You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
t27c seal records spec_path as typed: an absolute path made three dangling seals (#6789) #6913
t27c seal <spec> --save records spec_path exactly as it was typed. Called with an absolute path, the seal carries the sealing machine's worktree path. #6789 committed three such seals:
tools/check_seal_coverage.py then failed every PR with 3 seal(s) newly do not hold ... [dangling] (for example run 37469508168, job 112288988211) until #6862 (75cf4e5) rewrote the three paths by hand. All three spec_hash values match the current spec bytes, so that was a path-only repair and no re-seal was needed.
Cause
bootstrap/src/main.rs, compute_seal_hashes:
spec_path: input_path.to_string(),
Nothing normalizes the path. Two consequences:
Dangling seals. An absolute path, or a ./ or ../ form, goes into the record verbatim. Every other checker keys on the repo-relative path.
Silent miss in the twin refresh.run_seal --save refreshes the other seal files of the same spec by string-comparing existing["spec_path"] with hashes.spec_path. An absolute-path call therefore never matches the repo-relative twins and leaves them stale without saying so.
seal_file_path uses only the parent directory name, so the file name came out right. That is why the defect reached master unnoticed.
Fix
In compute_seal_hashes, record the path relative to the working directory, which is the directory .trinity/seals is resolved against:
drop . components;
resolve absolute paths and paths containing .. by canonicalizing, then stripping the canonical working directory;
refuse, rather than record, a spec outside the working directory, because its seal would land in the wrong store;
use / separators.
Acceptance
t27c seal $PWD/specs/isa/t27a.t27 reports and records spec_path: specs/isa/t27a.t27.
t27c seal ./specs/isa/t27a.t27 and t27c seal specs/x/../isa/t27a.t27 record the same.
A spec outside the working directory is refused with a message that names the working directory.
Tested on the t27c Railway lab, not a local build.
Activity
fix(t27c): seal_spec_path names std::env and PathBuf in full; the fil…
chore(policy): drop the #6847 one-time block as master did in #6898, …
chore(policy): take master's exception list plus the seal_duplicates.…
fix(t27c): seal records spec_path relative to the store, refuses a sp…
self-host: t27core accepts compound assignment, byte-identical to gen…
t27core: numeric literal forms and pub var, byte-identical to gen-c (C…