Skip to content

maintain context after runs with accepted input measurements - #438

Merged
xandreeddev merged 2 commits into
mainfrom
compaction-after-run
Oct 31, 2026
Merged

xandreeddev merged 2 commits into
mainfrom
compaction-after-run

Conversation

@xandreeddev

Copy link
Copy Markdown
Owner

What

  • Run context maintenance after successful completed or partial loop returns, before the host chooses its final reply. Expose prepareRun and its once-only afterRun effect for manual compositions; keep stepRequestOf preparation-only.
  • Calibrate conservative message estimates from the accepted request’s actual model, input measurement and frozen reserves. Keep helper billing separate, remove obsolete step context at run end, and preserve original recorder failures and interrupted maintenance outcomes.
  • Advance window and summary decisions to version 2. Summaries default to summarizeAt: "turn-end"; "step" retains pre-request timing. Custom loops can forward optional accepted-input facts through StepRequest.record; existing two-argument callbacks remain assignable.
  • Restore the authentic 0.14.0 journal fixture and preserve newer replay evidence in an explicit development fixture. Prevent the journal recorder from overwriting release fixtures. Stored format 9 and model-facing wording remain unchanged.

Checks

  • Full key-free suite: 3,076 pass, four expected environment skips, zero failures; focused fixture and recorder checks also pass.
  • Frozen install, zero-baseline typecheck, foundry self-check and demo, package build and strict packed verification: pass.
  • Packed Node and Bun journeys verify after-run maintenance, manual composition, helper billing, request replay, retry/accounting, queued input and restart behavior.
  • Generated docs remain clean; website and internal links pass. Required Bun 1.3.6 proxy suites: 46 pass, two expected skips, zero failures.
  • Live provider probes were not run; all implementation and validation are key-free.

Run memory maintenance after successful loop returns, calibrating message estimates from the accepted request's actual model and frozen reserves. Default summaries to turn-end timing, retain step timing as an option, and bind maintenance to its own run without obsolete step context.

Expose composable prepareRun and a once-only afterRun effect while preserving preparation-only stepRequestOf and the public loop compact callback. Keep helper failures and interrupted outcomes precise, avoid repeated nonreducing summaries, and advance strategy decisions to version 2 without changing stored format 9 or prompt text.
Restore the 0.14.0 journal recording from its release tag and keep current-format replay coverage in an explicit unreleased fixture. Require a development flag for refreshes and publish release recordings exclusively, including when two recorders race.

Verify that the extra post-run snapshot is empty and uncorrelated with a step while dispatch and settlement retain their original incremental reads. Keep release evidence immutable and document the new recorder commands without changing package versions or model-facing text.
@xandreeddev
xandreeddev merged commit 5965163 into main Oct 31, 2026
1 check passed
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