Skip to content

Declare residual in a local schema so a typo stops reading as the real field - #200

Merged
avrabe merged 1 commit into
mainfrom
declare-residual-field
Sep 1, 2026
Merged

Declare residual in a local schema so a typo stops reading as the real field#200
avrabe merged 1 commit into
mainfrom
declare-residual-field

Conversation

@avrabe

@avrabe avrabe commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

residual is where this repo puts every honesty disclosure — what a feature does not do, what an assessor must not conclude from a green. FEAT-091's trailer limits, FEAT-093's ruleset-reset gap, FEAT-096's undetected asymmetric case, FEAT-097's four vacuous 100%s all live in it.

The dev schema never declared it, so all 18 uses were reported as possibly-a-typo (#197).

The point is not the suppressed diagnostics

An undeclared field makes a typo indistinguishable from the correct spelling. Measured on an isolated probe carrying three artifacts — residual, residuals, residual_notes:

reported
without this schema all three, identically
with this schema only the two typos

A misspelled disclosure is silently a different field — i.e. silently absent — which is precisely the failure residual exists to prevent.

Field merge verified, not assumed

#197 flagged the open question: does naming an existing artifact-type in a local schema add to it or replace it? Replacing would drop acceptance-criteria from every feature in the repo.

Probed on an isolated project: it merges. rivet schema show feature afterwards lists phase, acceptance-criteria, baseline and residual. Controlled both directions — disabling the schema brings the INFO back, enabling it removes it.

On this repo: INFO 32 → 14, WARN unchanged at 188. It removes exactly these diagnostics and nothing else.

Deliberately not required: true

Even for status: accepted. A required field is satisfiable with the word "none", so it would gate on the presence of a string rather than on disclosure — a checkbox that reads as rigour and enforces nothing, which is this repo's documented dominant failure class. FEAT-088's rule 2 shape (declared and justified) is what would be worth having, and it is not expressible as a field constraint.

Unrelated, pre-existing, and being investigated separately

rivet schema validate reports two errors on the safety-case preset:

ERROR: rule 'goal-has-support': required-backlink 'supported-by' not a known link type
ERROR: rule 'goal-has-context': required-backlink 'scoped-by'  not a known link type

Verified identical with this schema disabled, so not introduced here. Noting it because those are the two rules sitting at 40% — the ones the standing brief points at.

Refs: FEAT-088 · scry#197

🤖 Generated with Claude Code

https://claude.ai/code/session_01KkNzkNYzPh7366DkNijeNc

…eal field

`residual` is where this repo puts every honesty disclosure -- what a
feature does NOT do, what an assessor must not conclude from a green.
FEAT-091's trailer limits, FEAT-093's ruleset-reset gap, FEAT-096's
undetected asymmetric case, FEAT-097's four vacuous 100%s all live in
it. The `dev` schema never declared it, so all 18 uses were reported as
possibly-a-typo (scry#197).

THE POINT IS NOT THE SUPPRESSED DIAGNOSTICS. An undeclared field makes a
TYPO INDISTINGUISHABLE FROM THE CORRECT SPELLING. Measured on an
isolated probe carrying three artifacts -- `residual`, `residuals`,
`residual_notes`:

  without this schema : all THREE reported identically
  with this schema    : only the two typos reported

A misspelled disclosure is silently a different field, i.e. silently
absent, which is precisely the failure `residual` exists to prevent.

FIELD MERGE VERIFIED BEFORE WRITING, NOT ASSUMED. #197 flagged the open
question -- does naming an existing artifact-type in a local schema ADD
to it or REPLACE it? Replacing would drop `acceptance-criteria` from
every feature in the repo. Probed on an isolated project: it MERGES.
`rivet schema show feature` afterwards lists phase, acceptance-criteria,
baseline AND residual. Controlled in both directions -- disabling the
schema brings the INFO back, enabling it removes it.

Measured on this repo: INFO drops 32 -> 14, WARN unchanged at 188. It
removes exactly these diagnostics and nothing else.

DELIBERATELY NOT `required: true`, even for `status: accepted`. A
required field is satisfiable with the word "none", so it would gate on
the presence of a string rather than on disclosure -- a checkbox that
reads as rigour and enforces nothing, which is this repo's documented
dominant failure class. FEAT-088's rule 2 shape (declared AND justified)
is what would be worth having and is not expressible as a field
constraint.

NOTE, unrelated and pre-existing: `rivet schema validate` reports two
errors on the safety-case preset (`goal-has-support` and
`goal-has-context` name required-backlinks `supported-by` / `scoped-by`
that are not known link types). Verified identical with this schema
disabled, so it is not introduced here. Investigating separately -- those
are the two rules sitting at 40%.

Refs: FEAT-088

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KkNzkNYzPh7366DkNijeNc
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown

📐 rivet artifact delta

PR: #200 Base SHA: 9de06694

Validation

head — `rivet validate` result
  SR-11 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-12 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-13 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-2 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-3 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-4 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-5 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-6 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-7 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-8 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-9 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SYS-1 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-2 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-3 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-4 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-5 (system-req, status: accepted) — missing: sys-integration-verification
  → run `rivet validate --explain SR-1` to see which link type and source types satisfy a gap

Result: PASS (188 warnings)
Schemas: common@0.3.0 (embedded), dev@0.3.0 (embedded), research@0.1.0 (embedded), research-ext@0.1.0 (on-disk), dev-ext@0.1.0 (on-disk), safety-case@0.1.0 (embedded), aspice@0.2.0 (embedded)
base — `rivet validate` result (for comparison)
  SR-11 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-12 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-13 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-2 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-3 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-4 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-5 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-6 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-7 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-8 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SR-9 (sw-req, status: accepted) — missing: sw-integration-verification, unit-verification
  SYS-1 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-2 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-3 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-4 (system-req, status: accepted) — missing: sys-integration-verification
  SYS-5 (system-req, status: accepted) — missing: sys-integration-verification
  → run `rivet validate --explain SR-1` to see which link type and source types satisfy a gap

Result: PASS (188 warnings)
Schemas: common@0.3.0 (embedded), dev@0.3.0 (embedded), research@0.1.0 (embedded), research-ext@0.1.0 (on-disk), safety-case@0.1.0 (embedded), aspice@0.2.0 (embedded)

Artifact stats

base head
Total artifacts 267 267
full stats — head
Artifact summary:
  academic-reference               24
  competitive-analysis             11
  design-decision                  22
  feature                          97
  market-finding                    7
  requirement                      21
  safety-context                    3
  safety-goal                       5
  safety-justification              4
  safety-solution                   6
  safety-strategy                   1
  stakeholder-req                   3
  sw-req                           13
  sw-verification                  13
  sys-verification                  5
  system-req                        5
  technology-evaluation            12
  verification                     15
  TOTAL                           267

Orphan artifacts (no links): 12
  CA-001
  CA-002
  CA-003
  CA-004
  CA-005
  CA-006
  CA-007
  CA-008
  CA-009
  CA-010
  CA-011
  FEAT-078

Diagnostics: 0 error(s), 188 warning(s), 14 info(s)

Diff (base → head)


0 added, 0 removed, 0 modified, 267 unchanged

AADL model — head

spar/scry.aadl: OK

Posted by the rivet-delta workflow. Informational only — does not gate the PR.

@avrabe
avrabe merged commit 8a7de29 into main Sep 1, 2026
13 checks passed
@avrabe
avrabe deleted the declare-residual-field branch September 1, 2026 20:39
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