docs(req): REQ-075 duplicate-ID + REQ-076 orphan detection (change list)#307
Merged
Conversation
… F2-family findings as typed work items Two findings surfaced in conversation after the cross-git investigation landed (#304), both confirmed empirically against the v0.10.1 binary: REQ-075 — duplicate artifact IDs are silently swallowed. Two artifacts with the same `id` (two files, or twice in one file) collapse via `store.upsert`'s last-write-wins; the earlier definition is destroyed and `rivet validate` reports PASS. Reproduced 2026-05-20: two files both declaring `id: REQ-DUP` -> `Result: PASS (0 warnings)`, one survivor. `docs/artifact-format` states the uniqueness invariant; nothing enforces it. Direct sibling of REQ-062 — detection must happen at load time, where both copies still exist. Emit `rule: duplicate-artifact-id` naming both source files. P1. REQ-076 — orphan artifacts are invisible to `rivet validate`. `rivet stats` reports `Orphan artifacts (no links): N`; `rivet validate` never mentions orphans (grep -ic orphan -> 0). An artifact disconnected from the traceability graph passes validate clean. Rivet's own main has 5 such orphans. Fix: emit `rule: orphan-artifact` per orphan — Warning by default (the dogfood's own 5 orphans forbid a hard-error default — REQ-062's F2b lesson applied to severity), Error under `--strict-orphans`, mirroring the `cited-source-drift` strict-flag pattern. Both carry executable `Acceptance:` blocks and link to FEAT-135; REQ-075 and REQ-076 both `traces-to` REQ-062 as the sibling fix whose load-report channel they reuse. Slotted into Wave 2 (P1 code fixes) of the follow-up plan. This commit adds the work items only — the implementations are separate PRs per the audit-then-act discipline established by REQ-074. Refs: FEAT-135, REQ-075, REQ-076 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_075["REQ-075"]:::added
REQ_076["REQ-076"]:::added
classDef added fill:#d4edda,stroke:#28a745,color:#155724
classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Added
Posted by |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two typed work items to the cross-git investigation change list
(
artifacts/cross-git-investigation.yaml, anchored on FEAT-135). Bothare F2-family findings — silent failures under a green
rivet validate— surfaced in conversation after #304 landed and confirmed
empirically against the v0.10.1 binary.
REQ-075 — duplicate artifact IDs silently swallowed (P1)
Two artifacts with the same
idcollapse viastore.upsert'slast-write-wins. Reproduced: two files both declaring
id: REQ-DUP→Result: PASS (0 warnings), one survivor, the other definitiondestroyed.
docs/artifact-formatstates the uniqueness invariant;nothing enforces it. Detection must happen at load time (where
both copies still exist) —
validate::validateonly ever sees thesurvivor. Sibling of REQ-062; reuses its load-report channel.
REQ-076 — orphan artifacts invisible to
rivet validaterivet statsreports orphans;rivet validatenever mentions them(
grep -ic orphan→ 0). An artifact disconnected from thetraceability graph passes validate clean. Rivet's own main has 5 such
orphans. Fix: emit
orphan-artifactdiagnostics — Warning by default(a hard-error default would fail the dogfood's own validate — REQ-062's
F2b lesson applied to severity), Error under
--strict-orphans.Scope
This PR adds the work items only. Implementations are separate PRs
(Wave 2 of the follow-up plan), per the audit-then-act discipline.
Both REQs carry executable
Acceptance:blocks.Refs: FEAT-135, REQ-075, REQ-076
🤖 Generated with Claude Code