Skip to content

fix(schema): restore accepted to canonical status enum (#522)#525

Draft
avrabe wants to merge 1 commit into
mainfrom
fix/issue-522-restore-accepted-status
Draft

fix(schema): restore accepted to canonical status enum (#522)#525
avrabe wants to merge 1 commit into
mainfrom
fix/issue-522-restore-accepted-status

Conversation

@avrabe

@avrabe avrabe commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Closes #522 — first slice only (slice 2: re-add accepted).

Why

v0.16.0 declared the canonical status lifecycle in schemas/common.yaml (REQ-162, #352, #355, PR #419) but dropped accepted, the documented terminal state for design-decision / external-anchor / requirement-meta artifacts. Stores that followed the published chain … → verified → accepted flipped from PASS to FAIL on the 0.15 → 0.16 bump with no migration path — the jess hardware-integration store hit 12 of 21 errors from this alone.

This restores accepted to the enum and documents its terminal role in the inline schema comment. It does not widen the typo-guard: a genuinely off-vocabulary status (implmented) still fires status-allowed-values, which the regression test asserts as a negative control.

Acceptance criteria (from #522)

  • schemas/common.yaml canonical status enum re-includes accepted alongside verified / released / deprecated / rejected, with a one-line schema comment naming accepted as the documented terminal state for design-decision / external-anchor / requirement-meta artifacts (schemas/common.yaml:43-67).
  • Regression fixture: a project store with a design-decision whose status: accepted validates cleanlycommon_status_accepts_accepted_and_still_rejects_typos in rivet-core/tests/schema_validation_rules.rs builds a Store with DD-ACCEPTED (status accepted) and DD-TYPO (status implmented), runs validate(...), and asserts the former produces zero status-allowed-values / allowed-values diagnostics while the latter still produces exactly one.
  • rivet schema info common / rivet schema show common prints accepted in the allowed-values list — the test also asserts that Schema::base_fields (the introspection surface that schema info / schema show query) reports accepted among the status field's allowed-values, so the diagnostic and the introspection layer can't drift again. (CLI surfacing of base-field allowed-values in schema show TYPE output is a separate UX gap that doesn't block slice 2.)
  • rivet validate PASS on the rivet repoResult: PASS (271 warnings) post-rebase against origin/main (e60a3a9).
  • cargo test -p rivet-core --test schema_validation_rules green — all 6 tests pass including the new regression (common_status_accepts_accepted_and_still_rejects_typos ... ok). cargo test -p rivet-cli --bin rivet: 125/125 pass. (Note: the pre-existing rivet_core::externals::tests::is_working_tree_dirty_detects_tracked_edits_not_untracked lib test fails on this sandbox on a clean checkout of main as well, so it's a sandbox flake unrelated to this slice.)
  • cargo fmt --check clean; cargo clippy --all-targets -- -D warnings clean (exit 0; only pre-existing MSRV-mismatch meta warning from clippy.toml).
  • Commit trailer: Fixes: REQ-162 + Refs: #352, #419, #522 (on 117e9c7).

Out of scope (per #522 body — file separately)

  • Slice 1: rivet migrate status-remap / validate --fix with a default-mapping policy for open / resolved from ai-found-defect — needs a distinct command and a policy decision.
  • Slice 3: per-schema status enums so ai-found-defect can keep its open / triaged / resolved triage vocabulary distinct from the document lifecycle — schema-level discriminator vs. dedicated enum is its own design call.
  • The rivet 0.16.0 upgrade docs page.

Why this is a draft

The hard rule in the triage workflow requires consulting https://pulseengine.eu/blog/ before opening a PR — process posts there are authoritative. The blog has been HTTP 503 throughout this run (and across the recent triage threads on #420, #522, #516, …, per the carried side-rail note). I couldn't verify against the published process posts, so the PR is parked as a draft pending maintainer review against that guidance once the blog is reachable.

Slice 2 itself is otherwise complete: one-line schema addition + 6-line comment, regression test (positive + negative control), CHANGELOG entry.


Generated by Claude Code — issue-triage agent run 2026-06-10.


Generated by Claude Code

v0.16.0 declared the canonical status lifecycle in common.yaml (REQ-162,
PR #419) but dropped `accepted` — the documented terminal state for
`design-decision` / `external-anchor` / requirement-meta artifacts.
Downstream stores that followed the documented chain
(`... -> verified -> accepted`) flipped from PASS to FAIL on the
0.15 -> 0.16 bump with no migration path; the jess hardware-integration
store hit 12 of 21 errors from this alone.

Re-add `accepted` to the canonical enum and document its terminal role
in the inline schema comment so the published lifecycle and the
validator agree again. The `status-allowed-values` guard still fires on
genuinely typo'd values — covered by the new regression test
`common_status_accepts_accepted_and_still_rejects_typos`, which also
asserts via `Schema::base_fields` that the introspection surface and
the diagnostic see the same set.

Slice 2 of #522 only. Out of scope (filed separately): slice 1
(`rivet migrate` / `validate --fix` status remap with default-mapping
policy for `open` / `resolved` in `ai-found-defect`); slice 3
(per-schema status enums so `ai-found-defect` can keep its
`open`/`triaged`/`resolved` triage vocabulary distinct from the
document lifecycle).

Note: the pulseengine.eu/blog/ workflow guidance was 503 throughout
this run (carried symptom flagged across the recent triage threads on
#420, #522, #516, …), so this PR ships as a draft for maintainer review
against the authoritative process posts once the blog is reachable.

Fixes: REQ-162
Refs: #352, #419, #522

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

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: 117e9c7 Previous: e60a3a9 Ratio
traceability_matrix/1000 60573 ns/iter (± 233) 43193 ns/iter (± 499) 1.40
query/10000 352846 ns/iter (± 3939) 236806 ns/iter (± 4501) 1.49

This comment was automatically generated by workflow using github-action-benchmark.

@github-actions

Copy link
Copy Markdown

📐 Rivet artifact delta

No artifact changes in this PR. Code-only changes (renderer, CLI wiring, tests) don't touch the artifact graph.

@codecov

codecov Bot commented Jun 10, 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.

0.16.0 canonical status enum is breaking: no migration, drops documented 'accepted', and doesn't fit ai-found-defect

2 participants