Skip to content

Commit b867ace

Browse files
authored
feat: v4.3.1 — planning/reuse quality + gap-closure (partial) (#42)
## Summary Planning- and reuse-quality work toward **v4.3.1**, plus the first batch of the v4.3.1 gap-closure backlog. Opened as a **draft** — this is a reviewable checkpoint, not the full backlog. The branch carries the prior WS-1/WS-2/WS-3 + A13 work (already committed) and this session's additions on top. This release is versioned **4.3.1** (app, Cargo workspace, internal crate deps, website metadata, landing stamps, and changelog all synced). ## Root Cause / Context Driven by two triple-reviewed plans: - `2026-06-02-v4.3.0-implementation-plan.md` (§0.5 authoritative) — recall → reuse → planning rails. - `2026-06-02-v4.3.1-gap-closure-plan.md` — closes recorded braingent misses (lock-degradation, display-ownership, mongo/Atlas traps, polyrepo review). The core v4.3.0 diagnosis (search is conjunctive-by-default → reuse search returns empty) and the v4.3.1 root-causes (redb exclusive-on-open lock; semantically-orphaned gateway node) are code-grounded in those plans. ## Key Decisions - **Did not rush the large, schema-changing waves.** WS-5/6/7 (4 NodeKinds + ~16 EdgeKinds), WS-8 `DF4`, embeddings (WS-12), polyrepo materialization (WS-G1) are deferred. Per §0.5.1 the R7 snapshot ratchet had to land before any schema work; it now has (this PR), so the schema wave is unblocked but remains its own multi-day effort. Quality bar over volume. - **Mongo detectors ship as a pure module** over a JSON-shaped mongo op (stable rule IDs + confidence). Wiring the parser's pipeline extraction into them is the heavier follow-on the plan lists separately (MQS1 key files). - **`plan_change` contract bumped to schema v2** for the new `display_ownership_checks` section; the G7 gate asserts the exact manifest, so the bump is deterministic. - **REL1 exit code = 75** (`EX_TEMPFAIL`), distinct from generic failure (1), so a blocked read can never look like "found nothing". ## What landed this session (all TDD, green) | ID | Change | Plan | |---|---|---| | B8/B9 | `traverse` multi-path provenance + `depth_capped`/`truncated` signaling | v4.3.0 WS-4 | | A13 | Query-time index freshness surfaced per-repo in `gather-step status` | v4.3.0 WS-4 | | REL1 | Distinct lock-contention exit code (75) + `degraded: graph_locked` JSON disclosure | v4.3.1 WS-G2 | | DSO1 | `display_ownership_checks` planning section in `plan_change` | v4.3.1 WS-G4 | | MQS1–3, AIX1 | Mongo/Atlas structural detectors (index-defeat, unsafe-coercion, null-parent-path, atlas-index-drift) | v4.3.1 WS-G3 | | B1/B3/WS-16 | `pass_two_gap_dimensions` (8) + `v1_completeness_checklist` (19, V1–V9 folded) in `plan_change` (schema v3) | v4.3.0 WS-3/16 | | REL4 | Lock-free reads: graph snapshot fallback when the store is held (daemon-attach already existed) | v4.3.1 WS-G2 | | R7 | Resolution snapshot ratchet: golden test fails on any resolved-edge drift; unblocks the schema wave | v4.3.0 WS-11 | | A6 | Shared-component reuse-opportunity audit (design-system fork detection) | v4.3.0 WS-5 | | P4 | Cross-repo cycle detection (Tarjan SCC) | v4.3.0 WS-9 | | F7 | Mock/fixture-import-into-production detector | v4.3.0 WS-6 | | wiring | A6/P4/F7 surfaced as non-gating advisories in `gather-step doctor` | — | | — | Version + changelog sync to 4.3.1 | release | Already on the branch from prior sessions: S1/S2/S4 recall, A14 confidence filter, S3 graph-ranked reuse, E1 typed `plan_change`, B7, G7, A13 core. ## Deferred (with reasons — not silently dropped) - **WS-5/6/7 schema** (FE component facet, FE-beyond, backend graph), **WS-8 DF4/reach**, **WS-12 embeddings** — large; R7 (now landed) is their prerequisite. - **WS-G1 polyrepo `pr-review` materialization** (PRM1–4) — P0 product blocker but L-effort, touches `engine.rs`/`index_runner.rs`; needs its own PR + parity coverage. - **GWP1–3 gateway-aware planning** — GWP1 cross-repo edge is M and depends on v4.3.0 D1; GWP2/3 follow. - **A18/A20** (unresolved-call debt, dangling-target detection), **REL2/REL3** — self-contained follow-ons. ## Files Changed - `crates/gather-step-analysis/src/query.rs` — traverse provenance/caps (B8/B9) - `crates/gather-step-analysis/src/mongo_query_safety.rs` (new) + `lib.rs` — MQS1–3, AIX1 - `crates/gather-step-cli/src/commands/status.rs` — A13 freshness column - `crates/gather-step-cli/src/errors.rs`, `main.rs` — REL1 - `crates/gather-step-mcp/src/tools/packs.rs`, `catalog.rs`, `server.rs` — DSO1 + contract v2 - `Cargo.toml`, `Cargo.lock`, `website/**` — 4.3.1 version + changelog sync ## Test Plan - `cargo test --workspace` → **1557 passed, 12 ignored** (51 suites). - `cargo clippy --workspace --all-targets -- -D warnings` → **clean**. - `cargo fmt --all --check` → clean. - Each feature added failing tests first (TDD): traverse depth-cap/provenance, A13 freshness label + payload field, REL1 lock predicate + disclosure, DSO1 section presence/absence, MQS1–3 + AIX1 against the GO4 trap shapes + clean siblings. ## Follow-ups 1. WS-5/6/7 schema wave (now unblocked by the R7 ratchet). 2. WS-G1 polyrepo `pr-review` materialization (P0 blocker, own PR). 3. GWP1–3 gateway planning. 4. Mongo/Atlas detectors (MQS1–3, AIX1) are built but cannot be surfaced yet: the parser does not extract mongo query/pipeline ASTs or Atlas index definitions into the graph, so there is no input to feed them. That parser extraction is the follow-on (A6/P4/F7 are already wired into `doctor`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
2 parents 36196ac + 94496e6 commit b867ace

33 files changed

Lines changed: 2986 additions & 92 deletions

File tree

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ members = [
1414
]
1515

1616
[workspace.package]
17-
version = "4.2.1"
17+
version = "4.3.1"
1818
authors = ["JJ Adonis"]
1919
edition = "2024"
2020
rust-version = "1.96"
@@ -24,15 +24,15 @@ homepage = "https://github.com/thedoublejay/gather-step"
2424
description = "High-performance multi-repo codebase intelligence engine"
2525

2626
[workspace.dependencies]
27-
gather-step = { path = "crates/gather-step-cli", version = "4.2.1" }
28-
gather-step-analysis = { path = "crates/gather-step-analysis", version = "4.2.1" }
29-
gather-step-core = { path = "crates/gather-step-core", version = "4.2.1" }
30-
gather-step-deploy = { path = "crates/gather-step-deploy", version = "4.2.1" }
31-
gather-step-git = { path = "crates/gather-step-git", version = "4.2.1" }
32-
gather-step-mcp = { path = "crates/gather-step-mcp", version = "4.2.1" }
33-
gather-step-output = { path = "crates/gather-step-output", version = "4.2.1" }
34-
gather-step-parser = { path = "crates/gather-step-parser", version = "4.2.1" }
35-
gather-step-storage = { path = "crates/gather-step-storage", version = "4.2.1" }
27+
gather-step = { path = "crates/gather-step-cli", version = "4.3.1" }
28+
gather-step-analysis = { path = "crates/gather-step-analysis", version = "4.3.1" }
29+
gather-step-core = { path = "crates/gather-step-core", version = "4.3.1" }
30+
gather-step-deploy = { path = "crates/gather-step-deploy", version = "4.3.1" }
31+
gather-step-git = { path = "crates/gather-step-git", version = "4.3.1" }
32+
gather-step-mcp = { path = "crates/gather-step-mcp", version = "4.3.1" }
33+
gather-step-output = { path = "crates/gather-step-output", version = "4.3.1" }
34+
gather-step-parser = { path = "crates/gather-step-parser", version = "4.3.1" }
35+
gather-step-storage = { path = "crates/gather-step-storage", version = "4.3.1" }
3636

3737
tree-sitter = "=0.26.9"
3838
tree-sitter-typescript = "0.23.2"

crates/gather-step-analysis/src/anchor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ fn score_candidate<S: GraphStore>(
148148
if boundary_bonus > 0.0 {
149149
let downstream = outgoing
150150
.iter()
151-
.filter(|edge| !matches!(edge.kind, EdgeKind::Defines | EdgeKind::Imports))
151+
.filter(|edge| edge.kind.is_consumer_edge())
152152
.count();
153153
rationale.push(AnchorRationale::ControllerService {
154154
downstream_nodes: downstream,

0 commit comments

Comments
 (0)