fix(reqif): import fails on an unresolved ENUM-VALUE-REF (REQ-119, F2)#375
Merged
Conversation
Bug-hunt finding (f2-silent-failure, 3/3 lens-confirmed). An ENUM-VALUE-REF matching no ENUM-VALUE @Identifier in any enumeration datatype was silently dropped by `.filter_map(|r| enum_value_names.get(...))`, producing a degraded / incomplete enum field value with no signal — an internally-inconsistent ReqIF imported as if clean. The resolver now separates resolved from unresolved refs and returns an Err naming the unresolved one(s), so the inconsistency surfaces instead of corrupting the imported value. Regression test `parse_reqif_fails_on_unresolved_enum_value_ref`; all 45 reqif tests green. Implements: REQ-119 Verifies: REQ-119 Refs: REQ-004 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_119["REQ-119"]:::modified
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
Modified
Posted by |
Codecov Report❌ Patch coverage is
📢 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.
Bug-hunt finding (REQ-119, f2-silent-failure, 3/3 lens-confirmed). An
ENUM-VALUE-REFmatching no definedENUM-VALUEidentifier was silently dropped viafilter_map, yielding a degraded enum value with no signal. Import now returns anErrnaming the unresolved ref(s). Regression test; all 45 reqif tests green; clippy --all-targets clean. Marks REQ-119 implemented.