fix(reqif): directory import fails loudly on a corrupt file (REQ-120, F2)#374
Merged
Conversation
… F2) Bug-hunt finding (f2-silent-failure, 3/3 lens-confirmed). `import_reqif_directory` skipped a malformed `.reqif`/`.xml` with only a `log::warn!` (often suppressed) and returned no signal to the caller — a silent partial import of interchange data, exactly the trust-eroding class this codebase guards against. It now collects every parse failure and returns an Err naming each file that failed and was NOT imported, instead of dropping them silently. Valid-only directories are unaffected (existing test still green). Regression test `import_reqif_directory_fails_loudly_on_corrupt_file`. Implements: REQ-120 Verifies: REQ-120 Refs: REQ-004 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_120["REQ-120"]:::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 |
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: 3da975b | Previous: de3d414 | Ratio |
|---|---|---|---|
traceability_matrix/1000 |
64043 ns/iter (± 345) |
44996 ns/iter (± 316) |
1.42 |
query/10000 |
124026 ns/iter (± 2316) |
98294 ns/iter (± 531) |
1.26 |
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.
Bug-hunt finding (REQ-120, f2-silent-failure, 3/3 lens-confirmed).
import_reqif_directoryskipped a malformed file with only a (often-suppressed)log::warn!and no signal to the caller — a silent partial import of interchange data. It now collects every parse failure and returns anErrnaming each un-imported file. Valid-only directories unaffected; regression test added. Marks REQ-120 implemented.