fix: sync fork with upstream calm export visibility and secondmate handoff fixes - #9
Merged
Merged
Conversation
…d mate (kunchenguid#2457) The lightweight Relay follow-up link lives in the answering home's own state/<task-id>.meta, so it can only bind work that home owns. When a Relay-linked request is routed to a second mate, the task record lives in the second mate's home, fm-x-link.sh failed with a bare "no such task ...meta", and nothing else picked the promise up: only the soft acknowledgement was ever posted. The typed promised-final path already supports --work-home secondmate:<id>; the playbook simply never chose it. - fmx-respond now states the routing rule crisply: a task in this home takes the lightweight link, and second-mate-routed work takes a promised-final commitment bound to that home, registered up front with the brief command carried into the routed worker's instructions. - fm-x-link.sh refuses a task with no local record by naming the registered second mate whose home actually holds it and printing the promised-final registration command, with the exact --work-home when the match is unambiguous. A home with no registered second mates keeps the plain error. - fm-backlog-handoff.sh reports, after a successful move, any moved key that still owes a public reply bound to main/<key>, since that binding no longer names the home owning the work. The move itself is never blocked. Docs and the secondmate handoff prose follow the same rule. Tests cover the refusal, its scoping, the unchanged local-link path, and both handoff outcomes at the script boundary.
…verdicts (kunchenguid#2456) * fix(skills): hint that remote secondmate liveness verdicts false-negative fm-crew-state and fm-send routinely misreport a live remote secondmate as dead; confirm against the pane before relaunching, and relaunch only through fm-spawn.sh, never raw herdr pane surgery. * no-mistakes: apply CI fixes
Pi 0.83.0 added a status line to every tool-expansion change, and Pi updates the previous status line in place when two status messages arrive back to back. Calm's post-export redraw cycled tool expansion on the macrotask right after Pi printed "Session exported to: <path>", so both expansion status lines coalesced over that confirmation and the captain was left with no record of where their export landed. Calm now repaints only the tool rows it presents, by invalidating each row through the render context Pi hands its render slots, and requests the surrounding redraw through setStatus. Neither appends to the transcript. The repaint is still needed because Pi can re-render a row asynchronously - the built-in edit row invalidates itself once its diff is ready - and that re-render can land inside the window where /export forces stock rendering. The real-terminal /export case now asserts the confirmation is still on screen after the redraw has settled, and that the redraw restored every Calm-hidden row, instead of only racing the moment the confirmation first appeared.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Sync fork main with upstream: merge upstream/main's 3 commits (ef35d79 fix(calm): keep Pi's export confirmation visible kunchenguid#2461; 196fb65 docs(skills): remote-secondmate recovery hint kunchenguid#2456; 7a3259e fix: keep the public promise reachable when work is routed to a secondmate kunchenguid#2457) into fork main safely, preserving both sides fully - the fork's ~137 commits of work AND upstream's 3 fixes, with no feature, function, flag, backend arm, or test dropped from either parent. The deliverable is deliberately a single merge commit of upstream/main into a branch off origin/main - a merge, not a rebase or squash, so both histories stay intact. Drop-guard already verified before this run: the merge delta vs origin/main is content-identical to upstream's own delta since the merge-base, and symmetrically vs upstream/main; no files deleted vs either parent; the spawn/backend/relaunch code restored in PR #8 (fm-runtime-handoff.sh, fm-spawn.sh, fm-dispatch-select.mjs, fm-fleet.sh, fm-backend.sh, fm-spawn-acct.sh, fm-account-exec.sh) is byte-unchanged from fork main. The PR targets fork main (adibirzu/firstmate) and must not be merged by the pipeline - the captain merges. Known pre-existing local test flakes not caused by this merge: fm-calm-pi-extension loaded_off case (upstream-origin, predates the merge-base) and fm-inactive-reconcile (environmental); CI is the final gate. Context: the 2026-08-14 upstream-sync merge 2d39b28 silently stripped spawn/backend features and caused a two-week CI blackout repaired by PR #8 - this sync deliberately preserves both sides in full.
What Changed
.pi/extensions/fm-calm.tsnow keeps Pi's export confirmation visible instead of suppressing it, with matching test coverage intests/fm-calm-pi-extension.test.shand an updated feasibility doc (upstream fix(calm): keep Pi's export confirmation visible under Calm mode kunchenguid/firstmate#2461).bin/fm-backlog-handoff.shandbin/fm-x-link.shkeep the public promise reachable when work is routed to a secondmate, with new tests (tests/fm-backlog-handoff.test.sh,tests/fm-x-mode.test.sh) and updated fmx-respond/provisioning skill docs, plus a remote-secondmate recovery hint for false-negative verdicts instuck-crewmate-recovery(upstream fix(bin): keep the Relay public follow-up reachable when work is routed to a second mate kunchenguid/firstmate#2457, docs(skills): add remote-secondmate recovery hint for false-negative verdicts kunchenguid/firstmate#2456).Risk Assessment
✅ Low: A clean two-parent sync merge whose deltas are verified content-identical to each parent's own delta since the merge-base, with zero deletions, byte-unchanged PR #8 spawn/backend files, orthogonal resolutions in the four dual-touched files, and all dependencies of upstream's new code intact in the merged tree.
Testing
Independently re-verified every drop-guard claim on merge 2244566 (two-parent topology, bidirectional content-identical delta symmetry vs both parents, zero deletions, all 7 PR #8 spawn/backend files blob-identical to fork main), then ran all four test suites upstream touched since the merge-base — including the real-Pi-in-tmux calm E2E that exercises the kunchenguid#2461 export-confirmation fix and the tasks-axi-backed handoff suite exercising the kunchenguid#2457 public-promise fix — all passing with a clean worktree afterward; the known fm-calm loaded_off flake did not manifest in either of two runs. No UI-screenshot artifact applies: the end-user surface here is git history and terminal test behavior, captured as transcripts.
Evidence: Drop-guard verification (merge topology, delta symmetry, no deletions, PR #8 files byte-identical)
Source: Drop-guard verification (merge topology, delta symmetry, no deletions, PR #8 files byte-identical)
Evidence: Calm Pi extension E2E transcript — real Pi in tmux passing the kunchenguid#2461 export-confirmation regression assertions
Source: Calm Pi extension E2E transcript — real Pi in tmux passing the #2461 export-confirmation regression assertions
Evidence: Targeted test transcripts for upstream fixes (fm-backlog-handoff incl. kunchenguid#2457 public-promise assertions, fm-procevent, fm-x-mode)
Source: Targeted test transcripts for upstream fixes (fm-backlog-handoff incl. #2457 public-promise assertions, fm-procevent, fm-x-mode)
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.
git cat-file -p 2244566— confirmed true merge commit with exactly two parents: 7079657 (fork main base) and ef35d79 (upstream/main tip)Drop-guard CHECK 1: normalizedgit diff 7079657 2244566vsgit diff f1a4af4 ef35d79— content-identical (only blob hashes/hunk offsets differ), so the merge adds exactly upstream's 3 fixes and nothing elseDrop-guard CHECK 2 (symmetric): normalizedgit diff ef35d79 2244566vsgit diff f1a4af4 7079657— content-identical, so the merge preserves exactly the fork's work relative to upstreamDrop-guard CHECK 3:git diff --diff-filter=Dvs both parents — 0 deleted files against either sideDrop-guard CHECK 4: blob-hash comparison of bin/fm-runtime-handoff.sh, fm-spawn.sh, fm-dispatch-select.mjs, fm-fleet.sh, fm-backend.sh, fm-spawn-acct.sh, fm-account-exec.sh — all byte-identical to fork main parent 7079657bash tests/fm-backlog-handoff.test.sh— 13/13 ok against the real tasks-axi binary, including the two new #2457 public-commitment assertionsbash tests/fm-calm-pi-extension.test.sh(ran twice) — exit 0 both runs; interactive terminal E2E ran a real Pi session in tmux and passed the new #2461 export-settled assertions; known loaded_off flake did not manifestbash tests/fm-procevent.test.sh— all ok, exit 0bash tests/fm-x-mode.test.sh— all ok, exit 0Post-test cleanliness:git status --porcelainempty, no leftover tmux servers or /tmp residue✅ **Document** - passed
✅ No issues found.
✅ **Lint** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.