Skip to content

ArghDA M4 follow-on: Idris2 totality-hole + partial lint (M4 → 100%)#48

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/arghda-roadmap-planning-p5mu93
Jul 1, 2026
Merged

ArghDA M4 follow-on: Idris2 totality-hole + partial lint (M4 → 100%)#48
hyperpolymath merged 1 commit into
mainfrom
claude/arghda-roadmap-planning-p5mu93

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

The Idris2 escape-hatch lint now flags the two remaining totality opt-outs, closing M4 (→ 100%):

  • 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.

How (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 — clean
  • cargo clippy --all-targets -- -D warnings — clean
  • cargo test173 pass (+5 idris2 lint units: per-def partial, hole, hole-in-string ignored, <?> not a hole, total not flagged)
  • bash scripts/check-spdx.sh . — OK

Dogfooded vs real idris2 0.7.0 on a file with partial loop + f = ?rhs:

step result
idris2 --check --source-dir … exits 0 — the silent-failure class
arghda scan --backend idris2 flags both partial and ?rhs
arghda reason --check --backend idris2 Holey → self=admitted, effective=admitted, evidence "prover: proven; escape-hatch → admitted" — the green exit correctly capped to amber

Scope

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 Unavailable stub stays.

🤖 Generated with Claude Code

https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7


Generated by Claude Code

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
hyperpolymath marked this pull request as ready for review July 1, 2026 20:39
@hyperpolymath
hyperpolymath merged commit bd7bb5f into main Jul 1, 2026
3 checks passed
@hyperpolymath
hyperpolymath deleted the claude/arghda-roadmap-planning-p5mu93 branch July 1, 2026 20:40
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.

2 participants