Skip to content

Files on another environment: tabs stay without a workspace; Copy path gives the path there (#1250) - #1338

Open
scuttletoby wants to merge 876 commits into
mainfrom
fork/env-file-tabs-1250
Open

scuttletoby wants to merge 876 commits into
mainfrom
fork/env-file-tabs-1250

Conversation

@scuttletoby

Copy link
Copy Markdown
Owner

Needs #1337 merged first: that PR announces this PR's six seam lines, and until it merges this PR's seam check refuses them, as expected. After it merges, the fix round is a merge of main into this branch.

Small follow-up sweep: #1250 items 1 and 2 (files viewer tabs for a chat file link naming another environment, from the #1110 code lens).

What changes

  • Tabs no longer vanish without a workspace (item 1). In a thread whose project is not loaded or is gone, reconcileFileSurfaces(ref, false) dropped every non-attachment file tab, including tabs for /t3-environment/<id>/<path> links, which read through that environment and need no workspace here. One fork line after upstream's filter (keepEnvironmentFileTabs) puts those tabs back in their places. Workspace file tabs still go.
  • Reopening such a tab is no longer refused there (item 1). reopenClosedView refused every non-attachment file tab when !workspaceAvailable. One fork condition (!isEnvironmentFileTab(surface)) lets these through; openFile then restores the tab with its line.
  • Copy path copies the path on that environment (item 2). The tab's "Copy path" copied /t3-environment/<id>/srv/app.log. It now copies /srv/app.log (or C:\Users\a\notes.txt for a Windows path, as upstream's copy formats one), as the link's chip does. A ~ link path keeps the old copy: upstream's copy would expand it against this thread's home folder, which is on another machine, and the tab already says such a link needs an absolute path.
  • The helpers live in the new fork file apps/web/src/forkEnvironmentFileSurface.ts (no React or store import, as the store calls it). isForkEnvironmentFile in the panel now calls the same check.

Left on #1250 (it stays open)

  • Item 3, the line is not revealed. A link like app.log:42 keeps revealLine on the tab, but upstream's AttachmentFilePreview and its ReadOnlySourcePreview take no line to reveal (only LargeTextViewer/VirtualTablePreview do, and the attachment viewer passes none). Fixing it means a reveal prop through two upstream viewer files, or a different fork viewer for these tabs; neither is small, so this round only adds a code comment at the panel saying so.

Tests (red on main)

apps/web/src/forkEnvironmentFileSurface.test.ts:

  • "stays when the thread's project is not loaded or is gone": a workspace tab and an environment tab, then reconcileFileSurfaces(ref, false); only the environment tab is left, still active, with its line. With main's rightPanelStore.ts the list is empty.
  • "reopens after it was closed, though the thread's project is not available": with main's reopenClosedView.ts it returns false.
  • environmentFileTabCopyPath: the path on the environment for a link (POSIX and Windows), unchanged for any other path and for a ~ link.

