Skip to content

FEAT-064: mechanize the qualified obligation-identity invariance (ObligationId.v) - #119

Open
avrabe wants to merge 1 commit into
mainfrom
feat-064-obligationid-proof
Open

FEAT-064: mechanize the qualified obligation-identity invariance (ObligationId.v)#119
avrabe wants to merge 1 commit into
mainfrom
feat-064-obligationid-proof

Conversation

@avrabe

@avrabe avrabe commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Adds proofs/rocq/ObligationId.vadmit-free, //proofs/rocq:obligationid_test passes locally (0 Admitted/admit/Axiom across all 20 .v files).

It proves both sides, on purpose

theorem what it establishes
ordinal_stable_under_foreign_insertion (+ _anywhere) the corrected AC — inserting other-kind operators leaves a later site's ordinal, hence its identity, unchanged
ordinal_shifts_under_same_kind_insertion why the qualification is necessary — one same-kind insertion strictly increases it, so the original unqualified AC is false
survivor_inherits_deleted_identity, aliasing_is_real the aliasing hazard as a theorem — delete the first of two same-kind sites and the survivor's ordinal becomes exactly the deleted site's

That third row is the point. DD-020 recorded aliasing as prose; as a proven proposition it can't quietly evaporate the next time someone reads the AC optimistically — and it's the formal justification for FEAT-065's conservatism rule (degrade to uncertain, never over-claim discharged).

Claim corrected to match the evidence

AC#3 previously read "id equality implies same structural site is proven admit-free". That is a hash property requiring collision resistance — the identity is a SHA-256 and the theorems are about the key tuple, not the digest. The AC now says what the file actually proves. Changing the claim rather than stretching the proof.

Honest scope (in the file header)

The region path component isn't modelled: under the qualified hypothesis the insertion opens no region, so the structure is untouched and the path is trivially preserved. Its list algebra stays γ-swept — the same split Segment.v uses.

rivet validate PASS; core tests green.

🤖 Generated with Claude Code

…igationId.v)

proofs/rocq/ObligationId.v — admit-free, //proofs/rocq:obligationid_test PASSES.
Tree-wide: 0 Admitted/admit/Axiom across 20 .v files.

Proves BOTH sides, deliberately:
- ordinal_stable_under_foreign_insertion (+ _anywhere) — THE CORRECTED AC: an
  insertion of other-kind operators leaves a later site's intra-region ordinal,
  hence its identity, unchanged.
- ordinal_shifts_under_same_kind_insertion — WHY the qualification is needed:
  one same-kind insertion strictly increases the ordinal, so FEAT-064's original
  unqualified AC is false.
- survivor_inherits_deleted_identity / aliasing_is_real — the ALIASING HAZARD as
  a theorem rather than a caveat: delete the first of two same-kind sites and the
  survivor's ordinal becomes exactly the deleted site's. This is the formal
  justification for FEAT-065's conservatism rule (degrade to `uncertain`, never
  over-claim `discharged`), so the limitation cannot quietly evaporate the next
  time someone reads the AC optimistically.

AC#3 CORRECTED to match the evidence rather than the other way round: it claimed
"id equality implies same structural site", which is a HASH property requiring
collision resistance. The identity is a SHA-256 and no such claim is made — the
theorems are about the KEY tuple. Scope stated in the file header: the region
PATH component is not modelled (under the qualified hypothesis the region
structure is untouched); its list algebra stays γ-swept, the same split Segment.v
uses.

Env note for the next Rocq build: nix-build was missing from PATH — the recurring
macOS-rewrites-the-shell-profile issue. The store (22,871 entries) and daemon were
intact; the sourcing block survives in /etc/bashrc but is gone from /etc/zshrc.
Workaround used: source nix-daemon.sh per command. Durable fix needs sudo.

rivet validate PASS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown

📐 rivet artifact delta

PR: #119 Base SHA: 524b3e0b

Validation

head — `rivet validate` result
  SR-11 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-12 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-13 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-2 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-3 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-4 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-5 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-6 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-7 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-8 (sw-req, status: accepted) — missing: unit-verification, sw-integration-verification
  SR-9 (sw-req, status: accepted) — missing: unit-verification, sw-integration-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 (117 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)
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 (117 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 222 222
full stats — head
Artifact summary:
  academic-reference               24
  competitive-analysis             11
  design-decision                  20
  feature                          71
  market-finding                    7
  requirement                      20
  safety-context                    3
  safety-goal                       5
  safety-justification              3
  safety-solution                   6
  safety-strategy                   1
  stakeholder-req                   3
  sw-req                           13
  sw-verification                  13
  sys-verification                  5
  system-req                        5
  technology-evaluation            12
  TOTAL                           222

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

Diagnostics: 0 error(s), 117 warning(s), 17 info(s)

Diff (base → head)

~ FEAT-064
  field changed: acceptance-criteria

0 added, 0 removed, 1 modified, 221 unchanged

AADL model — head

spar/scry.aadl: OK

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

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