Skip to content

Fork CI health: attention - #465

Merged
lab-agent-np[bot] merged 7 commits into
mainfrom
nplez1/issue-463
Nov 24, 2026
Merged

lab-agent-np[bot] merged 7 commits into
mainfrom
nplez1/issue-463

Conversation

@lab-agent-np

@lab-agent-np lab-agent-np Bot commented Nov 24, 2026

Copy link
Copy Markdown

Fixes #463

Three fork health checks were red on main, and all of them reproduced locally on f55ccb82. The
cause is one sync: the fork merged upstream 7daf01d99f3 (1,350 commits) as a8c508f5fb7, and
upstream's PR stablyai#46786 in that range deleted ~93% of the test files, several workflows, and rewrote
AGENTS.md's testing rule. The fork's ledgers, ratchet baselines and workflow contract still cited the
deleted files. Four of the nightly's 17 failures were something else: collisions between long-standing
fork patches and upstream's new tests, and one of them was a real defect.

What changed

check-actions-enablement. macos-updater-tests.yml left REQUIRED and EXPECTED_TRIGGERS.
Upstream deleted the workflow together with the updater suites it ran, so the contract named a path no
commit on either side carries — a permanently red health check rather than a guard. The two fork tests
that pin contract-against-tree went green from the removal itself.

