plan(v0.35): REQ-308 — verify advances on evidence existence, not sufficiency (#838) - #840
Merged
Merged
Conversation
…ficiency (#838) Maintainer-reported from varve and reproduced in rivet's own v0.34.0 cut the same day, which is why this is filed rather than acknowledged. `rivet verify REQ-X` refuses correctly when there is NO evidence. When a `verifies` marker exists it advances unconditionally, and a marker costs one comment line. The structural issue is granularity: a requirement is a set of clauses, a marker attaches to the requirement, so the evidence link is coarser than the claim and the shortfall has no representation. The result is a graph that looks complete, which is worse than one that looks incomplete — readers stop reading the requirement text once status reads `verified`. Our own instance: REQ-298 was flipped to `verified` during the v0.34.0 release with its third clause knowingly undischarged (52 flat top-level commands remain), while `coverage --tests` reported "REQ-298 1 test marker" — indistinguishable from full discharge. The residual was hand-carried into REQ-307 plus commit prose, i.e. the reporter's option (3) improvised by hand. The trace graph does not carry that caveat, so the caveat is not traceable, which is the property the tool exists to provide. Degenerate variant found the same day: a marker matching nothing reports as neither present nor broken. Six such markers used issue numbers where the scanner accepts only word characters and hyphens, against 593 valid ones. Recommended ordering differs from the issue's: option (2), making `partially-verifies` BLOCK rather than annotate, should land before option (1). It needs no schema change and converts the common case into a refusal, whereas per-clause markers require clauses to become addressable — a migration across every existing artifact. Also flagged that option (3)'s clause indices drift whenever description prose is edited, so the clause text must be recorded alongside the index. Refs: REQ-307, #838
📐 Rivet artifact delta
Graphgraph LR
REQ_308["REQ-308"]:::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 |
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.
| Benchmark suite | Current: fc3605d | Previous: b3bc0d3 | Ratio |
|---|---|---|---|
validate/10000 |
1298652091 ns/iter (± 9970316) |
1081910995 ns/iter (± 19388520) |
1.20 |
traceability_matrix/1000 |
66021 ns/iter (± 449) |
45538 ns/iter (± 180) |
1.45 |
query/10000 |
326834 ns/iter (± 3577) |
257844 ns/iter (± 2205) |
1.27 |
This comment was automatically generated by workflow using github-action-benchmark.
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.
Triages #838 into the plan. Reported from varve, and reproduced in rivet's own
v0.34.0 cut the same day — which is why this is a filed requirement rather than
an acknowledgement.
The gap
rivet verify REQ-Xrefuses correctly when there is no evidence. When averifiesmarker exists it advances unconditionally, and a marker costs onecomment line above one
#[test].The structural problem is granularity: a requirement is a set of clauses; a
marker attaches to the requirement. The evidence link is coarser than the
claim, so a shortfall has no representation. That produces a graph that looks
complete — worse than one that looks incomplete, because readers stop reading
the requirement text once the status says
verified.Our own instance, from yesterday
REQ-298 was flipped to
verifiedduring the v0.34.0 release with its thirdclause knowingly undischarged — "tighten the top-level command list so the
common path is legible", still 52 flat top-level commands. Meanwhile:
Indistinguishable from full discharge. The residual was hand-carried into
REQ-307 plus commit prose — the issue's option (3), improvised manually. The
trace graph does not carry that caveat, so the caveat is not traceable, which
is precisely the property this tool exists to provide.
Degenerate variant, also found yesterday
A marker that matches nothing reports as neither present nor broken. The
scanner accepts only word characters and hyphens after
verifies, so an issuenumber silently is not a marker:
Six were in that state against 593 valid ones. So there are two silent states
today: a marker covering only some clauses, and a marker covering nothing while
looking correct in source.
Where I differ from the issue's ordering
The issue lists three options by cost. I'd reorder the first two:
Option (2) — make
partially-verifiesBLOCK — should land before option (1).It needs no schema change and converts the common case ("I know clause 3 is
open") into a refusal
verifywon't advance past. Option (1), per-clausemarkers, is the real fix but requires clauses to become addressable — today
they are prose inside
description, so that is a schema migration across everyexisting artifact. The cheap win shouldn't wait on it.
One caution on option (3):
--clauses-discharged "1,2,4"is only meaningfulif clause numbering is stable, and prose clauses renumber whenever someone edits
the description. Record the clause text alongside the index, or do (1) first —
otherwise the record silently drifts.
Verification
rivet validateexit 0 ·rivet docs checkexit 0 · YAML parses, 278artifacts, no duplicate ids.
(The first draft of this artifact broke the file —
\wis an invalid escape ina double-quoted YAML scalar. Caught by validating before pushing rather than in
CI.)