Repository navigation
fix(bin): skip machine-local or undeclared items on remote inherit version skew - #5397
VasanthAmana wants to merge 2 commits into
Conversation
1ef741e to
126937b
Compare
[High impact] The PR appears safe to merge; no actionable correctness, security, or repository-rule violations remain. Reviews (3) · Last reviewed commit: "no-mistakes(document): Update remote inh..." · Reviewed by Greptile |
|
Speaking as Kun's firstmate: thanks for the careful write-up, @VasanthAmana. I read the whole diff of head What I checked: on the sender, What's needed from you (waiting on you):
CI: I approved this head's fork runs Contract-class: new-default. Main documents the current cross-revision behavior on purpose: "A local and remote code root that disagree about this list must be reconciled by the ordinary remote sync/update path before the transfer succeeds" ( VISION.md, rule by rule
Overlap note for Kun: #5873 ("keep Lavish server address local to each home") covers the same Next step: waiting on you for a no-mistakes re-raise (attestation for the head). Then come green CI and Require no-mistakes, and then a decision from Kun. |
126937b to
9b1722f
Compare
126937b to
5dcc646
Compare
|
Thanks for the review. Following up on the one item you were waiting on: no-mistakes re-raise is done. The branch was re-pushed through One honest caveat from the pipeline's test step: live validation is inconclusive (0 of 3 scenarios driven live). The e2e test drives the real CI: the fork runs for Understood that the contract-class (new default: skip-and-continue instead of fail-closed, and |
5dcc646 to
d20986b
Compare
|
Rebased onto current main; the branch is mergeable again with the same behavior, adapted to the parallel send structure in |
A remote secondmate's relaunch refused outright when the primary offered an inherited config item that the remote host's older Firstmate code root does not declare, even when the file existed on neither side. The remote code root only advances through /updatefirstmate, so this skew is routine, and it stranded the only sanctioned recovery path for a stuck remote secondmate. The sender now treats the receiver's existing pre-side-effect refusal line as version skew: it warns, writes nothing for that item, and keeps converging the rest. Every other failure still stops the push and refuses the launch with the remote's stderr and exit status unchanged, and the remote still writes only paths its own code declares. config/lavish-axi-host is a per-machine server address, so it is now declared machine-local: same-machine secondmate homes still inherit it, the primary never sends it to a remote host, and a receiver that is offered it by an older sender leaves the host's own value untouched.
d20986b to
6233df6
Compare
|
Speaking as Kun's firstmate: thanks @VasanthAmana, and sorry for the long wait on the fork runs. I reviewed the rebased head
Diff review: safe, no P1. No workflow, network or credential changes, and the receiver's writable set is unchanged. I approved this head's fork runs (CI What's waiting on you: the attestation binds this head, but its Contract class: new-default (unchanged: skip-and-continue replaces the documented fail-closed cross-revision default, and |
Intent
Merge #5397 ("remote secondmate relaunch tolerates inheritance version skew": remote relaunch skips, with a warning and writing nothing, items an older remote code root does not declare instead of refusing; genuine failures still fail). The merge was approved on 7 Oct on the condition that the PR is still open and all checks are green at its current head; it was found CONFLICTING with main and with no checks reported, so it was not merged. Follow-up instruction: rebase PR 5397 onto current main, resolve the conflict, push, let the checks run. Do NOT merge after it - the head changes, so it comes back with the check results for a fresh merge word.
14 Oct 2026, 'resume also': rebase it onto current main, resolve any conflict, push only to the existing PR branch (no new PR, no comment), and report the checks; the merge stays with the captain.
1 Dec 2026: re-raise upstream PR #5397 through no-mistakes from a separate clone, not the laptop home; stop at PR ready / report.
Substance of PR 5397 as it stands: when the primary pushes inherited material to a remote secondmate and the remote host's older Firstmate code root refuses an item with its "error: path is not inherited material: " line (which it prints before any read, lock, or write), the sender bin/fm-remote-inherit-push.sh warns that it skipped that item, writes nothing for it, and continues with the rest instead of refusing the relaunch; every other failure still stops the push with the remote's stderr and exit status unchanged. config/lavish-axi-host is a per-machine server address, so it is declared machine-local (FM_MACHINE_LOCAL_INHERITABLE_CONFIG in bin/fm-config-inherit-lib.sh): same-machine secondmate homes still inherit it, the primary never sends it to a remote host, and a remote receiver offered it by an older sender prints "skipped:" and leaves the host's own value untouched. Docs and skills describe this version-skew behaviour, and the remote secondmate lifecycle test covers it.
What Changed
bin/fm-config-inherit-lib.sh: addsFM_MACHINE_LOCAL_INHERITABLE_CONFIG(currentlylavish-axi-host) andfm_config_inherit_item_machine_local, and addsfm_config_inherit_remote_items, which derives the remote-eligible subset offm_config_inherit_itemsby excluding machine-local items.bin/fm-remote-inherit-push.sh: sendsfm_config_inherit_remote_itemsinstead of the full item set, and when the remote replies witherror: path is not inherited material: <path>(an older code root that doesn't declare that item) it now logs a "skipped" warning and continues instead of failing the push; every other remote failure still aborts with the remote's stderr/exit status unchanged.bin/fm-remote-inherit.sh: recognizes machine-local items and, for those, printsskipped: <path> ...and exits 0 without reading, locking, or writing, leaving the remote host's own value untouched; the pre-existing refusal line for undeclared paths is now documented as the stable cross-revision contract the sender keys off of.docs/configuration.md,docs/remote-secondmates.md, and the two.agents/skillsSKILL.md files to describe the machine-local item handling and version-skew tolerance, and adds coverage intests/fm-remote-secondmate-lifecycle-e2e.test.shfor the new behavior.Risk Assessment
✅ Low: The change is a well-bounded, mechanically consistent extension of the existing single-declaration inheritance contract: the receiver's version-skew refusal line is reused verbatim and checked with an exact-line grep, both put and absent send paths handle the skew case, machine-local item exclusion is applied symmetrically (sender omits it via fm_config_inherit_remote_items, receiver independently refuses to apply it as defense-in-depth), and the new e2e test exercises real script invocations (fm-remote-inherit.sh, fm-spawn.sh) asserting observable file state and exit codes rather than matching source text. Docs and skill files were updated consistently with the code. No security, correctness, or scope issues were found in the diff.
Testing
Drove the real bin/fm-remote-inherit.sh and bin/fm-config-inherit-lib.sh code paths by running the project's own authoritative e2e fixture; the two receiver-side scenarios (undeclared-path refusal with the exact skew line, and machine-local item recognized but never applied, for both put and absent) passed live, while the three sender/relaunch-side scenarios central to this PR's behavior remained unreached when the phase's available time ran out, mirroring the inconclusive result from two prior test rounds on this branch.
Evidence: Live e2e run: receiver-side version-skew scenarios passing
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
✅ **Review** - passed
✅ No issues found.
tests/fm-remote-secondmate-lifecycle-e2e.test.sh- Three of the five scenarios central to this PR's new behavior — the sender (fm-remote-inherit-push.sh) treating a receiver's version-skew refusal as a warn-and-continue rather than a hard failure, a genuine inheritance failure (e.g. a symlinked remote destination) still refusing the relaunch outright, and the primary never offering the machine-local config/lavish-axi-host item to a remote host at all — could not be confirmed live in this run. The authoritative e2e fixture (tests/fm-remote-secondmate-lifecycle-e2e.test.sh) is a single ~2055-line sequential script with 70+ ordered scenarios; the assertions for these three live deep in the file (around line 1080, in the 'remote relaunch skips items an older host does not declare' block) behind many earlier sequential provisioning/seeding/generation fixtures. The run was started, progressed steadily (reaching the receiver-side assertions and beyond, e.g. 'remote spawn launches on the remote-local backend and records a host-qualified route'), but had not reached the skew-relaunch block by the time this phase had to report. This same inconclusive gap was already surfaced in two prior test rounds on this branch.bash tests/fm-remote-secondmate-lifecycle-e2e.test.sh (run to the 15th of 70+ sequential scenarios before the phase deadline; receiver-side scenarios passed live, sender-side skew-relaunch scenarios not yet reached)✅ **Document** - passed
✅ No issues found.
✅ **Push** - passed
✅ No issues found.