feat(interop): classify third-party gap rows; ratchet SPAR-DEFECT count exactly (#427) - #429
Merged
Merged
Conversation
…nt exactly (#427) third-party-gaps.txt ratcheted 14 vendored models spar fails to parse. Read as a number that looks like 14 units of debt; #427 opened all 14 and measured that it is 3. The other 11 are files no parser should accept (7 with committed git-conflict markers), AADLv1 unnamed connections that OSATE rejects too (2), or malformed AADLv2 (2). Give each row a CLASS token (SPAR-DEFECT / UPSTREAM-INVALID / AADLV1 / MALFORMED-V2) so the count is no longer read as raw debt, and split the one number that names debt spar owes from the pile that does not: - every_baseline_entry_is_classified reds any row without a recognised class, so a NEW gap must be classified before it can be ratcheted in. - spar_defect_count_matches_ratchet asserts SPAR-DEFECT == MAX_SPAR_DEFECT (3) two-sided, same shape as MAX_TOO_PERMISSIVE: a new too-strict rejection reds above the floor; a fixed defect reds below until the constant is walked back. Non-vacuity executed, not asserted: three baseline mutations each red a distinct assertion (reclassify a SPAR-DEFECT row -> below-floor; unknown class token -> classifier; bogus SPAR-DEFECT row -> above-floor); restoring greens all four tests. Does not fix the three underlying parser defects (#427 names them) and does not decide whether the 7 conflict-marker files stay in the corpus — both are separate moves called out in the issue. Traces: REQ-PLUGFEST-CORPUS-CLASSIFY-001, TEST-PLUGFEST-CORPUS-CLASSIFY. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Rivet verification gate✅ 20/20 passed
Filter: Failed artifacts(none) Updated automatically by |
This was referenced Aug 20, 2026
Merged
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.
Closes #427 (a)+(b) — the two "cheap suggestions", plus the separate-count assertion. Does not fix the three underlying parser defects, and does not decide whether the conflict-marker files stay in the corpus (both are separate maintainer moves the issue lays out).
The defect #427 measured
test-data/interop/baseline/third-party-gaps.txtratchets 14 vendored models spar fails to parse. Read as a number that looks like 14 units of debt. #427 opened all 14 against the source and measured that it is 3:UPSTREAM-INVALID— committed git-conflict markersAADLV1— unnamed connections (OSATE rejects them too, #421)MALFORMED-V2— missingproperties/implementationkeywordSPAR-DEFECT— EMV2-qualified owners (2) + two-tokenreference(virtual processor)(1)Bundling three genuine defects with eleven files no parser accepts is how "14" invites being driven to zero by relaxing the parser onto invalid input, or absorbing a real regression into the mixed pile.
What this PR changes
third-party-gaps.txt— aCLASStoken on every row (path\tCLASS\tfirst-diagnostic), header rewritten to define the four classes.crates/spar-cli/tests/third_party_corpora.rs— two tests:every_baseline_entry_is_classified— reds any row missing a recognised class token, so a new gap must be classified before it can be ratcheted in (the moment someone actually looks).spar_defect_count_matches_ratchet— assertsSPAR-DEFECT == MAX_SPAR_DEFECT (3)two-sided, same shape asMAX_TOO_PERMISSIVEinthree_way_conformance.rs: above the floor reds a new too-strict rejection; below reds until the constant is walked back. The other three classes stay in the file as documentation but are not counted as debt.artifacts/{requirements,verification}.yaml—REQ-PLUGFEST-CORPUS-CLASSIFY-001(traces-toREQ-PLUGFEST-007) +TEST-PLUGFEST-CORPUS-CLASSIFYwith executablefields.steps.Non-vacuity (executed, not asserted in prose)
Three baseline mutations, each reddening a distinct assertion, run before land:
SPAR-DEFECTrow →UPSTREAM-INVALID: count drops → below-floor branch reds;SPAR-DEFECTrow: count rises → above-floor branch reds.Restoring the file greens all four tests.
MAX_SPAR_DEFECTis a fixed literal, so neither bound is vacuous.Verification
cargo test -p spar --test third_party_corpora→ 4 passedcargo fmt --all --checkclean;cargo clippy --workspace --all-targets -- -D warningscleanrivet validate→0 broken cross-refs, new REQ visible (its lonemissing: design-decisionwarning is the repo-wide baseline shape)🤖 Generated with Claude Code
Generated by Claude Code