Skip to content

Hand rebase onto v0.1.11-nightly.20261117.4851: candidate branch for review #458

Closed as not planned

Description

@scuttletoby

The fork's patch series was rebased by hand onto upstream's nightly v0.1.11-nightly.20261117.4851. The result is on the branch fork/rebase-candidate-20261117 (head 730f609d69c60d853393a995ddf09e4a9a592c71), for review. main is unchanged.

The full report (conflicts, tests, range-diff, state questions) is in the first comment.

Activity

  1. scuttletoby commented on Nov 18, 2026

    @scuttletoby
    OwnerAuthor

    Hand rebase onto v0.1.11-nightly.20261117.4851: report

    Candidate: branch fork/rebase-candidate-20261117, head 730f609d69c60d853393a995ddf09e4a9a592c71.
    Old series: main at f398e05b185be139636b073503211c840fba0fd1, on v0.1.10-nightly.20261114.4682 (the base comes from fork release v0.1.10-nightly.20261114.4682.fork.1, found the same way fork-follow's plan finds it).
    New base: v0.1.11-nightly.20261117.4851 (b387e3a179), upstream's newest nightly; that range has 945 upstream commits.

    Nothing else was changed. main was not moved and no tag or release was made. fork-follow was not started, enabled or disabled; it is still disabled_manually. No pull request was opened.

    Why fork-follow is disabled

    The workflow was disabled at 2026-11-14 12:31:55 UTC. That was about 6 minutes after its first successful run (43592875081) published v0.1.10-nightly.20261114.4682.fork.1 and closed #67. No issue, PR comment or orchestrator note records who disabled it or why, so it was probably done by hand. It has not run since. That is why upstream got 945 commits ahead and this sync had to be done by hand.

    Result in short

    • All 209 patches of the old series are in the candidate. None were dropped and there are no merge commits. Two new commits sit on top: the seam counts, and the CI follow-up.
    • 6 patches had conflicts (table below). 2 of them are fork-deleted workflows, which stay deleted.
    • Upstream's updater (upstream PRs 17585/17586) is not in this nightly, so the runbook's "sync that brings upstream's updater" special case does not apply.
    • fork-follow.sh's plan, run locally on the candidate, says action=release, base_tag=v0.1.11-nightly.20261117.4851, candidate=730f609d69, with no new workflows. Once main points at this candidate, fork-follow would release it.

    Conflicts and choices

    # Patch File Upstream's change Fork's change Choice and why
    1 #14 delete outside-started workflows .github/workflows/mobile-eas-preview-fork.yml edited the file deletes it (listed in fork-removed-workflows.txt) Deleted. Fork-removed workflows stay removed.
    2 #17 file links: remote, full size, download apps/web/src/components/chat/MarkdownFileLink.logic.ts pingdotgg#37064 (PDF links open in the file viewer) removed shouldOpenMarkdownFileLinkInBrowserByDefault and iconPath rewrote the imports for remote editor URLs Kept the fork's imports minus the removed helper. The body already follows upstream's simpler rule.
    2 #17 .../chat/MarkdownFileLink.logic.test.ts added (add/add) a PDF primary-action test added menu and remote-editor-URL tests The file is now exactly upstream's. The fork's tests moved, unchanged, into the new fork file apps/web/src/components/chat/forkMarkdownFileLinkMenu.test.ts. The seam check refuses fork lines in a file upstream adds.
    2 #17 .../chat/MarkdownFileLink.tsx pingdotgg#37768 (drag file pills to the desktop: resolveDragPath, FolderIcon) and pingdotgg#37067 (app icon placeholder) long press, onOpenFullSize, onDownload Both. Dragging uses draggable/onDragStart and long press uses pointer events, so the handlers do not overlap.
    2 #17 apps/web/src/components/ChatMarkdown.permissions.browser.test.tsx passes resolveDragPath resolveCopyPaths gains pathOnly Both.
    3 #5 auto-update hold apps/server/src/orchestration-v2/ProviderRuntimeRecoveryService.ts pingdotgg#32413: a run marked running that its provider never accepted is rewound to unstarted; unattended (MCP or scheduled) ones are re-sent at startup (at most 3 times) runs held by the update gate are kept aside and started after the update commits Both, plus two guards so the paths never overlap. (a) A run held for the update is never re-sent; otherwise it would start before the update commits and again after. (b) A run that recovery rewound is never held: it takes upstream's path, which resets its attempt. The seam ceiling for this file goes 152 → 164 (see "Seams"). This interaction is new code: it needs a review lens before release.
    3 #5 apps/server/src/orchestration-v2/ThreadLaunchService.ts pingdotgg#36821 adds isNonGitProject to the service registers the work gate and the preparation resumer Both.
    4 delete issue-vouch.yml (auto) .github/workflows/issue-vouch.yml edited the file deletes it (listed) Deleted, the same way fork-follow does it automatically.
    5 #171 fork default pin apps/server/src/serverSettings.ts (fallback for an unreadable settings file) pingdotgg#28111 adds usageHistoryRetentionDays: "unlimited" automaticUpdates: false with its Fork: comment Both. The fork's default and comment are kept, and upstream's line is added.
    6 #227 MCP profiles 1 apps/server/src/serverSettings.ts pingdotgg#38037 wraps the update in withoutRedirectedSimlockTokens(...) (secrets reach only their saved destination) the save-check seam line after it Upstream's new expression, then the fork's ForkSettingsWrite.check seam line, unchanged.

    No fork setting default took upstream's value, and every Fork: comment in the conflicts was kept.

    Upstream workflow files changed in the range

    No upstream workflow file is new. These six changed:

    • issue-vouch.yml and mobile-eas-preview-fork.yml: fork-deleted. They stay deleted (conflicts 1 and 4).
    • ci.yml, mobile-eas-preview.yml, mobile-eas-production.yml, mobile-fingerprint-check.yml: upstream's own changes are taken as they are. These files stay disabled on GitHub as before.

    From ci.yml, the fork's test workflow must follow three changes. The new commit "fork tests: follow upstream's CI after the rebase…" ports all three:

    • The Lint job's "Check generated Linear GraphQL operations" step is added to fork-tests.yml.
    • The Lint job's "Check i18n catalogs" step is added to fork-tests.yml.
    • "Test release checks" now also runs upstream's new .github/scripts/mobile-ios-preview-record.test.cjs (fix(ci): build iOS previews on Blacksmith with one mobile comment pingdotgg/t3code#37568), and .github/fork-ci-tests.txt lists it.
    • fork-tests-drift.cjs --record updated .github/fork-tests-upstream.json.

    Seams

    The new commit "fork seams: counts after the rebase…" updates .github/fork-seams.json:

    • pending for ProviderRuntimeRecoveryService.ts goes from 152 to 164. Those 12 lines are the two guards from conflict 3; they are fork lines in an upstream file.
    • pending for ProviderRuntimeRecoveryService.test.ts goes from 435 to 434.
    • lost counts go down for serverSettings.ts (lines 10→9, gone 8→7) and MarkdownFileLink.logic.ts (lines 22→20, gone 20→18). Upstream removed the code that those notes were about.

    Raising a ceiling is a decision for review. The alternative is to move the guards into a fork file, which needs a new seam call in an upstream file.

    Checks (all on the final head 730f609d69)

    Check Result
    fork-seam-check.cjs --from-upstream <tag> HEAD pass
    fork-seam-check.cjs --from-upstream --after-rebase <tag> HEAD pass ("only the pinned seams")
    Schema check (fork-schema-check.cjs <tag> HEAD) pass: "No database schema changes (501 changed files checked)"
    fork-tests-drift.cjs pass after the follow-up commit
    Runbook pin tests (the 8 files in step 3) 184/184 pass
    Tests of the conflicted files: ProviderRuntimeRecoveryService (+ regression), ThreadLaunchService, workAdmission (+ startPaths), serverSettings (server and shared), MarkdownFileLink.logic, forkMarkdownFileLinkMenu 276/276 pass
    Browser tests ChatMarkdown.browser and ChatMarkdown.permissions.browser 54/54 pass
    Typecheck (effect-tsgo): server, web, shared, contracts 0 errors
    Fork script tests (fork-ci-tests.cjs, all three groups as in fork-tests.yml) and fork-owned-reads.test.py pass. See the note below.
    Fork secret scan (ran on the push) pass

    Note: fork-fleet-desk-seed.test.py, test a_same_size_rewrite_with_its_old_date_put_back_is_exit_4, failed in 2 of 5 runs (it passes most of the time). The file is identical on main, and the test depends on file ctime changing within a very short time, so the flake comes from main, not from this rebase. It should get its own issue.

    Not run: the root/sudo test steps in fork-tests.yml, and a full build (fork-follow's plan does not need one). There is also no test yet for the new hold/resend interaction (conflict 3).

    Range-diff (git range-diff v0.1.10-nightly.20261114.4682..main v0.1.11-nightly.20261117.4851..candidate)

    209 patches are matched one to one: 195 are identical and 14 changed. 2 commits are new and none were dropped.

    Changed because of the conflicts above:

    • fork: delete four outside-started upstream workflows and keep them deleted (#14): the deleted file had upstream edits.
    • feat(web): file links open remotely, full size, download from their menu (#17): conflict 2. Its tests also moved to forkMarkdownFileLinkMenu.test.ts.
    • Auto-update (server): background service updates itself when quiet (#5): conflict 3, including the two guards.
    • fork: delete upstream's issue-vouch.yml and keep it deleted: conflict 4.
    • Fork default pin: one row per fork setting, #51 fix, #44 test, sync runbook (#171): conflict 5.
    • MCP profiles 1: settings and the profile resolver (nothing calls it yet) (#227): conflict 6.

    Changed only in context lines, where the upstream code next to the fork's lines changed and the fork's own lines are the same:

    • feat(usage): usage pacing gate on delegate_task (pacing part 4) (#73): upstream changed DEFAULT_WAIT_TIMEOUT_MS from 10 minutes to 30 s ("return recoverable handles before common MCP client timeouts expire").
    • feat(waits): contracts and pure functions for wait_for and agent slots (off, not wired) (#84): an upstream import gained containsSecretReference.
    • feat(slots): agent slot gate on delegate_task (off by default) (#89): the same timeout context.
    • feat(waits): agent tools to register, list and cancel waits (part 4, off by default) (#103): an upstream import changed (MCP_HTTP_PATH).
    • fork: delegate checks behind one fork module (SEAM) (#174): the timeout context, an import line, and one closing-paren line that is now context instead of fork.
    • fork settings: fork keys live in forkSettings.ts (FS0) (#185): the containsSecretReference import.
    • feat(playtest): session store and service (claim, rounds, release) (#261): processRunner.ts context (upstream's onSpawn option).
    • fork seams: green from upstream on main; a PR's own list is format-checked (#385) (#426): import context in runtimeLayer.test.ts and ChatMarkdown.tsx.

    New:

    • fork seams: counts after the rebase onto v0.1.11-nightly.20261117.4851
    • fork tests: follow upstream's CI after the rebase onto v0.1.11-nightly.20261117.4851

    State questions

    • A second rebase from this candidate: it works. The candidate's history contains no fork release tag, so the plan takes the newest upstream nightly in its history (4851) as the base; the local plan run confirmed it. A later rebase onto a newer nightly starts from 4851 with these 211 patches. The resolutions above are now in the patches, so they will not conflict again unless upstream touches the same lines.
    • A run stopped half-way: nothing shared is left behind. All rebase work was in a private local clone, which has been removed. The only remote change is the new branch fork/rebase-candidate-20261117, which nothing deploys or releases from. If it is abandoned, deleting that branch undoes everything.
    • The series branch moving while I worked: it did. main was 6697fec95a at the start and became f398e05b18, a fast-forward by 3 fork-only commits (fix(golive): rehearse never clones a link out of its tree, nor lands where a live userdata link leads (#441) #451, weakened-tests: refused test built a new head per run (#452) #455, fork-ci: HEAD attributes ignored in the queue cache; local git calls drop GIT_EXEC_PATH (#447 follow-ups) #453 under fork-ci/ and fork-kit/). I replayed those 3 commits into the candidate, in series order, before the two new commits. The candidate's change compared to before the replay is exactly main's change (byte-identical diff). All checks above were re-run on the final head. At the end, main was still f398e05b18.
    • Old fork releases and tags: untouched. Nothing was tagged, released, deleted or moved. v0.1.10-nightly.20261114.4682.fork.1 still points to the old series commit.

    To go live (owner or orchestrator, after review)

    1. Review the hold/resend interaction (conflict 3) and the seam ceiling raise. Two independent reviewers, since this is on the update path.
    2. Move main to the candidate head. The runbook says --force-with-lease on main; the lease should expect f398e05b18, or the candidate must be redone if main moved again.
    3. Decide whether to re-enable fork-follow, then start it once. Its plan will say release.
  2. scuttletoby commented on Nov 18, 2026

    @scuttletoby
    OwnerAuthor

    lens: rebase-runtime verdict: NOT SAFE (head 730f609)
    read at: 730f609 (branch head unchanged during the review)

    Scope: runtime and state for conflicts 2, 3, 5, 6 of the report (MarkdownFileLink handlers, ProviderRuntimeRecoveryService hold vs upstream restart resend and its two new guards, ThreadLaunchService, serverSettings fallback + secret-safe update + save-check seam). Read-only: nothing pushed, no branch, tag, release or workflow touched.

    In short: the merged behaviour is right. Both sides are kept, and throwaway tests show the two new guards do what the report says. But the candidate fails the fork's CI Lint job (vp check) in exactly the new guard code. The straightforward fix then fails the seam check. So main must not move to this head. Conflict 3 needs a re-resolution, and the guard tests should be committed with it.

    Findings

    1. blocker: vp check (fork-tests.yml Lint, line 596) fails on the candidate. A repo-wide run found only this file:

    • apps/server/src/orchestration-v2/ProviderRuntimeRecoveryService.ts:438: lint error t3code(no-low-value-comments) ("Cut this to 4 lines or fewer"). The merge appended the 2-line Fork: note to upstream-side hold comment, making a 6-line block.
    • The same file is not formatted. vp fmt rewraps rewound (:445-448, one 106-char line) and re-indents the unattendedRuns filter (:487-499, guard (a) was added without reformatting).

    Effect: pushing this to main turns fork-tests red. A fork-follow release would fail at fork-release.yml's tests job (assemble needs it) after the desktop builds were started. No bad release would be published, but the run is wasted and main stays red. The report's checks ran typecheck only, not vp check.

    2. blocker (follows from 1): the obvious fix fails the seam check. I tested this locally only, with a --no-verify commit that was never pushed. I moved the Fork: note next to rewound and ran vp fmt. vp check then passes, but fork-seam-check.cjs --from-upstream v0.1.11-nightly.20261117.4851 HEAD fails:

    • 14 upstream lines are re-indented (the formatter re-wraps upstream's queuedMessages.some(...) block). The "lost" limit is 5.
    • 6 upstream lines are gone. The limit is 5.
    • pending reaches 168 fork lines, over the ceiling of 164.

    A re-resolution that leaves upstream's lines untouched would avoid this. For example:

    • filter the held runs out once, before upstream's expression (unstartedRuns.filter((run) => !heldForUpdateIds.has(run.id)) as its input), and keep rewound under 100 columns;
    • or move both guards into a fork file, which needs one new seam call.

    Either way the seam numbers must be recorded again. Any ceiling raise is an owner decision.

    3. major: the two new guards have no committed tests, and the existing hold tests cannot reach upstream's resend. In ProviderRuntimeRecoveryService.test.ts, threadFor builds threads as { id } (:1736). restartContinuationBlocked reads thread.archivedAt !== null, which is true for undefined, so every upstream resend counts as blocked. As a result, "starts a held scheduled run / t3_thread_send once the update is committed, not before" stays green when guard (a) is deleted (mutation M1 below). For the same reason, "keeps the upstream restart behaviour with marker %s" (:2102) asserts that a t3_thread_send is cancelled. On a live thread, upstream re-sends it instead (probe c). The test name overstates what it checks. The probe tests below fix this with a live thread and an outbox listByCommandId mock. Commit them with the re-resolution.

    4. minor: the fallback line automaticUpdates: false in apps/server/src/serverSettings.ts:838 is untested. If you delete it, every test in serverSettings.test.ts (76) and serverSettings.forkDefaults.test.ts (6) stays green. It only matters when an admin policy defaults automatic updates on and the settings file cannot be read. That case has no test. The gap dates from #171 and is not caused by this rebase; the line itself was carried over correctly.

    5. nit: rewound (:445) could be before !== run. rewindUnacceptedRuns returns the same objects for runs it does not change. That form would also fit the line limit.

    Runtime and state answers (conflict 3)

    • Can a held run be sent or started twice? No. Guard (a) at :489 keeps a held run out of upstream's restart resend. Without it, a held scheduled run or t3_thread_send on a live thread gets a resend effect at startup (it waits at the held outbox gate), and startHeldWork starts it as well, so it starts twice after commit. Probes a and a2 show this, and both fail without the guard. With the guard: no start before commit, one start after it, also across two startups before commit and two startHeldWork calls.
    • Can a rewound run be held forever? No. Guard (b) at :451 sends it down upstream's path: a user message goes to the visible held queue, and a scheduled or MCP run is re-sent once with run.updated set back to starting / startedAt: null. It is never written to the marker, so startHeldWork never starts it. Without guard (b), the run is held while the database still says running with a running attempt, and the attempt reset is never written (probes b and b2 fail). That would leave a stuck run. A rewound run that the marker lists, after a crash during its held start, gets exactly one upstream resend (probe b3).
    • Server restart in the middle of an update: the resend and held starts wait at the gate, which admits effect claims only after commit (EffectWorker.ts, admission.admit). Recovery never claims effects itself: runRecoveryOnce is unused. If the update fails, the restored database has no resend effect. The old release has no rewind code, so it cancels a running run that was never accepted, as before. No double start.
    • Settings or marker from the old fork release: workAdmission.ts and autoUpdate.ts are byte-identical to main, so the marker format is unchanged. The settings fallback keeps the fork's automaticUpdates: false and upstream's usageHistoryRetentionDays: "unlimited".
    • Conflict 5/6 (serverSettings.ts:1233-1237): the save check now sees upstream's withoutRedirectedSimlockTokens(...) output. It reads only fork keys and the playtest program, so the order does not matter. Both sides are kept (M7, M8, M9 go red).
    • ThreadLaunchService: upstream's isNonGitProject is kept. A preparation interrupted while waiting at the held gate is not failed (M10), and the preparation resumer is registered (M11).
    • Conflict 2 (MarkdownFileLink): upstream's nativeDrag (draggable/onDragStart) and the fork's long press (pointer events, touch only) use different handlers. Neither replaces the other, and a drag that starts fires pointercancel, which cancels the long press. Upstream's logic test file is upstream's exactly. The fork menu items keep upstream's items and add the fork's.

    Mutation results

    Each mutation broke one line, ran only the touched test file, and was put back (git diff clean after each).

    # Mutation Result
    M1 remove guard (a) !heldForUpdateIds.has in unattendedRuns (:489) existing 42 tests green (gap); probes a, a2 red
    M2 remove guard (b) !rewound(run) (:451) existing green (gap); probes b, b2 red
    M3 retryable runs no longer skip held runs (:483) red (1)
    M4 held runs no longer kept out of the cancel list red (7)
    M5 drop recordHeldRunsStarted before held starts red (2)
    M6 drop fallback automaticUpdates: false (serverSettings.ts:838) green in forkDefaults (6) and serverSettings (76): finding 4
    M7 drop ForkSettingsWrite.check (:1237) red (2)
    M8 drop upstream's usageHistoryRetentionDays fallback red (2)
    M9 drop upstream's withoutRedirectedSimlockTokens wrap red (1)
    M10 ThreadLaunch: fail a preparation interrupted at the held gate (ThreadLaunchService.ts:1198) red (1)
    M11 ThreadLaunch: no setPreparationResumer red (1, by timeout)
    M12 menu: drop "Copy full path without line" red (1)
    M13 menu: drop "Download to this device" red (1)

    Baseline on the head: ProviderRuntimeRecoveryService 42/42, with probes 49/49. ThreadLaunchService 72/72, serverSettings 76/76, forkSettings 25/25, forkDefaults 6/6, forkMarkdownFileLinkMenu 13/13. Dependencies were installed only in a throwaway clone, which has been deleted.

    Probe tests (throwaway; to commit with the re-resolution)

    In threadFor's ThreadInput, add rewound?: boolean and live?: boolean. When live is set, the thread is { id, archivedAt: null, deletedAt: null, settledOverride: null, snoozedUntil: null, lineage: { relationshipToParent: null, parentThreadId: null }, forkedFrom: null }. rewound makes the run status: "running", with startedAt set and its attempt and node running. Add listByCommandId: () => Effect.succeed([]) to the EffectOutboxV2 mock. Then:

    it.effect("a held scheduled run on a live thread is not resent at startup; starts once after commit", () =>
      Effect.gen(function* () {
        const world = yield* heldWorld([{ kind: "scheduled run", live: true }]);
        const [thread] = world.threads;
        const process = yield* world.startProcess();
        yield* process.recover;
        assert.deepEqual(world.starts(), []);
        assert.deepInclude(yield* world.marker, { runs: [thread!.runId] });
        yield* process.gate.startHeldWork;
        assert.deepEqual(world.starts(), [thread!.runId]);
        yield* process.gate.startHeldWork;
        assert.deepEqual(world.starts(), [thread!.runId]);
      }));
    it.effect("a held t3_thread_send restarted twice before commit still starts once", () =>
      Effect.gen(function* () {
        const world = yield* heldWorld([{ kind: "t3_thread_send", live: true }]);
        yield* world.startProcess();
        const second = yield* world.startProcess();
        assert.deepEqual(world.starts(), []);
        yield* second.gate.startHeldWork;
        assert.deepEqual(world.starts(), [world.threads[0]!.runId]);
      }));
    it.effect("a rewound scheduled run is not held; upstream resends it once and resets it", () =>
      Effect.gen(function* () {
        const world = yield* heldWorld([{ kind: "scheduled run", live: true, rewound: true }]);
        const [thread] = world.threads;
        const process = yield* world.startProcess();
        assert.deepEqual(world.starts(), [thread!.runId]);
        assert.isTrue(world.runUpdates().some((u) => u.id === thread!.runId && u.status === "starting" && u.startedAt === null));
        assert.notDeepInclude(yield* world.marker, { runs: [thread!.runId] });
        yield* process.gate.startHeldWork;
        assert.deepEqual(world.starts(), [thread!.runId]);
        assert.equal(process.summary.terminalizedRuns, 0);
      }));
    it.effect("a rewound user run is not held; it goes to the visible held queue", () =>
      Effect.gen(function* () {
        const world = yield* heldWorld([{ kind: "user message", live: true, rewound: true }]);
        const process = yield* world.startProcess();
        yield* process.gate.startHeldWork;
        assert.deepEqual(world.starts(), []);
        assert.isTrue(world.runUpdates().some((u) => u.id === world.threads[0]!.runId && u.queueHeld === true));
      }));

    Also checked: a rewound run that the marker lists gets one resend (b3). With no marker, a rewound run gets upstream's resend (b4), and so does a live t3_thread_send (c).

  3. scuttletoby commented on Nov 18, 2026

    @scuttletoby
    OwnerAuthor

    lens: rebase-trust verdict: NOT SAFE (head 730f609)

    read at: 730f609 (the branch head did not move during the review; main did, see G1)

    Scope: trust and fork policy. A second reviewer covers the other lens. I ran the touched test files only. Deps were installed in my own throwaway clone, which is now deleted.

    Short version

    The patch series itself is honest. All 209 patches match, the only changes are the listed conflicts plus context lines, every fork default and Fork: comment is kept, and upstream workflows stay disabled. But the candidate is red. 21 fork tests fail that pass on main (same environment), the Lint job's vp check fails, and one failure means the server's MCP layer dies on startup. The report's checks did not include these files, and fork-tests.yml never ran on the candidate (the only run on the branch is the secret scan). main has also moved since the candidate was cut.

    Findings

    B1 (blocker): the server's MCP layer dies while it builds

    • Upstream's new rule in apps/server/src/mcp/McpToolAccess.ts:427-434: a tool without a remote check must carry EnabledWhen: hiddenFromOutsideClients. If it does not, the layer build calls Effect.die("… acts as its calling thread, so outside clients must not be offered it").
    • The fork's wait_for (apps/server/src/mcp/toolkits/waits/tools.ts:31, handler waits/handlers.ts:44 actsAsCaller) has no such annotation. The waits toolkit is always registered (McpHttpServer.ts:1410), and McpHttpServer.layer merges layerForkTools (McpHttpServer.ts:1413). So building the layer dies.
    • Red: waits.test.ts (17 tests) and ForkAgentContextBudget.test.ts (1), all with that message. On main they are green.
    • Fix: annotate the fork's caller-bound wait tools the way upstream's device/tools.ts:49 does. Do not relax upstream's check, because it is a security rule. Check the other fork toolkits for the same gap.

    B2 (blocker): Lint (vp check) fails, and fork-ci-result needs Lint

    • vp check --no-lint over every file the fork changes against upstream finds one file: apps/server/src/orchestration-v2/ProviderRuntimeRecoveryService.ts. The new guard lines are not formatted: :447 is 106 chars, and the unattendedRuns filter at :488-498 is not in formatter layout.
    • Fixing it changes the seam numbers (see M1). I ran the seam check on a formatted copy (a local, unpushed commit object). It reports pending 168 > 164, and lost lines 14 > 5 and gone 6 > 5. The 164 only passes because the formatter was skipped, which keeps upstream's re-indented lines byte-identical.

    B3 (blocker): fork test still expects upstream's old restart behaviour

    • apps/server/src/orchestration-v2/runtimeLayer.test.ts:13124-13128 ("work that waited at the closed gate, then restart: after an ordinary restart") still says "an agent's message is cancelled". Upstream fix(server): restarts no longer drop prompts the provider never accepted pingdotgg/t3code#32413 now resends unattended (MCP) runs, so the agent run comes back starting.
    • It fails every time (2 of 2 full runs, plus 1 filtered run): update-hold-agent-false: starting: expected false to be true. On main it is green.
    • This is the only test that drives the new hold/resend interaction end to end, so a mutation run cannot judge the new guards while it is red (see M3 and M4 below).

    M1 (major): the seam ceiling raise 152 → 164 goes against the documented rule

    • docs/fork/updates.md:166-168 says: "pending takes no new file or higher ceiling … A pending file takes no new fork line". The after-rebase exception (:75-77) covers counts that rise because of the rebase. These 12 lines are new fork logic written during the rebase (guards (a) and (b)), not upstream text that moved.
    • The real footprint, once formatted, is 168 plus lost 14/6 (B2), not 164.
    • Recommendation: move the hold decision into the fork's own apps/server/src/workAdmission.ts, for example a helper that returns the held ids and the rewound check. Keep one filtered unstartedRuns in the upstream file, so the pending file gains about 1-2 lines and is formatted. Otherwise the owner must approve the higher ceiling explicitly, with the formatted numbers.

    M2 (major): the two new guards have no unit test

    • I deleted guard (a) (!heldForUpdateIds.has(run.id) && in unattendedRuns, :489) and guard (b) (!rewound(run) &&, :451). ProviderRuntimeRecoveryService (+ regression), workAdmission and workAdmission.startPaths stayed green both times (69/69).
    • The report says so too. Before release there should be a test that fails when a held run is also resent, and one that fails when a rewound run is held.

    M3 (major): the MCP profile tool groups are missing upstream's new issues toolkit

    • apps/server/src/fork/personOnlySettings.test.ts:226, plus the toolkit-row test: 2 red.
    • Upstream's 8 new tools (list_issues, read_issue, create_issue, comment_on_issue, set_issue_state, link_issue, unlink_issue, list_thread_issues) and the issues toolkit have no group in apps/server/src/fork/mcpProfile.ts / MCP_T3_TOOL_GROUPS.
    • This fails closed: mcpT3ToolGroup returns NOT_ALLOWED, so nothing leaks. It is CI-red only.

    M4 (major): run the real CI before go-live

    • The report's "checks" table covered 8 pin files and the conflicted files only.
    • Suggest running fork-tests (for example a draft PR from the candidate) and requiring fork-ci-result green on the exact head before main moves.

    G1 (go-live): what --force-with-lease against f398e05 does now

    Minor / nit

    What checks out (items 1-5)

    1. Range-diff: I reproduced it with git range-diff v0.1.10-nightly.20261114.4682..f398e05b18 v0.1.11-nightly.20261117.4851..730f609d69.
      • 209 patches match one to one: 195 =, 14 !, 2 new, none dropped, no merge commits.
      • I read all 14 changed patches. Each is either one of the listed conflicts or context-only (upstream lines next to fork lines). No fork line changed meaning beyond the report.
      • The moved test file forkMarkdownFileLinkMenu.test.ts is byte-identical to the old fork test apart from its 2-line Fork: header.
      • MarkdownFileLink.logic.test.ts is exactly upstream's.
    2. Fork defaults: packages/contracts/src/forkDefaults.ts, forkSettings.ts and settings.ts fork lines are identical old→new. serverSettings.ts differs only by conflict 5, where automaticUpdates: false and its comment are kept.
      • Fork: comments: none lost, 3 added.
      • The 8 runbook pin files plus ProviderRuntimeRecoveryService: 226/226 green.
    3. Seams: fork-seam-check.cjs --from-upstream passes as committed. M1 and B2 cover the problems with that.
    4. CI commit 730f609d69:
      • It only adds steps. The two Lint steps and the release-checks command match upstream's ci.yml diff exactly.
      • fork-ci-tests.txt lists the new test, and the drift record was updated.
      • Ran here: release checks node tests 64/64, vp run i18n:check pass, drift pass.
      • No upstream workflow is new. Triggers of ci.yml, mobile-eas-preview.yml, mobile-eas-production.yml and mobile-fingerprint-check.yml are unchanged.
      • On GitHub every upstream workflow is disabled_manually. issue-vouch.yml and mobile-eas-preview-fork.yml stay deleted (listed in fork-removed-workflows.txt).
      • Note: the drift check compares upstream with its record, not with fork-tests.yml (by design, fork-tests-drift.cjs:1-4). So the ports are checked by review only. I checked them by eye.
    5. Nothing personal: the two new commits use the generic noreply author, and their diffs contain no names, IPs, VM ids or home paths.

    Mutations (break one line, run the touched tests, put it back)

    # Guard Mutation Result
    1 fork default pin settings.ts:1399 automaticUpdates default false→true red (forkDefaults + serverSettings.forkDefaults, 4 fail)
    2 unreadable-settings fallback delete serverSettings.ts:838 automaticUpdates: false red (autoUpdateSettings, 2 fail)
    3 new guard (a): held run not resent delete ProviderRuntimeRecoveryService.ts:489 green: survives (69/69); runtimeLayer is red without any mutation (B3)
    4 new guard (b): rewound run not held delete :451 green: survives (69/69); same
    5 old fork guard: held run not kept as retryable drop !heldForUpdateIds.has at :483 red (1 fail)
    6 seam ceiling fork-seams.json ceiling 164→163 (local commit object) red ("pending with 164 fork lines, more than its ceiling of 163")
    7 ported CI step remove "Check i18n catalogs" from fork-tests.yml green: by design (drift does not read fork-tests.yml)

    Baseline: the 39 touched non-browser test files give 21 failed / 1079 passed (4 files red: waits, ForkAgentContextBudget, personOnlySettings, runtimeLayer). The same files on old main (f398e05b18, same machine) are 38/38 files and 1057/1057 tests green (forkMarkdownFileLinkMenu.test.ts is new, so it is not on main).

    Nothing was pushed, tagged, released, enabled or moved.

  4. scuttletoby commented on Nov 18, 2026

    @scuttletoby
    OwnerAuthor

    Fix round on the rebase candidate: fork/rebase-candidate-20261117b

    Per finding

    Finding State What changed
    G1 replay of main fixed #456, #461, #459, #462, #422 and #463 replayed; each has the same patch-id as its commit on main, and the files they touch equal main's (only .github/fork-ci-tests.txt and fork-tests.yml differ, by the candidate's own CI follow-up). #463 landed after the branch was pushed, so it sits on top instead of in main's order (no force push).
    B1 wait tools vs upstream's rule fixed wait_for and wait_list carry upstream's "hidden from outside clients" marker, as device/tools.ts does. Upstream's rule is unchanged. wait_cancel has a remote check and needs no marker. Visible effect: a client outside a thread is no longer offered the two tools ("not found" instead of a refused call); waits.test.ts expects that.
    B2 vp check fixed vp check: 0 errors (14 warnings, all in upstream files).
    M1 seam ceiling raise fixed, no raise The hold decision moved to the fork's own workAdmission.ts (takeRunsHeldForUpdate). ProviderRuntimeRecoveryService.ts keeps upstream's lines byte for byte apart from one call. Pending 152 on main -> 127 (the old candidate had 164); lost 5/5 -> 1/1. Every change in .github/fork-seams.json against main is a lowering.
    B3 runtimeLayer gate test fixed The test now expects upstream's resend for work no update held, and for held work: not resent, not cancelled, not in the held queue before the commit, started once on the commit. The file stays at its ceiling of 259.
    M2 guard tests fixed 7 guard tests committed. The fork's held-work recovery tests moved out of upstream's ProviderRuntimeRecoveryService.test.ts into the fork-owned apps/server/src/workAdmission.recovery.test.ts (24 tests); upstream's test file is byte-identical to upstream again, so its pending entry (435 on main) and lost entry are gone. Mutants: (a) held runs stay in recovery's list -> 4 tests red; (b) a rewound run counts as held -> 3 tests red.
    M3 issues tools and profiles fixed New group issues for upstream's issues toolkit (list_issues, read_issue, create_issue, comment_on_issue, set_issue_state, link_issue, unlink_issue, list_thread_issues). Why: the fork's rule is one group per toolkit, and the closest relative, pullRequests, has its own group pull-requests. Existing keep-lists do not name issues, so they do not gain the tools (fail closed stays); all profiles get them.
    M4 real CI done See "CI" below.
    Nit: trailer fixed The seam commit and every commit of this round carry a Co-Authored-By trailer.
    Nit: MCP wait limits noted Upstream lowered the MCP wait limits in apps/server/src/mcp/OrchestratorMcpService.ts:144-145: default 10 min -> 30 s, maximum 1 h -> 45 s. The fork does not change these lines (three fork patches only have them as context), so the fork takes upstream's new limits.

    How the series changed

    • Patch "Auto-update (server) (Auto-update: server updates itself when quiet #5)" is re-resolved in place (8d00f69f16): final ProviderRuntimeRecoveryService.ts, the helper in workAdmission.ts, tests in the fork-owned file. The 181 patches after it replayed without conflict.
    • New commits on top of main's replayed commits: 813eb6a888 (wait tools), 29be251fd6 (issues group), 690f4b8d7d (runtimeLayer test and guard tests), 965e9774d4 (seam counts, replaces the old seam commit), 2265463188 (CI follow-up, unchanged content), 1f07153f40 (fork-seam-check: #436 round-2 follow-ups (#446) #463).
    • How the hold works now: before upstream's held queue, restart resend and cancel run, the helper takes the runs held for an update out of recovery's lists. A run that recovery rewound (stored as running, never accepted by a provider) is never held and takes upstream's path once.

    Checks on the final head

    Check Result
    Seam check, --from-upstream and --from-upstream --after-rebase both pass
    vp check 0 errors
    Typecheck: contracts, shared, server, web 0 errors each
    knip pass
    Schema check no schema changes (503 files)
    Test drift check matches the recorded digest
    Pin tests (8 files), waits, ForkAgentContextBudget, personOnlySettings, both mcpProfile tests, all of mcp/ and fork/, runtimeLayer (whole file), ProviderRuntimeRecoveryService, workAdmission*, holdWork.boot, ThreadLaunchService, serverSettings, the two web link tests 63 files, 1259 tests, all pass
    Fork script tests (fork-ci-tests.cjs) pass; fork-seam-check.test.cjs 67/67 after #463

    The TypeScript tests, vp check, typecheck and knip ran on 2265463188; #463 on top changes only the seam-check script, its test and docs/fork/updates.md, and CI ran everything on the final head.

    CI

    1. https://github.com/scuttletoby/t3code/actions/runs/44232408195 — dispatched from the candidate branch (its own workflow file, head 2265463188). All 21 test jobs green. Fork checks ran and so fork-ci-result red by design: the #420 follow-ups: fork_checks_ran reads base config, pull_request_target-only runs, dispatch path, nits #430 guard refuses a dispatch from a non-default branch and says to dispatch on main with ref=<branch>. Not a red on main.
    2. https://github.com/scuttletoby/t3code/actions/runs/44233230144 — dispatched on main with ref=2265463188: fork-ci-result green.
    3. https://github.com/scuttletoby/t3code/actions/runs/44234137296 — dispatched on main with ref=1f07153f40 (final head): fork-ci-result green.

    Limit of runs 2 and 3: they test the candidate's commit with main's workflow file, which does not have the two lint steps and the one release-check test the candidate's CI follow-up adds. Those ran green in run 1. The first run with the candidate's workflow file and a green fork-ci-result will be the push run after the main move.

    Go-live steps (owner)

    1. The main move is owner/admin-only (ruleset "main: CI before merge"). Follow "Nightly sync runbook" in docs/fork/updates.md.
    2. Check that main is still ecacd22008f40da6969749e9538ce632ccb58c29. If it moved, the newer commits must be replayed onto the candidate first; the lease below then fails, which is the intended stop.
    3. Move main with a lease on that sha: git push --force-with-lease=main:ecacd22008f40da6969749e9538ce632ccb58c29 origin 1f07153f40dcf68211fcbf4229e545db27959b68:refs/heads/main. Keep the old main sha; the draft PRs need it.
    4. Open draft PRs (golive back: W2/W3 may follow a W1 stuck on its verify (#440) #472, golive: restore and check follow-ups from #288's lenses (#300) #471, contracts: modelPolicy person-only setting (model policy M1) #268, fix(web): no-project drafts follow load balancing (carry upstream #31049, parked) #43, Desktop: download updates in the background and install on quit (parked for upstream #17588) #40 at the time of writing) are based on the old main. Each needs git rebase --onto <new main> ecacd22008f40da6969749e9538ce632ccb58c29 <branch>, not a merge and not "Update branch".
    5. Nothing else was touched in this round: main, tags, releases and fork-follow are as they were.
  5. scuttletoby commented on Nov 18, 2026

    @scuttletoby
    OwnerAuthor

    lens: rebase-trust verdict: SAFE (head 1f07153)

    read at: 1f07153 (branch fork/rebase-candidate-20261117b; the head did not move during the review. main is still ecacd22008f40da6969749e9538ce632ccb58c29)

    Round 2 (re-check). Lens: trust and fork policy. Read-only: nothing was pushed, tagged, released, enabled or moved. Dependencies were installed only in my own clone, which is now deleted.

    Short version

    Every round-1 finding is fixed, and the fixes keep both sides' behaviour. The only patch that changed meaning since round 1 is "Auto-update (server) (#5)", and it changed the way the fix round says. The 6 replayed main commits have the same patch-id as on main. The seam file only goes down, and no upstream workflow can run. One minor finding is in the go-live steps: the rebase --onto command is wrong for drafts #40 and #43.

    Round-1 findings

    Finding State Evidence
    B1 wait tools vs upstream's rule fixed waits/tools.ts:46,62 add upstream's EnabledWhen: hiddenFromOutsideClients, the same marker device/tools.ts uses. Upstream's check in McpToolAccess.ts:427-434 is unchanged. wait_cancel keeps its remote check. Mutation C: removing the marker turns 17/17 waits.test.ts red.
    B2 vp check fixed CI run 44234137296 checked out 1f07153f40… (its log says ref: 1f07153f…), and its Lint job is green.
    B3 runtimeLayer gate test fixed, and stronger runtimeLayer.test.ts:13100-13131 now checks both before and after the commit. Held work: not cancelled, not re-sent and not in the held queue before the commit, then exactly one start after it. Work with no marker: upstream's resend for agent messages, the held queue for user messages.
    M1 seam ceiling raise fixed, no raise The seam diff against main only goes down. ProviderRuntimeRecoveryService.ts: pending 152 → 127, lost 5/5 → 1/1 (the single lost line is the reconcileProjection(...) call that now takes one more argument). The ProviderRuntimeRecoveryService.test.ts entries are gone because the file is byte-identical to upstream's. fork-seam-check.cjs --from-upstream and --from-upstream --after-rebase both pass here.
    M2 guard tests fixed workAdmission.recovery.test.ts has all 11 fork tests that were in ProviderRuntimeRecoveryService.test.ts on main. Outside the harness they are unchanged: a whitespace diff of the old fork lines against the new file shows only the import paths, the live / rewound options in threadFor, and the listByCommandId mock. The file adds 6 new tests. Mutations A and B below go red.
    M3 issues tools group fixed issues: "issues" was added to fork/mcpProfile.ts:94 and to the contracts group list. Existing keep-lists do not name it, so they still fail closed. Mutation D goes red.
    M4 real CI done Run 44234137296 is green on the final head, using main's workflow file. Run 44232408195 used the candidate's own workflow file, on 2265463188: all 21 test jobs are green, and fork-ci-result is red only through the #430 guard on non-default-branch runs, by design. The #463 commit on top touches only the seam script, its test and docs.
    Nit: trailer fixed

    Does the re-resolution of #5 keep both sides?

    • Fork side, compared with main. takeRunsHeldForUpdate (apps/server/src/workAdmission.ts:63-121) is the old heldSinceUpdate / heldForUpdateRuns logic moved, and it gives the same resume mapping. On main, held runs were left out of retryableRuns, the cancel list runs and the queued delivery. Now they leave runs, unstartedRuns and queuedRuns before upstream's code reads them, so the same sets are excluded. runs is first read again at ProviderRuntimeRecoveryService.ts:602 (cancel), then :628, :714, :852, :874 and :1112. On main all of these came after the held filter too, so they see the same runs. pendingRuns (:419) is built earlier, but it is only used to read message rows.
    • Upstream side. Taking held runs out of unstartedRuns is what keeps them away from upstream's new resend (unattendedRuns, :468). A run that rewindUnacceptedRuns changed has a different status or startedAt from its stored row. Unchanged runs are the same objects, so the identity check is sound. That run is never held, so upstream's resend or held queue and its attempt reset apply in full. ProviderRuntimeRecoveryService.ts is upstream's text apart from the imports, the two admission lines, one call with a 2-line Fork: note, and the existing Auto-update: server updates itself when quiet #5 block at the end (start of held work and the marker), which is unchanged from main.
    • No new problem found. startHeldWork and the marker write are byte-identical to main. workAdmission.ts differs from main only by the new helper.

    Lens items

    1. Range-diff.
    2. Fork defaults and Fork: comments.
      • forkDefaults.ts and forkSettings.ts: the fork diff is identical old → new (same hash).
      • settings.ts and serverSettings.ts: the fork lines are the same apart from conflict 5's re-wrapped fallback block, where automaticUpdates: false is kept.
      • Fork: lines: 127 on main, 130 on the candidate. None were lost and 3 were added (the hold note, the header of the recovery test file, the header of the menu test file).
    3. Seam ceiling. It is no longer raised, see M1. Mutation E: ceiling 127 → 126 gives seam-check exit 1 ("pending with 127 fork lines, more than its ceiling of 126").
    4. CI commit 2265463188.
      • It is = against round 1: it only adds steps, nothing is removed or relaxed.
      • The upstream workflow files in the range (ci.yml, mobile-eas-preview.yml, mobile-eas-production.yml, mobile-fingerprint-check.yml) are byte-identical to upstream and disabled_manually on GitHub. fork-follow.yml is disabled too.
      • issue-vouch.yml and mobile-eas-preview-fork.yml stay deleted and listed.
      • No upstream workflow file in the candidate is enabled, and the workflow file list equals main's.
    5. Nothing personal. The 5 new commits and the rewritten Auto-update: server updates itself when quiet #5 are authored and committed by the generic noreply identity. The rewritten Auto-update: server updates itself when quiet #5 keeps its original public author. A scan of their messages and diffs found no names, home paths, IPs, VM ids or mail addresses. The only hits are upstream's own tailscaleServe* setting keys in the context lines.
    6. Go-live.

    Findings

    Mutations (break one line, run only the touched test file, put it back; git status clean after each)

    # Guard Mutation Result
    A a rewound run is never held remove !rewound(run) && (workAdmission.ts:93) red: 3/24 in workAdmission.recovery.test.ts (the 3 rewound tests)
    B a held run never reaches upstream's resend leave unstartedRuns out of the removal loop (workAdmission.ts:107) red: 3/24 (the held user message, the held scheduled run not re-sent, the held agent message across two restarts)
    C B1: caller-bound wait tool hidden from outside clients drop the EnabledWhen marker of wait_for (waits/tools.ts:46) red: 17/17 waits.test.ts (the layer dies)
    D M3: issues toolkit has a group delete issues: "issues" (fork/mcpProfile.ts:94) red: 2 in personOnlySettings.test.ts
    E M1: lowered seam ceiling fork-seams.json:148 127 → 126 (local commit object, reset) red: seam-check exit 1, "more than its ceiling of 126"

    Baseline on the head: workAdmission.recovery, workAdmission, waits and personOnlySettings gave 63/63. The seam check passed in both modes.

  6. scuttletoby commented on Nov 18, 2026

    @scuttletoby
    OwnerAuthor

    lens: rebase-runtime verdict: SAFE (head 1f07153)
    read at: 1f07153 (branch head did not move during the review)

    Re-check round 2 of the runtime + state lens for conflicts 2, 3, 5 and 6. This was a read-only review: nothing was pushed, and no branch, tag, release or workflow was touched. Deps were installed in a throwaway clone only, and the clone is deleted.

    In short: every first-round finding (B1, B2, B3, M1, M2, M3) is fixed. Both sides' behaviour is kept, and every fix that has a test goes red under its mutation; B2 and M1 are checks (vp check, seam check) and pass. Moving the hold decision into workAdmission.ts makes recovery behave the same as on main in the old-base logic. It adds no new path that sends a held run twice or holds a rewound run forever. The replay of main up to ecacd22008 is faithful. What is left are two minor test gaps, neither a blocker.

    First-round findings

    Finding State How checked
    B1 wait tools vs upstream's rule fixed wait_for/wait_list carry EnabledWhen: hiddenFromOutsideClients, and upstream's rule is unchanged. waits + ForkAgentContextBudget 18/18. Mutation: drop the annotation on wait_for → 18/18 red (layer dies).
    B2 vp check fixed vp check on the 10 lens files: formatted, 0 lint errors.
    B3 runtimeLayer gate test fixed runtimeLayer.test.ts:13037-13133 now expects upstream's resend for unheld agent work, and one start on commit for held work. "closed gate" + "exactly once" 4/4.
    M1 seam ceiling fixed, lowered ProviderRuntimeRecoveryService.ts differs from upstream by imports, one helper call (:443-451) and the old fork code; pending 127 (main 152). Upstream's ProviderRuntimeRecoveryService.test.ts is byte-identical to upstream. fork-seam-check.cjs --from-upstream and --after-rebase both pass.
    M2 guard tests fixed workAdmission.recovery.test.ts has the round-1 probes as real tests. Mutations below.
    M3 issues group fixed issues is in MCP_T3_TOOL_GROUPS and in the toolkit map. Mutation: drop issues: "issues" → 2 red.

    Runtime and state answers

    • Both sides kept (conflict 3): takeRunsHeldForUpdate (apps/server/src/workAdmission.ts:64-121) takes held runs out of runs, unstartedRuns and queuedRuns in place. Then upstream's retryable/held queue, unattendedRuns resend and cut list never see them. That is the same exclusion main did inline: retryable, held queue and runs, plus the resend now. Upstream's code after the call is byte-identical. Between the call and upstream's runs = runs.filter(...) (:602), nothing reads runs, so moving the removal earlier changes nothing.
    • Can a held run be resent or started twice? No. A held run has left unstartedRuns before unattendedRuns is built. Probe p4: a held scheduled run on a live thread with a queued send gets no resend and no cut, and starts once on commit. Probe p2: a live held t3_thread_send whose start was recorded and then lost with the process gets exactly one upstream resend on the next startup, and startHeldWork does not start it again (hold.started).
    • Can a rewound run be held forever? No. rewound (workAdmission.ts:82-87) compares the run with its stored form (status or startedAt changed). A rewound run is never held and takes upstream's path once, with its attempt reset. Probe p1 covers a run stored as starting with startedAt set, which only the startedAt half of the check detects. Probe p3 covers a rewound user head with a queued run behind it: neither is held, both go to the visible held queue, and nothing is cut.
    • Restart mid-update / re-runs: these are as in round 1 and unchanged. The helper is pure, and the marker writes and startHeldWork are identical to main. Committed tests cover two startups before the commit, startHeldWork twice, a partial failure, and a crash between "started" and the start write.
    • Old fork release state: the marker schema is unchanged (optional runs/started), and an old marker counts as "fresh, no list". Settings: the profiles map is kept as written and checked per use, so a profile naming issues still loads after a rollback; the old build refuses that profile only when a thread uses it (fails closed).
    • Conflicts 2, 5, 6 and ThreadLaunchService: the fork's +/- lines compared with upstream are identical to main's against the old base. There are two exceptions. In serverSettings.ts, the fallback object is now upstream's multi-line one plus the fork's automaticUpdates: false. In MarkdownFileLink.logic.ts, the imports and the place of the copies list moved; the menu order is unchanged (forkMarkdownFileLinkMenu 13/13, logic test 1/1). serverSettings, forkDefaults and ThreadLaunchService tests are green.
    • Replay of main: all 6 non-merge commits in f398e05b18..ecacd22008 have a patch-id match in the candidate. They are go-live rehearse: clean refusals for bad live links, retryable walk errors, test gaps (#451 follow-ups) #456, fork-ci: fork_checks_ran budget margin, named contract FAILs, name-guard test (#449) #461, fork-ci: HEAD attributes ignored in the queue cache; local git calls drop GIT_EXEC_PATH (#447 follow-ups) #453 follow-ups, desk-seed, golive: kit switch, verify, automatic way back and guard timer (go-live PR 6) #422 and fork-seam-check: #436 round-2 follow-ups (#446) #463. Their files equal main's, apart from the candidate's own CI follow-up (.github/fork-ci-tests.txt, fork-tests.yml).

    Findings

    • minor: the startedAt half of the rewound check (apps/server/src/workAdmission.ts:85) has no committed test. Remove || before.startedAt !== run.startedAt and all committed tests stay green; only probe p1 goes red. Without it, a run stored as starting with startedAt set and never accepted would be held. Its rewind (attempt reset, startedAt: null) would then never be written. This is new with this rebase, because upstream's rewind is new.
    • minor: the "no held head, queued runs take the upstream path" early return (apps/server/src/workAdmission.ts:104) has no committed test. Remove it and all committed tests stay green; only probe p3 goes red. main has the same gap; the rewound path makes it reachable in one more way.
    • info: after B1, a client outside a thread is no longer offered wait_for/wait_list ("not found"). This is intended and covered by waits.test.ts.

    Mutation results (break one line, run the touched files, put it back; git diff clean after each)

    Files run for M1–M7: workAdmission.recovery, workAdmission, workAdmission.startPaths, ProviderRuntimeRecoveryService (79 tests including my 4 probes; baseline 79/79 green).

    # Mutation Result
    M1 held runs stay in unstartedRuns (workAdmission.ts:107) red (3 committed + p2, p4); runtimeLayer "closed gate: after an automatic update" red
    M2 drop !rewound(run) (:93) red (3 committed + p1, p3); runtimeLayer gate tests green (the unit tests carry it)
    M3 drop the startedAt comparison (:85) committed green (gap); only p1 red → minor 1
    M4 drop if (startsAndPreparations.length === 0) return [] (:104) committed green (gap); only p3 red → minor 2
    M5 drop !hold.started.has (:96) red (2 committed + p2)
    M6 held runs stay in runs (cut list) red (7 committed + p4)
    M7 held runs stay in queuedRuns red (4 committed + p4)
    M8 B1: drop EnabledWhen on wait_for red (18/18)
    M9 M3: drop issues: "issues" red (2)

    Baseline: the 7 lens server files 229/229; waits/ForkAgentContextBudget/personOnlySettings/mcpProfile 79/79; web link tests 14/14; runtimeLayer gate + exactly-once 4/4.

    Probes p1 and p3 (throwaway; worth committing to close the two minors)

    In workAdmission.recovery.test.ts's ThreadInput, add rewoundStarting?: boolean. Set started = input.rewound === true || input.rewoundStarting === true. The run status becomes input.rewound === true ? "running" : preparing ? "preparing" : "starting".

    it.effect("a rewound run stored as starting with a start time is not held; one resend", () =>
      Effect.gen(function* () {
        const world = yield* heldWorld([{ kind: "scheduled run", live: true, rewoundStarting: true }]);
        const [thread] = world.threads;
        const process = yield* world.startProcess();
        assert.deepEqual(world.starts(), [thread!.runId]);
        assert.notDeepInclude(yield* world.marker, { runs: [thread!.runId] });
        yield* process.gate.startHeldWork;
        assert.deepEqual(world.starts(), [thread!.runId]);
      }));
    it.effect("a rewound user head with a queued run: neither is held; both wait in the visible queue", () =>
      Effect.gen(function* () {
        const world = yield* heldWorld([{ kind: "user message", live: true, rewound: true, queuedBehind: true }]);
        const [thread] = world.threads;
        const process = yield* world.startProcess();
        yield* process.gate.startHeldWork;
        assert.deepEqual(world.starts(), []);
        const updates = world.runUpdates();
        assert.isTrue(updates.some((u) => u.id === thread!.runId && u.queueHeld === true));
        assert.isTrue(updates.some((u) => u.id === thread!.queuedRunId && u.queueHeld === true));
        assert.equal(process.summary.terminalizedRuns, 0);
      }));
  7. scuttletoby commented on Nov 21, 2026

    @scuttletoby
    OwnerAuthor

    Overtaken: main is on v0.1.11-nightly.20261119.4954 (release .fork.1) via fork-follow; this hand rebase is no longer needed.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions