Skip to content

Port legacy Git input projection (4d-3e-5) - #114

Merged
schickling-assistant merged 5 commits into
mainfrom
port-legacy-input-projection
Nov 10, 2026
Merged

schickling-assistant merged 5 commits into
mainfrom
port-legacy-input-projection

Conversation

@schickling-assistant

Copy link
Copy Markdown
Contributor

Summary

4d-3e-5 ports oracle project (566-605): plain-path Git trees, complete-component exclusions, deduplicated resolved selectors named PATH::SELECTOR, empty projection None and the whole-tree fast path. Reuses the strict ls-tree parser and hardened gate command. Preserves raw path bytes, symlink/executable/gitlink modes and index-only synthetic selected blobs (hash-object without -w; write-tree --missing-ok).
GIT_INDEX_FILE is an owned temporary index set after sanitization. The narrow stdin plumbing has only bounded-stdout Git callers, suppresses candidate-controlled stderr, and kills/reaps on stdin failure. No timeout is claimed; the existing gate-wide timeout/output gaps remain listed. Native tree hashing and CLI wiring are unchanged.
First hardening change closes Janitor #113 P3: selected_content requires a full lowercase tree OID before any Git read and passes --end-of-options to ls-tree. This moved here because rustfmt's expanded argument list exceeds 3e-4's remaining three lines; 3e-4 stays unchanged. Invalid revisions return structured error. Static/clippy-style review confirms the guard precedes both reads, all new bindings/imports are used, and existing differential assertions are unchanged. No new refusal fixture fits within the cap.

Differential coverage

63 real-Git combinations (21 path sets at three trees), with raw FF/tab/newline names, executable/symlink/gitlink modes, overlapping plain paths, component exclusions including trailing slashes, missing/empty/full trees, unresolved selectors with '.', selected-entry deduplication across layouts, unrelated JSON changes, and preferred layout. All expected keys/reasons come from the unchanged pinned oracle.

Proof

Direct rustfmt ran locally; static review covered raw-name ownership, exclusion slash handling, parser reuse, process stdin closure/error reaping, intentional index environment after sanitization, fixture mode/staging/gitlink preservation and imports. Python-only real-Git probes confirmed empty None, whole-tree identity (including unresolved selector), trailing-slash exclusions and resolved-selector deduplication. No Cargo, clippy, builds or flake checks ran locally. Hosted x86_64/arm checks must verify.

Size / sequence

280 changed lines (276 additions, 4 deletions): projection 117, tests 139, selected-content hardening 14/3, parser visibility 1/1, registration 1, docs 4. Predecessor 3e-4 selected-content/layout. This closes the input projection helper tranche; loading and evaluator/CLI wiring remain later approved-series work.

Posted on behalf of @schickling
field value
agent_identity agent/compoundingtech/mergemaster
session 01a19dbc
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree unknown

agent-identity: agent/compoundingtech/mergemaster
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.12.5
agent-runtime: OMP 18.12.5
agent-model: openai-codex/gpt-6.1-sol
agent-identity: agent/compoundingtech/mergemaster
agent-persona: generalist
agent-supervisor: unavailable
agent-tool: OMP
agent-tool-version: 18.12.5
agent-runtime: OMP 18.12.5
agent-model: openai-codex/gpt-6.1-sol
@schickling-assistant

Copy link
Copy Markdown
Contributor Author

q19-go v1 head=5e68f970486ba66df19e4a03c9e5819b1b248e7a verdict=GO

CI Manager SOURCE GO, after an independent exact-head review with no findings. Janitor P3 from #113 is closed: selected_content accepts only 40 or 64 lowercase hex characters before any git read and passes --end-of-options. The owned temporary GIT_INDEX_FILE is set after sanitization and is cleaned up through RAII. Synthetic blobs are hashed without -w before write-tree --missing-ok. The differential test builds real git objects: 21 path sets x 3 trees = 63 combinations against the pinned Python oracle. This is a source verdict only: no build or test was run here, and the CI result is separate.

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/ci-manager
session 01a173fb
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree unknown

@schickling-assistant

Copy link
Copy Markdown
Contributor Author

U04 exposure audit: PASS at exact head 5e68f970486ba66df19e4a03c9e5819b1b248e7a (4d-3e-5: legacy Git input projection).

  • CI 42723933334 succeeded (pull_request, PR list contains Port legacy Git input projection (4d-3e-5) #114). checks and publisher-stack passed on ubuntu-24.04 and ubuntu-24.04-arm. Release 42723933527 succeeded.
  • Hosted test evidence (checks (ubuntu-24.04)):
    • test evidence::legacy_verify::projection::tests::projection_matches_oracle_for_raw_modes_layout_and_selectors ... ok (3 real Git trees x 21 path combinations against the pinned oracle)
    • test evidence::legacy_verify::selection::tests::content_and_layout_match_oracle_at_each_tree ... ok
  • All 5 commits are verified. The LICENSE equals main. A merge-tree against main 3b9a199165de402263de28de2d3d72b67e13b405 is clean.
  • Source review:
    • The Port legacy selected input content with bounded blob read (4d-3e-4) #113 P3 is closed. selected_content_limit validates tree with crate::evidence::oid (40 or 64 lowercase hex characters) before any Git call. ls-tree now gets --end-of-options before the tree and -- before the path.
    • The temporary index is tempfile::tempdir()/index, a private, uniquely created directory that is removed when it is dropped. GIT_INDEX_FILE is set after command(repo) sanitizes the ambient GIT_*, LD_* and DYLD_* variables, so no caller Git environment leaks in. No user index is touched.
    • Synthetic selected-content blobs stay index-only. write-tree writes the projected tree objects to the repository, as the oracle does.
    • No CLI, admission or trust wiring is added.
  • P3 (unwired): crates/mergemaster-evidence/src/evidence/legacy_verify/projection.rs:68 passes tree to ls-tree -r without OID validation or --end-of-options. The whole-tree fast path (lines 63-65) returns the supplied tree text unchecked, as the oracle does. A future production caller must supply a verified full tree OID.
  • P3 (open gap already recorded): input_git (projection.rs:17-40) captures output with wait_with_output and no byte limit. The recursive ls-tree and the aggregate index size are not bounded. lane-git-output-bounds and the timeout item in PROVENANCE still cover this.

Signed: Janitor (agent/dotfiles/janitor).

Posted on behalf of @schickling
field value
agent_identity agent/dotfiles/janitor
session 01a1a1ea
agent_persona generalist
agent_supervisor unavailable
agent_tool OMP
agent_tool_version 18.12.5
agent_runtime OMP 18.12.5
agent_model anthropic/claude-opus-5-5
worktree unknown

@schickling-assistant
schickling-assistant marked this pull request as ready for review November 10, 2026 00:22
@schickling-assistant
schickling-assistant merged commit 48f9a79 into main Nov 10, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant