Skip to content

fix(load): silence skip-WARN for legitimate non-artifact YAML (REQ-139)#379

Merged
avrabe merged 1 commit into
mainfrom
fix/quiet-skip-warn-non-artifact-yaml
Jun 1, 2026
Merged

fix(load): silence skip-WARN for legitimate non-artifact YAML (REQ-139)#379
avrabe merged 1 commit into
mainfrom
fix/quiet-skip-warn-non-artifact-yaml

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 1, 2026

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 SkipKind classification 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 for ParseError; NotArtifactFile is silent.

Nothing is lost: rivet validate independently re-scans and surfaces the malformed-artifact case as a hard artifact-parse-error Error (REQ-062), so the loud path is unchanged.

Verification

  • rivet list on the rivet repo: 0 skipping … WARNs for bindings.yaml / feature-model.yaml / variants/*.yaml (was: one per file, every command).
  • A genuinely malformed artifact file (id:+type: at top level, or artifacts: + an unknown sibling key) still WARNs at load and FAILs rivet validate with artifact-parse-error.
  • New regression test import_directory_loads_valid_and_skips_both_skip_kinds in generic.rs; cargo test -p rivet-core --lib formats::generic green; clippy --all-targets + fmt clean.

Triage of #353 (verified against current main, not the reporter's 0.13.3)

  • Part 1 (silent whole-file skip): already fixed by REQ-062 — validate now emits artifact-parse-error and FAILs, naming the dropped file. The reporter was on 0.13.3, before that landed.
  • Part 4 (WARN noise): fixed here (REQ-139).
  • New finding → REQ-140 (draft, filed here): validate (lenient extract_schema_driven) loads artifacts from a file that list/get/export (strict load_artifacts) silently drop — the same project yields different artifact sets per command, and validate both 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

…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>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

📐 Rivet artifact delta

Change Count
Added 2
Removed 0
Modified 0
Downstream impacted (depth ≤ 5) 0

Graph

graph 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
Loading
Added
  • REQ-139
  • REQ-140

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-379download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ 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
Copy link
Copy Markdown

codecov Bot commented Jun 1, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@avrabe avrabe merged commit ab298f5 into main Jun 1, 2026
22 of 40 checks passed
@avrabe avrabe deleted the fix/quiet-skip-warn-non-artifact-yaml branch June 1, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant