ArghDA M4 follow-on: Idris2 totality-hole + partial lint (M4 → 100%)#48
Merged
Merged
Conversation
The Idris2 escape-hatch lint now also flags the two remaining totality
opt-outs, closing M4:
- a per-definition `partial` modifier (distinct from the already-handled
file-wide `%default partial` directive), and
- totality holes `?name` (incomplete terms/proofs).
Both ride under the shared `escape-hatch` rule name, so the reasoning graph
caps a hit at amber — exactly like `believe_me`.
Detection (src/lint/idris2.rs):
- `holes()` matches a `?` that begins a token (start of line / after whitespace
/ `([{,;=`) followed by an identifier, so a hole `?goal` matches but a user
operator `<?>` (with `?` between symbol chars) does not.
- `strip_strings()` blanks double-quoted literals (honouring `\"`) first, so a
`"?x"` inside a string is not a false hole.
Verification (actually run): cargo fmt --check, clippy -D warnings, cargo test
(173 pass, +5 idris2 lint units: per-def partial, hole, hole-in-string ignored,
`<?>` not a hole, `total` not flagged), check-spdx.sh — all green. Dogfooded vs
real idris2 0.7.0 on a file with `partial loop` + `f = ?rhs`: `idris2 --check
--source-dir` exits 0 (the silent-failure class); `arghda scan --backend idris2`
flags both; `reason --check --backend idris2` → Holey self=admitted,
effective=admitted, evidence "prover: proven; escape-hatch → admitted" (the
green exit correctly capped to amber).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7
hyperpolymath
marked this pull request as ready for review
July 1, 2026 20:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Idris2 escape-hatch lint now flags the two remaining totality opt-outs, closing M4 (→ 100%):
partialmodifier (distinct from the already-handled file-wide%default partialdirective), and?name(incomplete terms/proofs).Both ride under the shared
escape-hatchrule name, so the reasoning graph caps a hit at amber — exactly likebelieve_me.How (
src/lint/idris2.rs)holes()matches a?that begins a token (start of line / after whitespace /([{,;=) followed by an identifier — so a hole?goalmatches, but a user operator<?>(with?between symbol chars) does not.strip_strings()blanks double-quoted literals (honouring\") first, so a"?x"inside a string is not a false hole.Verification (actually run)
cargo fmt --check— cleancargo clippy --all-targets -- -D warnings— cleancargo test— 173 pass (+5 idris2 lint units: per-defpartial, hole, hole-in-string ignored,<?>not a hole,totalnot flagged)bash scripts/check-spdx.sh .— OKDogfooded vs real idris2 0.7.0 on a file with
partial loop+f = ?rhs:idris2 --check --source-dir …arghda scan --backend idris2partialand?rhsarghda reason --check --backend idris2Holey→ self=admitted, effective=admitted, evidence"prover: proven; escape-hatch → admitted"— the green exit correctly capped to amberScope
M4 complete. The only remaining roadmap item is M7 (real Echidna HTTP client) — gated on confirming Echidna's API actually exists; if it doesn't, the honest
Unavailablestub stays.🤖 Generated with Claude Code
https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7
Generated by Claude Code