Repository navigation
feat(server): persist exact Prism recovery history - #192
Conversation
|
What: Blocking finding: finalization still loads unbounded runtime-request historyTrigger: A long-lived child thread has accumulated resolved runtime requests and reaches delegated result finalization. Actual: RecoveryHooks.ts:54-61 requests Required: Keep finalization's pending-request check bounded so historical resolved requests are not read and decoded on every result transfer. The added 130-source oracle covers old runs and error items, not runtime-request history. Review recordRequirements and who asked: User-approved D35/D38 requires conclusive exact-source outcomes and bounded historical catch-up; the user requested an exact independent review of this candidate. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: unavailable · PR result: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
abe00b5 to
fc89e8c
Compare
|
What: PR192 fixes the remaining unbounded resolved-request hydration and publishes rebased successor Elon record: The fork-owned Serial batch, actual sampled1-minute loads before each execution: Commands use the existing direct Newbase Red98/6cb reviews and every failed/corrected check remain unwaived; fresh source review and CI requested. No browsers/devservers/install/pnpm/version/mainpush/merge. No live-provider claim. Initial183UIproof remains explicitly deferred to authorized planner;174 owns scheduler whole-completion transaction proof. Cost and final readiness will be recorded separately. |
Agent work on this PREstimated cost unknown · 0 responses · 50 sessions · 8.4 h wall time
Flags: 4 human corrections · 96 large tool outputs · 118 repeated commands · 11 repeated failures · 120 repeated reads · 17 repeated skill loads · 49 sessions with usage bound to no task · 1 session without usage records Details: snapshot, prices, coverage, counters
Token counters by model (native counter semantics; never added across semantics): Selected rates (USD per million tokens). These rates value the report at the selected schedule date; they do not establish historical prices or subscription spending.
Other output and reasoning are priced without double counting inclusive native output. Missing rates remain unknown. Local measurement from native records; usage totals are not billing. Updated in place by |
|
What: The shared recovery reader now limits finalization and reactor inputs to relevant runs and error items, plus at most one pending runtime request. Review resultThe prior finding is resolved on I inspected the The author’s retained red/green and focused proof is linked in the current handoff; I did not rerun tests, type checks, lint, CI, or browser/server proof. Earlier failure statuses on Elon recordRequirements and who asked: The user-approved D35/D38 outcome contract and the user’s request for an exact independent review. |
* feat(server): publish Prism per-run recovery outcome reader checkpoint * wip: publish D38 immutable decision and indexed continuation reader * fix(server): preserve admitted recovery sources and prove durable history * fix(server): bound Prism finalization history observation * fix(server): bound Prism pending request hydration
What: Persist exact Prism recovery decisions and admitted continuation sources for each failed run.
Why: A mutable per-thread recovery row loses history and cannot prove whether an older failure has a successor or whether an opted-out reset was later re-enabled.
So what: Exact-head independent review and cloud CI pass; root can merge, then #174 completes consumer integration proof against the merged reader.
Closes #169. Authorized separate follow-up to merged #183 under D35 and D38.
An admitted retry/reset run carries its immutable
forkPrismContinuationSourceRunId. A fork-owned table retains the exact source's conclusive decision without replacing it; the indexed run projection supplies the actual successor.RecoveryHistory.readRecoveryState(sourceRunId)reads{decision, admittedContinuations, pendingRecovery}through the caller's current SqlClient transaction. An earlieropted_outstays immutable while a newly enabled reset reports pending recovery before admission, then the exact admitted successor takes precedence. Each source admits at most one successor, enforced by the transaction guard and partial unique index; the declared array reader orders by ordinal and run ID.The existing generic EventSink commit-plan transaction admits the run/event and retried fact together, preserving receipt dedupe, rollback and accepted no-op semantics. The reactor processes bounded, fair batches of unresolved exact failed sources, including non-MCP/ineligible threads and older failures behind newer active/completed work. Automatic abandonment remains distinct from human report abandonment. This PR adds no scheduler/report logic, separate link registry, ID parsing or backfill.
Elon record:
Requirements and who asked: User/root D35/D38 requires immutable exact-source outcomes, bidirectional actual admissions, current pending reset and same-transaction consumer visibility.
Deleted: Conclusive overwrite and proposed separate continuation registry; unrelated scheduler logic, report registry, versioning, browser/dev-server work.
Bottleneck: Root-owned merge and174 consumer integration; current-head source review, local focused proof and cloud CI pass.
Checked myself: Read live predecessor diff and approved interfaces, verified remote head/base, identical rebase range-diff, actual failing-before/corrected output, source ownership and numstat.
Proof: current runtime-history correction, exact rebase and retained red/green, bounded-hook correction and retained red/green, current-base commands/results, retained earlier failures.
t3), contracts and webtsc --noEmiteach exited0. Scoped lint exited0 with one unchanged baselayerUnavailablewarning. Fork inventory passed with 20 features;git diff --checkpassed.(thread_id,status)index and pendingLIMIT 1; the same140-request oracle failed before this fix. Actual pending input still blocks automatic recovery.Exact candidate head
fc89e8c039ffb0bc01efa95a3613ad1ce76fd5eb, intended based1107646b522926e9e32d127aacf1b9fea1ae9fd. Exclusive branchfeat/169-prism-recovery-outcomes-v2. No merge commits or version bumps. Independent exact-head source review passes, reviewer lukemaj, GPT-6-Luna via Codex in T3 Code, no author-proof rerun.review/independent=successis verified on this SHA. All cloud CI checks pass or are workflow-conditional skips on run37851363963; no failure is accepted. The prior98 and6cb review failures remain unwaived. No merge performed.MODULAR upstream inventory, classified against upstream pin
12069eefd707f78eafc27812027c994eea0613cf, counts against the exact intended PR base:apps/server/src/orchestration-v2/Orchestrator.tsapps/server/src/orchestration-v2/ProjectionStore.tspackages/contracts/src/orchestrationV2.tsEvery upstream production hunk is under 15 lines. All behavior resides in fork modules. Existing upstream paths remain allowlisted;
prism-toolkitowns the six new history/policy/admission/projection files and their proof. Foundation, child-threads and issues-links ownership is retained.Tests are fork-owned, not upstream inventory:
RecoveryHistory.integration.test.tsadds757 lines because independent cases retain real EventSink/SQLite transactions, database connection reopens, serialized admission and reactor event drains.Recovery.integration.test.tsadds50 lines to existing actual Orchestrator cases for source/outcome/pending assertions. These cover the requested concurrency/restart contracts, with external providers mocked and no sleeps, live database access or generated fixtures.Limitations: not live-provider verified; no browser, dev server, desktop/mobile build, installation or deployment. No frontend changes here. Initial #183 settings images and integrated UI proof remain explicitly deferred by the user to the authorized planner pass. Website impact none. #174 final consumption remains blocked until this follow-up is reviewed and merged.
Implementation: GPT-6.1-Sol through Codex in visible T3 Code; independent review uses the separate visible T3 reviewer thread. Agent Observer cost publication succeeded. Measurement gap: estimated cost is unknown, 50 sessions include49 without bound usage and1 missing usage; zero attributed responses does not mean zero activity or spend. Evidence is incomplete at the recorded cutoff.