Repository navigation
feat(server): port durable child threads to v2 - #181
Conversation
|
What: Independent exact-head review found no blocking code issue in this #168 candidate. Read-only independent reviewer verdict, relayed unchanged: VerdictNo supported blocking code finding on exact head I inspected the exact-head artifacts without rerunning checks: 208 tests passed across 16 files with 2 opt-in skips, MCP integration passed 2 tests, and actual-source lineage proof passed 2 tests with zero skips. Its aggregate reports 761 threads, all 501 existing-parent child links repaired, and no orphan, dangling, cycle, or root mismatch; server typecheck and lint passed, with six lint warnings verified in the base, and the nine-feature inventory and fork check passed. The constructor audit found only Limits and follow-upA crash after dispatch commits but before The linked Issue proof comment still says the exact-head source run is underway and identifies the earlier Coordinator disposition: the proof-record follow-up is complete in the updated exact-head record. The earlier underway report is superseded. No source changed after review. Requirements and who asked: User required independent exact-head/current-base review of #168. |
Agent work on this PREstimated cost unknown · 0 responses · 41 sessions · 5.3 h wall time
Flags: 3 human corrections · 65 large tool outputs · 47 repeated commands · 9 repeated failures · 65 repeated reads · 5 repeated skill loads · 40 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 |
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. |
25ea84f to
948c007
Compare
|
What Independent exact-head review found no supported blocking code finding on e4e54d6. Reviewer findings follow unchanged: Verdict: no supported blocking finding on The production review carries forward from Adjacent behavior to track separately: IssueLinks.ts builds descendant traversal from rows where At the latest CI check, Build, Lint, Typecheck, and several test jobs passed, while Requirements and who asked The #168 task requires independent review of the exact final head and current base. |
|
What PR #181 now fixes the introduced rollback regression at b93bd69 against 2647478. Attribution and correctionCI Test Server 6 failed three unchanged runtimeLayer.test.ts rollback cases with ProjectionStore's provider-thread.updated handler also updates the app thread pointer. The #168 metadata wrapper now folds all planned self-thread events with the existing upstream applyToProjection reducer before adding retirement fields. It reads only thread records, using empty control arrays, and does not load history or change upstream rollback behavior. The existing rollback tests were not edited. The delayed ancestor Stop / explicit human child resume regression now asserts the resumed run's provider pointer alongside its retirement acknowledgment; before the fix it failed because that pointer was null. Commands and outcomesAll commands used Node 24.13.1,
The first uncommitted reducer attempt lacked control arrays and failed locally; no such attempt was committed or pushed. Filling the full typed empty projection resolved it before the passing proof above. Review and limitsThe previous e4 independent review remains valid only for that head. Its full findings are relayed unchanged, including unchanged #171 deleted-anchor Issue rollup behavior as adjacent scope. New head rereview is required. No retirement/query/commit-plan API changed. Post-commit preparation retains inherited cancellation recovery; supported-provider survival after accepted interrupt remains unverified, and no live provider was invoked. Parent will refresh the same Observer comment after this push. Requirements and who asked The user requires a ready #168 PR with passing focused proof, exact-head review, current base and no failed-check waiver; parent authorized this faithful in-scope repair. |
|
What Corrected PR #181 head b93bd69 passes refreshed serial actual-source lineage and stored-Issue carryover proofs. Against unchanged base 2647478, the following commands ran sequentially with Node24.13.1 and fork.md host-neutral environment:
Sanitized aggregate: 762 source threads, 502 subthreads, all 502 existing-parent links repaired; zero orphan, dangling, cycle or root-mismatch counts. Legacy transcript rows stayed at 41397; native rows were 1490 before hydration and 19148 after import, with ledger coverage762. Repeated import/repair adds zero events/messages. No IDs or message content published.
The complete correction/red-green and 302-test command evidence is recorded here. Scoped server typecheck passes; full changed-TypeScript scoped lint passes with six unchanged base warnings. The retirement/query/plan contract and map are unchanged by this correction. No live provider, browser, install, merge or userdata write. Requirements and who asked The user requires current-head actual-source VACUUM proof, focused checks, inventory and independent exact-head review. |
|
What Independent review found no supported blocking code finding on b93bd69 against 2647478. Full reviewer findings follow unchanged: Exact review verdictNo supported blocking finding remains on Correction auditedThe e4 regression was real: retirement metadata could overwrite a newly planned provider-thread pointer. The supplied red run reports 3 failures out of the 72 rollback cases, and the delayed Stop then human-resume assertion observed a null pointer. In b93, Proof inspectedThe supplied artifacts report 302 passes across 19 focused files with 3 opt-in skips, followed by 102 passes across 4 files. Server typecheck reports zero errors; changed-file lint reports one unchanged base warning. Both serial actual-source runs pass 2/2 with zero skips. The snapshot has 762 threads and 502 existing parent links repaired, with zero orphans, dangling links, cycles, or root mismatches; legacy message count remains 41,397 through hydration. Inventory and fork check pass with 13 features. The proof record is here; I inspected the referenced logs and counts without rerunning tests. Carried limitations and scope
CI is still pending per the latest update, so this review does not claim overall PR readiness. It clears no #169/#170 native blockers. I made no source, test, PR, Issue, or status changes. Requirements and who asked The #168 user requires independent exact-head/current-base review and no failed-check waiver. |
|
What PR #181 is ready for review into fork/v2 at exact head b93bd69. Exact delivery state
Current proofHost-neutral Node24.13.1 commands used unset ELECTRON_RUN_AS_NODE, TMPDIR=/private/tmp/, pnpm_config_verify_deps_before_run=error and excluded Homebrew paths. No dependency mutations accompanied final proof.
The CI rollback failure on e4 was an introduced #168 regression, not accepted as inherited: equivalent base source passed72/72 while candidate failed3; a new Stop/resume pointer invariant failed before correction. Canonical planned-event projection now preserves the upstream activeProviderThreadId and other thread metadata before retirement fields are appended. Existing rollback tests were unchanged, and current CI confirms the failed shard now passes. Decisions and limitsReviewed root A-D/D13-A/D14/D15/D21/D28 approvals govern this implementation. In-process typed fork plans remain bounded/data-only, provider starts are drained on subtree Stop, propagation preserves the original token, and only trusted explicit messages resume. The landed #171 registration-test primary-owner decision was followed without changing its entry; #170 SubagentProjection ownership transfer waits for an actual merge. No old aliases, spawn_thread, Prism/Spectrum/Wight/scheduler ports or second PR. Unchanged #171 deleted-anchor Issue rollup behavior remains adjacent, not a #168 blocking finding. Provider accepted-interrupt/native teardown survival remains unverified against live providers; no all-provider closure claim. Post-commit preparation keeps inherited cancellation recovery rather than automatic preparation resume. Missing-ancestor reads/repeated wake scans have unmeasured optional performance cost. No browser/mobile/live provider/dev server, merge, main push, install/deploy/version bump or live userdata write. Requirements and who asked The user and reviewed #166/root decisions require one ready native child-thread PR with focused and real-source proof, current base, exact-head independence and Observer publication. |
|
What The prior b93/264 readiness record is superseded because #170 merged into fork/v2 at a97591e. The root explicitly authorized rebase and confirmed D13-D transfer: child-threads primary for SubagentProjection.ts and the six shared MCP/Orchestrator/launch/contract paths, thread-people sharedFiles. Other landed entries remain unchanged, including issues-links primary ownership of worktree registration.test.ts. The routine registry conflict preserves both the landed thread-people backfill and child-lineage backfill in the same typed foundation registry; source patches otherwise remain equal by range-diff. No unapproved policy or source choice was introduced. The ownership integration proof now exercises a shared parent owned by a fixture person: same-project and cross-project native children inherit only the parent owner, clear coOwners, and leave the parent's owner/sharing intact. This uses #170's landed makeSubagentChildThread helper without a new owner API or source implementation. Requirements and who asked Root requires same PR181 rebased after actual #170 merge, approved ownership transfer, current-base proof and rereview. |
b93bd69 to
af30a62
Compare
|
What PR #181 is rebased at af30a62 onto #170 merge a97591e, with passing composed proof. Composition and ownershipAll fourteen #168 implementation commits remain equal by range-diff except the routine additive registry context and map context. The registry retains the landed thread-people entry with its typed payload-error mapping, followed by the child-lineage entry. No competing hook, source implementation or owner input was added. Root explicitly confirmed D13-D: child-threads primary and thread-people sharedFiles for SubagentProjection.ts, OrchestratorMcpService.ts, OrchestratorMcpToolkit.integration.test.ts, toolkits/thread/handlers.ts, Orchestrator.ts, ThreadLaunchService.ts and contracts/orchestrationV2.ts. Every other landed entry is unchanged; worktree registration.test.ts remains issues-links primary. JSON comparison verifies all unaffected entries identical and exactly seven paths transferred; 14-feature inventory has no duplicate primary owners. The existing cross-project integration case now uses real commands to create a Fixture Owner parent and share it with Fixture Collaborator. Both native destination and inherited-workspace children keep Fixture Owner and empty coOwners through #170's landed helper, while the parent's project/workspace, owner and sharing stay intact. This strengthens the actual launch seam, with no new mirrored test or ownership helper. Commands and resultsAll commands use Node24.13.1, unset ELECTRON_RUN_AS_NODE, TMPDIR=/private/tmp/, pnpm_config_verify_deps_before_run=error and omit Homebrew paths per fork.md. The exclusive workspace is clean; no dependency mutation or other checkout write.
Serial real-source proofEach following command uses CHROMERIA_V1_SNAPSHOT_SOURCE=/Users/lukaszmaj/.t3/userdata/state.sqlite and runs only after the preceding command completes; snapshots read-only VACUUM INTO, no live-state writes:
Only aggregate counts are retained publicly; no real thread IDs, owner names or message content. Review and limitsCurrent exact-head review was dispatched read-only and review/independent is pending. Older b93 success applies only to b93/264. The provider metadata rollback correction is unchanged and included in all72 passing runtime tests. D28 original-token/no-op guards, deleted/archived traversal and fork-plan constructor restrictions remain unchanged. No live provider/browser/mobile/server/merge/install/deploy/version bump. Live-provider teardown remains unverified; post-commit preparation retains inherited cancellation recovery. Adjacent #171 deleted-anchor rollup limitation is unchanged and separate. Missing-ancestor reads/repeated scans retain unmeasured optional performance cost. Consumer/native blocker disposition remains parent-owned. Requirements and who asked Root requires same PR181 rebase onto actual #170, D13-D ownership transfer, parent-preserving child inheritance, composed registry proof and current-head independent review. |
|
What Independent review found no supported blocking finding on af30a62 against a97591e. Full reviewer findings follow unchanged: VerdictNo supported blocking finding on PR #181 at exact head Source reviewThe rebased changes preserve the reviewed production behavior. The only production composition difference in the range-diff is the approved addition of child-lineage backfill to the landed thread-people registry; its typed error handling remains intact. The latest commit adds the #170 ownership test and map updates, with no production changes. The ownership test verifies children inherit the parent’s owner, start without co-owners, and leave the parent’s sharing unchanged in crossProject.test.ts. The feature map gives child-thread creation paths primary ownership under The approved Stop behavior remains intact: descendant Stops check the original ancestor token and resumed state at the child commit boundary. A stale Stop records an accepted no-op receipt and short-circuits later plans, events, outbox work, and cancellations in EventSink.ts. The production The direct RPC path validates the destination before dispatch, then prepares the committed delegated run through the normal launch service. The b93 provider-metadata reducer fix remains. Provider-idle updates require the interrupted run to own the current provider-thread ordinal, with no pending roster or surviving background work. Existing delegation tools and finalization remain; no alias or The shell-only lineage backfill repairs eligible missing links only when the parent exists, refuses cycles and dangling ancestry, and uses idempotent metadata events. Its registry composition and repair logic are in forkV1Backfills.ts and lineageBackfill.ts. Proof inspectedThe focused suite passed 312 tests across 22 files, with 4 ordinary-run skips. All three serial actual-source runs passed with zero skips: lineage 2/2, landed thread-people ownership 5/5, and Issues carryover 2/2. The lineage snapshot covered 762 threads, repaired all 502 existing child-parent links, and reported zero orphan, dangling, cyclic, or root-mismatched links. Legacy counts remained 41,517; native messages increased from 1,491 to 19,217 after hydration. MCP integration passed 2/2; server and contracts typechecks passed; changed-scope lint passed; fork inventory/check passed; and Carried limitations
Requirements and who asked The user requires full independent exact-head/current-base findings and success status after each final rebase. |
|
What PR #181 is ready into fork/v2 at af30a62. Exact head: af30a62. Exact reviewed base and live origin/fork/v2: a97591e. PR181 is OPEN, non-draft, merge state CLEAN, linked to this T3 thread; exclusive168-v2 workspace is clean and remote branch matches. Previous b93/264 readiness is superseded. No other checkout/index/files were altered. Proof and review
Decision trail and limitsReviewed A-D/D13-A/D14/D15/D21/D28 govern this port; the published transaction/interface record and current-base proof carry their exact dispositions. Root explicitly reconfirmed D13-D seven-path ownership transfer after #170 landed. Routine source conflicts were additive; no competing hook or owner API. The introduced retirement-metadata rollback regression was fixed at the #168 owner, reproduced failing-before and re-reviewed, with unchanged72 rollback tests now passing locally and in CI. No old aliases or spawn_thread, Prism/Spectrum/Wight/scheduler ports, and no second PR. Live-provider closure remains unverified; controlled adapters prove server lifecycle cancellation/draining, not every native provider process. Post-commit preparation retains inherited cancel/settle recovery without automatic preparation resume. Unchanged #171 deleted-anchor root Issue rollup behavior stays adjacent, outside #168; repeated wake scans/missing-ancestor lookup costs remain unmeasured. Separate native blockers stay parent-owned. No browser/mobile/dev server/live provider, merge/main push/install/deploy/version bump or live userdata write. Requirements and who asked The user/root requires one ready native child-thread PR with current base, composed owner/migration behavior, focused and real-source proof, exact-head independence and Observer publication. |
|
What PR #181 was merged by the parent at 6627c1a, and all authorized #168 transient resources are retired. Live disposition: PR181 MERGED at 2026-10-08T19:05:19Z; Issue168 CLOSED at19:05:27Z. Reviewed head af30a62; merge6627c1afe97378cd0c2e4528dec20e8177acd133 has an identical tree (git diff --quiet exit0). Pre-removal worktree status clean and git rev-list HEAD --not origin/feat/168-child-threads-v2 counted0: no dirty or unpushed work. Prior open/unmerged handoff is superseded by this verified parent merge. Exact resource enumeration and verification
No write to live userdata or main checkout, no shared-temp deletion, no install/deploy/version bump. The canonical full clone was used only for Git worktree/ref metadata and remote branch retirement; its checkout/index/files were preserved. Final current-base proof, full independent verdict, and Observer publication remain durable. Provider closure and adjacent #171 deleted-anchor rollup limitations remain as reviewed; cost estimate remains unknown with incomplete usage attribution. Requirements and who asked Root explicitly authorized terminal cleanup after verified PR181 merge: exclusive workspace, all owned actual snapshots, local/remote branches, small proof logs retained and stop. |
What: Port cross-project native children, descendant request handling and durable subtree Stop onto upstream V2.
Why: Upstream already owns lineage, task delegation and once-per-task results, but lacks these fork behaviors and imported child ancestry repair.
So what: PR #181 is ready at
af30a6297a912840b9e95dac7158a6272a57e79dagainsta97591eaca9ecb9979221a8f853dc69fff0126f2; composed proof, all CI, exact-head independent review and Observer publication pass. It remains unmerged.Closes #168. Part of #166; advances the Objective that Drafters start in any project. Based on current
fork/v2ata97591eaca9ecb9979221a8f853dc69fff0126f2, including merged foundation #178, Issues port #179 and people port #180. The PR diff contains only #168 changes.Retains upstream
delegate_task/task_status/task_cancel, environment-wide tools with the runtime mode ceiling, once-per-task completion wake and native lineage UI/mobile filtering. Adds optional project/workspace selection to both delegation paths through existing workspace preparation and access checks. Direct RPC and MCP validate existing worktrees against the destination project before creating children, then schedule the same idempotent preparation. Descendant approval/question notices dedupe accepted deliveries, retry rejected attempts and reconcile live after ancestor resume and after restart; responses remain descendant-only and preserve the child's mode.Stop/start admission checks commit with receipts and events through the approved typed fork plan seam. Root Stop cancels and drains native descendant effects, including real blocked provider starts; only explicit trusted human/parent messages acknowledge retirement. Delayed propagated Stops carry the original root token and become accepted receipt-only no-ops after resume or token replacement. Archived/deleted ancestry remains traversable without changing deletion or UI behavior. Imported
sub.*ancestry repairs only existing, acyclic parent links through #167's shell-only registry, idempotently without modifying transcripts. The feature map applies reviewed D13-D ownership, preserving all unaffected landed entries and one primary owner per path. Landed #170 supplies native parent-owner inheritance with empty child coOwners; cross-project integration proves parent owner/sharing stay intact. Both typed backfill registry entries compose.Previous reviews apply only to their exact heads. Current
af30a629review againsta97591ehas no supported blocking finding andreview/independentsuccess; prior b93/264 review and readiness are superseded by the #170 base move. Full unchanged findings. All current CI jobs pass or are conditionally workflow-skipped. Observer publication is current; estimated cost is unknown with incomplete usage coverage.Current composed proof on af30/a975:
VACUUM INTOsnapshot: 762 threads; all 502 existing-parentsub.*links repaired; zero dangling links, cycles or root mismatches; transcript counts unchanged and repeat execution adds zero messages/events.fork-check.sh --base 12069eefd707f78eafc27812027c994eea0613cfpasses with fourteen feature owners; diff check passes.The introduced CI rollback regression came from retirement metadata overwriting the active provider pointer set by an earlier provider-thread event in the same command. The correction uses the existing canonical projector to preserve planned thread state before adding retirement fields. Base rollback tests passed 72/72, candidate failed three, and a strengthened Stop/resume pointer assertion failed before this repair. Correction and proof.
Current #170 composition, 312-test commands and all three serial actual-source results are retained in the current-base proof.
Full commands, red/green production lifecycle, listener and intake evidence, new-base rollup composition, migration counts and decisions are retained in the #168 proof record. The generic transaction contract and reviewed D28 decisions are in the interface record. Upstream #13343 was fully inspected as a candidate; this adapts its serialized cancellation pattern without a merge dependency. Root A-D/D13-A/D14/D15/D21/D28 decisions supersede assessment suggestions; there are no old aliases or spawn_thread/Prism/Spectrum/Wight/scheduler ports.
Limitations: no browser, mobile, dev-server or live-provider execution was authorized. Provider lifecycle tests use actual server start/worker services with an adapter boundary controlled by Deferreds. Unchanged upstream accepted-interrupt settlement (
settleInterruptedRun) and Claude's ten-second query-close timeout retain an unconfirmed background-work survival risk; no supported real-provider survival was demonstrated, and this PR does not claim all provider closure paths verified. Extra missing-ancestor reads and rescans on subsequent acknowledged-thread metadata are unmeasured optional performance concerns. No app installation, deployment, merge, main push, version bump or live userdata write.Requirements and who asked: User #168 acceptance and reviewed #166/root decisions require native cross-project children, descendant requests, durable explicit-only retirement and existing-parent lineage repair.
Deleted: Fork aliases and duplicate delegation/UI/filtering/resume implementations; Prism, Spectrum, Wight and scheduler behaviors remain with their owners.
Bottleneck: Required current-base proof, CI, exact-head review and Observer publication are complete; integration remains parent-owned.
Checked myself: Verified merged base/live branch and #168-only range-diff, all foundation inventory entries unchanged, actual-service failing-before/green lifecycle cases, focused outputs and sanitized real snapshot counts.
Implemented with GPT-6.1-Sol through Codex in T3 Code; independent review routed by Prism to GPT-6-Luna through Codex.