Conversation
📐 Rivet artifact deltaNo artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph. |
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: 83acdc3 | Previous: 189f020 | Ratio |
|---|---|---|---|
store_insert/10000 |
14292983 ns/iter (± 1655015) |
10721000 ns/iter (± 239834) |
1.33 |
link_graph_build/10000 |
37568915 ns/iter (± 5709273) |
22364354 ns/iter (± 211537) |
1.68 |
This comment was automatically generated by workflow using github-action-benchmark.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Phase 2 of issue #236. Phase 1 (in 0.6.0) shipped the diff engine and mechanical apply with snapshot/abort. Phase 2 adds the rebase-style conflict-resolution flow. Engine (rivet-core/src/migrate.rs): * `MigrationState::Conflict` joins the existing `Planned / InProgress / Complete` states. * `MigrationManifest.resolutions` tracks per-artifact `pending / resolved / skipped` status across `--apply / --continue / --skip / --edit`. * `MigrationLayout::current_conflict_path` writes the artifact id the walker paused on; `--status` surfaces it. * `diff_artifacts` now emits `FieldValueConflict` for any source field whose value violates the target field's `allowed_values` enum (e.g. `priority: 5` → `[must|should|could|wont]`). * `apply_to_file_partial` skips conflict-class entries; the `--apply` walker uses it so mechanical changes always commit before pausing. * `write_conflict_markers` splices git-rebase-style `<<<<<<<` / `=======` / `>>>>>>>` blocks into the affected field. `scan_conflict_markers` is the inverse used by `--continue` and the `MigrationConflict` doc-check invariant. * `restore_artifact_from_snapshot` swaps a single artifact back to its pre-migration form for `--skip`. CLI (rivet-cli/src/migrate_cmd.rs + main.rs): * `--apply` no longer bails on conflicts — it walks the plan, applies every mechanical/decidable change, then writes markers for the first conflict and exits non-zero with state CONFLICT. * `--continue` verifies markers are gone, re-parses the file as YAML, marks resolved, advances. * `--skip` rebuilds the file from the snapshot (mechanical-pass applied to other artifacts in the same file) and restores the conflicted artifact's pre-migration form. * `--edit <ID>` re-stamps markers on a previously-resolved or skipped conflict. * `--status` reports CONFLICT state plus the current conflict's id and file, with next-step suggestions. Validation (rivet-core/src/doc_check.rs): * `MigrationConflict` doc-invariant scans every `*.yaml` / `*.yml` under `<project>/artifacts/` and emits a violation for any line that begins with `<<<<<<<` / `=======` / `>>>>>>>`. Prevents accidental commits with leftover markers. Tests (rivet-core/src/migrate.rs + rivet-cli/tests/migrate_integration.rs): * 7 new unit tests covering enum-mismatch detection, marker round trip, scan, restore-from-snapshot, partial-apply, plan lookup, and Conflict state roundtrip. * 6 new integration tests covering the apply-pauses-on-conflict flow, --continue success, --continue marker rejection, --skip restore, --edit re-open, and the docs-check MigrationConflict surface. Phase 3 (deferred): dashboard `/migrations/<id>` view, `rivet recipes` subcommand for recipe distribution, provenance entries on migrated artifacts. Implements: REQ-007, REQ-010 Implements: REQ-004 Verifies: REQ-007, REQ-010, REQ-004 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…migrate Extend the embedded `rivet docs schema-migrate` topic with: * Updated quick-start commands (`--continue`, `--skip`, `--edit`) * CONFLICT state in the state-machine diagram * Worked example of marker syntax + resolution workflow * `current-conflict` file in the storage-layout table * Note on the `MigrationConflict` doc-check invariant * Refreshed "still deferred" list (dashboard, recipes subcommand). Refs: FEAT-001
83acdc3 to
bc3ba33
Compare
2 tasks
avrabe
added a commit
that referenced
this pull request
Apr 30, 2026
…246) Workspace, vscode-rivet, and npm root package versions bumped to 0.7.0. Platform packages stay on the release-npm.yml override path. What's in 0.7.0: - feat(schema): rivet schema migrate Phase 2 (#242) — full git-rebase conflict-resolution UX. Conflict markers in YAML, --continue, --skip, --edit. New MigrationConflict invariant in rivet docs check. - feat(docs-check): subcommand-coverage gate (#241) — walks the live clap CLI tree and asserts each path has an embedded docs topic. Default warn-only; --strict makes it enforcing. - feat(validate): prose-mention-without-typed-link warning (#234, closes #207). - feat(schemas): vv-coverage repo-status type (#232, partial #188). - feat(mutants): canonical cargo-mutants template (#229, closes #185). - docs(pre-commit): canonical 21-hook template (#222, closes #186). - fix(ci): Release workflow now idempotent on existing tag (#244). Known issue: v0.5.0 / v0.5.1 / v0.6.0 release pages have no binary assets attached because the workflow's Create Release step failed on each (race with manual gh release create). The fix in #244 lands in this release; v0.7.0 onward is unaffected. Older releases need a manual gh release upload to backfill. Verified: cargo check, cargo clippy --workspace -- -D warnings, cargo test -p rivet-cli, rivet docs check (clean), rivet docs check --coverage reports 48/81 paths covered (warn-only). 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.
Phase 2 of issue #236. Phase 1 shipped in 0.6.0 (#240) with the diff engine and mechanical apply. Phase 2 adds the rebase-style conflict-resolution UX.
Summary
--applywrites<<<<<<< source ... ======= target ... >>>>>>>blocks for FieldValueConflict (e.g.priority: 5-> enum) and pauses with state CONFLICT.--continue: verifies markers are gone, re-parses the file, marks resolved inmanifest.yaml, advances to next conflict or COMPLETE.--skip: rebuilds the file from snapshot for the conflicted artifact, leaves other artifacts in their migrated form, advances.--edit <ID>: re-opens a previously-resolved conflict by re-stamping markers and setting state to CONFLICT.MigrationState::Conflict+current-conflictpointer file (already in Phase 1 storage layout, now wired up).diff_artifactsnow emitsFieldValueConflictfor any source value that violates the target field'sallowed_valuesenum.MigrationConflictdoc-check invariant: scans everyartifacts/**/*.yamlfor leftover markers; failsrivet docs check.--status: reports CONFLICT state with current artifact id, file path, and next-step suggestions.Phase 2 acceptance criteria (per #236)
--applypause--continuechecks for residual markers + re-validates YAML + advances state--skiprestores artifact from snapshot + advances state--edit <ID>re-opens a resolved conflictCONFLICTcurrent-conflictfile wired inMigrationConflictinvariant inrivet docs checkrivet docs schema-migrateupdated with the conflict-resolution flowDeferred to Phase 3
/migrations/<id>viewrivet recipessubcommand / recipe distributionTest plan
cargo check -p rivet-cli -p rivet-corecleancargo clippy --workspace -- -D warningsclean (only the pre-existing WASM stub warning)cargo fmt --all --checkcleancargo test -p rivet-core --lib migrate— 15/15 unit tests pass (8 inherited + 7 new)cargo test -p rivet-cli --test migrate_integration— 11/11 tests pass (5 inherited + 6 new)cargo test -p rivet-cli— full suite passesrivet docs checkclean against the rivet repopriority: 5targets an enum;--applypauses with markers, programmatic resolve,--continuereaches COMPLETE.Files
rivet-core/src/migrate.rs— engine:MigrationState::Conflict,ResolutionStatus, conflict-marker writer/scanner, partial apply, restore-from-snapshot.rivet-core/src/doc_check.rs—MigrationConflictdoc-check invariant.rivet-cli/src/migrate_cmd.rs— newcmd_continue / cmd_skip / cmd_edit;cmd_applyrewritten to pause on conflict.rivet-cli/src/main.rs—--continue / --skip / --editCLI wiring.rivet-cli/src/docs.rs— Phase 2 conflict-resolution flow in theschema-migratetopic.rivet-cli/tests/migrate_integration.rs— 6 new integration tests.🤖 Generated with Claude Code