Conversation
… migrate --list (#249) Three platform-engineering CLI symmetries from issue #249: B7 — `rivet check sources --strict` is a read-only audit gate. Walks every artifact with a `cited-source`, classifies each as match / drift / missing-hash / read-error / shape-error / stale, and exits non-zero on anything other than match. Mutually exclusive with --update so audit and fix are never the same invocation. Never modifies any YAML. B8 — `rivet validate --strict-cited-source-stale` promotes the previously-Info `cited-source-stale` diagnostic to Error. The stale verdict now fires for missing, unparseable, OR older-than-30-days last-checked timestamps (30d is a hard-coded default; per-schema thresholds remain a follow-up). New helpers: - cited_source::parse_iso8601_utc — chrono-free ISO-8601 parsing - cited_source::classify_staleness — fresh / missing / old / unparseable B9 — `rivet schema migrate --list` enumerates every available recipe (built-in + project-local YAML under <schemas-dir>/migrations/). Project-local recipes shadow built-ins of the same name. Text and JSON output. Mutually exclusive with target + action flags. New `migrate::list_recipes` helper + `RecipeEntry` / `RecipeOrigin` types. Tests: - B7: integration test asserts clean fixture exits 0; off-disk edit exits 1 without mutating the YAML; --update --apply restores 0. - B7: clap mutex test for --strict + --update. - B8: unit tests cover the staleness classifier and severity promotion; integration test asserts default exit 0 + strict exit 1. - B9: unit tests cover built-in / project-local / shadow precedence; integration tests cover text + JSON output + clap mutex with --apply. Docs (rivet docs schema-cited-sources, rivet docs schema-migrate) updated with the new flags + the audit-gate pattern. Implements: REQ-007, REQ-004 Verifies: REQ-007, REQ-004 Refs: #249 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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: ee68921 | Previous: b7a17be | Ratio |
|---|---|---|---|
store_insert/10000 |
14717203 ns/iter (± 1703331) |
10641021 ns/iter (± 264093) |
1.38 |
This comment was automatically generated by workflow using github-action-benchmark.
📐 Rivet artifact deltaNo artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
3 tasks
avrabe
added a commit
that referenced
this pull request
May 2, 2026
* chore(release): v0.8.0 — dogfood follow-ups Workspace, vscode-rivet, and npm root package versions bumped to 0.8.0. Platform packages stay on the release-npm.yml override path. What's in 0.8.0: - fix(docs): stale literals + extend rivet docs check (#252, closes #247). Six embedded-doc literals fixed, plus three new invariants (EmbeddedVersionLiterals, EmbeddedFlagReferences, EmbeddedTodoMarkers) to prevent the class of drift from re-shipping. - feat(docs-check): tighten --coverage rule 4 + --warn-only (#250, closes #248). Rule 4 now requires child name to appear in parent body (catches false-positives on lsp + batch). New three-mode semantics: default silent / --warn-only with annotations / --strict fail. - feat(cli): cited-source --strict, --strict-cited-source-stale, schema migrate --list (#251, closes #249). Read-only audit gate for cited-source drift; promotable stale severity; recipe discovery. Trace: skip * ci: ignore RUSTSEC-2026-0114 (wasmtime 42.x table-allocation panic) New wasmtime advisory published 2026-04-30, blocking 0.8.0 CI. Rivet's wasmtime usage is behind an optional wasm feature gate and doesn't allocate large wasmtime tables, so the panic case isn't reachable. Follow-up issue will track upgrading to wasmtime >=43.0.2. Trace: skip
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 #249.
Three CLI asymmetries from issue #249 that hurt platform-engineering
workflows. Each is a single-flag addition that preserves existing
behavior and ships a clean read-only audit gate or discovery surface.
B7 —
rivet check sources --strictRead-only audit gate. Walks every artifact with a
cited-source,classifies each one (match / drift / missing-hash / read-error /
shape-error / stale), and exits 1 on anything other than match. Never
mutates any YAML — audit and fix are separate invocations. Mutually
exclusive with
--update.This addresses the "run-then-
git diff --exit-code" pattern that CIgates were forced into in 0.7.0.
B8 —
rivet validate --strict-cited-source-stalePromotes the previously-Info
cited-source-stalediagnostic to Errorwhen set. The stale verdict now fires for
last-checkedthat ismissing, unparseable, or older than 30 days (30d is a global default;
per-schema thresholds remain a deferred feature per issue text).
Defaults are unchanged: without the flag,
cited-source-staleisstill Info and
validatestill exits 0 on stale-only projects.New chrono-free helpers in
rivet-core/src/cited_source.rs:parse_iso8601_utc(&str) -> Option<i64>classify_staleness(...) -> StaleStatusclassify_staleness_now(...)(system clock wrapper)B9 —
rivet schema migrate --listEnumerates every available migration recipe (built-in + project-local
YAML under
<schemas-dir>/migrations/). Project-local recipes shadowbuilt-ins of the same name. Text and JSON output (
--format json).Mutually exclusive with
<target>and the action flags. Always exits0 — discovery, not action.
New helper in
rivet-core/src/migrate.rs:list_recipes(schemas_dir) -> (Vec<RecipeEntry>, Vec<warnings>)RecipeEntry/RecipeOrigin(built-in | project-local)Test plan
cargo fmt --allcargo clippy --workspace -- -D warningscleancargo test -p rivet-core(892+ tests) passescargo test -p rivet-cli(108+ tests) passes--update --applyrestores 0--strict --updaterejected--strict-cited-source-staleexits 1--listtext mode printsdev-to-aspicewithbuilt-inorigin--list --format jsonparses;recipes[]containsdev-to-aspiceschemas/migrations/appears withproject-localorigin--list --apply <target>rejectedDocs
rivet docs schema-cited-sources— new--strictand--strict-cited-source-staleflags, audit-gate pattern.rivet docs schema-migrate— new--listmode (text + JSONexamples).
Notes
last-checkedsemantics changed: it's now both a stamp AND afreshness signal. The 30d default is hard-coded; a per-schema
threshold can land as a separate feature without breaking this
PR's API.
validate_cited_sourcesgained astrict_stale: boolparameter(was 4-arg, now 5-arg). All call sites updated.
🤖 Generated with Claude Code