Skip to content

Delete the six duplicated src/abi/*.idr modules and repoint ~15 references #815

Closed

Description

@hyperpolymath

What

Six Idris2 modules exist twice, with identical blob SHAs in both locations:

Module src/abi/ src/Hypatia/ABI/
FFI.idr · GRPC.idr · GraphQL.idr · REST.idr · RuleEngine.idr · Types.idr dead copy live

src/abi/hypatia-abi.ipkg sets sourcedir = "..", which resolves to src/,
so modules = Hypatia.ABI.Types compiles src/Hypatia/ABI/Types.idr. The
src/abi/*.idr copies are compiled by nothing.

They are not harmless. PR #811 found that
test/unified-api-adapter-contract_test.exs bound its golden source to the
dead src/abi/Types.idr — so the live ABI could drift and the guard would
stay green. That was instance 21 of the guard-asks-a-different-question trap,
and it was fixed in #811. The duplicates that made it possible are still here.

Blast radius — measured

~15 files name the dead path. Only the Elixir guard read it (now fixed);
the rest are prose and doc comments:

schema/README.adoc, ffi/zig/README.adoc, verification/PROOF-STATUS.adoc,
docs/operations/prover-wars-integration.adoc, ffi/connectors.json, doc
comments in ffi/zig/src/main.zig, ffi/zig/src/unified-api-adapter.zig,
clients/rust/hypatia-client/src/connector.rs, .../lib.rs, .../types.rs,
.../ffi.rs, verification/proofs/idris2/ConfidenceBounds.idr, a
data/verisim record, test/sensor_test.exs.

Acceptance criteria

  • The six src/abi/*.idr files are deleted.
  • idris2 --build src/abi/hypatia-abi.ipkg still succeeds — proving the
    ipkg was compiling the live tree all along, which is the claim this issue
    rests on.
  • idris2 --build src/abi/hypatia-abi-gen.ipkg still succeeds and
    just abi-gen still produces a zero diff.
  • Every one of the ~15 references is repointed to
    src/Hypatia/ABI/<Module>.idr. Verify by a repo-wide grep for
    src/abi/.*\.idr returning only the .ipkg files.
  • grep -c before and after is recorded in the PR, so the denominator is
    stated rather than "all references updated" being asserted.
  • mix test and .github/workflows/abi-codegen-drift.yml both stay green.
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

    bindingsABI, FFI, WASM, and cross-language interop surfacesrefactorRestructuring that preserves observable behaviour

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions