Landing detection still cannot be turned on: a shadow pass on pin 251850b (with #363) would file 22 priority tickets, stranded-closes on tickets that landed among them #385

Closed
opened 2026-11-20 19:27:12 +00:00 by ben · 4 comments
Owner

Dry run 2026-11-20T19:20Z on matou-workstation, dispatcher checkout at self-pin 251850b (carries #363), fleet-dispatch.sh once with FLEET_DISPATCH_MODE=shadow FLEET_DISPATCH_DETECT=on against a copy of the live spool. The live service is untouched and keeps FLEET_DISPATCH_DETECT=off.

Result: 22 anomalies, pass took 201 s. In live mode each would be filed with priority at the front of the fleet queue.

\()```

## 1. `stranded-close` still flags landed tickets (12 flagged)

Verified false on this repo's `main`:
- `dev-factory#381` — claimed `4afc398`, landed as `9761ed3` ("sandcastle: #381 — …").
- `dev-factory#374` — claimed `f13714e`, landed as `d710270` ("sandcastle: #374 — …").
- `dev-factory#359` — landed as `c1baa88` ("harness: #359 — …").
- `dev-factory#193` — the same sha #363 reported.

Each has a `main` commit naming `#N`, which #363's third witness (an `#N` reference by a `main` commit) should accept, and the claimed object exists in the checkout the pass read (`~/swarm/Matou/dev-factory`, `origin/main` current). So the witnesses are not matching in the deployed shape. The six `ai-company-os` and two `policy-generators` ones are unverified but have the same shape as #363's report.

## 2. Volume of the true-looking ones

- 5 `unrelanded-rescue`: possibly real, but filing one priority ticket per rescue branch on first switch-on needs a decision (age cut-off? one roll-up ticket?).
- 5 `unmerged-pr` on `Matou/coa`: these are PRs waiting for a human merge in a pr-mode repo — the normal state, not an anomaly a worker can act on. Across the fleet there are ~26 such PRs; only coa's were flagged, so the rule is also inconsistent between repos.

## Ask

Fix 1; rule on 2; then re-run this shadow pass and require it to come back with only anomalies a human agrees are real before `FLEET_DISPATCH_DETECT=on` in live.

Found by an interactive session at Ben's request.
Dry run 2026-11-20T19:20Z on `matou-workstation`, dispatcher checkout at self-pin `251850b` (carries #363), `fleet-dispatch.sh once` with `FLEET_DISPATCH_MODE=shadow FLEET_DISPATCH_DETECT=on` against a copy of the live spool. The live service is untouched and keeps `FLEET_DISPATCH_DETECT=off`. **Result: 22 anomalies, pass took 201 s.** In live mode each would be filed with `priority` at the front of the fleet queue. ``` \()``` ## 1. `stranded-close` still flags landed tickets (12 flagged) Verified false on this repo's `main`: - `dev-factory#381` — claimed `4afc398`, landed as `9761ed3` ("sandcastle: #381 — …"). - `dev-factory#374` — claimed `f13714e`, landed as `d710270` ("sandcastle: #374 — …"). - `dev-factory#359` — landed as `c1baa88` ("harness: #359 — …"). - `dev-factory#193` — the same sha #363 reported. Each has a `main` commit naming `#N`, which #363's third witness (an `#N` reference by a `main` commit) should accept, and the claimed object exists in the checkout the pass read (`~/swarm/Matou/dev-factory`, `origin/main` current). So the witnesses are not matching in the deployed shape. The six `ai-company-os` and two `policy-generators` ones are unverified but have the same shape as #363's report. ## 2. Volume of the true-looking ones - 5 `unrelanded-rescue`: possibly real, but filing one priority ticket per rescue branch on first switch-on needs a decision (age cut-off? one roll-up ticket?). - 5 `unmerged-pr` on `Matou/coa`: these are PRs waiting for a human merge in a pr-mode repo — the normal state, not an anomaly a worker can act on. Across the fleet there are ~26 such PRs; only coa's were flagged, so the rule is also inconsistent between repos. ## Ask Fix 1; rule on 2; then re-run this shadow pass and require it to come back with only anomalies a human agrees are real before `FLEET_DISPATCH_DETECT=on` in live. Found by an interactive session at Ben's request.

swarm-claim host=bens-mac-04 run=29155
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=bens-mac-04 run=29155 (automated multi-host claim — lowest live claim id works this ticket)

Root cause of part 1 (stranded-close) found — and it also explains the rescue volume.

All 12 stranded-close flags (and, same root cause, the 5 unrelanded-rescue) come from ONE collapse: the dispatcher checkout could not resolve the main-ref (origin/main) at pass time (a cold / not-yet-fetched checkout, a wrong remote, a failed best-effort fetch). Every reachability witness in fleet_landing_unlanded — by-SHA ancestry, patch-id, and the #363 #N-on-main witness — is measured against that baseline, and each git … 2>/dev/null swallows the error, so an unreadable baseline silently reads every claimed commit as absent and every rescue head as unmerged. That is the exact signature: all recently-closed tickets across all three checkouts flagged at once, including #193 (referenced ~10× on main), which witness 3 would clear the instant origin/main resolves.

Reproduced offline: fleet_landing_unlanded <repo> origin/does-not-exist <a-cleanly-landed-sha> returns the sha (flagged) purely because the ref did not resolve.

Fix (part 1): fleet_landing_unlanded and fleet_landing_rescues now probe the main-ref first (_fleet_landing_ref_resolves) and fail safe — judge nothing, one stderr line — when the baseline cannot be read, the posture the slice header already promises every gather. Covered by three new offline cases in tests/fleet-landing-detect-lib-test.sh.


Ruling on part 2 — Ruled by agent under ADR 0174 (veto anytime). Both are revertible by a later commit and re-gated by your own "only anomalies a human agrees are real" check before FLEET_DISPATCH_DETECT=on, so they are two-way doors.

  • unrelanded-rescue (5): these shared the part-1 baseline collapse (unresolvable main → every rescue reads merged:false), so the fail-safe fix removes the spurious ones. Rather than speculatively add an age cut-off / roll-up now against an unknown true count, re-run the shadow pass after this fix and read the real residual. If a genuine backlog of old parked branches is still noisy, the agreed follow-up is a rescue age-grace (FLEET_LANDING_RESCUE_GRACE) — filed then, not built blind.

  • unmerged-pr on Matou/coa (5): the rule is correct as gated — case 4 fires only where MERGE_AUTHORITY=agent-after-green. "Only coa flagged / ~26 across the fleet" is that gate working as designed: the other repos are human-merge, so their waiting green PRs are correctly NOT flagged. No harness change. The coa residue is a coa operational/policy fact, not a harness bug, and coa's identity layer is pull-only (ADR 0001) — not editable from here:

    • if coa's green agent PRs legitimately wait for a human as the steady state, coa is effectively human-merge and its MERGE_AUTHORITY should not be agent-after-green;
    • if coa IS meant to auto-merge green agent PRs, 5 sitting unmerged is a TRUE anomaly (the auto-merge isn't running) that the flag correctly surfaces.
      Either way it is for you to resolve in coa before live switch-on.

Why two-way: the code change is revertible and proven by the offline test added; it widens no security posture, trust, or spend. The part-2 rulings are re-checked by the host re-run + your sign-off gate before anything goes live.

Next (host/human, as the ticket asks): re-vendor (GOTCHAS 4), re-run the shadow pass on a dispatcher checkout with origin/main resolvable, and require only human-agreed-real anomalies before FLEET_DISPATCH_DETECT=on in live.

**Root cause of part 1 (stranded-close) found — and it also explains the rescue volume.** All 12 `stranded-close` flags (and, same root cause, the 5 `unrelanded-rescue`) come from ONE collapse: the dispatcher checkout could not resolve the main-ref (`origin/main`) at pass time (a cold / not-yet-fetched checkout, a wrong remote, a failed best-effort fetch). Every reachability witness in `fleet_landing_unlanded` — by-SHA ancestry, patch-id, and the #363 `#N`-on-main witness — is measured against that baseline, and each `git … 2>/dev/null` swallows the error, so an unreadable baseline silently reads **every** claimed commit as absent and **every** rescue head as unmerged. That is the exact signature: all recently-closed tickets across all three checkouts flagged at once, including #193 (referenced ~10× on `main`), which witness 3 would clear the instant `origin/main` resolves. Reproduced offline: `fleet_landing_unlanded <repo> origin/does-not-exist <a-cleanly-landed-sha>` returns the sha (flagged) purely because the ref did not resolve. **Fix (part 1):** `fleet_landing_unlanded` and `fleet_landing_rescues` now probe the main-ref first (`_fleet_landing_ref_resolves`) and **fail safe** — judge nothing, one stderr line — when the baseline cannot be read, the posture the slice header already promises every gather. Covered by three new offline cases in `tests/fleet-landing-detect-lib-test.sh`. --- **Ruling on part 2 — Ruled by agent under ADR 0174 (veto anytime).** Both are revertible by a later commit and re-gated by your own "only anomalies a human agrees are real" check before `FLEET_DISPATCH_DETECT=on`, so they are two-way doors. - **`unrelanded-rescue` (5):** these shared the part-1 baseline collapse (unresolvable main → every rescue reads `merged:false`), so the fail-safe fix removes the spurious ones. Rather than speculatively add an age cut-off / roll-up now against an unknown true count, re-run the shadow pass after this fix and read the real residual. If a genuine backlog of old parked branches is still noisy, the agreed follow-up is a rescue age-grace (`FLEET_LANDING_RESCUE_GRACE`) — filed then, not built blind. - **`unmerged-pr` on `Matou/coa` (5):** the rule is **correct as gated** — case 4 fires only where `MERGE_AUTHORITY=agent-after-green`. "Only coa flagged / ~26 across the fleet" is that gate working as designed: the other repos are `human`-merge, so their waiting green PRs are correctly NOT flagged. No harness change. The coa residue is a **coa operational/policy fact**, not a harness bug, and coa's identity layer is pull-only (ADR 0001) — not editable from here: - if coa's green agent PRs legitimately wait for a human as the steady state, coa is effectively human-merge and its `MERGE_AUTHORITY` should not be `agent-after-green`; - if coa IS meant to auto-merge green agent PRs, 5 sitting unmerged is a TRUE anomaly (the auto-merge isn't running) that the flag correctly surfaces. Either way it is for you to resolve in coa before live switch-on. Why two-way: the code change is revertible and proven by the offline test added; it widens no security posture, trust, or spend. The part-2 rulings are re-checked by the host re-run + your sign-off gate before anything goes live. **Next (host/human, as the ticket asks):** re-vendor (GOTCHAS 4), re-run the shadow pass on a dispatcher checkout with `origin/main` resolvable, and require only human-agreed-real anomalies before `FLEET_DISPATCH_DETECT=on` in live.

⏩ independent reviewer for #385 — verdict unauthenticated

review JSON
{
  "verdict": "unauthenticated",
  "findings": []
}
:fast_forward: **independent reviewer** for #385 — verdict `unauthenticated` <details><summary>review JSON</summary> ```json { "verdict": "unauthenticated", "findings": [] } ``` </details>

close-report for #385 — status success

✅ close-report gates passed — every claim verified against the pushed worker branch sandcastle/worker/20261120192753-1909682 (pre-land — the host promotes it to main only after its post-run verify, #193/#283); issue closed.

envelope
{
  "issue": 385,
  "status": "success",
  "commits": [
    "44a7a9f919039959b53d97926f533cea8a3e45cc"
  ],
  "changed_files": [
    "STATUS.md",
    "docs/journal/2026-11-20-385.md",
    "fleet-landing-detect-lib.sh",
    "tests/fleet-landing-detect-lib-test.sh"
  ],
  "tests": [
    {
      "command": "bash tests/fleet-landing-detect-lib-test.sh",
      "exit_code": 0
    },
    {
      "command": "bash tests/docs-budget-test.sh",
      "exit_code": 0
    }
  ],
  "criteria": {
    "Fix 1 — stranded-close no longer flags landed tickets": "Root cause: an unresolvable main-ref in the dispatcher checkout silently collapsed every reachability witness so landed work read absent (12 flagged incl. #193). fleet_landing_unlanded + fleet_landing_rescues now probe the main-ref via _fleet_landing_ref_resolves and judge nothing when the baseline is unreadable (commit 44a7a9f, fleet-landing-detect-lib.sh). Proven by 3 new offline cases in tests/fleet-landing-detect-lib-test.sh (ref_resolves true/false; unlanded flags nothing + emits a diagnostic on an unresolvable ref; rescues empty on an unresolvable ref).",
    "rule on 2 — the true-looking anomalies (unrelanded-rescue + unmerged-pr)": "Ruled under ADR 0174 and posted to the issue (comment 76255): the 5 unrelanded-rescue shared the same baseline collapse so the fail-safe clears them (re-run before adding any age cut-off); coa's 5 unmerged-pr are the case-4 gate working as designed (fires only in agent-after-green repos) — a coa policy fact, pull-only per ADR 0001, not a harness bug. Two-way door, re-gated by the host re-run + Ben's sign-off before FLEET_DISPATCH_DETECT=on."
  },
  "summary": "Landing detection now fails safe when the dispatcher checkout cannot resolve the main-ref, eliminating the 12 bogus stranded-closes (and 5 bogus rescues); part 2 ruled under ADR 0174.",
  "blockers": []
}
**close-report** for #385 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the pushed worker branch `sandcastle/worker/20261120192753-1909682` (pre-land — the host promotes it to `main` only after its post-run verify, #193/#283); issue closed. <details><summary>envelope</summary> ```json { "issue": 385, "status": "success", "commits": [ "44a7a9f919039959b53d97926f533cea8a3e45cc" ], "changed_files": [ "STATUS.md", "docs/journal/2026-11-20-385.md", "fleet-landing-detect-lib.sh", "tests/fleet-landing-detect-lib-test.sh" ], "tests": [ { "command": "bash tests/fleet-landing-detect-lib-test.sh", "exit_code": 0 }, { "command": "bash tests/docs-budget-test.sh", "exit_code": 0 } ], "criteria": { "Fix 1 — stranded-close no longer flags landed tickets": "Root cause: an unresolvable main-ref in the dispatcher checkout silently collapsed every reachability witness so landed work read absent (12 flagged incl. #193). fleet_landing_unlanded + fleet_landing_rescues now probe the main-ref via _fleet_landing_ref_resolves and judge nothing when the baseline is unreadable (commit 44a7a9f, fleet-landing-detect-lib.sh). Proven by 3 new offline cases in tests/fleet-landing-detect-lib-test.sh (ref_resolves true/false; unlanded flags nothing + emits a diagnostic on an unresolvable ref; rescues empty on an unresolvable ref).", "rule on 2 — the true-looking anomalies (unrelanded-rescue + unmerged-pr)": "Ruled under ADR 0174 and posted to the issue (comment 76255): the 5 unrelanded-rescue shared the same baseline collapse so the fail-safe clears them (re-run before adding any age cut-off); coa's 5 unmerged-pr are the case-4 gate working as designed (fires only in agent-after-green repos) — a coa policy fact, pull-only per ADR 0001, not a harness bug. Two-way door, re-gated by the host re-run + Ben's sign-off before FLEET_DISPATCH_DETECT=on." }, "summary": "Landing detection now fails safe when the dispatcher checkout cannot resolve the main-ref, eliminating the 12 bogus stranded-closes (and 5 bogus rescues); part 2 ruled under ADR 0174.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/dev-factory#385
No description provided.