fix(load): silence skip-WARN for legitimate non-artifact YAML (REQ-139)#379
Merged
Conversation
…act YAML (REQ-139) The generic-YAML directory import warned `[WARN] skipping <file>: …` for every file it declined to load — including legitimate non-artifact YAML that lives under the artifacts source path (bindings.yaml, feature-model.yaml, variants/*.yaml). On a real project that is a WARN line in front of every single command, burying the signal (#353 part 4). The REQ-062 `SkipKind` classification already separates a malformed artifact file (`ParseError`) from expected non-artifact YAML (`NotArtifactFile`), but the load-path WARN ignored it and warned on both. Gate the WARN on `classify_skip(...) == ParseError`: a real problem still warns at load, and `rivet validate` still surfaces it as a hard `artifact-parse-error` Error; the expected case is now silent. Verified: `rivet list` on the rivet repo no longer prints skip-warns for bindings.yaml / feature-model.yaml / variants/*.yaml, while a malformed artifact file (id+type without the `artifacts:` wrapper) still warns and still FAILs `validate`. Regression test in generic.rs. Also files REQ-140 (draft): surfaced while verifying #353 — `validate` (lenient extract_schema_driven) loads artifacts from a file that list/get/export (strict load_artifacts) silently drop, so the same project yields different artifact sets per command. Flagged as a maintainer design decision (which parser is canonical), not fixed here. Implements: REQ-139 Refs: REQ-062, REQ-140 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
📐 Rivet artifact delta
Graphgraph LR
REQ_139["REQ-139"]:::added
REQ_140["REQ-140"]:::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: 3ae5194 | Previous: a8167b1 | Ratio |
|---|---|---|---|
validate/10000 |
19712815 ns/iter (± 2974747) |
14460957 ns/iter (± 949415) |
1.36 |
This comment was automatically generated by workflow using github-action-benchmark.
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.
What
The generic-YAML directory import warned
[WARN] skipping <file>: …for every file it declined to load — including legitimate non-artifact YAML that lives under the artifacts source path (bindings.yaml,feature-model.yaml,variants/*.yaml). On a real project that's a WARN line in front of every single command, burying the signal (reported in #353 part 4; I hit the same noise repeatedly while dogfooding).The REQ-062
SkipKindclassification already distinguishes a malformed artifact file (ParseError) from expected non-artifact YAML (NotArtifactFile), but the load-path WARN (generic.rs) ignored it. Now the WARN fires only forParseError;NotArtifactFileis silent.Nothing is lost:
rivet validateindependently re-scans and surfaces the malformed-artifact case as a hardartifact-parse-errorError (REQ-062), so the loud path is unchanged.Verification
rivet liston the rivet repo: 0skipping …WARNs forbindings.yaml/feature-model.yaml/variants/*.yaml(was: one per file, every command).id:+type:at top level, orartifacts:+ an unknown sibling key) still WARNs at load and FAILsrivet validatewithartifact-parse-error.import_directory_loads_valid_and_skips_both_skip_kindsingeneric.rs;cargo test -p rivet-core --lib formats::genericgreen; clippy--all-targets+ fmt clean.Triage of #353 (verified against current
main, not the reporter's 0.13.3)validatenow emitsartifact-parse-errorand FAILs, naming the dropped file. The reporter was on 0.13.3, before that landed.validate(lenientextract_schema_driven) loads artifacts from a file thatlist/get/export(strictload_artifacts) silently drop — the same project yields different artifact sets per command, andvalidateboth validates an artifact and reports its file as failed-to-parse. Flagged as a maintainer design decision (which parser is canonical), not fixed here.Implements: REQ-139
🤖 Generated with Claude Code