feat(schema): declare canonical status lifecycle in common.yaml (REQ-162, #352, #355)#419
Conversation
…: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
📐 Rivet artifact delta
Graphgraph 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
Added
Modified
Posted by |
…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
|
Adjustment to the chosen set (please sanity-check): CI surfaced that the 7-value set I proposed omitted So the canonical set is now 8 values: Also fixed two test fixtures that incidentally used the off-vocabulary |
…-lifecycle # Conflicts: # CHANGELOG.md # artifacts/requirements.yaml
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: 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
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Implements #352 + #355 Finding 1. Your decision: canonical set in
common.yaml=[draft, proposed, approved, implemented, verified, deprecated, rejected].What
schemas/common.yamlstatusbase-field now declares thoseallowed-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.accepted→approved: DD-014/015/016/017 (decisions in force)active→approved: DD-041 (design decision); →implemented: FEAT-066 (shipped feature)partial→implemented: ARCH-ADAPT-WASM (runtime exists in code)proposedwas already in the set.Verify
implmented→rivet validateFAILs withstatus-allowed-valuesERROR + remediation block.validatePASS (drift migrated, 0 status errors); 1112 rivet-core lib tests pass; docs check PASS.Projects sharing
common.yaml(synth/meld/relay/loom/wohl) must use a status in this set or extend it — theirvalidatewill flag any other status. If a downstream usesplanned/accepted/etc., either add it here or migrate them.Deferred
#355 Finding 2 — the ASPICE promotion gates hardcode
(= status "approved"), so promotingapproved → implementedmis-fires. Fixing it needs astatus-at-leastpredicate over the ordering declared here. Separate follow-up (kept this PR to the enum decision).Implements: REQ-162
🤖 Generated with Claude Code