Repository navigation
fix(runtime)!: recover durable summaries within caller limits - #296
Conversation
… when spent AC3 (ADR-0048 § 2). The in-run compaction summarizer was a single-shot provider turn: one 529 failed the whole prompt run with a /compact diagnosis. It now runs under the same TurnRecoveryPolicy and MAX_TURN_RETRIES allowance as a model turn. A transient fault settles that compaction run failed and the loop re-issues the step after the backoff, emitting TurnRetrying. When the allowance is spent the run settles paused with every earlier turn durable. Rejected summaries still fail closed. Refs: ENG-1029
…d rejection AC3 review follow-up. A compaction step that finishes while its prompt run still holds the session no longer pings, counts as unread, raises an error notice or clears live tool state in the client. Adds tests for a cancel during the summarizer backoff and for a non-transient summarizer error failing closed, and asserts the scripted faults were served. Refs: ENG-1029
AC3 re-review: assert approvals survive a compaction step's finish and the prompt run's own pause still notifies and clears live state; cover a queued prompt cancelled behind the active run; document the summarizer retry in the protocol guide. Refs: ENG-1029
AC3/ENG-1029 qualification: a caller with 500k tokens completes despite 600001 reported summary tokens. This public-API fixture fails behaviorally on the adopted retry source before the accounting repair.
AC3 first accounting repair: durable internal compaction spend also consumes the prompt caller limit without duplicating session accounting. Stop before another provider work request when that allowance is exhausted. Retry/subturn durability and qualification remain in flight.
AC3: admit each provider send from the remaining allowance, persist each completed summarizer turn before continuation, and preserve known receipts with unknown aggregate state across faults and cancellation. Caller and internal-store accounting retain separate ownership. Session-total and child-rollup qualification remains in flight.
Token/cost and unknown-usage subrequest cases pass; priced receipt test reproduces the omitted internal-compaction cost in the session total before the settlement repair.
AC3: retain exact-once accounting independently of prompt active-slot ownership.
AC3: a second child must inherit the remainder after the first child and its internal summarizers.
AC3: preserve exact ownership and fail-closed accounting without counting internal attempts as descendants.
AC3: reserve schema45 after a red full-history-scan regression; preserve independent unknown accounting.
AC3: migrate schema44 to45 atomically, validate index shape and preserve historical accounting.
AC3: qualify cancellation/deadline durable prefixes and reproduce post-settlement turn writes.
AC3: guard internal turn persistence in its worker job; document measured-prefix accounting and caller bounds.
AC3: two process kills preserve measured prefixes and unknown totals without provider or tool replay.
AC3: prove output-lane persistence precedes cancellation settlement and cost is charged once.
AC3: measured summary replay is scoped; prompt-first terminal recovery must notify only once.
AC3: notify once in either recovery order, including snapshot reconnection. BREAKING CHANGE: RunStats adds owned_step. Explicit external struct literals must initialize it; Default-based construction and wire formats are unchanged.
AC3: preserve provider inputs across retries and original duration through backoff; distinguish lifecycle outcomes in design.
AC3: model schema16 before testing its exact auto-compaction ownership backfill.
Separate successful workspace and 2000-turn bounds proof from pending performance and live gates.
|
@codex review Latest head5dd3a15c fixes both new findings, plus the independently reproduced cold-eviction variant. Full workspace2,289 passed/0 failed/14 ignored, fmt/Clippy/build green. Please review the latest source. Performance description is corrected: prior recordings used materially different included fixtures; comparable replacement measurement remains pending in #297. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5dd3a15c3b
ℹ️ 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".
|
@codex review Head eff40ce fixes the new delayed-receipt/eviction finding. The regression preserves drafts/focus and requests one missing terminal receipt only for a body made warm by replay. Serial workspace2,289 tests pass with all original timeouts, fmt/all-target/all-feature Clippy/build green; independent review approved. Please review the latest head. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: eff40ce15a
ℹ️ 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".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 61b75bcc4b
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Merge main7de994b1 and preserve AC17, delegated holds, Herdr and AC3 receipt behavior. Test-first owned_compaction_index_upgrades_preserves_rows_and_reopens reproduces main45 failure; separate45→46 index migration preserves existing data and supports repeated reopen. Migration55, client38 and TUI363+6 pass; independent source review approved. Full workspace qualification follows before push.
|
@codex review Please review current head e8c52db against main7de994b1, focusing on concrete regressions introduced by this PR, especially preservation of main’s schema45 delegated holds and AC3’s separate schema46 migration. Previous resolved decisions are settled unless new reproduction evidence shows a remaining defect. Workspace2309 tests, formatting, Clippy and build pass; exact evidence and open performance gates are in the updated description. Please provide the final review outcome for this head, with the opening-description 👍 if approved. |
|
Codex Review: Didn't find any major issues. More of your lovely PRs please. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Transient in-run summary failures previously failed the whole prompt. AC3 retries them under the existing recovery policy, preserves durable work, and pauses when recovery is exhausted. Summary attempts retain measured spend and enforce the caller’s remaining allowance.
Spec: autonomous-core AC3 · ENG-1029
Behavior
Current-main integration
AC17 PR294 is merged on main
7de994b1. This head integrates that main, preserving schema45’sapproval_delegatedvalues and adding the validated owner index at schema46. Upgrade44/45, reopen, malformed-index refusal and rollback are covered. Older binaries reject upgraded stores. Protocol32 and descriptor13 remain unchanged.Verification
Qualified source
12d2f0bf, with evidence recorded ate8c52db1:-D warnings, and workspace build pass.Commands use
env -u NO_COLOR; inheritedNO_COLOR=1conflicts with existing ANSI-expecting tests. No user configuration or test timeout was changed. Failed diagnostic logs are preserved.Performance and remaining gates
Recorder PR297 supplies a common immutable benchmark fixture. Hosted diagnostic run38512527872 completed120 runs/360 rows against earlier sources; this does not qualify this newer integration’s latency. Final-head before/after measurement, quiet tails, H0 and whole-plan gates remain open without waivers.
Fresh idle bootstrap without retained foreground identity remains unidentifiable until run-body data loads. Rust consumers using explicit
RunStats/SessionViewliterals must initialize the added fields. Architecture, protocol migration history, transcript design, guide and ledger are updated.The opening Codex 👍 at
10f87482applies to that earlier head. Request fresh review of this current integration. Remaining autonomous-core goal/guard/continuation/retention/hosting and paid evidence belong to their tracked slices; this PR does not claim the entire plan finished.