check-fork-lane-red (fork-main-gates). Six lint steps:
check:max-lines-ratchet pruned two rows for files that no longer exist and gained the
upstream-owned orca-runtime-bots.ts exemption its own header already claimed (upstream 278 counted
lines; the fork's own-PR guard takes it to 318). check:focus-read-ratchet,
check:main-blocking-helper-ratchet and check:workspace-path-sync-fs-ratchet pruned — every one of
those is a shrink. verify:localization-catalogs lost two ko.json keys en.json no longer has.
check-upstream-file-comments was re-based, not widened: its recorded base was still
0c6207e3d7, so every fork comment on a file upstream rewrote in those 1,350 commits counted as new.
At the new base the total is 4752 against a baseline of 5113 — a 361-line shrink.

check-nightly-liveness. Eight of the ten failing files were fork-owned ledgers or tests pointing
at retired files: the e2e verdict contract still asserted upstream's old sharded job names while
.github/workflows/e2e.yml had already been re-pointed at the new unsharded one; local/e2e-known-failure-titles.json
and local/nightly-linux-known-red.json named specs and suites upstream retired (both lists are now
empty, which is the fail-closed state — every red fails); tests/tools/unit-gate.test.mjs cited a
spec-import barrel that is gone; the tab-focus harness passed event.detail > 0 where upstream stablyai#46611
made the parameter fromKeyboard; and the webhook refusal assertion pinned copy upstream stablyai#45929
replaced.

The last two were product defects, not stale ledgers:

  • The pi lane's cancel latch (upstream fix(pi): let background subagent starts right after Esc mark the row working stablyai/orca#47627) was broken here. This fork publishes one
    subagent_async_state snapshot per post instead of upstream's agent_start:subagent, so a child
    starting right after Esc matched nothing and was held as late work for the whole 15s window — the
    pane read done while the child worked. The latch now has one marked LOCAL(nplez1) rule: a snapshot
    naming a run the cancelled row did not carry is a start. Upstream's suite is kept and green,
    OMP-lifecycle and replay holds included.
  • The rate-limits isWatched patch answered two questions with one gate. Upstream's new
    service-activation-refresh case pins that an unwatched owner return stamps the interval without
    reading; the fork's documented local(usage) patch made every window watched. The gate is split:
    shouldBackgroundPoll is upstream's body byte for byte and still owns the owner return and the
    focus/show/restore listeners, while a fork-only shouldTimerPoll gates the interval clock and the
    deferred startup read. Both read through one refreshActiveWindow.

Verification

run result
pnpm tc clean
pnpm test — 13 focused suites (every originally-failing file, plus the fork invariants, process-docs, max-lines-exemption and both rate-limits suites) 230 passed, 0 failed
pnpm run check:code-quality:changed main passed — 0 new findings across 10 changed files
orca-queue node local/gate-lint.mjs @d762f22aa31 53 of 54 green; the one red is check:main-blocking-helper-ratchet, explained below
orca-queue node local/gate-unit.mjs @d762f22aa3 PASS — 10765 passed; 0 failed (0 allowlisted, 0 unexpected); 34 fork-local files passed; 58 s

The unit gate was run because the diff touches global inputs (config/**). It is a cached PASS for
this exact revision.

The one lint red is this machine, not this diff. check:main-blocking-helper-ratchet reports
eight rows over baseline in src/main/ai-vault-search/storage/**, cursor/hook-service.ts,
droid/droid-hook-config-files.ts and perf-notices/perf-notice-signals.ts — none of which this
change touches. Measured on a pristine f55ccb82 checkout via git stash: the identical eight rows.
CI's own fork-main-gates run at that revision (45420095853) reported only shrink rows for this step
and no growth, so the local resolution differs from the runner's and the runner is the arbiter. No row
was added for them, because a baseline row the runner does not need is reported there as stale.

Decisions

  1. Retire macos-updater-tests.yml from the contract rather than restoring the workflow. The file
    is gone upstream; restoring it would re-add upstream code upstream deleted, and the checker's own
    message prescribes updating the contract when a deletion is intended. Recorded in
    LOCAL-PATCHES.md § local(ci), which now says a retirement is the one edit to that table that
    removes work instead of absorbing a finding.
  2. Re-base the comment baseline at the new sync base with --init --accept, then --prune. The
    ratchet's own contract is that a sync moves the ruler; the alternative was deleting 18 comment lines
    of rationale from nine upstream files, which is another conflict surface, not cheaper. The accept
    reason names every one of the nine files and its delta.
  3. Split the isWatched patch rather than revert it or patch upstream's test. Taking
    LOCAL-PATCHES' offered full revert would stop the numbers being refreshed while the desktop window
    is unfocused — a user-visible product reversal that deserves its own issue, not a CI-health PR. The
    split keeps both suites' claims true and makes the fork hunk smaller.
  4. Keep the pi cancel-latch suite and fix the latch; retire the held-turn repost suite and record the
    gap.
    The first was a real defect on the fork's own lane, so deleting its coverage would have been
    the exact failure mode the issue warns about. The second cannot pass without re-adding the two
    subagent:async-* bindings convergence-ledger.md forbids, and porting upstream's repost into the
    fork's lane is a feature, not a sync repair — so it is a fork-refactor deletion in
    expected-deletions.json with coverage owed spelled out and filed as test(pi): pin the held-turn repost on the lane this fork runs #464: the repost cadence,
    the single timer across a Pi reload, the one-day cap, and whether a pane held by an async child past
    AGENT_STATUS_STALE_AFTER_MS goes stale are all unpinned now.
  5. checks: [] in upstream's test double, keeping the fork's unseen-rollup force. The double's own
    comment requires every field the hook reads, and the fork's hook reads checks. Documented in a new
    LOCAL-PATCHES.md § local(checks) as an event-driven force that consumes the existing
    forceNextFetch path — not a second cadence owner, which is what the convergence ledger forbids.
  6. Fix the tab-focus harness, keep the test. It is fork-owned (PR fix(focus): keep keyboard focus in the agent tab after chrome clicks #132) and guards real behaviour;
    only the harness was stale against upstream [Bug]: Clicking a right sidebar panel tab takes keyboard focus from the terminal stablyai/orca#46611.
  7. Fix the webhook assertion, keep the shipped copy. The copy is upstream's (fix(bots): name signed-out servers and wait for fresh connector state stablyai/orca#45929) and localized;
    reverting it would put a fork hunk in user-facing strings.
  8. Empty both known-red manifests rather than allowlist anything. Every entry named a file upstream
    retired, so none could ever match. An empty list quarantines nothing, which is the fail-closed
    direction; the contract test's non-empty assertion was replaced with a comment saying why.
  9. Exempt orca-runtime-bots.ts from max-lines instead of splitting it. The file is upstream-owned,
    the disable comment was already in it, and the fork's documented local(lint) policy exempts
    upstream-owned files rather than taking a permanent sync hunk. Its header comment no longer restates
    a stale count.

One consequence worth stating: the e2e verdict contract no longer passes --selected, because
upstream replaced the sharded matrix with one unsharded job that runs the whole suite, so there is no
selection manifest. The "a spec that never ran" check #317 added is therefore gone for interrupted
runs; the report is still the verdict's input and an empty one still fails closed.

Review

Reviewed by claude/opus, high: R1 found 1 BLOCKER (the new descendant-lifecycle case never reached
resolveCancelVerdictLatch, so deleting the upstream suite hid a live defect) and 2 SHOULD-FIX (three
ledgers claimed the retired repost suite's invariants "stay proved"); 4 blocking fixed. Delta clean on
R2, with one MINOR wording fix applied and no re-review needed.

Issue #463. Every red reproduced locally on f55ccb8 and is fallout from
upstream 7daf01d (PR stablyai#46786 retired ~93% of the test files and several
workflows) plus four collisions between long-standing fork patches and
upstream's new tests.

check-actions-enablement: macos-updater-tests.yml left REQUIRED and
EXPECTED_TRIGGERS. Upstream deleted the workflow with the updater suites it
ran, so the contract named a path no commit carries. Recorded in
LOCAL-PATCHES.md § local(ci); the two fork tests that pin contract-against-tree
went green from the removal.

fork-main-gates: max-lines pruned two dead rows and gained the upstream-owned
orca-runtime-bots.ts exemption its own header already claimed; focus-read,
main-blocking-helper and workspace-path-sync-fs pruned; two orphan ko.json keys
retired; the upstream-file-comments baseline re-based at the new sync base
(4752 lines against 5113, a 361-line shrink) with the growth reason recorded in
`accepted`.

Nightly: the e2e verdict contract follows upstream's unsharded job and its
report path; the two dead ledgers lost entries naming retired files; the tab
focus harness passes `fromKeyboard` as stablyai#46611 defined it; the webhook refusal
assertion follows the shipped copy; and the rate-limits isWatched patch is
split so the timer keeps the fork's gate while an owner return keeps upstream's.

The pi lane's cancel latch is the one real defect the nightly found. This fork
publishes one `subagent_async_state` snapshot per post instead of upstream's
`agent_start:subagent`, so a child starting right after Esc was held as late
work for the whole 15s window (stablyai#47627). The latch gained a marked LOCAL(nplez1)
rule for that shape and upstream's suite is kept and green. The held-turn repost
suite (stablyai#48146) needs the two `subagent:async-*` bindings this fork deliberately
removed, so it is a recorded fork-refactor deletion with its coverage owed.
…ment budget

The latch hunk needs a rationale in an upstream file, so it carries the
fork-comment-ok marker the ratchet asks for rather than growing the baseline,
and LOCAL-PATCHES.md § local(agents) now says why the rule is not "any snapshot
is a start".
@lab-agent-np

lab-agent-np Bot commented Nov 24, 2026

Copy link
Copy Markdown
Author

The gatekeeper did not merge (it never merges on a failed gate).

  • mergeStateStatus=BLOCKED: GitHub reports the PR blocked (required review or checks); a check is failing, and a failing check is never overridden

… baseline

check:main-blocking-helper-ratchet fails on the PR revision and on f55ccb8
itself: eight upstream-owned files now reach a sync fs/SQLite helper through
upstream's own call chains (its SQLite storage layer, and the
project-folder-placement split that put a readdirSync behind
getWorktreePathSettings). None has a fork hunk, so they are recorded in the
fork overlay with a why rather than diverged, which is the ratchet's documented
escape for a call the fork cannot move.

The earlier reading that this was this machine only was wrong: the same eight
rows reproduce on the merge revision GitHub tests, so the runner sees them too.
Upstream's shared connector list adds a photon entry for every bot, and the
fork's photon connector rides it. Mobile's typecheck has been red since the
sync because its words object lacked the field and needPage had no case for the
kind: TS2741 in connector-entry-rows.tsx and TS2366 in phone-connector-needs.ts.

The row is now listed with its mark and no press — the phone has no Photon
surface yet and the connector asks nothing of the owner, so listing it is the
honest half of parity rather than dropping it, which is what a switch with no
case for the kind was doing.
@lab-agent-np
lab-agent-np Bot merged commit ff2c90c into main Nov 24, 2026
19 checks passed
@lab-agent-np
lab-agent-np Bot deleted the nplez1/issue-463 branch November 24, 2026 19:43
nplez1 added a commit that referenced this pull request Nov 24, 2026
The CI-health bot pushed a repair of the same sync while this release was being
verified, touching the same ratchets, catalogs and contracts. Resolved by
intent, not by side:

- service-polling: the fork's clock gate (`shouldTimerPoll`) is a structural
  superset of upstream's foreground gate now, so a visible-but-unfocused window
  keeps polling while `refreshIfWatched` keeps upstream's narrower question; the
  fork's own polling suites and upstream's activation-refresh case both pass.
- mobile connectors: the bot and this line both added the photon case, so the
  merge left two; one case with the fork-comment marker remains.
- the Korean catalog's two tombstones are deleted: upstream's Korean catalog
  never shipped those keys, which is what the tombstone check reported.
- every generated baseline re-measured against the merged tree: focus 609,
  main-blocking-helper 6441 with the same nine raised rows, upstream comments
  4764, workspace-path 22.
- LOCAL-PATCHES keeps both sides' sections; the e2e, actions-enablement and
  unit-gate contracts take the union of both intents.

pnpm tc clean, gate-lint PASS (54/54), verify:localization-catalogs exit 0.
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.

Fork CI health: attention

1 participant