Skip to content

feat(bin): assert the model a pinned launch actually runs on - #8019

Open
kesslerio wants to merge 25 commits into
kunchenguid:mainfrom
kesslerio:fix/7735-relaunch-model-pin-assert
Open

kesslerio wants to merge 25 commits into
kunchenguid:mainfrom
kesslerio:fix/7735-relaunch-model-pin-assert

Conversation

@kesslerio

@kesslerio kesslerio commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

What Changed

  • After delivery, bin/fm-spawn.sh reads back the model the started session itself reports and emits a model pin asserted|mismatch|unverified: verdict on spawn stderr. A canonical pinned Claude launch gets a collision-checked --session-id so its transcript is addressable, a Herdr-bound Pi relaunch is read from its own fully completed turn, and raw/T3 launches report unverified immediately instead of polling; a mismatch is reported rather than failing the launch or writing task status.
  • Relaunch, remote/local secondmate launch, liveness sweep, bootstrap, and restart boundaries now forward that verdict unchanged (portable sed -E filters), so the model evidence a spawner observed reaches its caller instead of being dropped.
  • Adds the opt-in tests/fm-model-pin-readback-live-e2e.test.sh vendor guard with a harness-free comparator selftest wired into tests/fm-live-gate.test.sh, fixture-backed portable cases across the relaunch, restart, liveness, spawn-dispatch, and T3 suites, plus documentation of the Pi/Claude measurements and session readback rules in docs/verification/runtime-backends.md.

Risk Assessment

✅ Low: The report-only checks use launch-bound session evidence, preserve worker status and launch outcomes, and conform to the recorded decisions without a substantiated material defect.

Testing

Standing up a disposable fm-live-lab with the machine's real Claude CLI, I spawned pinned workers through the real bin/fm-spawn.sh and observed all three verdict classes on the spawn's stderr: asserted for a pin the session actually ran (sonnet → claude-sonnet-5-5), mismatch for a decorated pin whose session reported the undecorated model (claude-opus-5[1m] → claude-opus-5), and unverified for a pin the vendor refused, which wrote a <synthetic> record. Each spawn exited 0 with the worker running, and the verdict never appeared in the lab's task state — the worker's own paused line stayed authoritative. The change's opt-in live guard also passed against real pi 1.5.2 and Claude 2.1.322, confirming a resumed session's own turn carries the resumed pin over its inherited history and that a --session-id launch's transcript is readable at that address. The lab was torn down in the same run, including its Claude trust entries, the task temp dirs, and the treehouse pool the product created; the worktree is unchanged. The Herdr-bound Pi relaunch readback and the secondmate restart/remote relay forwarding were not driven live, so they rest on the branch's portable suites and CI.

  • Live validation: ✅ go - 5 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Spawning a worker pinned to sonnet through bin/fm-spawn.sh with the real Claude CLI reports the model the started session actually ran, as model pin asserted ✅ pass live livelab-up-sonnet.log: model pin asserted: pin 'sonnet' actual 'claude-sonnet-5-5' (pinned Claude session 2a95c8b1-...) from bin/fm-live-lab.sh up --harness claude --worker --model sonnet; real-tr…
An adversarial pinned spawn whose real session reports a model different from the pin reports model pin mismatch and still launches the worker instead of failing the spawn ✅ pass live spawn-mismatch.log: model pin mismatch: pin 'claude-opus-5[1m]' but pinned Claude session fc680ac8-... reports 'claude-opus-5', spawned labpintest-mm ... window=firstmate:fm-labpintest-mm, spawn_e…
An adversarial pinned spawn whose real session never states a model (vendor rejected the request, <synthetic> record) reports model pin unverified rather than asserted or mismatch, and still launc… ✅ pass live spawn-unverified.log: model pin unverified: pin 'claude-sonnet-4-5' was not confirmed by pinned Claude session 071f7f9c-... (no session-reported model), spawn_exit=0; real-transcript-models.log show…
The model verdict never becomes the task's own state: a live worker's own paused status line stays the only status content and no model pin line is written anywhere in the lab's state directory ✅ pass live grep -rl 'model pin' /tmp/fmlab-pintest/home/state/ → none; the lab worker's file held only paused [at=1794695119]: waiting for gate file ... (livelab-up-sonnet.log shows that same worker parked o…
The change's opt-in live guard confirms on the installed vendors that a resumed Pi session's own turn carries the resumed pin over the record it inherited, and that a pinned Claude launch's transcript… ✅ pass live live-guard.log: ok - pi 1.5.2: a resumed session's own turn carries the model it was pinned to, over an inherited record naming another and `ok - claude 2.1.322 (Claude Code): a pinned launch reads…
A Herdr-bound Pi relaunch through bin/fm-control.sh relaunch reads the replacement's own turn (over the history it resumed) and asserts it, including a registered session file recreated during the pro… ⏸️ untested no Driving this live needs a Herdr lab session (bin/fm-herdr-lab.sh prepare/provision) whose pane the Herdr runtime has registered with a live Pi agent session, then a bin/fm-control.sh relaunch agains…
A secondmate restart, remote relaunch, or liveness sweep forwards the model pin verdict it observed to the caller's output instead of dropping it ⏸️ untested no Driving this live requires a real seeded secondmate home and an /updatefirstmate restart or a remote relaunch cycle over ssh (or an automatic liveness recovery of a dead endpoint) so a relaunch's stde…
Evidence: Live lab up with a pinned worker spawn (asserted verdict)

Source: Live lab up with a pinned worker spawn (asserted verdict)

lab: /tmp/fmlab-pintest (tear down with: bin/fm-live-lab.sh down /tmp/fmlab-pintest)
tree: 203c99de04f3529eaa0ca22b6e15b5cbf13dd9d0 from {run-worktree}
model pin asserted: pin 'sonnet' actual 'claude-sonnet-5-5' (pinned Claude session 2a95c8b1-2bbe-425a-9566-57fba0bd4e26)
spawned lab43f4e74182e8-worker harness=claude kind=ship mode=local-only yolo=on window=firstmate:fm-lab43f4e74182e8-worker worktree=~/.treehouse/notes-65d578/1/notes
gate: /tmp/fmlab-pintest/home/data/lab43f4e74182e8-worker/gate (touch, then message the worker to resume)
primary: claude --setting-sources project,local --model sonnet --effort medium --permission-mode auto
ok primary: claude pid 3708573 in /tmp/fmlab-pintest/home
ok probe: the primary answered LABREADY-43f4e74182e8
ok trust: /tmp/fmlab-pintest/home is trusted in the Claude store
ok mirror: verified writer, check passed, captain=1 main=1
ok host: supervision host pid 3722915
ok watcher: live watcher with a fresh beacon
ok worker: lab43f4e74182e8-worker parked on /tmp/fmlab-pintest/home/data/lab43f4e74182e8-worker/gate
fail treehouse: new ~/.treehouse entries: notes-65d578
not ready after 90s; the lab is left up for inspection: bin/fm-live-lab.sh pane /tmp/fmlab-pintest, then bin/fm-live-lab.sh down /tmp/fmlab-pintest
Evidence: Real spawn: model pin mismatch on a decorated pin, spawn still succeeds

Source: Real spawn: model pin mismatch on a decorated pin, spawn still succeeds

warning: /tmp/fmlab-pintest/home/data/labpintest-mm/launch-brief.md records no ship branch; defaulting to legacy branch fm/labpintest-mm
warning: /tmp/fmlab-pintest/home/data/labpintest-mm/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode local-only - confirm its definition of done matches
model pin mismatch: pin 'claude-opus-5[1m]' but pinned Claude session fc680ac8-448a-4fbd-b784-98799ee19cf7 reports 'claude-opus-5'
spawned labpintest-mm harness=claude kind=ship mode=local-only yolo=on window=firstmate:fm-labpintest-mm worktree=~/.treehouse/notes-65d578/2/notes
spawn_exit=0
--- worker status file (state/labpintest-mm.status) ---
--- end status ---
Evidence: Real spawn: model pin unverified when the session states no model

Source: Real spawn: model pin unverified when the session states no model

warning: /tmp/fmlab-pintest/home/data/labpintest-unv/launch-brief.md records no ship branch; defaulting to legacy branch fm/labpintest-unv
warning: /tmp/fmlab-pintest/home/data/labpintest-unv/launch-brief.md records no delivery contract line (scaffolded before ship briefs recorded one); launching on the explicit --mode local-only - confirm its definition of done matches
model pin unverified: pin 'claude-sonnet-4-5' was not confirmed by pinned Claude session 071f7f9c-7979-41fe-bb57-f1f7c3b3d815 (no session-reported model)
spawned labpintest-unv harness=claude kind=ship mode=local-only yolo=on window=firstmate:fm-labpintest-unv worktree=~/.treehouse/notes-65d578/3/notes
spawn_exit=0
--- worker status file (state/labpintest-unv.status) ---
--- end status ---
Evidence: Vendor transcripts for the three sessions (independent oracle)

Source: Vendor transcripts for the three sessions (independent oracle)

session=fc680ac8-448a-4fbd-b784-98799ee19cf7 file=~/.claude/projects/-home-art--treehouse-notes-65d578-2-notes/fc680ac8-448a-4fbd-b784-98799ee19cf7.jsonl
  reported=claude-opus-5
session=071f7f9c-7979-41fe-bb57-f1f7c3b3d815 file=~/.claude/projects/-home-art--treehouse-notes-65d578-3-notes/071f7f9c-7979-41fe-bb57-f1f7c3b3d815.jsonl
  reported=<synthetic>
session=2a95c8b1-2bbe-425a-9566-57fba0bd4e26 file=~/.claude/projects/-home-art--treehouse-notes-65d578-1-notes/2a95c8b1-2bbe-425a-9566-57fba0bd4e26.jsonl
  reported=claude-sonnet-5-5
Evidence: Opt-in live guard: pi resume turn and Claude session-address facts

Source: Opt-in live guard: pi resume turn and Claude session-address facts

FM_TEST_BEGIN 2026-11-14T22:28:06Z tests/fm-model-pin-readback-live-e2e.test.sh family=live-harness-optin expected_gate_skip=live-capability
# pi 1.5.2: inherited turn openai-codex/gpt-5.6-luna, resumed turn openai-codex/gpt-5.6-sol in one record
ok - pi 1.5.2: a resumed session's own turn carries the model it was pinned to, over an inherited record naming another
# claude 2.1.322 (Claude Code) reported claude-sonnet-5-5 for pin sonnet
ok - claude 2.1.322 (Claude Code): a pinned launch reads back the model its own session id addresses
FM_TEST_END 2026-11-14T22:28:16Z tests/fm-model-pin-readback-live-e2e.test.sh exit=0 duration_ms=10014 gate_skip=false
FM_TEST_SUMMARY total=1 failed=0 skipped_gate=0 duration_ms=10069
FM_TEST_SUMMARY_FAMILY family=live-harness-optin count=1 duration_ms=10014 failed=0
FM_TEST_SLOWEST rank=1 script=tests/fm-model-pin-readback-live-e2e.test.sh duration_ms=10014
Evidence: Lab teardown transcript

Source: Lab teardown transcript

stopped: lab tmux server and lab processes
removed: task temp /tmp/fm-lab43f4e74182e8-worker+9043edb04a3225a92fe2664bb6e3aef9bd7f9d5a2ca3a0a6bbe7f3d584ee81db
removed: task temp /tmp/fm-lab43f4e74182e8-worker
removed: task temp /tmp/fm-labpintest-mm+9043edb04a3225a92fe2664bb6e3aef9bd7f9d5a2ca3a0a6bbe7f3d584ee81db
removed: task temp /tmp/fm-labpintest-unv+9043edb04a3225a92fe2664bb6e3aef9bd7f9d5a2ca3a0a6bbe7f3d584ee81db
removed: 2 Claude project entries under /tmp/fmlab-pintest
warning: ~/.treehouse gained entries during the lab; left as is: notes-65d578
removed: /tmp/fmlab-pintest
Evidence: Scenario write-up

Source: Scenario write-up

# Live validation: pinned-model assertion (PR #8019)

All runs used the real `claude` 2.1.322 CLI and the real `bin/fm-spawn.sh` from this
gate worktree, inside a disposable `bin/fm-live-lab.sh` lab (`/tmp/fmlab-pintest`),
torn down with the same helper, which also removed the Claude trust entries it
registered. The one `~/.treehouse/notes-65d578` pool the product created was removed
by hand afterwards.

| # | Scenario | Pin | Observed verdict | spawn exit |
|---|----------|-----|------------------|-----------|
| 1 | pinned worker spawn (lab `up --worker`) | `sonnet` | `model pin asserted: pin 'sonnet' actual 'claude-sonnet-5-5'` | 0 |
| 2 | adversarial: agent reports a different model | `claude-opus-5[1m]` | `model pin mismatch: pin 'claude-opus-5[1m]' but pinned Claude session fc680ac8-... reports 'claude-opus-5'` | 0 |
| 3 | adversarial: agent states no model (vendor 400) | `claude-sonnet-4-5` | `model pin unverified: ... (no session-reported model)` | 0 |

Scenario 1's worker status file held only its own line
`paused [at=...]: waiting for gate file ...`, and no file under the lab's `state/`
contained a `model pin` line, so the verdict never became task state.

`real-transcript-models.log` shows the vendor's own transcripts for the three session
ids above (`claude-sonnet-5-5`, `claude-opus-5`, `<synthetic>`), i.e. the oracle is the
real API-reported model, not a fixture.

`live-guard.log` is the change's opt-in live guard on this host: pi 1.5.2 resumed a
`gpt-5.6-luna` session on `gpt-5.6-sol` and its newest turn reported the resumed pin
while the inherited turn kept the old one; Claude 2.1.322 wrote a pinned launch's
transcript at the session id it was given and reported `claude-sonnet-5-5` for
`sonnet`.

Pipeline

Updates from git push no-mistakes

✅ **Intent** - passed

✅ No issues found.

✅ **Rebase** - passed

✅ No issues found.

✅ **Review** - passed

✅ No issues found.

✅ **Test** - passed

✅ No issues found.

  • Live validation: ✅ go - 5 of 7 scenarios driven live against the product
Scenario Result Live Evidence
Spawning a worker pinned to sonnet through bin/fm-spawn.sh with the real Claude CLI reports the model the started session actually ran, as model pin asserted ✅ pass live livelab-up-sonnet.log: model pin asserted: pin &#39;sonnet&#39; actual &#39;claude-sonnet-5-5&#39; (pinned Claude session 2a95c8b1-...) from bin/fm-live-lab.sh up --harness claude --worker --model sonnet; real-tr…
An adversarial pinned spawn whose real session reports a model different from the pin reports model pin mismatch and still launches the worker instead of failing the spawn ✅ pass live spawn-mismatch.log: model pin mismatch: pin &#39;claude-opus-5[1m]&#39; but pinned Claude session fc680ac8-... reports &#39;claude-opus-5&#39;, spawned labpintest-mm ... window=firstmate:fm-labpintest-mm, spawn_e…
An adversarial pinned spawn whose real session never states a model (vendor rejected the request, &lt;synthetic&gt; record) reports model pin unverified rather than asserted or mismatch, and still launc… ✅ pass live spawn-unverified.log: model pin unverified: pin &#39;claude-sonnet-4-5&#39; was not confirmed by pinned Claude session 071f7f9c-... (no session-reported model), spawn_exit=0; real-transcript-models.log show…
The model verdict never becomes the task's own state: a live worker's own paused status line stays the only status content and no model pin line is written anywhere in the lab's state directory ✅ pass live grep -rl &#39;model pin&#39; /tmp/fmlab-pintest/home/state/ → none; the lab worker's file held only paused [at=1794695119]: waiting for gate file ... (livelab-up-sonnet.log shows that same worker parked o…
The change's opt-in live guard confirms on the installed vendors that a resumed Pi session's own turn carries the resumed pin over the record it inherited, and that a pinned Claude launch's transcript… ✅ pass live live-guard.log: ok - pi 1.5.2: a resumed session&#39;s own turn carries the model it was pinned to, over an inherited record naming another and `ok - claude 2.1.322 (Claude Code): a pinned launch reads…
A Herdr-bound Pi relaunch through bin/fm-control.sh relaunch reads the replacement's own turn (over the history it resumed) and asserts it, including a registered session file recreated during the pro… ⏸️ untested no Driving this live needs a Herdr lab session (bin/fm-herdr-lab.sh prepare/provision) whose pane the Herdr runtime has registered with a live Pi agent session, then a bin/fm-control.sh relaunch agains…
A secondmate restart, remote relaunch, or liveness sweep forwards the model pin verdict it observed to the caller's output instead of dropping it ⏸️ untested no Driving this live requires a real seeded secondmate home and an /updatefirstmate restart or a remote relaunch cycle over ssh (or an automatic liveness recovery of a dead endpoint) so a relaunch's stde…
  • bin/fm-live-lab.sh up --harness claude --worker --model sonnet --timeout 90 /tmp/fmlab-pintest — real product spawn of a pinned Claude worker; captured model pin asserted: pin &#39;sonnet&#39; actual &#39;claude-sonnet-5-5&#39; (pinned Claude session 2a95c8b1-...) and a live worker parked on its gate
  • /tmp/fmlab-pintest/probe_spawn.sh labpintest-mm &#39;claude-opus-5[1m]&#39; — real bin/fm-spawn.sh spawn with a pin whose real session reports another model; captured model pin mismatch: ... reports &#39;claude-opus-5&#39;, spawn_exit=0
  • /tmp/fmlab-pintest/probe_spawn.sh labpintest-unv claude-sonnet-4-5 — real spawn pinned to a model the vendor rejects (API 400, &lt;synthetic&gt; record); captured model pin unverified: ... (no session-reported model), spawn_exit=0
  • jq -r &#39;select(.type==&#34;assistant&#34;) | .message.model&#39; over the three real ~/.claude/projects/*/&lt;session-id&gt;.jsonl transcripts as the independent oracle (claude-sonnet-5-5, claude-opus-5, <synthetic>)
  • grep -rl &#39;model pin&#39; /tmp/fmlab-pintest/home/state/ → none, and the lab worker's own file held only paused [at=...]: waiting for gate file ...
  • FM_MODEL_PIN_READBACK_LIVE=1 FM_MODEL_PIN_READBACK_CLAUDE_MODEL=sonnet bin/fm-test-run.sh tests/fm-model-pin-readback-live-e2e.test.sh — exit 0, pi 1.5.2 resumed-turn fact and claude 2.1.322 session-address fact both ok
  • bin/fm-live-lab.sh down /tmp/fmlab-pintest — lab, tmux server, task temp dirs, and its Claude trust entries removed; stray /tmp/fm-labpintest-* dirs and the ~/.treehouse/notes-65d578 pool the product created removed by hand
✅ **Document** - passed

✅ No issues found.

✅ **Lint** - passed

✅ No issues found.

✅ **Push** - passed

✅ No issues found.

Issues

Closes #7735

@greptile-apps

greptile-apps Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no new actionable defects remain.

Reviews (11) · Last reviewed commit: "no-mistakes(document): Fix model-pin rea..." · Reviewed by Greptile

Comment thread bin/fm-spawn.sh Resolved
Comment thread tests/fm-spawn-dispatch-profile.test.sh Resolved
Comment thread bin/fm-spawn.sh Resolved
@kesslerio kesslerio changed the title fix(bin): assert the model a pinned launch or relaunch actually runs on chore: update pull request Oct 31, 2026
Comment thread bin/fm-remote-secondmate-control.sh Resolved
Comment thread bin/fm-spawn.sh Resolved
@kesslerio kesslerio changed the title chore: update pull request fix(bin): assert the model a pinned launch or relaunch actually runs on Oct 31, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @kesslerio for turning #7735 into a bounded check that only reports. It never fails the launch, so the pin promise holds without adding a new blocker. I also appreciate that every Greptile round was fixed at the shared owner and backed by a regression test.

What I checked on 2f18b6bf against main 095db3bc:

  • spawn_assert_model_pin acts only on a concrete pin (MODEL set and not default). For a pinned Claude launch, fm-spawn.sh now adds a fresh, collision-checked --session-id and reads back the model from that transcript. For a Herdr Pi resume, it reads only turns after the line baseline. Everything else is reported unverified. The probe is bounded (20 polls at 0.5s), and the verdict goes only to stderr. Status bytes stay untouched, and the same sed -nE filter forwards the verdict through remote control and spawn, the liveness sweep, fm-watch.sh, bootstrap and restart.
  • The attestation binds this head with no skipped steps. The quick checks pass, all five Greptile threads are resolved, and Greptile's summary on this head is 5/5. I found no workflow, credential or network surface.
  • The body has no Closes line. That reads right to me, because Pinned model is not asserted: a relaunched session can come up on a different model #7735 also floated starting fresh or refusing when a resumed session's stored model disagrees, and this PR is report-only. Kun can decide whether it's enough to close the issue.

Contract-class (my own read): new-default. Every pinned Claude launch now carries a new --session-id on its launch line, and every pinned launch can wait up to about 10s for the readback and prints a new stderr verdict. Those are changes to the unconfigured pinned launch, so this goes to Kun, not auto-merge.

VISION.md, rule by rule: One captain, one interface: aligns (silent model drift becomes a reported fact, and nothing new reaches the captain unless it's a mismatch worth seeing). Authority is explicit: aligns (it reports and doesn't act). Scripts own the mechanics: aligns (deterministic readback). A restart is a non-event: aligns (relaunch paths forward the verdict instead of dropping it). Delegation with a spine: aligns. The fleet outlives any vendor: aligns, with one note for Kun. It binds to what each vendor exposes (the Pi session JSONL and the Claude transcript), but the Claude alias-to-snapshot table in spawn_model_pin_matches is hardcoded and will need upkeep as new models ship. Scope and the quota/model rule: aligns (model choices become more inspectable).

This is waiting on you for one thing: a live run of the pinned Claude launch path. Your body names it as untested live. The live guard proves the --session-id address, but that host's launch "ran no model". That path is the one every pinned Claude worker will take, so it's the one I'd most like Kun to see. When you have a moment, could you run one real bin/fm-spawn.sh worker pinned to a Claude model your credentials can answer, and show the launch line with its --session-id and the model pin asserted: (or mismatch:) line? Please post it here or re-raise through git push no-mistakes with it. We won't run our own live test. If you can also reproduce a real mismatch on upstream main (the Pi-on-Herdr resume I suggested on #7735), that would help Kun, but it's optional.

The red Full suite row is our label gate, not your code. Once the live run is in, we run the full suite, and then it goes to Kun.

@kesslerio
kesslerio force-pushed the fix/7735-relaunch-model-pin-assert branch from 2f18b6b to 02f283e Compare October 31, 2026 11:08
@kesslerio kesslerio changed the title fix(bin): assert the model a pinned launch or relaunch actually runs on fix(bin): assert and relay the model a pinned launch actually runs on Oct 31, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @kesslerio. I re-read head 02f283e5 against main bb3e6906 (the merge is clean). The opt-in guard closes the gap my note pointed at. On Claude Code 2.1.316 it now reads claude-haiku-4-5-20251001 back for the claude-haiku-4-5 pin, so a real model answered, and the alias-to-snapshot pairing is confirmed against a real binary. The attestation binds this head with no skipped steps, the quick checks pass, and all five Greptile threads are resolved. Contract-class stays new-default (my own read, unchanged), and VISION is as in my 10:17Z note. I've noted the new Closes #7735 line. Whether report-only is enough to close #7735 is still Kun's call when this reaches him.

Still waiting on you for the one live run I asked for: a real bin/fm-spawn.sh worker pinned to a Claude model. The guard calls claude --print --session-id ... directly, so it proves the vendor facts but not the launcher path. That path adds the --session-id to an interactive worker's launch line, then polls the transcript for about 10s while the brief is delivered. Only a real spawn shows whether that window gives model pin asserted: or unverified in practice. Please post the launch line with its --session-id and the verdict line here, or re-raise with it through no-mistakes. We won't run our own live test.

Once that's in, we run the full suite, and then it goes to Kun. The red Full suite row is only our label gate.

@kesslerio

Copy link
Copy Markdown
Contributor Author

Live run of the pinned Claude worker path, as asked. One real bin/fm-spawn.sh worker pinned to a Claude model, inside a disposable bin/fm-live-lab.sh home.

What ran. Claude Code 2.1.316 on this host, lab home checked out from this PR head:

$ bin/fm-live-lab.sh up --harness claude --worker --timeout 600 <lab-root>
lab: <lab-root> (tear down with: bin/fm-live-lab.sh down <lab-root>)
tree: 02f283e5fc71cc4830446c90a4d41293857ad0fd from <firstmate-checkout>

The lab's own worker spawn is bin/fm-spawn.sh <id> <lab>/projects/notes --mode local-only --yolo on --harness claude --model sonnet --effort low, i.e. the launcher path you wanted, not the guard's direct claude --print call. Below, <lab> is the lab home <lab-root>/home and <launch-dir> is the spawn's private /tmp launch directory.

The verdict line, from that spawn's stderr:

model pin asserted: pin 'sonnet' actual 'claude-sonnet-5-5' (pinned Claude session c5158fdf-ce98-4a55-942f-4d4f86664cc6)

The launch line the launcher recorded (launch.s1793456482.1123038.5354.sh), verbatim apart from those two path placeholders:

export DISABLE_AUTOUPDATER='1'; export COMPACT_ADVISER_DISABLE=1; export FM_TASK_INBOX='<lab>/state/lab1ac0dc044136-worker.inbox'; '<lab>/bin/fm-git-strip-ai-trailers.sh' env-file '<lab>/state/lab1ac0dc044136-worker.git-hooks' '<launch-dir>/git-config.s1793456482.1123038.5354.sh' && . '<launch-dir>/git-config.s1793456482.1123038.5354.sh' || return 1 2>/dev/null || exit 1; env -u CURSOR_AGENT -u CURSOR_INVOKED_AS -u GEMINI_CLI CLAUDE_CODE_ENABLE_PROMPT_SUGGESTION=false CLAUDE_CODE_SEND_FEEDBACK=0 claude --session-id 'c5158fdf-ce98-4a55-942f-4d4f86664cc6' --permission-mode auto --add-dir '<lab>/state/operational-inbox' --add-dir '<lab>/state/lab1ac0dc044136-worker.inbox' --add-dir '<lab>/data/lab1ac0dc044136-worker' --add-dir '<lab>/.agents/skills' --settings '{"feedbackDrafts":"off","attribution":{"commit":"","pr":"","sessionUrl":false}}' --append-system-prompt '<the worker trust-system prompt>' --model 'sonnet' --effort 'low' ': Firstmate operational input waiting: read '<lab>/state/operational-inbox/1793456483-f7ecb1d8c9bb9984.msg' and handle its contents as Firstmate operational input.'

The address the assertion polled, on that same line:

--session-id 'c5158fdf-ce98-4a55-942f-4d4f86664cc6'

That the spawn was a real worker, not a bare launch:

spawned lab1ac0dc044136-worker harness=claude kind=ship mode=local-only yolo=on window=firstmate:fm-lab1ac0dc044136-worker worktree=<pool-worktree>
paused [at=1793456496]: waiting for gate file <lab>/data/lab1ac0dc044136-worker/gate and a resume message

Its pane banner and its transcript agree with the verdict:

▐▛███▛█   Claude Code v2.1.316
▝▜██████▀  Sonnet 5.5 with low effort · Claude Max
$ jq -r 'select(.type=="assistant") | .message.model' <session>.jsonl | sort | uniq -c
      4 claude-sonnet-5-5

Margin on the ~10s window. The delivered brief's first user record is stamped 2026-10-31T14:21:24.583Z, and the first assistant record 2026-10-31T14:21:29.648Z, so the readback had its model about 5.1s in, roughly half of the 20 x 0.5s budget. The verdict appeared before the spawn's own spawned ... line, so the assertion ran before the spawn returned.

Readiness checks at the end of the run: primary, probe, trust, mirror, host, watcher, worker all ok. One lab guard flagged a host environment detail, unrelated to this change: fail treehouse: new treehouse-pool entries: notes-a0ccd0, because this host's treehouse v2.0.1 created the worker's pool under the shared pool directory rather than the lab's recorded TREEHOUSE_ROOT. No pin-assertion or launcher behavior is involved. The lab is torn down (bin/fm-live-lab.sh down), and that pool entry was removed afterwards, so no lab state remains on the host.

@kunchenguid kunchenguid added the full-ci Maintainer go-ahead: run the full CI suite on this outside pull request label Oct 31, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @kesslerio, that's the live run I asked for. A real bin/fm-spawn.sh Claude worker pinned to sonnet printed model pin asserted: pin 'sonnet' actual 'claude-sonnet-5-5'. The launch line carries the --session-id the assertion polled, and the readback landed about 5 seconds into the ~10 second window. The transcript's assistant records agree with the verdict. Head 02f283e5 is unchanged, and everything else is as in my 14:17Z note.

Nothing more is needed from you. I've added the full-ci label so the Full suite runs. If it's green, this goes to Kun, because asserting and relaying the pinned model changes what every pinned launch does by default. He'll also decide whether report-only is enough to close #7735. From here it's waiting on Kun, not you.

@kesslerio
kesslerio force-pushed the fix/7735-relaunch-model-pin-assert branch from 02f283e to 517d7d4 Compare October 31, 2026 19:21
@kesslerio kesslerio changed the title fix(bin): assert and relay the model a pinned launch actually runs on fix(bin): assert the model a pinned launch or relaunch actually runs on Oct 31, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @kesslerio. 517d7d49 is the fix for the serial-5 lane: the three pinned secondmate launch assertions now drop only the optional --session-id slot and still compare the permission flag, --settings, --model and --effort byte for byte. The rest of the branch is the same change rebased onto main. The attestation binds this head with no skipped steps, and every lane is green, including the Full suite (run 41233876464). Your live pinned-Claude run still covers it, since the new commit only touches tests.

This is now with Kun, because asserting and relaying the pinned model changes what every pinned launch does by default. He'll also decide whether report-only is enough to close #7735. It's waiting on Kun, not you.

@kesslerio
kesslerio force-pushed the fix/7735-relaunch-model-pin-assert branch from 517d7d4 to 6c43156 Compare November 2, 2026 16:32
@kesslerio kesslerio changed the title fix(bin): assert the model a pinned launch or relaunch actually runs on fix(bin): assert the model a pinned launch actually runs on and forward the verdict Nov 2, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @kesslerio. I re-read 6f3f0e73 against main 9224c902 (the merge is clean). Since 517d7d49 it's the rebase, one doc line, and the tests/fm-watcher-lock.test.sh teardown fixture, which now renames the old state tree away instead of emptying it in place. That's a welcome fix for a flake we've seen on main too. The attestation binds this head with no skipped steps, Greptile is 5/5 with every thread resolved, and the full suite is green on this head (run 41494339945). Your live pinned-Claude runs still cover the launcher path.

This is still with Kun, not you, because asserting and relaying the pinned model changes what every pinned launch does by default. He'll also decide whether report-only is enough to close #7735, which also asked to start fresh or refuse on a disagreeing resume.

@kesslerio
kesslerio force-pushed the fix/7735-relaunch-model-pin-assert branch from 6f3f0e7 to 9441b3a Compare November 9, 2026 01:45
@kesslerio kesslerio changed the title fix(bin): assert the model a pinned launch actually runs on and forward the verdict fix(bin): assert the model a pinned launch or relaunch actually runs on Nov 9, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thank you @kesslerio. Having the live guard accept the concrete id the API reports for a family alias closes the gap from your last round. I re-read head 9441b3af against main 14d06b04 (0 behind). The attestation binds this head with no skipped steps, and the no-mistakes check passes.

On CI: the only failing lane in run 42547202931 is Behavior tests (Herdr). It failed in tests/fm-backend-herdr-focus-flash-e2e.test.sh ("Part C ... observed no wrong-focus sample at all"). That's a focus-sampler timing check this branch doesn't touch, and it failed the same way on an unrelated PR while main passed. It isn't yours, and nothing is needed from you there. We'll re-run the full suite ourselves.

Waiting on you for one small thing: Greptile's new P2 thread, "Live check miscompares snapshot names", on tests/fm-model-pin-readback-live-e2e.test.sh is still unresolved. claude_pin_matches accepts any eight-digit date after a pin, but it rejects the reverse pair the launcher supports (pin claude-haiku-4-5-20251001, reported claude-haiku-4-5). Please compare explicit alias/snapshot pairs in both directions, or reply on the thread if you disagree, and then resolve it.

Contract-class (my own read): new-default, unchanged. spawn_assert_model_pin runs on every pinned launch with no switch, and pinned Claude launches gain a --session-id. Only the vendor guard test is opt-in. VISION aligns as in my earlier notes. The merge decision on that default behavior is still Kun's, and so is whether report-only is enough to close #7735. Once the thread is settled and the full suite is green on the final head, this goes back to him. From then on it waits on Kun, not on you.

@kesslerio
kesslerio force-pushed the fix/7735-relaunch-model-pin-assert branch from 9d4e020 to 63fce87 Compare November 9, 2026 19:36
@kesslerio kesslerio changed the title fix(bin): assert the model a pinned launch or relaunch actually runs on fix(bin): assert and report the model a pinned launch actually runs on Nov 9, 2026
Comment thread bin/fm-spawn.sh
done
[ "$normalized_pin" = "$normalized_actual" ] && return 0
case "$pin:$actual" in
opus:claude-opus-[0-9]* | sonnet:claude-sonnet-[0-9]* | haiku:claude-haiku-[0-9]*) return 0 ;;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Decorated models pass as pinned

With a short pin such as opus, spawn_model_pin_matches accepts claude-opus-5[1m] and reports asserted. The [0-9]* pattern allows anything after the first digit, including decorations. This hides model drift instead of warning the operator.

Check the whole model name before accepting a family match, and cover a short alias paired with a decorated reported model.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The observation is accurate: for a short family pin (opus, sonnet, haiku), the claude-<family>-[0-9]* glob accepts any reported id under that family prefix, including decorated variants like claude-opus-5[1m].

Two things argue this is intended tolerance rather than a hole. First, the drift this assertion exists to surface was an exact pin silently resolving elsewhere — issue #7735's relaunch reported model=<pin> while its session ran claude-opus-5[1m], and every exact-pin path still mismatches that decoration today (test_claude_model_pin_snapshot_verdicts pins claude-opus-5 vs claude-opus-5[1m] as a mismatch, as do the remote-relaunch fixtures). Second, a family alias is a deliberate "any model in this family" request: claude-opus-5[1m] is an opus-family id, so the same tolerance that lets sonnet accept claude-sonnet-5-5 accepts its decorated sibling.

Whether a bracket decoration should disqualify a family match is a product-semantics call about how strict family pins should be, so I have left this thread open for the maintainer to rule rather than changing the glob unilaterally.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That distinction is fair. The issue #7735 case is a concrete pin, which still mismatches the decorated report; opus is a family-level request, so accepting a decorated opus-family ID follows the broader family semantics. I agree this is a product-policy question rather than a correctness defect without a stricter contract, and I’ll defer to the maintainer rather than insist on changing the glob.

A pin was only ever an argument: nothing read back what the started session
ran, so a relaunch could report model=<pin> while its session served another
model (issue kunchenguid#7735: a session serving claude-opus-5[1m] under a
claude-opus-5-5 pin). A pinned launch now reads back the model its own
session reports and records one note in the task status: asserted, mismatch,
or unverified.

The read is per-harness and vendor-grounded: Pi's session record, which a
Herdr-bound relaunch hands its replacement as the resume identity, and
Claude Code's transcript at the --session-id a pinned launch mints. A resumed
session's inherited history is not the verdict, because pi applies --model
over the stored session model (measured on pi 1.4.0), so the comparison is
against the turn the replacement itself produced; refusing a resume whose
history disagrees would refuse every legitimate re-pin. A harness that emits
no readable session model is recorded unverified rather than guessed at, and
a mismatch is reported rather than turned into a launch failure or a blocked
decision that could drive supervision into replacing a live worker.

Coverage: portable fixture regressions in fm-control-relaunch and
fm-spawn-dispatch-profile, plus an opt-in live guard that re-proves both
vendor facts against the installed binaries and is the command that
refreshes the dated record in docs/verification/runtime-backends.md.

Closes kunchenguid#7735
… with a root-cause fix at the single shared owner plus portable regression tests. ci-2 (model note hides worker state): the invariant is that model evidence must never become the task's current state when the worker already reported one. `spawn_model_pin_note` in `bin/fm-spawn.sh` is the only writer of `note: model pin ...` lines and all verdict paths funnel through it, so the check went there: it now reads `status_current_line` from `bin/fm-classify-lib.sh` and, when that line is already `done`/`failed`/`blocked`/`needs-decision` or a declared wait (`paused`/`captain-held`, read through the shared verb constants), it leaves the status file byte-identical (no truncation, rewrite, or re-append; the worker writes concurrently) and prints the same verdict text on stderr as a `warn: model pin <verdict>: <tail>` line. A new fixtures hook (`FM_FAKE_CLAUDE_STATUS_FILE`/`FM_FAKE_CLAUDE_STATUS_LINE`) lets the fake Claude worker append its own event during launch delivery, and the new test asserts `done:` remains the last line and the classifier's current state, no model note is present, and the verdict appears on stderr. Verified by reverting only `bin/fm-spawn.sh` to HEAD: the case fails pre-fix and passes after. ci-3 (portable tests needed host uuidgen): `make_spawn_fakebin` in `tests/fm-spawn-dispatch-profile.test.sh` now installs a deterministic counter-based `uuidgen` stub in its own fakebin, so the pin cases no longer depend on the host. The existing collision case is untouched (it overwrites the stub), and a new case overwrites it with a failing stub and asserts the launch still succeeds, carries no `--session-id`, and records the pin unverified. ci-4 (raw launches waited needlessly): session-id allocation is now gated on the launch actually carrying the `__CLAUDESESSION__` slot, so a raw command (which has no such placeholder) mints no id and records the pin unverified immediately instead of polling a transcript that cannot exist. The pinned non-raw path is unchanged. A new test asserts the raw launch never invokes uuidgen, has no session id, and records unverified; it also fails against HEAD. Docs: `docs/verification/runtime-backends.md` now records the never-displace-worker-state rule, the raw-launch-no-address rule, and the new test names. Verification run locally: all Claude/pin tests in `tests/fm-spawn-dispatch-profile.test.sh` and the four `tests/fm-control-relaunch.test.sh` pinned-Pi cases pass; `bin/fm-lint.sh` on all changed files passes; `bash -n` and `git diff --check` clean. The full dispatch-profile file still stops at its pre-existing launch-environment case that fails only on this NixOS host (`sed: command not found` under a restricted `/usr/bin:/bin` PATH), which is unrelated to this change and matches the previously declined full-suite item
…use, with portable regression coverage. ci-2 (macOS drops model warnings). Invariant: every relay of the model-pin verdict line must match that line with a POSIX-portable expression, so no supported host can silently match nothing. All four relay sites now carry the identical filter `sed -nE '/^model pin (asserted|mismatch|unverified):/p'`, each with a one-line reason: `bin/fm-remote-secondmate-control.sh` (cmd_launch relay), `bin/fm-spawn.sh` (spawn_remote_secondmate relay), `bin/fm-secondmate-liveness-lib.sh` (`fm_sm_live_model_verdicts`), and the new restart relay. No GNU-only `\|` alternation remains in any verdict filter (`grep` over bin/ confirms the only four filters are the ERE form). Coverage that fails if the filter matches nothing: `tests/fm-secondmate-restart.test.sh` `test_restart_forwards_the_relaunch_model_verdict` (new), and the pre-existing per-path cases that assert the verdict actually arrives — `tests/fm-remote-secondmate-trace-context.test.sh` (real chain through both the remote host-local control script and the parent spawn), `tests/fm-secondmate-liveness.test.sh` (`test_sweep_reports_replacement_model_verdict`), `tests/fm-wake-queue.test.sh`. I also exercised the liveness filter directly with a verdict line plus a look-alike (`model pin notes: ...`): it forwards only the verdict. ci-3 (update restarts hide model warnings). Invariant: a capture of a relaunch result that ends in a reported success must still forward the verdict it observed, because `bin/fm-spawn.sh` writes it to the launch's stderr and nowhere else, so a dropped copy is the only copy. `restart_mate`'s success branch in `bin/fm-secondmate-restart.sh` now prints the matching verdict lines from `restart_out` right after its `restarted:` line, using the same one-line filter and identical wording; both placements (local `fm-control.sh relaunch` and remote `fm-remote-secondmate-relaunch.sh`) funnel through that single site. It stays report-only (`... || true`), and `harvest_restarts` still classifies the multi-line result as `restarted:` (asserted by the case's exit 0 and the summary). The script header now documents the forwarded verdict, and `usage()`'s fixed comment range moved 2,65 → 2,69 so `--help` output is byte-identical to before (verified by diff). Docs: `docs/verification/runtime-backends.md` now lists the restart boundary and its test, and records the `sed -E` portability rule and that the per-path cases fail on a silent non-match. Verification: `test_restart_forwards_the_relaunch_model_verdict` fails with only the restart forwarding reverted (``not ok ... missing: 'model pin mismatch: ...'``) and passes with it. `tests/fm-secondmate-restart.test.sh` — all 25 cases pass; `tests/fm-remote-secondmate-trace-context.test.sh` (6), `tests/fm-remote-secondmate-relaunch.test.sh` (5), `tests/fm-wake-queue.test.sh` (79), `tests/fm-control-relaunch.test.sh` (94) all pass. `bin/fm-lint.sh` (ShellCheck 0.11.0) clean on every changed shell file; `bash -n` and `git diff --check` clean. Two host-specific pre-existing failures are unrelated to this change and reproduce on the base commit with my changes stashed: `tests/fm-secondmate-liveness.test.sh` and `tests/fm-spawn-dispatch-profile.test.sh` abort at their first case under this NixOS host's restricted `/usr/bin:/bin` PATH (`grep: command not found`, `sed: command not found`)
The opt-in guard's last run on this host answered the pin with
claude-haiku-4-5-20251001, so the alias-versus-dated-snapshot pairing is
confirmed against an installed binary instead of resting on vendor
documentation, and the record no longer carries the earlier <synthetic>
caveat as the Claude half's only result.
…on id

A pinned Claude launch now carries a collision-checked --session-id so the
model it runs on can be read back by address (bin/fm-spawn.sh, kunchenguid#7735). That
slot sits between `claude ` and the permission flag, so three byte-exact
launch assertions in tests/fm-secondmate-harness.test.sh stopped matching and
the Behavior portable serial 5 lane failed.

Drop only that optional slot - the id is minted only when the host can mint
one, and a launch without one must still assert - and keep the permission
flag, --settings file, --model and --effort tokens compared exactly.
…ock.test.sh) — root cause found and fixed. The failing case `test_watcher_exits_on_state_teardown_during_startup` tore the state directory down with `rm -rf "$state"` while the SIGSTOPped watcher still had a forked child publishing into that tree. Losing that race leaves `rm -rf` unable to rmdir the directory (CI log shows `rm: cannot remove .../state: Directory not empty`), so the original inode survived at the same path with its lock pid gone; the watcher then correctly took the documented "successor released the lock" self-eviction branch (bin/fm-watch.sh:3902, `exit 0`, no output) instead of the teardown branch that requires a changed state-directory devino. The fixture, not the watcher, was nondeterministic. Fix: replace the tree in place-free fashion — `mv "$state" "$state.torn-down"`, `mkdir -p "$state"`, then best-effort `rm -rf` of the renamed tree — so the old inode stays allocated and the recreated directory is guaranteed a new devino. Invariant restored: a fixture that asserts a recreated state directory is read as a teardown must never leave the original inode at that path. I enumerated the sibling sites: `rm -rf "$state"` appears only here and in tests/fm-wake-queue.test.sh:2784, whose case removes the directory permanently (no recreation, no in-place writer) and needs no change; no other suite creates the watcher-teardown fixture. Evidence: pre-fix, the case failed 6/30 runs under parallel contention locally (and twice more before instrumentation, one showing the leftover `state/.wake-queue.lock.owner.<scope>.<rand>` staging dir written by the stopped watcher's own child); post-fix it passed 30/30 under the identical contention and 30 further sequential runs, and the full tests/fm-watcher-lock.test.sh passes (exit 0, 58 cases) with `bash -n` and shellcheck clean. The ordinary path is unchanged: the fixture still tears down and recreates the state directory at the same path, the watcher still exits 1 with `watcher: exiting - state directory was torn down (singleton lock removed)`, and the old tree's removal (previously done by the same `rm -rf`) still reaches the watcher's EXIT cleanup identically. ci-2 (Behavior portable serial 11, tests/fm-pr-check-security.test.sh "post-queue retry watcher failed:") — no code change: this failure is not caused by the change under review and I could not reproduce it. The suite, including the exact `test_retirement_crash_recovery` sequence, passes 30/30 locally (including 5-way concurrent load), and at the CI commit it still passes end-to-end here (3m32s). The CI timeline shows the case failing ~2.3s after the previous case, i.e. the watcher exited non-zero immediately rather than exceeding the 60s bounded wall, with the diagnostic only on the watcher's stdout (the assertion prints stderr alone). Nothing this branch changes is on that path: bin/fm-test-run.sh only gained a shard hint and a family mapping, tests/fixtures.sh only changes the fake spawn harness, and the fm-watch.sh/fm-bootstrap.sh/fm-secondmate-* edits only forward the `model pin ...` verdict after a successful secondmate relaunch. In the same CI generation, main (2118038) failed this same lane family on a different test (`limit-later: the host did not stop on TERM`), which points at runner-level timing flakiness in untouched real-process suites rather than this change. ci-3 (Full suite) is only the aggregation gate (`FM_CI_LANES_FAILED=true`) over the two lane jobs above; it needs no change of its own and passes once the lanes pass. Net change: one fixture in tests/fm-watcher-lock.test.sh; no behavior, instruction, or subsystem added
…end-herdr-focus-flash-e2e.test.sh:344 ('Part C ... observed no wrong-focus sample at all, so the sampler proved nothing'). Root cause is a flaky test, not product code: Part C proved the transient wrong-focus window with an independent background poller, but that window is bounded by two Herdr CLI calls (the explicit `pane close` and the restore backstop's snapshot read), so on a loaded runner every sample can land outside it and the assertion reports nothing even though the close did move focus. The CI log proves it: in the same run Part A measured that exact public close stealing focus (steal_live=1), Part C exercised the same close, and zero samples differed; main's run of this suite saw 4. Invariant violated: a test's proof that a transient in-operation focus change occurred must come from a deterministic observation of that mutation, never from a poller racing it (a miss and a real regression were indistinguishable). Enumerated sites: Part C's positive-existence check (the failure) — fixed; Part C's complementary focus-preserving branch — moved to the same deterministic evidence so both directions hold; Part A measures with a direct post-close snapshot rather than the poller and Part B's claim is an absence over samples, so neither had the defect. Fix: derive the evidence from the production restore backstop's own observation in the call log the suite already parses (`tab focus` is issued only when its post-mutation snapshot differs from the pre-close snapshot), assert it present on a defective release and absent on a focus-preserving one, and delete the Part C sampler, its stop/ready files, and the wait loop that the fix left unreachable. ci-2: 'Full suite' is only the FM_CI_LANES_FAILED aggregation gate over that one Herdr lane (all 18 portable lanes and both parallel lanes passed in the same run), so it needs no change of its own and clears once the Herdr lane passes. Verification: the exact CI lane command `bin/fm-test-run.sh --family real-herdr-gated --fail-on-gate-skip 'herdr not found'` passes locally against the upstream-pinned Herdr 0.7.4 protocol 16 (total=16 failed=0 skipped_gate=0, exit 0), i.e. the same release CI pins; the focus-flash suite passes 20/20 further runs on 0.7.4 (steal_live=1, the defective branch) and 3/3 on Herdr 0.9.3 protocol 22 (steal_live=0, the preserving branch); sensitivity was checked by forcing each classification the wrong way, where the new assertion fails ('the restore never observed a moved focus') and the complementary branch fails ('needed the corrective tab focus'), so neither can pass vacuously; `bash -n`, `bin/fm-lint.sh` on the file, and tests/fm-documentation-audiences.test.sh are clean. The two documented dated transcripts in docs/verification/runtime-backends.md are left verbatim and annotated with one sentence recording that the assertion now derives the window from the restore's own observation, so the record stays accurate without rewriting history. No product behavior, status writer, flag, or subsystem was added
…rections

The live model-pin readback guard's claude_pin_matches accepted any
eight-digit date after a pin but rejected the reverse explicit pair the
launcher treats as equal: a pin naming the dated snapshot
(claude-haiku-4-5-20251001) against a session reporting its short alias
(claude-haiku-4-5). spawn_model_pin_matches normalizes the vendor's
documented alias/snapshot pairs on both sides before comparing, so the
guard now applies the same normalization while keeping the date
wildcard one-directional: only a documented pair, never an arbitrary
snapshot date, compares a snapshot pin back to its alias.

The comparator's case table runs harness-free through
FM_MODEL_PIN_READBACK_SELFTEST=1 before the live gate, and
tests/fm-live-gate.test.sh drives that entry point so portable CI pins
the oracle the opt-in guard trusts.
@kesslerio
kesslerio force-pushed the fix/7735-relaunch-model-pin-assert branch from 63fce87 to 0d6478c Compare November 14, 2026 22:36
@kesslerio kesslerio changed the title fix(bin): assert and report the model a pinned launch actually runs on feat(bin): assert the model a pinned launch actually runs on Nov 14, 2026
@kunchenguid

Copy link
Copy Markdown
Owner

Speaking as Kun's firstmate: thanks @kesslerio for the re-raise on current main and for the reasoning on the family-pin thread. I checked head 0d6478c7 against main 427056c4 (0 behind, merges cleanly).

What changed since my last note:

  • The snapshot-pair thread is fixed (1adffc8e compares the documented alias/snapshot pairs in both directions) and resolved.
  • The series is rebased with one docs commit (0d6478c7, docs/verification/runtime-backends.md).
  • I read the full diff. It has no workflow, CI-config, credential, package or network changes.

Gates on this head:

  • The no-mistakes attestation binds 0d6478c7, every step completed and none skipped.
  • The labelled full run 43649022831 passed all 22 jobs, Full suite included.

The open thread "Decorated models pass as pinned" is a policy question, so I'm not asking you to change anything. You're right that exact pins still mismatch a decorated id (the #7735 case), and Greptile agreed this is product policy, not a defect. Whether a family pin like opus should accept claude-opus-5[1m] is Kun's call. I've added it to his decision.

Contract-class: new-default, unchanged. The readback runs on every pinned launch with no switch, and pinned Claude launches gain a --session-id. Kun decides three things together: the default-on readback, whether report-only is enough to close #7735, and how strict family pins should be. It is waiting on Kun's decision, not on you.

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

Labels

full-ci Maintainer go-ahead: run the full CI suite on this outside pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pinned model is not asserted: a relaunched session can come up on a different model

2 participants