Run locally (vp test run --project unit with this PR's four test files): green 4 files, 111 tests pass. With main's rightPanelStore.ts, reopenClosedView.ts and useRightPanelActions.ts put back: the two store tests fail (expected [] to deeply equal [ Array(1) ], expected false to be true), the other 3 pass. The Copy path wiring is tested through the helper only; on main the test file fails as the module does not exist.

Also checked locally: vp fmt and vp lint on the changed files, the fork seam/schema/upstream-files checks on this head (with #1337's list), and fork-seam-check.test.cjs (126 pass). The web typecheck did not run locally (VM106 was out of memory for it); CI runs it.

State question

  • Runs again: the reconcile runs on every thread load; the kept tabs are the same objects, so a second run changes nothing and returns current when nothing was dropped.
  • Stops half-way: each change is one synchronous store update; nothing is written in parts.
  • Old or empty state: a tab saved before this PR has the same shape (part 1 never made other shapes), so after a reload it is kept now where before it was dropped. A tab already dropped by an older build is gone; it opens again from its link. An empty panel stays empty.

Refs #1250 (items 1 and 2; item 3 is left, see above)

🤖 Generated with Claude Code

scuttletoby and others added 30 commits November 28, 2026 22:29
…1211)

* fork(ci): a failed typecheck names its failed tasks and their errors

vp stops the other tasks at the first failed one and can drop the end of
that task's output, so the Build and Typecheck job on #1149 failed with
"26/30 successful" and no error. When `vpr typecheck` fails,
fork-typecheck-failures.py reads `vp run --last-details` (before the build's
own `vp run`), prints each failed task with its exit code, and reruns each
task that failed on its own (not those vp stopped, exit 137) so its errors
show. The typecheck's exit status is unchanged.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fork(ci): the typecheck failures script is not fork-owned

Build and Typecheck, an app job, runs .github/scripts/fork-typecheck-failures.py,
so a pull request changing only that script must still run the job. List it
with `!` beside the other scripts app jobs read (fork-owned-paths.test.py).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ore.ts (#1212)

A new worktree's background index refresh writes into the worktree's Git
folder while `git worktree remove` deletes it, so a cancelled launch could
keep its task folder. The fix (#1210) keeps its logic in
apps/server/src/fork/worktreeIndexRefreshes.ts and needs five one-line seams
in the upstream driver; this list-only change announces them.

Co-authored-by: Claude Opus 5.5 <[email protected]>
… (eval) (#1216)

The kit's default lens runner is now Opus 5.5 medium, and a new settings
key weight_runners gives every lens of a change of one tier its own
runner; its default keeps every lens of a critical change (its code lens
too) on Opus 5.5 high. A lens's own lens_runners entry still wins.

From a 48-review eval (6 fork cases, high vs medium, 4 runs each, blind
judge): on normal code medium found each confirmed bug at least as often
as high (13 of 16 hits vs 12 of 16) at about 0.68x the cost; on critical
code it missed two bugs once more each, so critical stays high. Results
in fork-kit/review/eval/README.md.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…tep 1) (#1213)

Announces one line for apps/web/src/components/CommandPaletteContent.tsx:
after upstream's input.focus() in claimFocusInOpenDialog, a disabled
search input hands focus to the dialog popup. Without it, focus stays on
the body and Base UI's dialog refocuses its popup a frame later, which
steals focus from the root search after a quick step back from file
search (the flaky "ignores repeated Escape keydowns after stepping back
from file search" browser test). The line itself follows in step 2.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ges weight_runners per weight (#1225)

server.reviewRules gains an optional `weightRunners` ({critical, normal, light}: a runner each),
the fork's mirror of the review kit's `weight_runners`. lens_start gives a lens its own
lensRunners entry, else (the approach lens) the approach role runner, else its change's weight
runner, else `runner`. The preset sets none, so a value without the field runs as before. An
unknown weight or a bad entry is refused on save and reads as off in the file. The settings panel
shows the weight runners and asks before the preset button drops them.

Review kit: a settings file's `weight_runners` merges per weight over the default, so a file that
names only `light` keeps critical lenses on high. Eval README and the DEFAULTS comment say medium
is not shown to be at parity on critical code; the README names `weight_runners`.

Co-authored-by: Claude Opus 5.5 <[email protected]>
* Dynamic slots D5: learned agent costs survive a restart (#882)

The slot gate keeps each agent kind's last 20 run peaks in the state
folder's agent-peaks.json (AgentPeaksFile), reads them when it starts
and writes them after every run that adds a peak. A missing or
undecodable file holds no runs (the start costs). learnedAgentMb now
clamps at the rule's upper bound, so the "cost learned" log line shows
the cost the gate counts (#1206 review).

Part of #882

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(shared): keep AGENT_PEAKS_FILE_VERSION module-local (knip unused export)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…#808 row 3, web) (#1228)

The parent thread's composer shows read-only banners for each prompt its open
delegated tasks wait on (question, approval, secret, pairing card), here and on
linked machines, read from GET /api/fork/prompt-mirror. At most three cards,
then a count. A task whose prompts are not known shows a card with the reason.
Read on each thread change, every 10 s while a card shows, 30 s otherwise; a
failed read shows nothing and is tried again later.

The card shape moves to packages/contracts/src/forkPromptMirror.ts so the web
reads the server's type. The four ChatView.tsx lines announced in #1097 move to
"added" in .github/fork-seams.json.

Co-authored-by: scuttletoby <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
…(step 2) (#1214)

* fork seams: announce the Command Palette disabled-input focus line (step 1)

Announces one line for apps/web/src/components/CommandPaletteContent.tsx:
after upstream's input.focus() in claimFocusInOpenDialog, a disabled
search input hands focus to the dialog popup. Without it, focus stays on
the body and Base UI's dialog refocuses its popup a frame later, which
steals focus from the root search after a quick step back from file
search (the flaky "ignores repeated Escape keydowns after stepping back
from file search" browser test). The line itself follows in step 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(web): a disabled Command Palette input hands focus to the dialog (step 2)

claimFocusInOpenDialog claims focus for a view that replaces another in
the open Command Palette, but input.focus() does nothing on a disabled
input (file search with no project open). Focus then stayed on the body,
so Base UI's dialog refocused its popup on the next animation frame; a
step back to the root search before that frame lost its focus to the
popup. That is the flaky CommandPalette.browser.test.tsx test "ignores
repeated Escape keydowns after stepping back from file search" on slow
runners.

A disabled input now gives focus to the dialog popup itself, so Base UI
has nothing to restore and schedules no late frame. The seam line moves
from announced to added. The fork test holds frames with fake timers
and fails without the line.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…tVcsDriver.ts) (#1224)

* fork seams: announce the worktree index refresh stop in GitVcsDriverCore.ts

A new worktree's background index refresh writes into the worktree's Git
folder while `git worktree remove` deletes it, so a cancelled launch could
keep its task folder. The fix (#1210) keeps its logic in
apps/server/src/fork/worktreeIndexRefreshes.ts and needs five one-line seams
in the upstream driver; this list-only change announces them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fork seams: announce the index refresh stop in checkpoint restore (GitVcsDriver.ts)

A rewind right after its task folder was recreated failed with "Git's
index is locked": the restore met the new worktree's background index
refresh swapping its copy in through index.lock. restoreCheckpoint will
stop that refresh and wait for it first. This list-only change announces
the two seam lines; the fix PR adds them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
… D5) (#1230)

* feat(server): slot gate learned costs may go below the start cost (#882 D5)

After 10 finished runs of a kind (AGENT_RUNS_TO_LOWER), its learned cost
follows the measured peaks down as well as up: highest of the last 20
runs x 1.15, up to 128 MB, never under the rule's learnedBounds.minPercent
of the start cost. Fewer runs keep the start cost as the floor; one big run
raises the cost at once. Zero peaks are no runs, like NaN, negatives and
infinities.

The agent peaks file is written by a fiber of its own, so a slow or hung
disk never delays an admission; a stop writes the newest peaks within 2 s.
A newer server's peaks file is read as no runs and never written over.
Run ends are also seen by the 30 s sample, not only at decisions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(fork): link the D5 part 3 PR in the agent slots change doc

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…arts (Text file busy flake) (#1223)

* test(fork): write every fake curl before any release-download step starts

test_passing_errors_retried ran the four download steps in a thread pool, and
each thread wrote its own fake curl and then forked bash. A fork made while
another thread still had its fake curl open for writing kept that descriptor
until it exec'd. If that thread's curl ran in that moment, it failed with
"bad interpreter: Text file busy" (exit 126, ETXTBSY), as on #1194 and #1213.

Each step is now made (server, temp dir, fake curl written, closed and made
executable) before the pool starts any of them, so no fake curl is open for
writing once any process can start. A new test checks this with an audit
hook: every fake curl is written before the first process starts, and no
process starts while this process holds a fake curl open for writing.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(fork): fork-release-downloads.test.py weighs ~10s with its new test

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…k's gate (#1219)

* fix(fork-ci): cap review rounds at 2 in the fork's gate config

The owner's rule since 2026-11-16 is at most two lens rounds per PR, but
review.rounds in .github/fork-pr-queue.json still said max 4 with the
approach lens from round 3. Set approach_at 2 and max 2 so the gate says
the same, and update the two tests that pin the fork's own numbers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(fork-ci): rounds.approach_at null means no approach lens, and the fork's gate asks for none

The owner's rule is at most two lens rounds and no approach lens (a PR stuck after round 2 gets an audit outside the
gate). The config could not say "never": approach_at had to be 1-20 and max not below it, in both readers.

- review_config.py: approach_at may be null; approach_lens is then optional (still a declared lens when given).
  A missing approach_at is still refused, and a number reads as before.
- review_judge.py, review_kit.py: no round requires the approach lens under null; the plan says so.
- lensStartRun.ts, plan.ts, rounds.ts, lensStart.ts: the same on the server side.
- review.vectors.json: a no-approach config and two rounds vectors both sides run.
- .github/fork-pr-queue.json: rounds approach_at null, max 2.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(fork-ci): T3's config reader takes review.rounds exactly when the gate does

parseQueueConfig took rounds the gate refuses: approach_at 0, -1, 1.5 or 21, max 0 or 21, max below approach_at,
and an approach_lens that is empty or names no declared lens (also under approach_at null). It now ports
review_config._rounds: approach_at a round 1-20 or null (a missing one refused), max a round 1-20 not below it,
approach_lens a declared lens written the way the gate reads it, left out only under null, and no unknown key.

The new shared section `round_configs` in review.vectors.json (39 values, 7 read and 32 refused) is run by
review_judge.test.py against review_config and by lensStartRun.test.ts against parseQueueConfig, so the two
readers cannot drift again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(fork-ci): a round that requires the approach lens but names none is refused in T3

ReviewBlock.rounds had an optional approach_lens, so a numeric approach_at with no lens compiled, and
requiredLenses and planLensStart dropped the required approach lens while roundsText printed "undefined".
The type is now a union (a number has its lens; only null may leave it out). At run time a block that still
lacks it fails closed: approachLensOf throws ReviewPlanError (requiredLenses, roundsText), and lens_start
refuses the pull request rather than start too few lenses.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(fork-ci): the over-cap reason names no approach lens under approach_at null

Past the round cap the reason said a person's override is enough "also for a required approach lens that never
posted", even when approach_at is null and no round requires one. Both judges (review_judge.judge_rounds and T3's
judgeRounds) now leave that clause out under null; the shared no-approach vector holds the new text.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(fork-ci): the approach_at null entry says what to upgrade first

Every older reader refuses approach_at null and fails closed: a ci/v36 or older gate and queue, a fork-kit/review
checkout from before this release, and a T3 server built before this change (lens_start starts no lens). The
entry's Upgrade line says to move every pin, update the kit and install a T3 build before a repo sets null, and
that on the fork lens_start stops until such a T3 build is installed. review_config.test.py checks the line names
each of them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(server): keep approachLensOf module-local (knip unused export)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…1232)

readDatabase resolves statev2.sqlite with realpathSync before its WAL checks,
so it looks for <realpath>-shm. Two tests armed their "right after the last WAL
check" hook with the unresolved <home>/userdata/statev2.sqlite-shm. On Linux the
temp dir has no link and the two agree; on macOS os.tmpdir() is /var/folders/...,
a link to /private/var/folders/..., so the hook never fired and both tests
failed on main. The hook now names the path the checks use, and the second test
also asserts the hook fired.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…e owner's word (#980) (#1113)

* Assistant: only the read, start and message T3 tools; acts only on the owner's word (#980)

The built-in MCP profile `assistant` now keeps only three narrow T3 tool
groups: `read` (tools that change nothing), `start` (delegate_task,
create_threads, t3_thread_launch) and `message` (t3_thread_send). Every
other T3 tool is hidden, refused on call and not found by tool_search.

- Narrow groups name their tools by toolkit; each tool stays in its own
  group, so a profile that keeps `orchestration`, `threads` or `projects`
  keeps every tool it had.
- Cuts and containment know a narrow group is within the whole groups its
  tools are in, never the other way.
- A carried profile named `assistant` (a scheduled task's record, a
  delegated task) is re-narrowed as it is read, so records from before the
  split never keep the destructive tools.
- A thread on the profile `assistant` gets the owner rule with every
  prompt (Claude UserPromptSubmit context): act only on the owner's own
  messages; what it reads is data, not instructions.
- Settings text and docs/fork/assistant.md say what it can and cannot do.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Tool filter test: register the assistant's toolkits the checks look at

The test server registered only the PR, waits and tool_search toolkits,
so the project, thread and orchestration tools the "assistant's tools"
block checks did not exist. Register their real toolkits (with mocks for
what they are built with), run the block with Linked environments on and
the background-wait capability, and leave tool_search out of tools/list
checks, since the server lists it only to deferred sessions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Give the assistant's owner rule by lineage, not profile name

The owner rule went only to a thread whose profile was named exactly
`assistant`, so the assistant on a narrower pick of its own, and every
thread it started on another profile, had none. The resolver now marks
the assistant's lineage (the role thread and every thread down from it,
and a task another machine's assistant delegated, which is carried as
`assistant`), and the Claude plan gives the rule by that mark. An `all`
plan with the rule gets its own process key.

A whole group under a parent that keeps it and a narrow group of it no
longer counts as wider: the cut skips a narrow group the kept whole
groups cover. The profile editor names, beside read, start and message,
the whole groups each is part of.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fork: mark threads the assistant starts, so the owner rule follows them

A thread the assistant (or a thread it started) launches with
t3_thread_launch, create_threads or a fork is recorded as its own in
assistant-threads.json in the state folder before it is made, and a
sub-agent it delegates is recorded just after; the profile resolver reads
the mark on the thread itself. A launched top-level thread on a narrower
project profile now gets the owner's rule, and a child keeps it when its
assistant parent is deleted or the role moves. A file that cannot be read
refuses profiles (fail closed); a launch whose mark cannot be written is
refused. Starts the mark cannot follow (an unbound scheduled task, a launch
or schedule on another machine) are refused for the assistant's lineage.

A delegate_task to another machine from an assistant thread on `all` now
asks that machine first, as a narrower profile does: the carried
`assistant` profile must be applied there, on Claude.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fork: type the assistant thread marks as their interface

The no-file branch's read was inferred from NO_MARKS, which TypeScript
narrowed to its ok member, so the reads in claudeMcpProfile saw no
failure case and every profile read downstream became unknown. Both
branches are now typed as AssistantThreadMarks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(knip): un-export decodeAssistantThreadMarks

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fork: test assistant marks through effect's FileSystem and Path

The marks tests read and write the state folder with effect's
FileSystem and Path instead of node:fs and node:path, and take the
launched thread's id through a check that fails the test when there is
none, instead of passing ThreadId | undefined on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
* Review rules T5 part 1: lens_arm's decision as pure logic (#888)

lens_arm arms a head only if the gate would pass it after the override
lens_arm itself would post: every required lens reads the head, and no
round, finding or approach lens is left open (a TS port of
head_check.review_rounds, replayed on the shared reads vectors). T3's
override counts as no person's, so it never clears a finding. A why that
cites a quick check is refused unless that comment is the newest of its
lens, reads this head, says nit-only: yes and reports no blocker or major.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: a nit-only line other than yes on any report of this head refuses, cited or not

Round 1 (both reviews): a quick check of the head that said nit-only: no
was only read when the why cited its URL, so a why without the anchor
armed past it. Now the newest report of every lens that reads this head
is read: a nit-only value other than yes, or a quick check with no
nit-only line, refuses.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: only a bare nit-only: yes passes, read folded as the gate reads lines

Round 1 (both reviews): /^yes\b/ let yes|no, yes/no and yes, but through,
and the line was read without review_judge.fold or the narrow markdown
reading, so nit-only\: no, nit-only&#58; no, a zero-width character or
a look-alike letter was missed. Now each line is folded and read both
ways (as has_state_line reads one), nit only / nit_only count too, and
only a bare yes lets the head through.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* review rules: a blank override_authors entry never matches an override with no author

Round 1 (Neon): people.has((post.author ?? "").toLowerCase()) matched an
override with no author (T3's planned one) when override_authors held "",
so T3's override cleared findings, the cap and the approach lens. One
helper, isPersonsOverride, now needs a non-empty author and skips blank
entries, for lens_arm and lens_start's postAgainKeys alike; lens_arm
also refuses an override_authors list the gate's parser refuses
(review_config._override_authors: logins, each once, at most 20).

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* review rules: an edited, hidden or unread override covers no read and clears nothing

Round 1 (Neon): gateRounds and lens_start's gateReads trusted
post.override without the gate's own checks (lens.Review.override_sha:
never edited, not hidden), and lensPosts could set it on a post whose
hidden flag was not read. One check, trustedOverride (a full sha, not
edited, not hidden, flags read), now gates every override in
newestOverride and gateRounds, and lensPosts keeps an override only when
GitHub recorded it as not hidden.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* review rules: an override is scanned as a lens post as the gate scans it (shared vector)

Round 1 (Neon): lens.Review.scan_posts reads every post of a lens author,
overrides too, so an override prefix that reads as a lens header
(lens: override, which config.py accepts) makes the override a lens
entry with no sha and the gate fails the head. The TS port skipped every
override post and armed it. Now only an override whose author has no
lens association (overrideOnly, set by lensPosts) is skipped, as the
gate skips it. A new shared reads vector with its own override_prefix
runs in review_judge.test.py, lensStart.test.ts and lensArm.test.ts.
lens_arm also refuses an override prefix config._text refuses (blanks
around it, a line break, empty).

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: T3's own override is never a person's, whatever login it posts as

Round 1 (Opus): the gate counts an override only from the override
association's account, which until #916 is the owner's own login, often
listed in review.override_authors. So T3's posted override would read as
a person's on the next call and clear findings, the cap and the
approach lens. lens_arm now takes the login T3 posts as (poster, a
typed input; unknown or not a login: refused), drops the author of
every override by that login before judging, and says in its notes
when the gate will count T3's override as a person's.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: refuse a pull request read that is not the number asked for

Round 1 (Neon, minor): planLensArm never compared pull.number with
pr.number, so a mismatched read armed one number with another pull
request's reviews and head.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: name both reads when the lenses read two commits of one change

Round 1 (Neon, minor): when every lens read the head's change but not
one commit, the gate fails the head, yet no lens counted as unread, so
the refusal said "lens  does not read this head". It now names each
lens and the commit it read.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: a quick check whose flags were not read is not called edited

Round 1 (Neon, minor): the refusal said "is edited" for a post with
unread flags (a review whose edit and hidden flags were not read). It now
says so.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: gateRounds reads the head lower-case, as the gate does

Round 1 (Neon, minor): the exported gateRounds compared a person's
override sha with the head as given, so a caller passing an upper-case
head missed that override (head_check.review_rounds lower-cases it).

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: the module comment says the round-1 rules

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* review rules: types for the round-1 fixes (exactOptionalPropertyTypes)

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: refuse exactly the review blocks the gate's parser refuses (shared vectors)

Round 2 (Neon): planLensArm read the review block as given, so blocks
review_config.parse_review refuses were armed under or crashed it:
override_authors as a string (TypeError), findings missing (no finding
judged), bad rounds, a normal rule with no lenses (armed with 0 posts).
reviewConfig.ts ports parse_review's refusals (keys, types, lenses,
min_lenses, rules, catch-all, rounds, override_authors and the rule
order check with glob_witness). A new shared review_configs section (45
blocks, each refused or not as parse_review decides) runs in
review_judge.test.py and reviewConfig.test.ts, and every valid configs
block parses in both. lens_arm refuses any block with a problem.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: a quick check of this head that is not a bare yes holds it, in any shape

Round 2 (Neon majors 1 and 2, Opus major and minors): the uncited
nit-only check read only well-formed newest entries, so it deadlocked a
head that a clean next round or a person had passed, and it missed a
quick check the gate cannot read as a report (a title line above the
header, a fence, a quote, no lens marker, edited, hidden, a short sha),
which T3's planned override then turned into a pass. It also read only
each lens's newest comment, so a later quick check of an older head hid
this head's no, and it matched only the literal name quick-check.

Now quickCheckHolds reads every comment, every line folded: per lens
and per head, the newest one of this head whose nit-only value is not a
bare yes, or a quick check (quick-check, quick check, quickcheck, as
lens_key folds it) with none, holds the head. A comment naming no sha
counts as one of this head. Only a person's override newer than the
hold, or a clean read that passes without the hold and without any
override, releases it; T3's own override, posted or planned, never does.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: T3's own override never covers a comment the gate cannot read

Round 2 (Opus major, root fix): a lens report the gate reads as
NO_HEADER (inside a fence, under a title line, in a quote or table)
fails the head, and any override newer than it covers it and reads its
findings loosely, so T3's planned override alone passed the head (new
shared reads vectors show both, through the gate's own replay and the
TS ports). lens_arm now refuses (posts) while such a comment is newer
than every trusted override that is not T3's own, posted or planned:
that lens posts a report the gate reads, or a person overrides.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* review rules: one login compare (sameLogin) for T3's posts and a person's override

Round 2 (Neon, minor): lens_arm matched T3's own posts by lower-case only,
while isPersonsOverride trimmed the author first, so a padded author
was not T3's but was a person's. sameLogin compares as the gate does
(lower-case, nothing trimmed; a missing or blank login matches nothing)
and both use it.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: a cited quick check is skipped only when it is a trusted override

Round 2 (Neon, minor): the cited loop skipped any post with an override
field, also one that is edited, hidden or holds no full sha, which the
gate reads as an ordinary comment. It now skips only trustedOverride.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_start: test lensPosts' override reading (hidden: null, overrideOnly)

Round 2 (Neon, minor): round 1 changed lensPosts (an override needs
hidden false; overrideOnly for an author with no lens association) with
no test of its own. lensPosts is exported and tested: an override whose
hidden flag was not read is no override, overrideOnly is set only for
an author with no lens association, and a lens: prefix override by a
lens author is scanned as a lens post.

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm tests: post times without Date (effect globalDate)

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(knip): un-export isQuickCheckName and quickCheckHolds

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* lens_arm: un-export the QuickCheckHold type (used only here)

Part of #888

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
* Account order: a project may set its own order (#881)

A project's `accountOrder` override replaces the server's for the tasks
delegated from that project's threads; an empty one moves nothing there.
Left out or null: the server's order. Read leniently and saved strictly,
as the server's; an older client's save keeps it, only null clears it.

- contracts: the project-scoped key, its file and patch fields, its
  default row, and the feature count reads each project's override.
- delegate_task: the order check reads the parent's project order.
- Settings: a project screen shows the Account order row; its reset gives
  the project the server's order again.
- docs: README row and section, change file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Account order: project tests in a fork-named file (seam check)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Account order: the change file names #1231 and the project's own order

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Account order: say the pacing gate can still move a task; no order on remote handoffs or create_threads

The project note said an empty order moves nothing, which is wrong with
usagePacingGate on: the gate runs after the order and reads none. The
README now says so, and that remote handoffs and create_threads read no
account order yet.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
)

* Git: removing a worktree first stops its background index refresh

A new worktree whose first index refresh ends inside the checkout's second gets a second refresh about a second later, in the background. It writes index.t3-refresh and index.lock beside the index in .git/worktrees/<id>. A removal in that window (a launch cancelled right after checkout) made `git worktree remove` fail with "failed to delete '.git/worktrees/<id>': Directory not empty", so the cancel kept the worktree and the thread's binding to it. Seen as a flake of "cancels task folder setup with side chat".

removeWorktree now interrupts that worktree's refresh and waits for it, its git process and its copy cleanup included, before Git runs. A refresh for a folder made again at the same path stops the older one.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fork seams: announce the worktree index refresh stop in GitVcsDriverCore.ts

A new worktree's background index refresh writes into the worktree's Git
folder while `git worktree remove` deletes it, so a cancelled launch could
keep its task folder. The fix (#1210) keeps its logic in
apps/server/src/fork/worktreeIndexRefreshes.ts and needs five one-line seams
in the upstream driver; this list-only change announces them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* vcs: keep the index refresh code in a fork file, with five seam lines

The seam check refuses fork lines in GitVcsDriverCore.ts that its list does
not name. The tracking and stopping of a new worktree's background index
refresh moves to apps/server/src/fork/worktreeIndexRefreshes.ts; the driver
keeps only the five one-line calls announced in .github/fork-seams.json.
The regression test moves to fork/worktreeIndexRefreshes.test.ts, with a
second test that removes a worktree twice.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fork seams: move the index refresh stop lines from announced to added

Step 2 of 2 after the announcement (#1212): the five lines are now in
GitVcsDriverCore.ts, so they move to the entry's "added".

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fork seams: announce the index refresh stop in checkpoint restore (GitVcsDriver.ts)

A rewind right after its task folder was recreated failed with "Git's
index is locked": the restore met the new worktree's background index
refresh swapping its copy in through index.lock. restoreCheckpoint will
stop that refresh and wait for it first. This list-only change announces
the two seam lines; the fix PR adds them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(server): a checkpoint restore stops a new worktree's index refresh first

A rewind right after its task folder was recreated failed with "Git's
index is locked" (flaky CheckpointRollbackService.taskFolder test
"restores a task folder storage cleanup removed before rewinding it"):
the recreate's background index refresh swaps its refreshed copy in
through index.lock about a second after the checkout, and a restore that
writes the index meanwhile fails.

The refresh registry is now one per process, so the checkpoint driver
(a service of its own) sees the refreshes the driver core forks.
restoreCheckpoint stops the refresh of the worktree its cwd is in and
waits for it before any Git command; the swap is uninterruptible, so it
has either finished or never started. Moves #1224's two GitVcsDriver.ts
seam lines from "announced" to "added".

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(server): the index refresh registry resolves with Effect's Path, not node:path

Each tracked refresh keeps the Path of the driver that tracked it, and
stopWithin resolves the cwd with it (effect(nodeBuiltinImport)).

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…#875) (#1215)

* fork seams: announce the fork budget lines in AgentContextBudget.test.ts (#875 PR 6)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MCP profiles PR 6: delegate_task gives a sub-agent a narrower profile

delegate_task takes an optional mcpProfile. Seat 2 checks it within what
the sub-agent would get without it (its role default cut to the caller's)
and records it for the child's thread before the dispatch. Every read of a
delegated child's profile cuts the pick to that again, for the whole
lineage; a task for another machine carries the pick instead of the
parent's. A retry keeps the first pick; an unreadable record refuses.

Part of #875

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* starterMcpProfiles: decodeStarterPicks is used only in this file

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* delegate_task: the sub-agent's pick is narrowMcpProfile, a narrowing-only field

The tool field shared the person-only mcpProfile setting's name. It is
now narrowMcpProfile, and the person-only guard also finds a field whose
name only contains a setting's, passing only reviewed narrowing picks by
tool and field. The tool list grows by the one field (budget updated).

Part of #875

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Put agentContextBudget.json back as main has it

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MCP profiles PR 6: one pick per child id, no leftovers; fork bytes in the fork budget

The pick is checked before the slot gate and bound to the child's id after
it, under the record's lock: a call in flight on the same id must name the
same pick, an accepted child keeps its first pick, a refusal or a stop
before the child is made removes the record, and a retry without a pick
drops one a stopped server left. A remote retry of an accepted task with a
different pick is refused. Recorded names are trimmed.

agentContextBudget.json is back as main has it: upstream's budget test
measures each tool without the fork's input fields (the lines announced
in the base PR), and ForkAgentContextBudget.test.ts counts them in
forkAgentContextBudget.json.

Part of #875

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* delegateMcpProfile: the retry refusal and the release are used only in this file

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* starterMcpProfiles, delegateMcpProfile: the claim and hold types stay in their files

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* MCP profiles PR 6: a pick is never dropped on a read that fails

A child counts as made when the thread store has it or its command has a
receipt, read from the receipt store with its errors kept: a failed read
refuses the call and never means "not made", and release keeps a record
unless it is known that nothing was made. Profile reads with no state
folder refuse delegated-child lineages, and the plan read reads the
picks. A task for another machine binds the first pick sent per
clientRequestId, recorded after the checks there (no leftover on a
refusal, a retry after a half-way stop is matched). A retry while the
child is still being prepared is told so.

Part of #875

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…sh-session row (#877) (#1235)

The 11-21 design wrapped upstream's fresh-session line in a scope, which the
formatter re-indents, so the seam check refused it. The new design keeps
upstream's lines in place: one fork element before that line renders
"Handoff N" for a handoff's first message and hides its next sibling,
upstream's "New session" divider. The unused 11-21 announcements (the scope
tags and the V2LifecycleRow.tsx lines) are dropped.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…thon (#1233)

The gate's reasons quote comment text with Python's own repr, which escapes
by the runner's Unicode. On a Python with Unicode 16 a symbol new there
(U+1FAE9) printed as itself, where the gate's Unicode 15.0 and T3's port
write \U0001fae9: the same head got another reason text depending on the
runner. lens.py_repr pins it to PY_UNICODE's table (escapes what that
Unicode leaves unassigned; refuses, as UnicodeDrift, a code point only that
Unicode assigns), and the four quoting sites use it.

The table test now checks the table as far as the runner's Python can tell
(the full table on the pinned Unicode, monotonic on a newer or older one)
and expects the unicode vectors' refusal where this Python assigns a code
point a rule reads otherwise, instead of asserting the runner's version.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…5) (#1236)

One fork element just before upstream's fresh-session line in UserMessageRow
renders "Handoff N" for a handoff's first message (a fresh-session user
message with the server's handoff id for its thread and a [T3 handoff N]
header) and hides its next sibling, upstream's "New session" divider, with
CSS. Any other message renders nothing and hides nothing; old or partial
rows give nothing too. Spends the three lines announced in #1235.

Co-authored-by: Claude Opus 5.5 <[email protected]>
… like OpenCode

Upstream pingdotgg#41726 made recovering a failed usage probe on the interval opt-in
(recoverUsageOnInterval). The fork's test of the interval loop's own answer
still assumed every driver recovers; it now opts in the way the OpenCode
driver does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ressure too

Upstream's t3_environment_read now adds a machine field that samples
HostResources.readPressure. The fork's linked-machine test mocked only read,
so the box's handler died and the read came back as an error.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… now needs

Upstream pingdotgg#44369 made ProjectionStore.layer need effect/crypto/Digest (its
pull request sweep reuses a decode while the payload digest matches). Two
fork reads build their own store inside an Effect (the lens_start
visibility check and the Claude MCP profile's lineage read), so Digest
leaked into every MCP handler's and the Claude driver's requirements. They
now provide NodeCrypto.layerDigest with the store, as upstream's own tests
do; the fork tests that build the store do the same.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ironment read its host sampler

Upstream's ProjectionStore layer now needs a Digest, and every environment
tool now names the HostResources sampler and reads its pressure. The fork's
own tests that build a store or an environment toolkit provide both, so they
test the same behaviour as before on the new base.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s follow the machine (#882) (#1234)

* heavy-install --memory-auto: the slice's memory caps follow the machine (#882 D7)

--memory-auto works out the heavy slice's MemoryMax (MemTotal less the
capacity rule's margin and its agent floor's start cost, read from the
release's capacity-rule.json) and MemoryHigh (90 % of it). The config
remembers it, so every later install run works the caps out again from
the memory the machine has then. Fixed --memory-high/--memory-max turn
it off; the two together are refused; a machine too small for a 1 GB
slice is refused with nothing written.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* heavy-install --memory-auto: lens round 1 (unit holds the mode, kit's own margin, rounding)

- A slice unit someone else wrote is refused in the check step, before
  anything is written, whatever the config says; the unit is written
  before the config. A refused run (auto, or a repeated --memory-max on
  main's path) no longer leaves a config that lets the next plain run
  overwrite the foreign unit.
- The unit itself says its caps are automatic (its second line) and
  holds the extras, so a switch between automatic and fixed that stops
  half-way keeps the new way on the next run.
- The margin is t3-capacity's own: the release's lib/capacity_rule.py
  loads and checks the rule (shipped_rule) and works the margin out
  (_margin: wide without swap, with unreadable swap or without cgroup
  v2, rounded up). A rule its loader refuses is refused here.
- Both caps are rounded down to 64 MB, so small MemTotal moves leave
  the unit as it is.
- README: the container limit is not seen; a machine that drops under
  the floor refuses upgrades until fixed caps are given.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fork-ci-tests: heavy install.test.py weight ~14s after the lens round's tests

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
Upstream's AgentScopeShape now has controlGroups, where agents' memory is
read. The slot observer test builds its scope by hand, so it says it has
none, like the default scope.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A record of unknown values is advertised as a bare object type, with no
value schema. Upstream's model selection options now decode such a record,
so the walk missed the four reviewed options paths and the reviewed list
no longer matched. The walk now counts a bare object type as open, so the
reviewed paths are found again and a new one is caught too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
* Handoff: set the idle timer again after a restart (#877)

At start the handoff service re-arms the idle timer of each active thread
with handoff on whose last turn completed less than an hour before, as the
idle timer (not a turn end), so a restart neither drops a warm thread's idle
handoff nor fires a size handoff of its own.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Handoff change file: name #1209

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Handoff: keep the re-arm lookback private to its file

knip's unused-exports check failed on HANDOFF_REARM_LOOKBACK: only
HandoffService.ts reads it, so it needs no export.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
scuttletoby and others added 29 commits November 30, 2026 05:13
… paragraph (#1464)

* owner-questions: skip indented code blocks; end the options list at a paragraph

The template check now skips indented code blocks (4 spaces or a tab past
the list item the line is in, after a blank line or a heading) as it skips
fenced ones, and an option's text ends at a blank line followed by text
not indented under an option, so a paragraph after the list cannot give
the last option its cost. Four new template cases, three failing before.

Follow-up to #1382.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs: link #1464 from the owner-question template change file

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
… Codex adapters (#808) (#1465)

Step 1 of adding the seam lines for the role-thread question rule (part 3,
left by #1355): a question call from a thread that holds a role now (the
assistant or a project orchestrator) is kept as an open owner question and
answered at once with "not answered yet", so the thread does not wait for
the owner. List only; step 2 adds the lines with the fork seat
apps/server/src/fork/roleQuestionSeat.ts, after the store (#1375) merges.

- ClaudeAdapterV2.ts: an import, the seat made beside mcpProfiles, and two
  lines first in the AskUserQuestion branch of canUseTool.
- CodexAdapterV2.ts: an import, the seat made beside continuationRequests,
  and two lines in the item/tool/requestUserInput handler after its turn
  check.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…upstream ending in .git (#854) (#1466)

Follow-up to the code lens minors on #1402.

- seriesBranch: refuse HEAD (git check-ref-format --branch refuses it) and
  full ref forms (refs/..., origin/...), so part 2 can feed it to the
  push guard as one short branch name.
- A key given twice is refused instead of read last-wins.
- upstream: refuse a repository name ending in .git.
- Docs: list the new refusals; an empty file is refused (delete it instead).

Co-authored-by: Claude Opus 5.5 <[email protected]>
… key per head (#1467)

A head pushed again sits at its last push (a re-run marked `rerun` keeps its
place), `toContinue` names the full head that `continuedAfter` matches, and the
stop key is per task and head, so a re-run that changes the reason tells the
parent once.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…k its rebase (#1472)

A minors item queued with readyWhen pr-merged of PR N names N in its id, title and
pr field, so writers() counted it as "a writer works on it". It cannot start while
N is open, so a conflicting N never got its rebase (seen on #1373).

Co-authored-by: Claude Opus 5.5 <[email protected]>
…and MessagesTimeline.tsx (#879) (#1473)

List only. In the assistant thread's texting look, a closing replies fence in an
assistant reply becomes buttons that send through the composer. ChatView.tsx gets
an import, one hook call and a fork context around ThreadTimeline; MessagesTimeline.tsx
gets an import and one element at the end of TimelineRowContent. Step 2 adds them.

Part of #879

Co-authored-by: Claude Opus 5.5 <[email protected]>
…issues (#1480)

- Read only enabled, supported machines (enabledEnvironmentIds), so a
  machine the owner turned off is not named as "Not connected now".
- When issues are unsupported, the first line gives only the sign-ins.
- Change file notes that cached statuses can show briefly on reconnect.

Part of #808

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ccount (#881) (#1329)

* Account order: t3_thread_launch moves an agent's launch off a spent account (#881)

An agent's t3_thread_launch that names no model, on a spent account, now
starts on the first account in the order that applies (the project's own,
else the server's) with room that lists the same model, takes the same
options unchanged, is not turned off for the project and offers the started
runtime mode. The slot is counted on that account.

- handlers.ts: the two lines #1312 announced (forkLaunch, and launchGate
  taking it), moved from announced to added in fork-seams.json.
- usage/accountOrder.ts: moveByOrder, the order loop delegate_task and
  create_threads ran inside delegateChecks.ts, now shared by every route;
  orderThatApplies moves here too (delegateChecks re-exports it).
- fork/launchAccountOrder.ts: the launch's candidate check and log line.
- launchGate runs the order first, before the no-message return, then
  linked pacing and the slot on the final account.
- Docs: under modelPolicy enforce a launch naming no model is refused
  before the order, so only off/advise launches move; not asked again.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Account order change file: link #1329 (#881)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
systemd 255 kept hundreds of tmux-spawn-*.scope folders active below one
agent slice after their panes ended (cgroup.events populated 0, no
process, 0 MB). scope_demand only treated a missing cgroup as gone, so
each owed a whole agent: reserved 67916 MB, free -61514 MB, and every
start on the machine was refused for 30+ minutes.

A listed scope (this user's agents and plain heavy jobs, other users'
agents and jobs) whose cgroup.events says populated 0 now counts
nothing, with one note giving the number. A missing, unreadable or
garbled cgroup.events still counts it (fail closed); a live ticket owes
its cost however its scope reads.

claude-login's RealTmux tests already give tmux no user bus, so their
panes never get a scope of their own; a new test pins that (the pane is
in the test's own cgroup).

Co-authored-by: Claude Opus 5.5 <[email protected]>
…1481)

The transient filter was the glob run-u[0-9]*.*, which also skipped real
units such as run-u9backup.service. It is now the regex
run-u[0-9]+\.[a-z]+. timeoutSeconds is now one deadline across every
systemctl call of a run, so the check's own one-line timeout message
shows before the runner's generic one. The docs say which systemd-run
names are skipped and that run-r<hex> ones still count.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…PRs, partial on unfinished runs (#1482)

Follow-up to #1419 (the three minors of its code lens):
- read_cache checks every cached time with stamp() (and stamp() no longer raises on a right-shaped non-time),
  so a bad mergedAt/created reads the cache as empty and it is rewritten, instead of crashing the clean-up daily.
- a cached merged pull request merged in the last RELIST_DAYS (2) days has its branch's runs listed again; a run
  whose attempt rose or whose updated_at changed since its read is read again. Cache version 2 (runs keep
  "updated"); an older cache is read as empty once.
- a run still going makes the report ci-cost.partial (warn), not only a stderr note.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…r full run (#1090) (#1483)

* Fork tests: Rust and Release Smoke run as Lint steps, 2 fewer jobs per full run

Each was about 40-60 s, most of it runner start, checkout and setup (Rust about
22 s of work, Release Smoke about 11 s), so a full run started two runners for
about half a minute of checks. Both now run as gated steps of Lint: each keeps
its gate, its steps run in order, and they still run after an earlier Lint step
failed. fork-fleet.json, fork-ci-result's needs and the tests that named the two
jobs follow.

Part of #1090.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fork tests: the Cargo cache save in Lint runs only when every Lint step before it passed

The save had !cancelled() like the merged Rust steps, so a push whose Lint
failed elsewhere could still save; fork-ci-cache-keys.cjs refuses that. The
cache-keys test now looks for the Cargo restore and save in Lint, their new job.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…5) (#1486)

* heavy: learn the memory peak per light step, not one per kind (#882 D5)

Every light CI step ran under one kind, so each one reserved the kind's
shared start value (1536 MB) and a 25 s step waited for room it never
uses. Each queued job now also has a step (--step KEY, else its command
line). A step keeps its own last 20 peaks in peaks.json; once one of
them exited 0 by itself, it reserves its own highest x 1.15 (below the
start value too, same 4x and budget caps). A new step, or one with only
failed or stopped runs, gets the kind's value as its first-run default.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* heavy: a step learns from memory.peak, and peaks.json gets its own lock (#882 D5, r1)

- The Measurer hands the queue's sampler its memory.peak-based need, so a spike
  between two samples counts; only a run with that figure may lower its step.
- record_peak also takes peaks.lock next to peaks.json (one file per user,
  one queue lock per slice), so two slices ending together keep both records.
- README: derived step keys, the 20-run window, a raised --mb, how to start a
  step over; the sampling-limits sentence now covers steps.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ry copy agrees (#987) (#1500)

The Skill check read the first copy T3's skill list keeps. The list passes
over a copy it cannot parse and takes the next one of that name, and
Claude Code's own order is not checked against T3's, so Claude Code could
run a copy the check never read.

Now a name found in more than one of the managed, config and project skill
folders is refused (enforce) or noted (advise) unless every copy reads and
runs the same model and effort. The refusal names each copy and what it
runs. Plugin skills (prefixed names) and launch-arg folders are not
scanned.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ecks (CI flake) (#1501)

Upstream's "bolds $word after '$prefix' with Mod+B over a selection"
read the editor right after pressing End. ProseMirror reads End's caret
move from Chrome's selectionchange, which can arrive after the key press
resolves on a loaded runner, so the markers shown around the selection
were still there and the bold check read nothing. Wait until the
selection has collapsed (the caret left the markers) first.

Step 2 of 2: adds the lines announced in step 1 and moves them to
"added".

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ed tests (#1493) (#1495)

* Tooling tests: rules against bloat, a ratchet on PR- and round-named tests (#1493)

docs/fork/tooling-tests.md adds the tooling points to 15_testing.md (extend before adding, one test
per behaviour, no PR- or round-named tests, no hand-written mutants, duplicates folded). The code lens
flags new test bloat and names the fix.

fork-test-names-check.cjs refuses new test files, classes, functions and titles that carry a PR,
issue or round, in the files a branch changes under the config's roots. Today's 36 names are in
.github/fork-test-names.json, whose allow list may only shrink. Fork checks runs it through the
upstream-files step's script, so no workflow changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Fork changes: list #1495 on the fork checks change

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Tooling tests doc: upstream baseline, is a test worth keeping, core tests, one place (#1493)

The doc starts from 15_testing.md and adds the worth-keeping check (a real break, or only a
small detail), a few core table and contract tests per tool, and where a test lives. The lens
and the fork README only point to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test-name check: refuse shrunk roots and removals for untouched files; fixture and review tier (#1493)

A branch whose roots leave out a base root is refused, and so is an allow-list entry removed for a
file the branch does not change. The precheck fixture copies the new script the upstream-files
check requires. The review policy test sorts fork-test-names.json as bookkeeping (NOT_GATE). The doc
says how entries are removed and that moving a file renames its flagged tests.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test-name check: judge the list and roots against the merge-base, not main's tip (#1493)

A branch behind main was refused once a cleanup merged, for an entry main removed and it never
added. The added-entry, removed-entry and left-out-root rules now read the config at the merge-base;
main's tip still decides which files count. A branch from before the config is held to main's list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…s past 2,000 entries (#885) (#1474)

host_read's core never ends a page inside a UTF-8 character (a page that is
not the file's last is cut back before an incomplete character, at most 3
bytes), says where the next page starts (nextOffset) and gives the page as
text when it is whole UTF-8. host_list's core takes `after` (the `next` of the
page before) and reads the folder as a stream that keeps one page of 2,000
names, so a big folder no longer costs a whole sorted copy.

Co-authored-by: Claude Opus 5.5 <[email protected]>
* pr-queue: priority_labels, a merge priority by label (#862)

An optional, ordered `priority_labels` config key: among armed pull
requests that are behind, one carrying an earlier label is updated
first; ties stay oldest first. With the key, an up-to-date pull request
still holds the queue whatever its labels, so a priority pull request
never costs another one a second CI run. Labels are read from the list
each run. Without the key the order and the gh list call are unchanged;
an older release refuses the key (exit 2), so pin first, then config.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* pr-queue: an UNKNOWN merge state holds a priority PR back too (#862 r1)

With priority_labels, merge state UNKNOWN now sorts with the up-to-date
PRs, so a behind labelled PR is not updated while a PR the queue just
updated may be running its checks. README "Priority" names the limits:
no ageing, a renamed label drops priority, a green BLOCKED PR holds the
queue. The order tests are one table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* pr-queue priority: r2 minors (lost older-behind row, UNKNOWN hold note)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ng (CI flake) (#1505)

"writes nothing on cancel, also after a profile was chosen" clicked "Add thread" while the
Advanced fold was still growing (its 200 ms height transition). Playwright scrolls the clipped
panel to reach the button, the growing panel moves it between press and release, and the click
is lost: no form opened and the fill timed out after 15 s (Test Web, a pull request that does
not touch this page; its next two runs passed).

A helper now opens the fold and waits until the panel covers its content before any control
under it is clicked. The three tests that click under the fold use it.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…#1486 follow-up) (#1507)

- bin/heavy: when heavy stops a command that is still running, record the
  peak (record_soon, no status yet) before stop_scope, so a heavy killed
  during the stop still leaves the run that raises its step.
- README: an older kit in another slice can still lose one record; the two
  small cases where a step's need comes out low (a sub-second spike followed
  by cache growth, growth in the last second before the scope ends); a
  stopped record's code is null.
- queue.test.py: one row, a stopped run with no status yet raises its step.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…test minors (#881) (#1508)

* Account order: an unreadable project check moves nothing; README and test minors (#881)

Follow-up to #1325 and #1329 (code-lens minors):
- A candidate's project check whose settings read fails (it dies in
  ThreadManagementService) no longer stops t3_thread_launch or
  delegate_task with a defect: the order move stops and the work runs as
  asked, and the pacing gate lets the task through, as with the first
  settings read failing. The comments now say this, and so does the README.
- README: a Claude-only order with a removed Claude id holds or lowers a
  Codex task only when it is ahead of its usage pace.
- UsagePacingGate test: the [] and [MAIN] orders again pin that nothing
  follows "has room." on the hold path.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* docs(fork): change note lists #1508

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
* desk-install: per-job memory and CPU limits from machine.json

A desk machine could not set the launcher's JOB_MEMORY_MAX_MB, JOB_MEMORY_HIGH_MB or
JOB_CPU_QUOTA, so every job got (MemTotal - reserveMb) / slots and all CPUs. The rented-host
trial measured anon peaks up to 5.8 GB, so 4 slots on a 32 GB desk fail the biggest jobs, and a
job that sees every CPU runs that many workers. desk.jobMemoryMaxMb, desk.jobMemoryHighMb and
desk.jobCpuQuota now reach launch.conf; bad values and high above max are refused.

Part of #929

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* desk-install: check job memory keys against this machine's MemTotal

Fix round r1 of the code lens: desk-install reads MemTotal as the launcher's
job_limits does and refuses, by key name and before writing anything, a
jobMemoryMaxMb above MemTotal - reserveMb, slots x max + reserveMb above
MemTotal, and a jobMemoryHighMb above the max each job gets (the given max,
or the launcher's default (MemTotal - reserve) / slots). Part of #929.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* desk-install: a MemTotal line with no number is refused, not a traceback (r2 minor)

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* desk-install: job memory check uses the dispatcher host's rule

Refuse when reserveMb is under slots x jobMemoryMaxMb (a job may grow to
its max, the reserve covers that), or when reserveMb + the biggest job
(4096) is above MemTotal (no job could start). This replaces the check
slots x max + reserve > MemTotal, which refused a valid 2-slot desk at
24 GB with reserve 16384. Table test: a passing 24 GB row, new refusals.

Part of #929

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
The three round classes (RoundOnePostTest, RoundTwoPostTest, RoundTwoPushTest)
move into PostTest and PushTest as behaviour tables: where the shell runs a
post, how a body file is named, what is not posted, the repos list, what a
push sends. Every input row is kept; the round-history docstrings go, and the
fetch-first hint becomes one assertion in the commit refusal test. The allow
list loses the file's entry.

Part of #1493

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ard (#1512)

- empty_cgroup treats a populated-0 scope as gone only once its folder is
  at least 2 s old (EMPTY_MIN_AGE_SECONDS); a younger folder or one whose
  age cannot be read still counts (fail closed). systemd makes the folder a
  moment before it moves the process in.
- The empty-scopes note says their owner's systemctl --user stop ends them
  (the list holds other users' scopes too).
- OneScopeRule also compares the two heavy_scope_of bodies (ast, no
  docstring), so an edit to one copy alone fails; docstrings name
  OneScopeRule, not OneRule.
- claude-login: drop the pane assertNotIn('tmux-spawn-'), which failed by
  mistake when the suite itself runs in a tmux-spawn scope.

Co-authored-by: Claude Opus 5.5 <[email protected]>
A queue item may name its own parentThreadId (and parentEnvironmentId);
without one the config's applies. The filler asks T3 for the children
of every parent it knows and keeps one shared pool of slots, caps,
memory, usage pacing and priority. A parent settled by hand or gone
stops only its own items (kept, with the reason logged); a left-over
start of such a parent is only looked up. An optional `parents` list
names the allowed threads; an item naming another is refused and kept.
Request ids, markers, catch-up, fix-red, autostep, lens-watch items
and the idle alarm (`idleAlarm.to`) work per parent.

Co-authored-by: Claude Opus 5.5 <[email protected]>
…ftover (#1509)

* fix(fork): scratch project's orchestrator pointer is a leftover role

The phone's Thread roles section dropped scratch projects before looking up
titles, so an orchestrator pointer set on one (by hand, or by a tool) showed as
"Orchestrator of project <raw id>", and its menu offered that project's threads
as picks although a scratch project gets no orchestrator.

roleSlots now leaves scratch projects out of the offered slots itself and marks
every trailing pointer (scratch, archived or unknown project) as not listed;
roleCandidates offers no threads for such a slot, so its menu is Remove only.
The phone passes all projects, so the leftover row shows the project's title.
The web list has no picks and already shows the title, so it is unchanged.

Follow-up to #1459.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(fork): move the leftover-slot case into the fork-named threadRoles.test.ts

threadRoleList.test.ts matches no "forkFiles" pattern, so the seam check
takes it for an upstream file and refuses fork lines in it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
)

Every install in the installer tests self-tests its copy with three
Python starts (the module import and two --help runs), and that was
nearly all of each test's time: the copies one test file makes are
nearly all byte-identical. install_fixture now gives the loaded engine a
subprocess whose self-test runs (this Python, cwd a copied tree) keep a
pass per command and tree digest (names, modes, owners, bytes, link
targets). A failure always runs again, and any change to the tree or the
command (modules, --help asked for, a RedCheck break) is a new run, so
no broken copy is hidden. tree_problems still runs every time.

Locally: golive/tests/install.test.py 92 s -> 28 s,
common/tests/kit_install.test.py 99 s -> 37 s, the other installer tests
2-9 s -> about 1 s each. Weights in fork-ci-tests.txt follow.

Co-authored-by: Claude Opus 5.5 <[email protected]>
Main announced this branch's six seam lines; the conflict in
.github/fork-seams.json keeps this branch's side, which moves them from
`announced` to `added`. Also give the test's file tab a template-literal
id (`file:${string}`), so it is a RightPanelSurface and the web typecheck
passes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant