Repository navigation
Description
Context & Rationale
Follow-up to #512. consolidate_duplicate_findings (src/devops_cli/ai/review_schema.py:1029) is a greedy first-match fold over _are_findings_duplicate (:866), which is not transitive. _merge_two_findings (:932) keeps the first argument's title and location, joins personas and list fields in arrival order, takes the first non-empty category and relocated_from, and gives description and fix length ties to it. sort_findings (:1048) has no total tie-break. Worker completion order never reaches the fold (ai/agents/pipeline.py:264, ai/review/pool.py:126); model emission, persona and segment order do (ai/review/pipeline.py:1838, :2405; ai/review/runner.py:457; ai/review/verification.py:1581 via ReviewResult.merge). Verification reads the folded list (pipeline.py:2165), so the kept anchor decides what gets checked. No test reorders the input. vibes' CRDT has the same blind spot: its one commutativity test swaps a single pair and passes.
Scope & Deliverables
- Context & Rationale*: Follow-up to fix(review): findings are lost between the model reply and the report #512.
consolidate_duplicate_findings(src/devops_cli/ai/review_schema.py:1029) is a greedy first-match fold over_are_findings_duplicate(:866), which is not transitive._merge_two_findings(:932) keeps the first argument's title and location, joins personas and list fields in arrival order, takes the first non-emptycategoryandrelocated_from, and givesdescriptionandfixlength ties to it.sort_findings(:1048) has no total tie-break. Worker completion order never reaches the fold (ai/agents/pipeline.py:264,ai/review/pool.py:126); model emission, persona and segment order do (ai/review/pipeline.py:1838,:2405;ai/review/runner.py:457;ai/review/verification.py:1581viaReviewResult.merge). Verification reads the folded list (pipeline.py:2165), so the kept anchor decides what gets checked. No test reorders the input. vibes' CRDT has the same blind spot: its one commutativity test swaps a single pair and passes. - Deliverable*: First, a test that fails today: run the fold over
itertools.permutationsof four fixtures (the chained triple, a chain whose bridging finding sorts first, the fix(review): findings are lost between the model reply and the report #512 SQL-injection pair, the recorded_watchersession) and assert one distinct set of (title, location, severity, sorted personas) and, separately, one distinct sequence. Then pre-sort by a total key (parsed file and start line, lower-cased title, persona, full dump). Join a cluster only when_are_findings_duplicateholds against every original member (complete linkage), and merge after clustering. Keep the title and location with the highest severity, then the narrowest parsed span, then the key, so_watcherkeepsk8s/informer.py:44-112. Sort list fields, pick scalars by the same key, and add location and title tie-breaks tosort_findings. Stdlib only. Measure by offline replay: capture the lists reaching the fold in one feat(review): synthetic defect corpora for review evaluation #415 corpus run and count those with more than one output under the old and new fold. - Constraint*: A canonical order alone makes an over-merge deterministic, not rare: with the bridging finding first, the pre-sorted fold merges all three in every order, the defect loss fix(review): findings are lost between the model reply and the report #512 guards against. Connected components (networkx) merge the chain by definition. Conservatism comes from complete linkage; determinism from the order. A test comparing entry counts passes on
_watcher, where the count is 3 in every order and only the anchor and output order move. Sorting raw location strings putsa.py:10beforea.py:9, the same string comparison as the vibes CRDTpossort.FindingCluster.representative(security/normalization.py:237) is no model: same tool and rank keep the first seen. - Measured*:
uv run --no-sync python scratchpad/probe/consolidate_probe.py: a chained triple gives 3 distinct outputs over 6 orders.uv run --no-sync python scratchpad/probe/l302_perm_probe.py: the fix(review): findings are lost between the model reply and the report #512 pair merges into 2 different findings over 2 orders.uv run --no-sync python scratchpad/probe/l302_perm_probe2.py:_watchergives 12 sequences but 2 entry sets over 24 orders.uv run --no-sync python scratchpad/probe/v436_value_probe.py: bridging-first, the pre-sorted fold leaves 1 entry; complete linkage leaves 2. - Source*: vibes
examples/ast-crdt-collaborative-editor/ast_crdt.py, vibesexamples/ast-crdt-collaborative-editor/test_ast_crdt.py, vibespatterns/ast-crdts-for-real-time-agent-collaboration.md, vibesobservations/systems/37-real-time-ast-crdts-and-concurrent-multi-agent-swarms.md
Strategic Alignment
- Milestone:
v0.2.23(devops ai Review Quality, LLM Routing & Multi-Language Validation) - Roadmap Reference:
docs/ROADMAP.md
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
dan-petty commentedon Oct 1, 2026
Moved from the shipped v0.2.23 to the backlog. It is still valid (checked 2026-10-01), and P2 items don't displace P1 work in the planned releases.
dan-petty commentedon Oct 2, 2026
Grooming (2026-10-02): Priority p2-medium → p1-high. Reproduced order-dependent loss of review findings and a nondeterministic report. This is the same defect class as #512 (P0), and data-loss defects are at least P1.
Placed in v0.2.28, one of its slots held for P1 work that surfaced after it was planned. Value High, effort Medium. Ready.
Checked against the code at the release/v0.2.25 tip.
dan-petty commentedon Oct 3, 2026
Merged into #1141 (the review redesign absorbs it, owner 2026-10-03): #1151 deletes
consolidate_duplicate_findings, and this item's order-dependent, defect-losing merge problem, its permutation test over the four fixtures, complete linkage and deterministic picks are now #1141's criteria against thededuplicateandcorrelatethat replace it.fix(security): fingerprint v2 and deterministic correlation (#1141) (#…
feat(release): v0.2.31 (#1490)