Skip to content

fix(validate): validate and validate --direct produce identical output (REQ-241, #620)#638

Merged
avrabe merged 1 commit into
mainfrom
fix/620-validate-direct-parity
Jul 1, 2026
Merged

fix(validate): validate and validate --direct produce identical output (REQ-241, #620)#638
avrabe merged 1 commit into
mainfrom
fix/620-validate-direct-parity

Conversation

@avrabe

@avrabe avrabe commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

What

Closes #620rivet validate (default salsa path) and rivet validate --direct (library path) now produce byte-identical output on the same project.

Root cause

The substantive divergence a user reported (one path flagging issues the other didn't) was the self-link false-PASS, fixed in #627. This closes the last residual difference: the two paths collect artifacts in different orders, so check_lifecycle_completeness returned lifecycle gaps in different order and the --explain <id> hint (.first()) named a different example artifact per path.

Fix

Sort lifecycle gaps by artifact id before printing → the gap list and the hint are deterministic and identical across both paths.

Verification

  • Byte-identical output confirmed on the self-link repro and rivet's own ~940-artifact project.
  • Regression test validate_and_direct_produce_identical_output, proven to fail without the sort.
  • REQ-241 verified. Full cli_commands suite + clippy --all-targets green locally.

Self-hosted CI pool is offline (#509); verified locally.

🤖 Generated with Claude Code

…output (REQ-241, #620)

A user reported `rivet validate` and `rivet validate --direct` returning
different results on the same project — one flagging issues the other didn't.
The substantive divergence (self-satisfying links counted as closing a
traceability rule) was fixed in #627; this closes the last residual
difference.

The default (salsa) and --direct (library) paths collect artifacts in
different orders, so `check_lifecycle_completeness` returned the lifecycle
gaps in different order and the `--explain <id>` hint (which used
`.first()`) named a different example artifact per path. Sort the gaps by
artifact id so the printed gap list AND the hint are deterministic and
identical across both paths.

Verified byte-identical output between the two paths on both the reporter's
self-link repro and rivet's own 940-artifact project. Regression test
validate_and_direct_produce_identical_output (proven to fail without the
sort).

Implements: REQ-241
Verifies: REQ-241
Refs: REQ-089
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@avrabe avrabe merged commit 18dd82b into main Jul 1, 2026
22 of 23 checks passed
@avrabe avrabe deleted the fix/620-validate-direct-parity branch July 1, 2026 04:16
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

📐 Rivet artifact delta

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

Graph

graph LR
  REQ_241["REQ-241"]:::modified
  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
Modified
ID Changes
REQ-241

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

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

@codecov

codecov Bot commented Jul 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

rivet vadlidate and rivet validate --direct show different results

1 participant