Repository navigation
test(index): preserve submodule source boundaries - #4719
ScriptedAlchemy wants to merge 5 commits into
Conversation
|
Use the canonical compiled include policy to identify reachable submodule paths, including a single file or glob below the gitlink. Restrict file admission inside opted-in submodules to matches of those explicit includes; a broad traversal may not silently expose unrelated source files. Keep the normal exclude policy and authenticated gitlink/superproject checks. Add domain policy and real Git-submodule walker regressions. Rust/Bazel and full integration validation remain for hosted CI; production scheduler candidate enumeration is a separate known blocker before merge.
Let Git validate object IDs instead of assuming SHA-1 width, and remove only its output newline rather than whitespace belonging to a root path. Reuse one real Git fixture for SHA-1, SHA-256 and Unix whitespace roots; keep narrow includes, unrelated-clone rejection and removed-gitlink checks. Fail the walk fixture on entry errors instead of silently dropping them. Native Git mechanism probes pass. Rust/Bazel execution remains pending.
Keep the established repository boundary: a path include and parent gitlink do not provide child capture, freshness or indexed retrieval. Remove discovery subprocesses and the now-unused path-policy APIs instead of exposing files only to live search. Retain strict walk fixture errors. Add real registered-submodule coverage for broad, exact and glob includes with and without explicit search scope, and a regression for malformed metadata breaking unrelated source reads. Native Git fixture and failure probes pass. Rust/Bazel tests, formatting and the complete native matrix have not run in this tool-limited session. This withdraws the partial feature; it does not complete issue #4593.
|
Review follow-up: I pushed 7da327e on top of the concurrent narrow-include fix d2de698, removing SHA-1-only OID assumptions and whitespace trimming, with shared real-Git fixtures. Four native Git mechanism fixtures passed; the Rust walker tests did not execute locally. Current-head reconciliation: the repair lane subsequently advanced to 0d0e718 and withdrew the incomplete submodule-admission feature. I reviewed that current diff: it removes the custom discovery commands and discovery-only policy APIs, retains strict walk-error assertions, and adds real registered-submodule boundary and malformed-.gitmodules regressions. I did not restore the superseded production logic or overwrite the concurrent change. The indexed-capture gap is material: authenticated capture, child freshness and indexed retrieval must land together rather than making live grep/AST disagree with the index. The boundary-preserving replacement is the appropriate scope until that is implemented. Keep #4593 open. My earlier Git mechanism probes do not validate the new Rust boundary regressions; hosted CI on the current head is still required. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scope
Refs #4593; does not resolve it. The earlier walker-only submodule feature is withdrawn. A registered parent gitlink does not capture child files or establish their freshness, and allowing live grep/AST traversal alone makes those surfaces disagree with indexed retrieval.
The final patch keeps the existing nested-repository boundary, removes the custom submodule discovery subprocesses and the path-policy APIs added only for that discovery, and retains strict handling of walk errors in the test helper. It adds no production feature switch or fallback.
Regression coverage
.gitmodulescannot break an unrelated source include or admit a nested repository.The prior feature-admission tests are replaced because the incomplete feature is deliberately withdrawn, not because its failing checks are being hidden. Existing baseline source-walk tests remain.
Validation
A local native Git fixture verified that the child file exists, the parent index records only the gitlink, and Git confirms the child/superproject relation. A second probe reproduced the removed discovery command failing on malformed
.gitmodules, even though the intended include was unrelated. The publication blob matches the locally reviewed file exactly.The Rust source-walk regressions, Rust formatting, and full Bazel/native matrix have not executed locally: this environment has no checkout or Bazel/Rust toolchain. Hosted CI must validate the current revision before merge. The Git probes are not Rust test results.
Full submodule support still requires authenticated capture, freshness and indexed retrieval to be delivered together. Keep #4593 open.