Skip to content

4 pre-existing Alloy model violations exposed by the #199 detector fix #218

Closed

Description

@jobordu

Summary

PR #214 (issue #199) fixed the Alloy runners so they actually detect assertion violations. That fix immediately surfaced 4 genuine, pre-existing formal-model violations that the dead /Counterexample/i regex had been silently recording as pass. These are NOT regressions introduced by #214 — they exist on main today and have been reported green the whole time.

The 4 violated specs (from the FV CI run on #214)

Check Spec Evidence
alloy:quorum-composition .planning/formal/alloy/quorum-composition.als check AllRulesHold → counterexample (skolem $AllRulesHold_c={Config$0}); reproduced with Alloy 6.2.0
alloy:install-scope install-scope.als Alloy verification FAILED with instance block
alloy:taxonomy-safety taxonomy-safety.als Alloy verification FAILED with instance block
alloy:transcript-scan transcript-scan.als TraceDivergenceDetected counterexample (skolem $TraceDivergenceDetected_tc)

All 4 report assertion counterexamples (not vacuity / not parser errors — the new parser's 18 existing runner tests stay green).

Why this matters

This is the core risk that issue #199 was about: the formal-verification surface could not report a violation, so 4 genuinely-violated invariants were being counted as verified. Each needs triage:

  1. Real system bug — the modeled behavior is wrong → fix the implementation.
  2. Wrong assertion — the spec over-constrains → fix the .als.
  3. Stale model — the spec drifted from the current design → update or retire it.

Action

Blocks/relates to #214 (#199). Part of the 2026-06 quorum-hardening series.

Activity

  1. jobordu commented on Jun 19, 2026

    @jobordu
    Author

    Deep assessment complete — all 4 are SPEC bugs, none are implementation bugs

    Each violation was reproduced with Alloy 6 and cross-referenced against the implementation. The code is correct in every case; the models were wrong, and the dead /Counterexample/i regex hid it. Being fixed in PR #214 (spec-only, no waivers):

    Check Verdict Root cause Fix
    quorum-composition / AllRulesHold SPEC_BUG Asserts High ⇒ ≥1 slot unconditionally; facts only guarantee that when #availableSlots > 0. Empty/all-down roster is the counterexample — real system routes it to solo mode. Add the #availableSlots > 0 guard so the assertion matches the facts.
    install-scope / AllEquivalence SPEC_BUG Claims all fully-installed states are identical, but scope (Local/Global) is an orthogonal free choice (--all --global vs --all --local). Tie both states to a shared InstallOp at one fixed scope (mirrors the passing InstallIdempotent).
    taxonomy-safety / TaxonomyClosed + NewCategoryConsistent SPEC_BUG Under-constrained: no relation binds a Classification to the snapshot it was classified against, so the solver picks mismatched pairs. Bind Classification.against to its snapshot + model the is_new classifier contract as a fact. Also: stale provenance — SCBD-05/06/07 referenced but absent from requirements.json.
    transcript-scan / PairingUniqueCheck SPEC_BUG No fact enforces unique tool_use/tool_result IDs, so the solver collapses many onto one Id atom. Add injectivity facts (real transcripts always have unique block.id).
    transcript-scan / SuccessCountNeverExceedsMinSizeCheck SPEC_BUG + STALE Bounds successCount by minSize per a removed qgsd-stop.js:453 break; current code breaks at successCount >= maxSize (nf-stop.js:1069) since the #192 min_live_voters rework. Add injectivity facts + re-anchor the ceiling to maxSize, update source-line comments.

    Net: no implementation changes needed. Once #214's spec fixes land green, this issue is resolved (modulo the separate cleanup of the missing SCBD-05/06/07 requirement entries, which I'll leave noted here).

  2. jobordu commented on Jun 19, 2026

    @jobordu
    Author

    The 4 Alloy specs are fixed and merged via #214 (#199) — all spec/model bugs, no implementation changes. Formal CI is green. Leaving this issue open only for the residual cleanup: create the missing SCBD-05/06/07 requirement entries in .planning/formal/requirements.json (referenced by the taxonomy-safety spec's @requirement tags).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions