Repository navigation
Port legacy record discovery (3f-1) - #121
Merged
Merged
Conversation
Contributor
Author
|
U04 exposure audit: PASS at exact head
Signed: Janitor ( Posted on behalf of @schickling
|
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.
Summary
Port 3f-1, tree-record candidate discovery, in the existing legacy_verify::discovery module. tree_refs lists tags before tree-prefixed notes, preserving first occurrence and exact suffix/object identity through records_under. legacy_refs finds only surviving first-layout notes of the requested object-ID width. Neither function validates statements/signatures or authorizes evidence. Native gate and CLI behavior are unchanged.
Full 3f exceeds a 280-changed-line review slice once statement validation, Git/shallow-parent checks, owned cache and SSH verification have their differential fixtures. The committed README records the split: 3f-2 statement_of (633-667), 3f-3 read_statement/load (720-765; split cache separately if necessary), then signature integration (768-773) before 3g selection and 3h require_all. Detailed rationale is in tmp/record-loading-3f-1/plan.txt.
Janitor projection.rs:68 OID/end-of-options hardening and input_git output capture do not touch this discovery path; keep them as the next hardening slice before caller wiring.
Python source lines ported
Pinned Python oracle: v0.6.0, cff667c.
scripts/evidence-verify 670-680 (legacy_refs) and 696-699 (tree_refs), reusing the already ported records_under at 683-693. scripts/PROVENANCE records these boundaries.
Hardening: tree IDs must be full lowercase OIDs; first-layout widths must be 40 or 64. The Python caller already derives these from validated OIDs.
Differential tests
Added legacy_tree_record_indexes_match_real_oracle to the existing gate integration suite. It compares actual Git listings with unchanged Python functions in SHA-1 and SHA-256 repositories, at empty, populated and post-GC states. Fixtures include tag-first ordering, tag/note duplicates, another tree and missing tree, matching and mismatched first-layout widths, mismatched object targets, invalid suffixes, nested refs, uppercase names, sibling prefixes and input-index isolation. Direct hardening assertions cover invalid widths/OIDs. These tests were authored but NOT EXECUTED because admission was unavailable.
Evidence
Source synchronized to dev5:/var/tmp/mergemaster-port3f-source with rsync, excluding .git and tmp. No Cargo targets were created under ~/.megarepo.
Attempt 1 on dev5: gate-slot --class eval --max-wait 1800 --max-hold 600 -- nix develop --profile /var/tmp/mergemaster-port3f-shell --command true. Admitted after 177s; failed fetching the pinned Fractal source after repeated GitHub HTTP 504s (exit 1).
Recovery: transferred the exact local Git archive e2721e52463428b4ff655addee129cecd2839763 to /var/tmp/mergemaster-port3f-fractal.
Attempt 2 on dev5: gate-slot --class eval --max-wait 1800 --max-hold 600 -- nix develop --override-input fractal-fixture path:/var/tmp/mergemaster-port3f-fractal --no-write-lock-file --profile /var/tmp/mergemaster-port3f-shell --command true. Never admitted; max-wait exit 94 at 2026-11-10T17:00:10Z. Stopped remote attempts at the required 30-minute admission ceiling.
NOT RUN
All requested Cargo verification is blocked, not passed:
Run these on dev5 after shell preparation, under gate-slot --lane build --profile disk=cargo-cold --max-wait 1800 -- with CARGO_TARGET_DIR=/var/tmp/mergemaster-port3f-target (cargo-warm only if a reusable warm target exists). Keep the pinned shell's three oracle/fixture variables. No local Cargo fallback, Nix checks, hosted CI, CLI cutover, pushes or PR publication ran.
Verification: local Cargo runs were blocked (dev5 Nix admission and GitHub 504s; dev3 Cargo window closed). Hosted CI on this PR runs fmt, clippy, the full Rust suite and the oracle differential tests, and is the verification for this head.
Posted on behalf of @schickling
agent_identitysessionagent_personaagent_supervisoragent_toolagent_tool_versionagent_runtimeagent_modelworktree