Commit b867ace
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)33 files changed
Lines changed: 2986 additions & 92 deletions
File tree
- crates
- gather-step-analysis/src
- gather-step-cli
- src
- commands
- tests
- golden
- gather-step-core/src
- gather-step-git/src
- gather-step-mcp
- src
- tools
- tests
- gather-step-storage/src
- website
- src
- components/landing
- content/docs
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
0 commit comments