Skip to content

test: Zig FFI (18 exports, 16 connectors) has no CI gate; Idris2 ABI duplicated byte-for-byte #696

Closed

Description

@hyperpolymath

Two languages in this repo carry correctness claims that no gate checks.

Zig FFI is entirely ungated

ffi/zig/ holds 20+ files: main.zig with 18 export fn declarations, hexadeca.zig, and 16 protocol connectors (grpc, graphql, capnproto, flatbuffers, arrow_flight, mqtt, ipfs, …).

grep -rn zig .github/workflows/*.yml returns only incidental --include='*.zig' grep filters in dogfood-gate.yml and language-blockers.yml. There is no zig build and no zig build test in any workflow. Justfile:94 has cd ffi/zig && zig build, never invoked by CI.

So the C ABI compatibility invariant in MUST.contractile is unverified by anything, and a breaking change to any of the 18 exports would land silently.

Idris2 ABI sources are duplicated byte-for-byte

src/Hypatia/ABI/{FFI,GRPC,GraphQL,REST,RuleEngine,Types}.idr and src/abi/{same six}.idr are all six pairs diff-identical.

src/abi/hypatia-abi.ipkg:17 sets sourcedir = ".." and resolves modules as Hypatia.ABI.* — so src/Hypatia/ABI/ is what actually compiles, and src/abi/*.idr is a six-file copy that nothing builds. Divergence between them is undetectable today, and every doc that pointed at the ABI pointed at the dead copy until the 2026-08-07 docs pass.

Fix: delete src/abi/*.idr, keep src/abi/hypatia-abi.ipkg and src/abi/README.adoc.

For contrast — the proof gate itself is genuine

Worth recording, since fake gates are a recurring estate problem: verify-proofs.yml is not one. It runs a real per-file loop under set -euo pipefail with failure counting and exit 1, real idris2 --build of both ipkgs, a real lake build, and a real TLC model-check. Last three runs on main: success. No || true, no continue-on-error.

Escape-hatch counts are also better than documented: across 22 .idr files there are 0 assert_total, 0 postulate, 0 %hint, and the 8 believe_me hits are all non-executing (4 in comments carrying an explicit -- hypatia: allow pragma, 4 in a deliberate scanner fixture). The 5 Lean proofs contain no sorry.

Two consequences:

  • AFFIRMATION.adoc's "zero escape hatches" claim should be scoped to "outside test/soundness/fixtures/" to be exactly true.
  • docs/proof-debt.md is stale: it instructs readers to run scripts/check-trusted-base.sh and claims a check-trusted-base CI job enforces annotation. Neither exists. Its headline count is derived from "agent worktrees under .claude/worktrees/", a directory that no longer exists.

Evidence: docs/DEBT-REGISTER.md (P-1, P-2, P-3, C-4).

Activity

  1. added
    vfy/test
    on Aug 7, 2026
  2. added
    cicd
    tech-debt
    and removed on Aug 24, 2026
  3. hyperpolymath commented on Sep 22, 2026

    @hyperpolymath
    OwnerAuthor

    main branch ruleset — state change 2026-09-22, and how to revert it

    Ruleset 23818931 (ABI-Codegen-Drift) on hyperpolymath/hypatia main now
    requires two status-check contexts, up from one:

    context "abi-codegen-drift",                    integration_id 15368
    context "zig build test (FFI + wire contract)", integration_id 15368
    

    Verified by reading back what applies (repos/hyperpolymath/hypatia/rules/branches/main),
    not by the PUT response. enforcement: active; effective rule types remain
    exactly ["required_status_checks"]; the owner-ruled admin bypass
    (RepositoryRole:5:always) is preserved.

    Preconditions checked before promoting the second context:

    • Neither zig.yml nor abi-codegen-drift.yml carries a paths: filter, so
      neither can deadlock the default branch on a PR outside a filter.
    • Both contexts were completed/success on the push-to-main commit
      3bf9674ac4a3b80fc7fb701e416657bdc20e51ef (via /commits/<sha>/check-runs,
      total_count 88) before the context was added. A PR-event green does not
      prove a push-event green.

    The context string is the job's name:, not the workflow's: the workflow is
    name: Zig, the job is zig-test with name: zig build test (FFI + wire contract).

    Applied on the owner's go

    The owner authorised this with go; the selection UI was never posted. It is
    reversible in one command. Prior state, verbatim:

    {
      "id": 23818931,
      "name": "ABI-Codegen-Drift",
      "target": "branch",
      "enforcement": "active",
      "conditions": { "ref_name": { "exclude": [], "include": ["~DEFAULT_BRANCH"] } },
      "rules": [
        {
          "type": "required_status_checks",
          "parameters": {
            "strict_required_status_checks_policy": false,
            "do_not_enforce_on_create": false,
            "required_status_checks": [
              { "context": "abi-codegen-drift", "integration_id": 15368 }
            ]
          }
        }
      ],
      "bypass_actors": [
        { "actor_id": 5, "actor_type": "RepositoryRole", "bypass_mode": "always" }
      ]
    }

    To revert, save the block above as rs-before.json and:

    gh api -X PUT repos/hyperpolymath/hypatia/rulesets/23818931 --input rs-before.json
    

    Side effect handled

    Adding a required context does not retro-run anything, so the two open PRs
    (#829, #830, both Dependabot, both same-repo branches) had no
    zig build test (FFI + wire contract) check-run and would have sat at
    "Expected — waiting for status". zig.yml was dispatched on both branches
    (runs 35735936821, 35735940350) to post the check-run on each head.

    Not enabled, deliberately

    Optimus-Branch (23066466) stays enforcement: disabled. It carries five
    required contexts (CodeQL ×3, CodeRabbit, Escript soundness) whose reporting on
    hypatia PRs is unmeasured, and a required context that never reports is how a
    default branch deadlocks.

    🤖 Generated with Claude Code

    https://claude.ai/code/session_0113HQM9LVGkNCzU1WwkJZSV

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    cicdtech-debtvfy/test

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions