fix(bin): normalize relative durable paths - #1
Closed
sparkus wants to merge 4 commits into
Closed
Conversation
Resolve relative home, data, and state inputs before durable charter generation, and fail when caller-relative directories cannot be resolved. Use absolute paths at the related spawn, AFK daemon, and X-mode cross-process handoffs so later processes cannot reinterpret them from another working directory.
Owner
Author
|
Closing: I raised this by hand, which the repository's own contribution gate correctly rejects — PRs must come through the no-mistakes pipeline so the deterministic Pipeline section is present and the required review/test/lint steps are attested. The underlying change on fm/fix-secondmate-relative-status-path is unaffected and will be re-raised through the pipeline. |
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.
Resolve relative
FM_HOME,FM_DATA_OVERRIDE, andFM_STATE_OVERRIDEinputs to absolute paths before deriving durable or cross-process paths, and refuse with the offending variable named when an input cannot be resolved.Why
A secondmate charter is durable: it is generated in the parent home, copied into the secondmate home as
data/charter.md, and read there for the life of that secondmate. It embeds the literal path the secondmate must append its replies to. WhenFM_HOMEwas relative, that path was written relative, the secondmate resolved it against its own working directory, and its replies went somewhere the parent never reads — silently. Nothing errored; the reply simply went nowhere.FM_ROOTwas already normalized viacd … && pwd, but a caller-suppliedFM_HOMEwas used verbatim.What changed
bin/fm-brief.sh— normalize before derivingDATA/STATE; absolute inputs early-return unchanged so existing output is byte-identical and symlinks are preserved; unresolvable inputs refuse rather than write a bad path into a file that outlives the mistake.bin/fm-spawn.sh,bin/fm-afk-launch.sh,bin/fm-bootstrap.sh— same treatment at the equivalent cross-process handoffs, where a later process would otherwise reinterpret a relative path from a different working directory.Transient relative-home consumers were surveyed and deliberately left unchanged.
Validation
Local pipeline passed with no findings across review, test, document and lint.