feat: batch mutations, JSON output, perf fix, cross-repo fix#43
Merged
Conversation
Clear GIT_DIR and GIT_WORK_TREE environment variables in check_baseline_tag and list_baseline_tags so they target the specified repo_dir rather than an enclosing worktree. Also isolate test git commands with env_remove to prevent tag collisions when tests run inside a git worktree. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…EAT-055) Add `rivet batch <file>` command that reads a YAML file containing multiple mutations (add, link, modify) and applies them atomically. All mutations are validated upfront before any file writes. Supports $prev variable substitution to reference the ID generated by the preceding add mutation, enabling chained artifact creation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…AT-056)
Add "result" field ("PASS"/"FAIL") to validate JSON output for both
standard and incremental pipelines. Restructure coverage JSON to use
"rules" array with percentage fields and "overall" summary object,
matching the agent-consumable schema specification.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ProjectContext::load() now loads external project artifacts (prefixed with their repo prefix) so rivet link and rivet add --link can resolve cross-repo references (e.g., sigil:L-7). Fixes: FEAT-038 Refs: REQ-020 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…re-size collections - Add Copy to Severity enum (eliminates clone overhead in validation loops) - Add #[inline] to hot accessors in store, schema, model, links - Pre-size HashMap and DiGraph with with_capacity(n) in LinkGraph::build() - Eliminate redundant schema.artifact_type() double-lookup per artifact - Defer ResolvedLink construction to the branch where it's used Benchmark improvement: validate/100 ~25-39% faster. Refs: REQ-013 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
4 tasks
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.
Summary
Three parallel workstreams merged:
1. Performance fix
CopyonSeverityenum (eliminates clones in validation loop)#[inline]on hot accessors (store, schema, model, links)with_capacity(n)in LinkGraph::buildartifact_type()double-lookup2. Cross-repo artifact discovery
ProjectContext::load()now loads external artifacts (prefixed with repo prefix)rivet linkandrivet add --linkcan now resolve cross-repo references3. Agent ergonomics (FEAT-055, FEAT-056)
rivet batch <file>— apply multiple mutations atomically from YAMLadd,link,modifyactions$prevvariable for chaining (references last added artifact ID)--format jsonenhanced for validate and coverageresultfield (PASS/FAIL)rulesarray withname/covered/total/percentageAlso fixed
GIT_DIR/GIT_WORK_TREETest plan
🤖 Generated with Claude Code