Skip to content

feat(schema): declare canonical status lifecycle in common.yaml (REQ-162, #352, #355)#419

Merged
avrabe merged 5 commits into
mainfrom
feat/canonical-status-lifecycle
Jun 3, 2026
Merged

feat(schema): declare canonical status lifecycle in common.yaml (REQ-162, #352, #355)#419
avrabe merged 5 commits into
mainfrom
feat/canonical-status-lifecycle

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented Jun 3, 2026

Implements #352 + #355 Finding 1. Your decision: canonical set in common.yaml = [draft, proposed, approved, implemented, verified, deprecated, rejected].

What

  • schemas/common.yaml status base-field now declares those allowed-values (ordering: draft → proposed → approved → implemented → verified; deprecated/rejected terminal). The REQ-135 enforcement mechanism was already in place but inert — this turns it on.
  • Migrated the rivet repo's own 7 drifting artifacts (the only off-vocabulary ones):
    • acceptedapproved: DD-014/015/016/017 (decisions in force)
    • activeapproved: DD-041 (design decision); → implemented: FEAT-066 (shipped feature)
    • partialimplemented: ARCH-ADAPT-WASM (runtime exists in code)
    • proposed was already in the set.

Verify

  • Typo'd status implmentedrivet validate FAILs with status-allowed-values ERROR + remediation block.
  • No-status artifact → not flagged (the 360 status-less artifacts are unaffected; the check only fires when status is present).
  • rivet repo validate PASS (drift migrated, 0 status errors); 1112 rivet-core lib tests pass; docs check PASS.

⚠️ Downstream blast radius (by design, per your choice)

Projects sharing common.yaml (synth/meld/relay/loom/wohl) must use a status in this set or extend it — their validate will flag any other status. If a downstream uses planned/accepted/etc., either add it here or migrate them.

Deferred

#355 Finding 2 — the ASPICE promotion gates hardcode (= status "approved"), so promoting approved → implemented mis-fires. Fixing it needs a status-at-least predicate over the ordering declared here. Separate follow-up (kept this PR to the enum decision).

Implements: REQ-162

🤖 Generated with Claude Code

avrabe added 2 commits June 3, 2026 06:38
…:is_structural() (REQ-161, #408)

From #408 (and the recurring #353/#355 ask): `rivet validate`'s PASS/FAIL
lumps structural integrity (a broken graph) together with coverage/lint
findings, so a bulk status-flip can't tell "did I break the graph?" from
"the project is still incomplete". spar/sigil both hand-rolled a
`0 broken cross-refs` gate for exactly this.

Add `Diagnostic::is_structural()` — an explicit allowlist of the
structural rule ids (broken-link, duplicate-artifact-id,
artifact-parse-error, link-target-type, cardinality, known-type,
unknown-link-type, doc-broken-ref, yaml-type-coercion,
conditional-rule-consistency, coverage-rule-consistency). Everything else
is coverage/lint, including the three borderline rules required-field /
unknown-field / status-allowed-values (an incomplete/extra/typo'd field
doesn't break the graph) and all schema-defined coverage/status-gate
rules.

`rivet validate --structural` retains only structural diagnostics before
counting/display, so the shown set, counts, and PASS/FAIL exit reflect
structural-only. No rename of `validate_structural*` (its name is
unrelated to this gate) — the classification lives on Diagnostic (#408
option b).

Verified: rivet repo `validate --structural` PASSes with 0 shown (its
206 warnings are all coverage/lint); a broken-link fixture FAILs
--structural; a coverage-only fixture PASSes. Unit test enumerates every
built-in rule's class; CLI test covers the gate. clippy --all-targets +
fmt clean; docs check PASS.

Implements: REQ-161
…162, #352, #355)

From #352/#355 Finding 1: the `status` base-field had no `allowed-values`,
so typo'd/off-vocabulary statuses passed `rivet validate` silently. The
enforcement mechanism (REQ-135) shipped but was inert until a set was
declared.

Maintainer decision: declare the canonical lifecycle in the shared
`schemas/common.yaml` `status` base-field —
[draft, proposed, approved, implemented, verified, deprecated, rejected]
(ordering: draft -> proposed -> approved -> implemented -> verified;
deprecated/rejected terminal).

Migrated the rivet repo's own 7 drifting artifacts to fit:
accepted/active design-decisions -> approved; the active feature FEAT-066
and partial component ARCH-ADAPT-WASM -> implemented. No-status artifacts
are unaffected (the check only fires when a status is present).

Verified: a typo'd status (`implmented`) now FAILs validate with a
`status-allowed-values` ERROR + remediation; no-status does not; rivet
repo validate PASSes (0 status-allowed-values errors). 1112 rivet-core
lib tests pass; docs check PASS.

Downstream note: projects sharing common.yaml must use a status in this
set or extend it. #355 Finding 2 (approved-hardcoded ASPICE promotion
gates) is a separate follow-up needing a status-at-least predicate.

Implements: REQ-162
Refs: REQ-135
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

📐 Rivet artifact delta

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

Graph

graph LR
  ARCH_ADAPT_WASM["ARCH-ADAPT-WASM"]:::modified
  DD_014["DD-014"]:::modified
  DD_015["DD-015"]:::modified
  DD_016["DD-016"]:::modified
  DD_017["DD-017"]:::modified
  DD_041["DD-041"]:::modified
  FEAT_066["FEAT-066"]:::modified
  REQ_162["REQ-162"]:::added
  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
Added
  • REQ-162
Modified
ID Changes
ARCH-ADAPT-WASM
DD-014
DD-015
DD-016
DD-017
DD-041
FEAT-066

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

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

…st fixtures (REQ-162)

CI caught that the 7-value set omitted `released` — a first-class lifecycle
state rivet's own schemas use: `schemas/aspice.yaml` verification gates are
`(or (= status "approved") (= status "released"))`, and common.yaml's
defect flow gates transitions to `released`. Excluding it would make those
rules unsatisfiable and broke the `check_oracles` / ai-defects tests.

- Add `released` to the `status` allowed-values (ordering now
  draft -> proposed -> approved -> implemented -> verified -> released;
  deprecated/rejected terminal).
- Fix two test fixtures that used the off-vocabulary `active` (incidental):
  `warning_only_project` and integration.rs FEAT-001 -> `approved`.

Verified: cli_commands (113), rivet-core lib (1112), integration (27),
check_oracles (7), vv_coverage_schema (9), mcp_integration (24) all pass;
rivet repo validate PASS, 0 status-allowed-values errors.

Implements: REQ-162
@avrabe
Copy link
Copy Markdown
Contributor Author

avrabe commented Jun 3, 2026

Adjustment to the chosen set (please sanity-check): CI surfaced that the 7-value set I proposed omitted released — which rivet's own schemas treat as a first-class state: schemas/aspice.yaml's verification gates are (or (= status "approved") (= status "released")) (lines 564/579/595) and common.yaml's defect flow gates released. Without it those rules are unsatisfiable and 5 tests (check_oracles, ai-defects) break.

So the canonical set is now 8 values: [draft, proposed, approved, implemented, verified, released, deprecated, rejected] (ordering draft → proposed → approved → implemented → verified → released; deprecated/rejected terminal). If you'd rather drop released, we'd need to rework the aspice gates — flag me and I'll do that instead.

Also fixed two test fixtures that incidentally used the off-vocabulary activeapproved. Full suites green locally.

…-lifecycle

# Conflicts:
#	CHANGELOG.md
#	artifacts/requirements.yaml
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

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: 0f0eb1d Previous: 950c605 Ratio
link_graph_build/10000 38294666 ns/iter (± 3169738) 27522343 ns/iter (± 318383) 1.39
query/10000 320787 ns/iter (± 1320) 232623 ns/iter (± 1748) 1.38

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

…-lifecycle

# Conflicts:
#	artifacts/requirements.yaml
@avrabe avrabe merged commit f2ecf31 into main Jun 3, 2026
18 of 38 checks passed
@avrabe avrabe deleted the feat/canonical-status-lifecycle branch June 3, 2026 07:34
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

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.

1 participant