Skip to content

preserve context and personal memory across compaction - #431

Merged
deathbyknowledge merged 12 commits into
mainfrom
feat/context-continuity
Oct 13, 2026
Merged

deathbyknowledge merged 12 commits into
mainfrom
feat/context-continuity

Conversation

@deathbyknowledge

@deathbyknowledge deathbyknowledge commented Oct 13, 2026 •

Copy link
Copy Markdown
Owner

Summary

Compaction previously summarized only the head and tail of long histories, could not reclaim completed steps during a long worker run, and presented internal summaries as Memory in Chat.

  • Let an active process submit proc compact --summary. Install it after its current tools finish, preserving the current request, unseen results and recent complete exchanges. Self-authored and automatic compaction share the configured retention target: 40% of the usable input budget by default, including standing instructions, tools, handover and original messages. Cancellation and epoch changes fence stale requests.
  • Summarize the entire selected transcript in bounded, model-budgeted passes when the model does not hand over itself.
  • Queue new archived Ship slices through ordinary low-priority responsibilities, serialized per owner and durable across Ship replacement. Crew merges useful facts into standing context and the wiki with revision-checked writes. proc history --archive streams readable archives page by page even after the source Process is gone. The existing responsibility-source setting can disable new reviews.
  • Keep internal compaction notes out of Chat. Working handovers, personal memory and responsibilities remain separate. Memory-change notifications are deferred.

No new service, account role or model-facing tool. Existing user-edited prompts remain unchanged.

Validation

  • Gateway CI: 2,723 unit tests passed. Both continuity integration tests pass, including two handovers in an active run with recent originals retained, and Crew reading an archive after Process deletion.
  • Archive coverage includes reads beyond 128 MiB expanded size, ID/generation filtering, corruption, cancellation and filesystem authorization. There is no shell-wide output-limit change.
  • Gateway/integration typechecks, changed-file lint, docs checks and prompt-editor tests pass. The full gateway integration suite also passes: 99 tests across 26 files.
  • Earlier full validation passed: SDK 139 tests, web 1,018 tests, gateway integration 97 tests, plus frontend build and protocol checks.
  • Synthetic local real-model evaluation exercised repeated Ship handovers, automatic fallback and recall through the real Worker runtime using the actual Modal model. Managed billing and admission were not exercised in that local run. Canonical Ship runs retained all 11 probed facts. The warning-compliance probe was confounded by a user instruction forbidding tools; it is not evidence of reliable warning compliance. Memory-review model execution and the final retention policy will be exercised in staging.

Rollout

Deploy existing main to staging and production first. Merge this only after review and CI pass, then deploy the compaction change to staging only for further real-model testing. No customer contents are used for evaluation.

Pre-existing maintainer comments in history/compaction-renderer.ts and zenModel.ts describe superseded behavior and remain unchanged under the comment-preservation rule.

Docs

docs/ is updated here. Companion GSV Manual PR: deathbyknowledge/gsv-manual#37; the exact reviewed revision f1aefe7 is pinned here; merge the companion before this runtime PR.

@deathbyknowledge

Copy link
Copy Markdown
Owner Author

@codex review Please focus on active-run ownership and tool/result grouping when installing handovers; cancellation, restart and repeated compaction; complete emergency-summary coverage within model budgets; and memory-review admission durability, deduplication, owner isolation and opt-out. Provider calls in the tests are mocked, so live model quality is still a separate draft-PR validation step.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T15:01:09.766627Z 5eb4231 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-431 October 13, 2026 12:17 Destroyed
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Preview removed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 433a7f98b3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread workers/gateway/src/process/memory-review.ts
@deathbyknowledge

Copy link
Copy Markdown
Owner Author

@codex review The teardown finding is fixed in f8b6d04 with an ordered Kernel-owned source queue and mandatory pre-teardown handoff. Please recheck that lifecycle and the original compaction boundaries. Also added a real Shell/Gateway test for repeated active-run handovers and fixed the prompt-editor catalog check.

@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-431 October 13, 2026 12:31 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f8b6d04be9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread workers/gateway/src/process/controller/runtime.ts
@deathbyknowledge

Copy link
Copy Markdown
Owner Author

@codex review Please re-review the latest head, especially the pending memory-review lifecycle across Ship replacement and Crew reading archived slices after the source pid is killed. The last finding is fixed with the existing native filesystem/gzip path plus a Workers-compatible shell output limit, covered by a real gateway integration regression. Provider responses in automated tests remain mocked; real-model quality validation is still pending.

@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-431 October 13, 2026 12:53 Destroyed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9e4fba58bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread workers/gateway/src/drivers/native/shell.ts Outdated
@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-431 October 13, 2026 13:04 Destroyed
@deathbyknowledge

Copy link
Copy Markdown
Owner Author

@codex review Please review 7bd4b1d and 5e2209c: self-authored handovers now use the shared 40% retention policy, and archive reads stream through proc history --archive instead of a bounded gzip shell pipeline. In particular check the current-run/epoch fence, retention of recent complete tool groups, archive authorization and cancellation, and pagination. All 2,722 gateway unit tests and both continuity integration tests pass. The baseline deployment is separate; this change will initially go to staging only.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: 5e2209c6e5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-431 October 13, 2026 14:42 Destroyed
@deathbyknowledge
deathbyknowledge marked this pull request as ready for review October 13, 2026 14:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0ad3727fae

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/gsv/src/protocol/syscalls/responsibility.ts
@deathbyknowledge

Copy link
Copy Markdown
Owner Author

@codex review Please review 5eb4231, which fixes the memory.review source control finding using the existing policy registry and covers disable/re-enable plus required-source rejection.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 5eb4231e80

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@github-actions
github-actions Bot temporarily deployed to gsv-preview-pr-431 October 13, 2026 15:01 Destroyed
@deathbyknowledge
deathbyknowledge merged commit 107f2ca into main Oct 13, 2026
24 checks passed

This branch was successfully deployed

No deployments
gsv-preview-pr-431 — 5eb4231e Deployed Oct 13, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant