Skip to content

feat(code-index): index authenticated Git submodules - #4801

Draft
ScriptedAlchemy wants to merge 46 commits into
codex/dashboard-fixture-listenerfrom
fix/4593-skipped-nested-repository-audit
Draft

ScriptedAlchemy wants to merge 46 commits into
codex/dashboard-fixture-listenerfrom
fix/4593-skipped-nested-repository-audit

Conversation

@ScriptedAlchemy

@ScriptedAlchemy ScriptedAlchemy commented Nov 8, 2026 •

Copy link
Copy Markdown
Owner

DRAFT / HOLD MERGE

Refs #4593. Keep the issue open pending independent review.

A project can set index.include_submodules.v1 and restart its daemon to index a checked-out direct submodule under its parent-relative paths. The default is false. Grep, structural search, the unmounted-file audit and graph indexing share the boundary. The audit reports skipped nested repositories.

Live capture binds the staged parent gitlink and exact pin, the staged and working .gitmodules registration, and the child checkout to the parent's Git administration. It tracks child commits and local additions, edits and removals. Linked worktrees, unrelated clones, nested gitlinks, aliases into child repositories and uninitialized children stay outside live indexing. Tracked parent source aliases retain their logical graph paths when every link and the terminal file belong to the same parent checkout. Historical capture uses the selected parent tree and the pinned object in the parent-owned module store. If that store is missing, the historical generation is unavailable.

This PR is stacked on draft #4835, which fixes the shared dashboard fixture used by the failing Linux readiness journey. At a39c36da7d all 48 feature-file patches match their previous versions. On this stacked head, eight native submodule tests passed across the walker and runtime, and the dashboard opening-to-unavailable test that previously failed on Linux passed on macOS. The scheduler fixture fix from the preceding head had already landed on master in adc55f8eca. Earlier full Linux and targeted Windows verification.

The dashboard fixture now uses the shared Linux launcher download fix. At 8b58d91c10 all 48 feature-file patches still match the preceding head. The third frontend attempt on the preceding head also stopped at a release download with HTTP 504. Full Linux and targeted Windows verification on the new head.

The authenticated release download prerequisite #4847 is now included through the dashboard fixture. On 77ce539b4f, all 50 feature-file patches match the reviewed alias correction da69c12c2a. Full Linux and targeted Windows on the combined head.

Verification

At f36fbb3841, the hosted Linux fleet passed all 183 Bazel test targets, including 107 uncached executions. The Clippy job, dashboard and shipped Linux CLI build also passed. Native Windows is queued on the same head. The subsequent master merge did not change the submodule indexer or its tests.

At f36fbb3841, the two complete native Linux ARM64 suites passed as an ordinary user on ext4: 377 source-index cases and 695 runtime cases, with two existing opt-in memory tests ignored. The first full run exposed a stale reconcile assertion expecting a tracked same-parent alias to vanish. The restored test now requires both tracked paths, the exact committed HEAD revision, and no redundant background refresh. The runtime suite reran all 695 cases after the correction. Hosted Linux and Windows on this head.

At da69c12c2a, independent review found and repaired a default-policy regression that had removed previously supported parent source aliases even in checkouts with no submodules. Native macOS passed all 377 code-index unit tests, five authenticated submodule runtime tests, and the restored historical/live regression. Both policy settings retained the local parent alias and refused an alias into a registered child. The historical and live captures agreed on six committed paths, and an unstaged change to the regular target updated all three Rust aliases in live capture while historical digests remained intact. Alias repair · Hosted PR CI on this head

The preceding hosted Linux fleet passed all 183 Bazel targets at 8b58d91c10 (95 executed). The dashboard API, authenticated code-index runtime, and MCP suites ran in 212.2, 116.9 and 296.4 seconds respectively. The hosted Dashboard, Clippy, shipped Linux CLI build and repository gates also passed. The Windows job on that head stopped before target execution when GitHub’s release endpoint returned HTTP 504 for rules_python 2.4.6. Windows download failure The draft and independent review hold remain in place.

On the latest stacked commit 8b58d91c10, native macOS Bazel passed all eight authenticated submodule cases and all 89 dashboard API tests. The dashboard suite exercised the opening-to-unavailable journey that previously timed out on the Linux fleet.

On the stacked commit a39c36da7d, Linux ARM64 passed all eight targeted submodule tests as an ordinary user, together with the previously failing dashboard opening-to-unavailable case on a native tmpfs scratch directory. The profile admission refused Docker overlay storage before the dashboard started during the initial local run. The same fixture completed in 0.37 s on tmpfs. The hosted frontend job failed twice while GitHub returned HTTP 504 for the pinned Bazel launcher binaries, before frontend tests began. The independent full Linux and native Windows run is pending.

At 478da430ede75cb22cb1f7ffc97a5f14364a0f46, the complete macOS Bazel code-index-runtime unit suite passed 694 tests in 175.75 seconds. Two existing opt-in memory-scale regressions were ignored by the ordinary suite. The crate’s Bazel rustfmt check also passed. With an incomplete staged .gitmodules and valid working file, repeated graph-serving and retained-reconcile calls now abstain while the probe fails. Repairing the staged registration restores reuse of the same generation. The suite also exercises positive live and historical submodule graphs and the default-off path.

On b96724957d79e242838c22b14b48c9d7c17e64b1, macOS Bazel ran 52 focused tests across six suites.

  • 22 source-walk cases and five indexing/runtime cases cover the default and opt-in, unrelated checkouts, parent-to-child calls, live edits and deletions, historical reads after deinitialization, and refusal to read a formerly bound checkout.
  • 17 MCP integration cases cover field sites and rename previews, including CRLF and UTF-16 sources, stale paths, reference evidence, deadlines and cancellation.
  • Six native Git integration cases and two configuration/registry cases cover candidate trees, project overrides and convergence of pre-existing settings.

The MCP production library and repository-wide Bazel rustfmt check passed. The workspace dependency fetch and BUILD generator completed. A separate scheduler fixture correction keeps backend identities consistent with the hosted environment.

At 26d7171bf8, all 548 MCP integration tests and all 22 storage/runtime integration tests passed on macOS, including both regressions from the earlier Linux run. The grep journey uses an actual separate Git directory. Restarting with a retained dependency that moved behind a nested repository or symlink returns the specific refusal before reading that path. The changed Clippy and rustfmt targets passed. The code-index suite passed all 377 cases on this head. An unfiltered runtime repeat reached the 300-second Bazel timeout on the shared Mac. Two disjoint runs on this same head then covered the complete suite: all 11 matching committed-tree cases passed, and the complementary run passed 683 cases with the usual two opt-in cases ignored. Across both indexing crates and the two affected integration targets, 1,641 tests passed on this head.

On Linux ARM64 at the same commit, eight authenticated submodule tests passed across the source walker (three) and index runtime (five). They exercise the real live and historical graph across restart, default-off behavior, and refusal to reuse a persisted or retained generation after a failed submodule probe.

Hosted Linux ran both complete indexing suites (377 code-index and 695 code-index-runtime, with two opt-in cases ignored), and all 675 MCP tests passed. Clippy passed. The Linux fleet passed 182 of 183 targets. The dashboard API suite had one failure in 89 cases: the loopback fixture timed out during initial readiness before the opening-to-unavailable assertion. The effect on this run of releasing the chosen port before binding remains unproven. The preceding Windows job targeted that earlier head. Independent review remains pending. Keep this PR draft and HOLD MERGE.

Keep parent repository source admission unchanged; use one shared
walker for exclusion evidence instead of a second filesystem scan.

Refs #4593
@changeset-bot

changeset-bot Bot commented Nov 8, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: d245259

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy marked this pull request as draft November 8, 2026 01:11

Copy link
Copy Markdown
Owner Author

Refs #4593 — validation blocker at exact head 38bc131598d5d993295f97b7001811209a1b16a5.

The repository-gates job failed before Rust execution: https://github.com/ScriptedAlchemy/tracedecay/actions/runs/42433144833/job/128586224987 . The actual failures are:

  1. check-generated-rust-entrypoints: stale generated entrypoint/toolchain contract; its diagnostic names package.json packageManager/engines and the setup-pnpm node-version instruction surface.
  2. check-generated-api: unexpected generated AgentPromotionStatus.swift and AgentSignalGate.swift bridge surfaces.
  3. Domain ownership contract drift: docs/generated/domain-module-map.json, docs/generated/runtime-service-map.json, and crates/tracedecay-configuration/src/generated/project_settings_contract.rs.

git diff --check, CI-shape/scope/environment-policy checks and Bazel BUILD graph checks passed. This is NOT a rustfmt failure, and none of those passes establishes Rust compilation or behavioral correctness. Native tests were skipped by draft selection. I could not establish whether these gate failures also occur on current master: the master status/workflow requests were unavailable to this integration. Do not label them pre-existing without that comparison.

No source fix, Rust test execution, independent review, branch update, merge or issue closure was completed in this follow-up. This environment has no executable repository checkout or Bazel; direct repository retrieval failed, and no usable remote execution/workflow-dispatch capability was exposed. This is a validation limitation, not evidence that the implementation is correct.

#4801 remains diagnostic-only and draft. It does not yet satisfy authenticated submodule admission, pinned child-tree capture, child-aware freshness, or consistent retrieval/graph behavior. Retain Refs #4593; do not infer issue completion from a green diagnostic PR. Reuse this existing issue PR rather than opening a duplicate. The next implementation must use one authenticated submodule inventory across admission/capture/freshness/retrieval, invalidate parent reuse for child commits and edits, preserve linked-worktree/untrusted-repository exclusions, and add nonzero Bazel regressions including opt-in/off, spoof rejection, child changes, historical capture and restart behavior.

Coordination: the dedicated #4593 owner remains responsible for implementation; PR maintenance owns CI assistance without racing its branch. Do not repair unrelated decision-model generated paths by importing forbidden work. #4776 and all Kev/decision-model work remain draft and unmergeable by instruction; #4763 remains read-only. No protections or tests were weakened.

Copy link
Copy Markdown
Owner Author

Refs #4593 — exact-head CI repair 1f8c1997090e4631ee38f50a32af4186e8153c12 (nonforce fast-forward from 38bc131): applied the three exact Rust formatting replacements reported by hosted Bazel //crates/tracedecay-code-index:rustfmt_check_2024 in run 42433144833. Correction: my earlier comment erroneously attributed the failure to generated entrypoints/API/domain maps. The repository-gates log shows the actual failure was rustfmt_check_2024 only; 8 other Bazel test targets passed. No generated-source edits are warranted by that log. Fresh run 42437677389 was queued when last checked; no claim it passed.

The PR is still partial: it adds skipped-nested-repository diagnostics and regression source, but NOT authenticated submodule indexing, freshness, or indexed retrieval. HOLD MERGE even if its current-head diagnostics tests pass: keep this same PR open to complete #4593. Being reviewable or passing preliminary tests does not mean the issue's acceptance is met. No complete-implementation, native macOS or independent-review proof exists. Keep Refs #4593, issue open, and protected Kev/release PRs untouched.

Limit skipped-repository samples during traversal, honor directory policy
before collecting diagnostics, and quote bounded path labels. Propagate
source-walk failures instead of returning an empty successful audit.

Add behavioral coverage for bounded sampling, policy scope, preserved
ecosystem caveats, Unicode/control-character paths, and missing roots.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published source repair 8d6f07e1bb326630a313e1911d8bd271f337dd6c on this same branch with expected_sha=1f8c1997090e4631ee38f50a32af4186e8153c12, force=false; independently re-read PR head confirms the update.

Fixed unbounded skipped-repository collection, diagnostics escaping configured directory exclusions, unquoted/unbounded path labels, and swallowed filesystem-walk failures. Added six behavioral regression cases (one Unix-only filename case); existing initialized-submodule and linked/nested-repository exclusions are preserved. Only source_walk.rs, unmounted_files.rs, and the new nested-repository test module changed; no scheduler, generated contract, release, infrastructure or model changes.

Current-head CI: https://github.com/ScriptedAlchemy/tracedecay/actions/runs/42442123433 — queued when inspected. These Rust regressions have NOT executed; author diff review is NOT independent review. The prior successful draft run skipped Rust/Clippy/native jobs, so it is not acceptance evidence for these changes.

The existing merge hold remains. This repairs the current audit implementation, not the still-unimplemented optional authenticated submodule indexing feature. Keep the PR draft/open and #4593 open. Continue the integrated admission/capture/freshness/retrieval implementation here rather than opening a duplicate or treating more diagnostic fixes as feature completion.

Apply the exact formatter changes reported by the hosted Bazel
rustfmt_check_2024 failure on PR #4801.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published nonforce, expected-head fast-forward 8d6f07e → 1b49877, fixing the precise three rustfmt_check_2024 hunks from the current-head hosted Bazel repository-gates failure in run 42442123433 (job 128613365191). The exact diff changes only formatting in source_walk/nested_repository_tests.rs; 8 other repository-gate targets passed before the format failure. Verified #4801 now points to 1b49877, and current-head run 42447730459 was queued at last read. These behavioral Rust regressions have still not run; native/Linux/Clippy remained skipped on the draft workflow, and there is no submitted independent review. HOLD MERGE. Authenticated submodule indexing in parent capture, freshness, historical Git-tree capture, policy/configuration, and indexed/live retrieval remains unimplemented; keep PR draft, issue open and existing hourly owner enabled. Do not import protected Kev/release branches or change CI protections.

Use one source boundary for interactive walks, Git candidate classification,
worktree capture (including ignored-file admissions), and freshness. Parent
tracked files hidden by a new nested .git marker become tombstones, invalidate
clean HEAD-tree reuse, and return when the marker disappears. Reject source
paths passing through symlinked directories or lexical escapes.

Add real Git classification and filesystem regressions for nested directory,
gitdir-file, symlink, path traversal and removal behavior.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published source repair 624cc833 on the existing branch, expected-head NONFORCE fast-forward from 1b498778. Four source paths changed: shared nested-repository/symlink/escape guard in source_walk, parent Git classification tombstones + dirty/freshness invalidation for tracked paths newly hidden behind nested .git, worktree capture guard including explicit ignored-source admission, and freshness roster parity. New real Git and source-boundary regression source is committed; it has not executed via Bazel. The exact-head CI run 42449422792 was still pending; native/OS Rust jobs are skipped for draft PRs. No independent review. This is a partial fail-closed security/correctness fix, NOT the registered-submodule opt-in feature. Hold #4801 DRAFT/unmerged and #4593 OPEN; next owner work must deliver canonical config + authenticated 160000/.gitmodules/topology inventory, child-aware capture, historical pinning, freshness/retrieval parity and nonzero Bazel/native acceptance. PR maintenance: assist only with exact-head CI and do not race this source branch. Preserve #4800/#4508 scheduler work, Kev/#4776 DRAFT and release #4763 read-only.

Apply four exact replacements from hosted Bazel rustfmt_check_2024
at PR #4801 head 624cc83; no behavioral source change.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published exact-head CI repair 9beb7b8 to the existing DRAFT #4801, using expected head 624cc8338a1cfe8486b0638ba88fbbae0df9fa33 and force=false. Hosted run 42449422792 failed Bazel rustfmt_check_2024 for exactly four formatting hunks (two in source_walk.rs, two in classification.rs); eight unrelated repository tests passed. This patch makes exactly those four formatting replacements in those two files, with no behavior changes. PR/ref readback confirms the new head. Fresh current-head run 42455645684 was QUEUED at inspection; no pass is claimed. The draft workflow skips Linux/Windows/macOS Rust tests and Clippy; zero new behavioral Rust tests have executed, and no independent review exists. HOLD MERGE: the integrated authenticated submodule feature (canonical default-off setting, gitlink + .gitmodules + child topology, dirty/historical child capture, freshness, graph/live parity, toggles and restarts) remains unimplemented. Keep issue OPEN and owner schedule unchanged. No Kev/#4776, release/#4763, or peer PR changes.

Sample .git marker evidence for tracked and explicitly admitted source
ancestors even when Git dirwalk never recurses into tracked-only folders.
Test marker creation and removal against a real Git parent index.

Refs #4593
Directory metadata changes when the marker is removed, so the original
cached roster must not be treated as restored merely by marker absence.

Refs #4593
A registered gitlink remains an untrusted nested source boundary even if
its child .git marker is absent. Keep live grep and audit in default-deny
parity with the parent index; include/glob cannot lift repository trust.

Exercise a real registered Git submodule with its marker removed.
Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published narrow default-deny source fix 704a9aac135046fe1d720242a482561a61eb5274 to #4801 with an expected-head NONFORCE fast-forward from 0119cf9 (remote PR ref verified). Parent 160000 gitlinks now remain excluded by the shared live source walker even if the child .git marker is removed; the real registered-submodule regression fixture now exercises that missing-marker case and explicit glob refusal. Production uses the existing in-process gix opener (no shell Git or network); no child indexing is enabled. Source diff changes one file only: crates/tracedecay-code-index/src/source_walk.rs.

Current-head run: https://github.com/ScriptedAlchemy/tracedecay/actions/runs/42466514013 (queued at check). NO Bazel behavioral Rust pass or independent review claim. Do not merge or mark ready. Feature acceptance remains integrated authenticated opt-in, pinned historical child capture, child status/freshness and cross-boundary graph/index/live retrieval, with nonzero Bazel/native validation. Preserve #4800 and protected Kev/release lanes.

Apply the two exact rustfmt_check_2024 hunks from hosted run 42466514013.
No source behavior changes; authenticated submodule indexing remains pending.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — narrow hosted Bazel formatting repair published at 1899d261 by nonforce, expected-head fast-forward from 704a9aac, independently verified against the remote Git ref and PR head.

Exact-head run 42466514013, repository-gates job 128687191524, failed only //crates/tracedecay-code-index:rustfmt_check_2024, with two exact hunks in source_walk.rs (line wrapping around the workdir and index reads). The other 8 repository-gate targets passed, most cached; these were not code-index behavioral Rust regressions. Commit 1899d261 applies only those two reported formatting replacements in one file, no behavior changes. New-head CI and nonzero Bazel Rust test evidence have not yet been established.

HOLD MERGE: this PR remains DRAFT and contains only exclusion/diagnostic/freshness hardening. The requested default-off authenticated submodule inventory, selected historical child-tree capture, dirty child freshness, and graph/indexed/live retrieval parity remain unimplemented. No independent review. #4593 stays open. Please do not merge or change the draft selection to conceal missing behavior, and preserve #4800/#4508, protected #4776 Kev and read-only #4763.

Copy link
Copy Markdown
Owner Author

Refs #4593 — new source-review boundary mismatch, regression needed; not a claimed exploit or passing test (reviewed at exact head 1899d261c9c6486f572a0cbdf619d07315b65378).

The default-deny live walker now checks parent stage-0 gitlink roots through source_walk.rs::parent_gitlink_paths, including when the child's .git marker is absent. But code_index_scheduler/reconcile.rs::capture_admitted_candidate (around 3977–3983) and freshness_witness.rs::source_candidates (around 135–143) still validate explicitly admitted ignored paths using only source_walk::has_nested_repository_ancestor. That helper checks nested .git markers and symlink/path ancestry, not parent-index gitlink roots. Therefore the new deny boundary is not yet shared by these capture/freshness paths.

Test the concrete scenario with a real parent 160000 gitlink under node_modules/<package>, a registered .gitmodules entry, child source still present but its .git marker missing, and an ignored-dependency admission/retained roster. The admission must fail closed or retire before child bytes enter a parent generation, even when the package path matches .gitignore. Check ignored_dependencies.rs::prove_gix_ignored (exact-path lookup plus ignore match) against gitlink ancestor semantics rather than assuming it already prevents this. Also assert live grep/AST and freshness parity across marker removal and restart. This is an actionable trust-boundary test requirement, not evidence that the runtime admission exploit has reproduced: no nonzero Bazel Rust test can be executed in this environment.

Current-head hosted workflow 42468887836 has passed repository gates, but Rust native/OS tests and Clippy were skipped for this draft; the Dashboard job remained queued when checked. Do not push a speculative fix that cancels that run. Fix via the one canonical authenticated submodule boundary, not a third independent scanner, and keep DRAFT/HOLD MERGE, Refs #4593, and issue open until full integrated acceptance.

A parent stage-0 gitlink remains tracked repository source even when its
child checkout loses the .git marker. Check every indexed ancestor before
an ignored dependency is admitted or revalidated, preserving the existing
proof for ordinary ignored sources.

Add a real local Git submodule regression that removes the child marker
and checks both the admission proof and production source-read refusal.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published 77332ede0f9b9cb557bd41185203eba9500c3f0a by expected-head, NONFORCE fast-forward from 1899d261 on this existing draft PR.

The ignored-dependency gix proof now checks every parent index ancestor for mode-160000 gitlinks, not only the exact candidate path. This closes the omitted-marker admission path discussed in comment 6720823044 for verified ignored dependencies, including the production source read and existing ignored-roster revalidation. Added a real local Git submodule regression source: verified stage-0 gitlink and .gitmodules, removed the child .git marker, asserted typed refusal by proof and read, plus a normal ignored-source control. Only ignored_dependencies.rs changed; candidate diff and live remote head were read back.

No Rust regression has executed through Bazel, and there is no independent review. Current-head hosted CI 42482445184 was queued. Previous-head run 42468887836 completed successfully after re-running a Dashboard job blocked by a transient download timeout; draft native Rust/Clippy remained skipped. I independently checked the disposable Git fixture commands locally, but that is not a repository Rust test or acceptance evidence.

HOLD MERGE / keep DRAFT / #4593 OPEN. The default-off authenticated submodule inventory, selected child-commit historical capture, child-aware freshness, and indexed/graph/live retrieval parity remain undone. Protected Kev/release PRs, #4800/#4508, and CI protections were not changed.

Refs #4593. Full authenticated child indexing still incomplete.

Copy link
Copy Markdown
Owner Author

Refs #4593 — guarded source repair on existing DRAFT #4801, HOLD MERGE.

Commit 2b230e8232f6ffd23675223c261fcfbd0a26e80a addresses a concrete remaining default-deny gap: a child checkout with its .git marker removed and its parent gitlink staged for removal disappears from the index but remains a mode-160000 gitlink in the parent's HEAD tree. The interactive source walker previously checked only index gitlinks and the current marker, so an explicit include/glob could admit those live child bytes. It now unions parent index gitlinks with parent HEAD-tree gitlinks, handles unborn HEAD, and fails closed on unreadable committed-tree authority. The existing real-Git submodule test now commits the parent, stages removal without deleting the child, verifies index absence plus HEAD's 160000 entry, and checks ordinary and explicitly scoped walks still exclude the child. A real Git fixture was independently probed for these Git semantics; that is not a repository Rust/Bazel test.

One file changed: crates/tracedecay-code-index/src/source_walk.rs. Published via expected-head 77332ede nonforce fast-forward, verified by direct branch and PR REST reads. Exact-head hosted CI run 42499856015 was queued on last check. No nonzero Bazel Rust regression pass, native OS test, or independent code review is claimed. Draft workflow selection skips native Rust/Clippy.

The integrated canonical default-off authenticated submodule opt-in, shared inventory across child candidate capture/freshness, pinned historical submodule trees, and parent-relative graph/retrieval are not implemented. Do not mark ready, merge, or close #4593. Protected #4776 Kev, #4763 release and #4800/#4508 peers untouched.

Refs #4593. Reuse the parent's index-plus-HEAD boundary for ignored
sources and cover the real staged-removal checkout scenario.

The authenticated opt-in indexing feature remains incomplete.

Copy link
Copy Markdown
Owner Author

Refs #4593 — source repair published on existing DRAFT PR; HOLD MERGE.

Commit f925fe65 is a guarded, nonforce fast-forward from 2b230e8232f6ffd23675223c261fcfbd0a26e80a. It corrects another default-denial discrepancy: the ignored-dependency proof used only the staged parent index. After staging removal of a registered gitlink and removing the child's .git marker, live search still denies the child through the parent HEAD but explicitly admitted ignored-source reads could treat the same child files as ordinary ignored dependencies.

Ignored-source proof now calls the same index-plus-HEAD parent gitlink boundary as the source walker. The real-Git fixture commits a parent with a 160000 submodule, stages removal with git rm --cached, verifies the index no longer has that gitlink while HEAD still does, and asserts ignored admission and source-read refusal; its ordinary ignored-source control remains. Exactly two changed files: source_walk.rs (exports the existing boundary) and ignored_dependencies.rs (uses it and adds the regression).

Verification limit: read back the exact commit and diff; no nonzero Bazel Rust test executed locally. Current-head hosted run 42503394287 was queued and chooses native=none because the PR is draft, so it cannot establish Rust behavior. No independent review. This remains a partial fail-closed repair only; canonical default-off authenticated submodule inventory, child capture/freshness, pinned historical-tree capture, graph/indexed/live parity, and acceptance tests are outstanding. Keep Refs #4593, PR DRAFT/unmerged, issue open. Preserve scheduler #4800/#4508 and protected Kev/release PRs.

@ScriptedAlchemy
ScriptedAlchemy changed the base branch from master to codex/dashboard-fixture-listener November 9, 2026 04:42

Copy link
Copy Markdown
Owner Author

Refs #4593 — NEW ACTIONABLE NATIVE WINDOWS FAILURE; DRAFT / HOLD MERGE (2026-11-09 UTC).

The independently dispatched hosted run 42587465701, on exact tested commit f36fbb3841, finished Windows with failure, not an infrastructure timeout. I read job 129123474411 and its actual test output:

  • //crates/tracedecay-code-index:unit_test PASSED (20.8 s).
  • //crates/tracedecay-code-index-runtime:unit_test FAILED (170.7 s): 608 passed, 1 failed, 2 ignored.
  • The failing real Rust test is code_index_scheduler::tests::index_path_policy_tests::submodule_policy_binds_live_graph_and_historical_child_pins_across_restart, assertion at index_path_policy_tests.rs:332. Following an independently committed child HEAD update, removal of app/gone.ts and addition of untracked app/pending.ts, the reconciled live generation contains only ["dev/launch.ts"] rather than ["app/lib.ts", "app/pending.ts", "dev/launch.ts"]. Its earlier enabled-child/live-call-edge assertion already passed. Actual child source admission or incremental capture has been lost on Windows following the child transition. Whether the loss begins at live_submodules checkout authentication, WorktreeChangeClassificationV1::for_policy child candidate inventory, or a later capture step is not yet established.
  • The Linux Bazel fleet (183 targets, 107 uncached), dedicated Linux job, Clippy, Dashboard and shipped Linux CLI passed on that earlier head. This does not overrule the Windows behavior.
  • Existing PR tip c2c6495eb84f41f9bdf41f790ae0d78284c7768f remains OPEN DRAFT; comparison f36fbb3841..c2c6495 has no changed submodule implementation files, but this is not current-head native acceptance. Its draft workflow 42592284120 skips Rust tests.

Required source follow-up: preserve the falsifiable test unchanged; on native Windows compare authenticated live_submodules bindings, classification.child_sources, candidate paths and actual captured logical paths before and after the child commit, then repair the first incorrect production boundary and rerun a nonzero Bazel Windows regression plus full affected suite. No speculative default-off exception, skipped/relaxed assertion, fallback to parent-only success, or claiming Linux green as Windows acceptance. This run has no local Bazel or Windows checkout to reproduce/validate a proposed repair. No source push was made.

Issue #4593 stays OPEN. PR #4801 stays DRAFT / UNMERGED. Independent review and exact-head native acceptance remain outstanding; do not race other issue owners, #4800/#4508, Kev/#4776, or release #4763.

Refs #4593

Normalize the existing child-root canonical identity before comparing it to the scheduler's plain path. Windows canonicalize returns a verbatim disk path even for the same checkout; the raw comparison silently dropped live child candidates after a child HEAD advance. Keep the strict existing-root/no-symlink boundary. The already-failing native Windows submodule graph regression exercises this path; run it on the new head with Bazel before accepting.

Copy link
Copy Markdown
Owner Author

Refs #4593 — published narrow Windows live-capture repair 88ca6c1dee8bb9cea75aaea30370834226d4f04d through expected-head, nonforce fast-forward from c2c6495eb84f41f9bdf41f790ae0d78284c7768f; verified the remote branch and PR head match. Exactly one file changed: crates/tracedecay-code-index-runtime/src/code_index_scheduler/reconcile.rs.

Cause isolated from the failed native Windows test: capture_admitted_candidate compared root.canonicalize() directly with the scheduler's plain canonical self.project_root.join(prefix). On Windows, std::fs::canonicalize returns an extended-length/verbatim disk path while the project's own path_safety::canonical_root_identity deliberately removes that spelling. The mismatch silently returned Absent for every live child source after the child HEAD advanced. The initial clean pinned-tree capture did not take this live path, explaining why dev/launch.ts survived while app/lib.ts and app/pending.ts vanished. The production guard now uses canonical_existing_identity (which requires the path to exist and removes the Windows verbatim spelling) before the same strict equality test; the symlink/escape and file checks remain in place. Existing submodule_policy_binds_live_graph_and_historical_child_pins_across_restart is a nonvacuous native Windows regression that failed precisely here in run 42587465701.

Not yet validated on this commit: local Bazel/checkout unavailable, and new current-head CI 42696190816 is queued with draft-native jobs expected to skip. Require >0 executed Bazel runtime tests on Windows and Linux on 88ca6c1 plus independent review before acceptance; earlier-head Linux green is not a substitute. Keep #4801 DRAFT/HOLD MERGE, leave #4593 OPEN, and do not touch #4776/#4763 or peer branches.

Retain each authenticated child binding while its source iterator is
alive. Reuse the graph reader's checkout/marker liveness proof before
advancing the child walk, including the depth-zero root. Return a typed
walk error and permanently stop that child if its binding changes.

Add real-Git regressions for marker removal, retargeting, mid-iteration
binding loss and a replaced root, with positive parent/child controls.
Rust regression execution and native verification remain required.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — review repair published in f0874897e1d49b9542fe12d2c3735b32e68b53d6.

Finding and repair

source_walk_inner authenticated child checkouts and enumerated their files when constructing the iterator, but retained only root paths and filenames. Removing or retargeting a child's .git marker after construction (or after a yielded child entry) did not invalidate that lazy walk. The foreground graph reader already rejected the same changed binding.

The walker now retains each AuthenticatedSubmodule and reuses the graph reader's checkout/marker liveness predicate before advancing that child's iterator. The check also precedes the depth-zero root entry, which the underlying walker does not pass through filter_entry. A failed binding produces one typed/path-attributed I/O error and permanently stops that child walk; restoring the marker cannot resume an iterator that already failed. Ordinary parent traversal, existing path policy, default-off behavior, pinned-history handling and supported parent aliases are unchanged. This is iteration-time binding revalidation, not a claim of atomic filesystem snapshots or removal of every concurrent read race.

Regression source

Added four real-Git cases in source_walk/submodules/tests.rs: removed marker, retargeted marker pointing at an actual other repository, mid-iteration loss (including no resume after restoration), and a replaced child-root symlink (Unix). Every fixture first proves that parent source and two real child sources are yielded. The before-iteration cases compare walker refusal with the existing graph resolver; child bytes remain present, so missing-file/zero-source success cannot satisfy them. Existing tests are preserved.

Publication and verification

Exactly three files changed: source_walk.rs, source_walk/submodules.rs, and the new test module. Published by expected-head 88ca6c1dee8bb9cea75aaea30370834226d4f04d, force=false; the commit's one-parent ancestry, all three blob hashes and resulting PR head were verified. The preceding Windows path-normalization repair remains intact.

No Rust compilation, formatting or behavioral test pass is claimed for this commit. Local Bazel/checkout execution is unavailable here. Current-head PR CI https://github.com/ScriptedAlchemy/tracedecay/actions/runs/42720663699 was queued when checked and is selected with native=none; draft gate success is not native acceptance. Required next verification is nonzero Bazel execution of the new lazy-walk regressions, existing source-walk/graph parity tests, and the previously failing Windows runtime submodule restart/history regression on this exact head, plus independent review. This is the author's source review, not independent approval.

Coordination: keep this same PR DRAFT and HOLD MERGE. No duplicate PR, base retarget, test weakening, CI cancellation, peer-branch edits, model/release changes, merge or issue closure was performed. The existing #4835 stack is preserved; final integration must still reach master before #4593 can close.

@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review November 9, 2026 23:55
devin-ai-integration[bot]

This comment was marked as resolved.

@ScriptedAlchemy
ScriptedAlchemy marked this pull request as draft November 10, 2026 00:28
Refs #4593

Reject older generation parse identities without an include_submodules
field rather than silently treating them as default-off. Seal both true
and false explicitly, with a regression for round-trip and omitted-field
refusal. Apply the two exact Bazel rustfmt corrections reported for the
new authenticated submodule source-walk regressions.

Native Bazel behavioral tests and independent review remain required.

Copy link
Copy Markdown
Owner Author

Refs #4593 — verified source repair published, keep DRAFT / HOLD MERGE.

Commit 7473407 is an expected-head, NONFORCE fast-forward from f0874897e1d49b9542fe12d2c3735b32e68b53d6; remote PR head and commit ancestry were read back. Exactly two files changed:

  • crates/tracedecay-code-index/src/source_walk/submodules/tests.rs: applied the two exact formatting corrections reported by hosted Bazel rustfmt_check_2024 in run 42720663699. This fixes a real current-head CI failure, without changing test assertions.
  • crates/tracedecay-code-index/src/production/ignored_sources.rs: removed the serde(default, skip_serializing_if) compatibility fallback from persisted CodeIndexRepositoryParseIdentityV1.include_submodules. Both false and true are now explicitly serialized; an older seal missing the policy must be refused rather than silently admitted as default-off. Added a roundtrip-and-omitted-field regression that checks both boolean values and the missing-field refusal. This addresses the concrete persisted-contract review finding in thread 4519425001.

An independent review also raised scoped-search HEAD-tree traversal cost in thread 4519424880. That performance concern is still open: parent_gitlink_paths traverses all HEAD files on each walk. It needs a measured/behaviorally checked scope-aware or correctly invalidated inventory solution; I did not introduce an untested cache or weaken staged-removal denial.

Verification status: new exact-head CI 42729122675 queued at check. Native Rust/Linux/Windows/macOS and Clippy remain unverified on 7473407 because draft PR selection runs native=none; no successful nonzero Bazel run or approval on this commit is claimed. The earlier Windows graph regression and new lazy-source-walk regressions must execute on the exact head. There is no local Bazel checkout/runner or exposed dispatch write action here. #4801 had temporarily been marked ready externally; I restored it to DRAFT as instructed, without merging. #4593 remains OPEN; no protected Kev/release/scheduler peer branches or CI settings were modified.

Avoid scanning every parent index entry and HEAD-tree object before a
literal-prefix source search. Probe index ancestors and the sorted prefix
range, and resolve only HEAD ancestors and the matching subtree. Broad
or basename scopes keep the complete fail-closed boundary inventory.

Add a real-Git regression where an unrelated committed subtree is
unreadable: its absence must not block an exact-file scope, while a
full source walk must still refuse the incomplete HEAD authority.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published narrow scoped-source performance repair 71602073 by expected-head NONFORCE fast-forward from 7473407babeb56d5d2eb7916e98c190b17f871ca. Read-back verified exact PR head 7160207, DRAFT/unmerged state and unchanged prerequisite base. Only crates/tracedecay-code-index/src/source_walk.rs and source_walk/submodules.rs changed. The existing unscoped and basename-search fail-closed behavior remains; narrowed positive scopes now inspect only indexed Gitlink ancestors/prefix and HEAD ancestors/subtree instead of traversing every tracked source. This addresses independent reviewer thread 4519424880 without introducing a cached secondary authority. Added real-Git Rust regression for an exact-file scope with an unreadable unrelated HEAD subtree, and verified the disposable native Git corruption semantics (not a Rust test).

Verification hold: new Rust regression has NOT executed by Bazel, and the previously failing Windows child-HEAD regression remains unproven on this head. Current-head CI 42740034779 is queued with native=none because the PR is draft; skipped jobs do not establish acceptance. No independent approval. Keep #4801 DRAFT / HOLD MERGE and #4593 OPEN. Never merge Kev #4776 or alter read-only release #4763, CI protections, or #4800/#4508 peers.

Apply the five precise formatting corrections from repository-gates run
42740034779 for source_walk.rs. No behavior or policy changes.

Refs #4593

Copy link
Copy Markdown
Owner Author

Refs #4593 — published exact-head Bazel formatting repair 967d9d1 on existing DRAFT / HOLD MERGE #4801.

At prior head 71602073d01bfdda3971da98c6ceef79fa73d8bc, repository-gates run 42740034779 failed //crates/tracedecay-code-index:rustfmt_check_2024, not behavioral Rust tests. The hosted Bazel log identified five formatting-only hunks in crates/tracedecay-code-index/src/source_walk.rs. Applied those exact five transformations; no semantic changes or other files. The seven cached plus one executed script tests passed on that failed run, but they are not native source-index acceptance.

Created one commit on the original remote parent and moved only fix/4593-skipped-nested-repository-audit using expected-head 71602073, force=false. Independently checked commit ancestry, one-file diff, PR head, draft state and unchanged prerequisite branch. New exact-head CI run 42748171498 was queued when checked; its PR-native Linux/Windows/macOS Rust and Clippy jobs are not selected in draft mode. Do not infer Bazel Rust validation from this source fix. Earlier native Windows child-capture regression and newly added scoped-walk/lazy-walk tests still require executed nonzero exact-head native verification and independent review. No merge, issue closure, protections or sibling work changed.

Copy link
Copy Markdown
Owner Author

Refs #4593 — new source-review finding on current draft head 967d9d19d0081703d92a25f9abc392e1744f1aeb; regression and repair required, not a tested exploit or acceptance claim.

The new lazy-walk guard in source_walk/submodules.rs::CheckoutWalk::next calls AuthenticatedSubmodule::checkout_is_live. That predicate rechecks only the child directory and its .git file pointing to the originally captured Git directory. It never revalidates the parent stage-0 mode-160000 gitlink, staged/working .gitmodules registration, or pin. Those proofs are checked in live_submodules only when the iterator is constructed. Likewise, LiveSourceBoundaries::resolve reuses the same marker-only predicate after an initially bound graph reader has been created.

Concrete falsifiable regression: create a real registered, initialized parent+child and successfully construct source_walk(root, ..., include_submodules=true) and LiveSourceBoundaries::open. Before advancing the child iterator or resolving the child path, (a) remove/replace the working .gitmodules registration while leaving app/.git unchanged; repeat with (b) staged removal/replacement of the parent's gitlink or staged .gitmodules. The current predicate remains true even though a fresh live_submodules binding would refuse that checkout. Assert the already-open source and graph readers fail closed rather than serving child bytes; preserve positive controls and normal parent files. This is a temporal authority mismatch, distinct from the previously fixed child-.git removal/retarget test. Reuse canonical parent authentication, avoid per-file full Git-tree rescans, and explicitly test the performance tradeoff. Source-level proof only; no nonzero Bazel Rust run was possible here.

HOLD MERGE / keep DRAFT / #4593 OPEN. Exact-head CI 42748171498 is running/queued with native Rust and Windows skipped; no speculative push was made that would cancel it. Earlier Windows regression and independent approval remain outstanding. This comment does not approve or resolve any review threads.

Refs #4593

Recheck the parent's exact staged mode-160000 gitlink and pin,
staged .gitmodules identity, live registration and owned module store
on existing child source and graph reads. The child marker alone is
not sufficient authority.

Add real-Git regressions for working and staged registration removal,
staged gitlink removal and pin replacement after reader construction.
These new Rust tests still require exact-head nonzero Bazel validation.
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as ready for review November 10, 2026 05:10
@ScriptedAlchemy
ScriptedAlchemy marked this pull request as draft November 10, 2026 05:19

Copy link
Copy Markdown
Owner Author

Refs #4593 — prepared fix now PUSHED, not just an unattached commit object.

Published bfe14a24e51106c061dbc163b20e2817ac6adfd7 on fix/4593-skipped-nested-repository-audit via expected-head, nonforce fast-forward from 2647906c2ac4de4a8fea89e11f928f0858f80116. Immediately reread the branch before updating; readback confirms both the remote ref and this PR head at bfe14a24. The user explicitly requested publication in this follow-up. No peer commits were rewritten or discarded.

Exactly two files changed: source_walk/submodules.rs and source_walk/submodules/tests.rs. Existing child walks and foreground graph readers now revalidate the parent's exact stage-0 gitlink/pin, staged .gitmodules identity, working registration, and parent-owned module store instead of accepting an unchanged child marker alone. Four new real-Git Rust regressions exercise working registration removal, staged registration removal, staged gitlink removal, and pin replacement after constructing both readers, with positive parent/child controls.

Not acceptance yet: the new Rust regressions have not executed through Bazel. The repeated exact parent-index and working-registration checks also need performance validation; this change does not claim atomic filesystem snapshotting. Exact-head all-event CI includes run 42761466450, queued with native=none at inspection. No test pass or independent approval is claimed; native Windows verification of the earlier capture repair remains necessary.

The PR was unexpectedly ready when read. Restored DRAFT under the user's standing instruction and verified draft/unmerged after the push. Keep HOLD MERGE and #4593 open until exact-head nonzero Bazel verification, independent approval, and eventual acceptance on master. Base/prerequisite stack and protected model/release/scheduler work were not changed.

Refs #4593

Apply the single exact formatter hunk reported by the current-head
hosted Bazel rustfmt_check_2024 failure (run 42761466450).
Retain all four new behavioral regression assertions unchanged.

Copy link
Copy Markdown
Owner Author

Refs #4593 — exact-head hosted Bazel formatting repair published on existing DRAFT #4801.

At bfe14a24e51106c061dbc163b20e2817ac6adfd7, CI 42761466450 failed the repository-gates job's Bazel //crates/tracedecay-code-index:rustfmt_check_2024. I read job 129647895677: the only reported formatting hunk was in src/source_walk/submodules/tests.rs:153, expanding the assertion for the still-existing child source into rustfmt's multiline form. All eight repository script tests passed (one executed, seven cached); these are not Rust behavioral acceptance.

Published 5f2d9f3 by an expected-head (bfe14a24) NONFORCE fast-forward, checked the one-commit ancestry and one-file, formatting-only diff, and independently verified the branch and PR head. No assertions or production behavior were changed, no native test was claimed. New exact-head CI 42769058413 was QUEUED when checked; draft-native Rust/Windows/Clippy are not selected by this PR workflow.

HOLD MERGE / keep DRAFT / issue #4593 OPEN. Exact-head nonzero Bazel source-walk/authentication, live graph/pinned-history and previously failing Windows child-commit regression, performance measurement of per-entry parent-authentication checks, independent approval and integration onto master remain outstanding. No peer, protected model/release work or CI policy was modified.

Refs #4593

Reject existing child source walks and graph reads when the child Git
administration changes core.worktree without changing the .git marker.
Reuse the initial pinned-store topology proof on every bound read.

Add a real-Git regression that changes only the child repository worktree
configuration after source and graph readers were created. The native
Git fixture demonstrates the mismatch; Rust acceptance still needs
nonzero Bazel tests on this exact commit.

Copy link
Copy Markdown
Owner Author

Refs #4593 — published narrow submodule authority repair on existing DRAFT #4801, HOLD MERGE.

Commit d245259 is a verified, expected-head nonforce fast-forward from 5f2d9f307ad0b83724702ba56c84dd6a3b715a89. It changes only crates/tracedecay-code-index/src/source_walk/submodules.rs and source_walk/submodules/tests.rs; remote branch/ref and PR head were independently read back.

Concrete issue: after a child source walker or graph reader is constructed, changing the parent-owned child Git repository's core.worktree redirects its advertised checkout while leaving the child app/.git marker, parent's staged gitlink, registration and source bytes unchanged. The earlier liveness check could still accept the stale binding even though fresh admission would reject it. A disposable native-Git fixture confirmed the same marker with a changed worktree path (Git behavior, not a Rust/Bazel test).

Repair: existing bound reads reuse the initial pinned-store topology verification, including child Git/common directory and current checkout identity. The added real-Git Rust regression first proves positive parent/child access, changes only the child repository worktree configuration, checks that fresh admission rejects it, and requires both an already-open graph reader and lazy source walk to refuse further child access with a typed error.

Validation hold: these new Rust tests have not executed through Bazel. The prior-head CI passed applicable repository/dashboard gates but skipped native Rust; current-head native Windows (including the prior failed child-HEAD regression), Linux/macOS, performance of per-entry binding checks, and independent approval are still required. Do not mark ready, merge, claim completion or close #4593. No protected/peer refs, CI settings or release work were changed.

This branch has not been deployed

No deployments
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