Skip to content

testsuite: correct stale command-execution and exit-code docstrings - #145

Merged
mfornet merged 1 commit into
mainfrom
claude/fix-testsuite-docstrings
Jul 14, 2026
Merged

testsuite: correct stale command-execution and exit-code docstrings#145
mfornet merged 1 commit into
mainfrom
claude/fix-testsuite-docstrings

Conversation

@mfornet

@mfornet mfornet commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Follow-up to #130. That PR set out to fix stale testsuite docstrings but left three inaccuracies in the Interpreter/Testsuite.lean module docstring (and, in one case, partially introduced an inconsistency by only half-updating a sentence). This is a comment-only change — no behaviour change.

Fixes

  1. Incomplete "executed" list. The docstring claimed "Only module, assert_return, assert_trap, and action are executed". But register is executed (it records a binding — the testsuite: fix stale help/docstring text, drop dead helper #130 commit message itself says so; Exec.lean:746) and so is assert_exception (Exec.lean:804). Both are now listed.

  2. assert_invalid/assert_malformed mislabelled as skipped. They were listed under "reported as Skipped(<kind>)", but they are executed: we decode + statically validate the module, record Pass on correct rejection, and Skipped(<kind>: not rejected) only when we wrongly accept it (Exec.lean:826-836). This also aligns the top-of-file docstring with the skippedBucket comment that testsuite: fix stale help/docstring text, drop dead helper #130 added lower in the same file.

  3. Exit-code claim ignored the setup-failure path. "Exit code: nonzero iff any Fail, InterpreterError, or OutOfFuel outcome was recorded" omitted the exit-code-3 paths (bad arguments, unreadable testsuite dir, no matching files, temp-dir creation failure). Both codes are now spelled out.

Verification

Comment-only edit confined to the existing /-! … -/ docstring block; delimiters untouched. Local oleans are stale from the v4.32.0 toolchain bump (#144), so a full local rebuild would rebuild Mathlib — disproportionate for a docstring change; CI will build it.

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Verifier report preview: https://talos-verifier-report-pr-145.vercel.app

(This URL is stable for this PR — it always points to the latest build of f800259.)

Follow-up to #130, fixing docstring inaccuracies that the same cleanup
left in place. Behaviour unchanged — comments only.

- The module docstring claimed "Only `module`, `assert_return`,
  `assert_trap`, and `action` are executed". `register` (executed since
  it records a binding) and `assert_exception` are also executed; list
  them.
- It listed `assert_invalid`/`assert_malformed` under "reported as
  `Skipped(<kind>)`", but those are executed: we decode and validate the
  module, `Pass` on correct rejection, and `Skipped(<kind>: not rejected)`
  only on wrongful acceptance. This also matches the `skippedBucket`
  comment #130 added.
- The "Exit code: nonzero iff any `Fail`/`InterpreterError`/`OutOfFuel`"
  line ignored the exit-code-3 setup-failure paths (bad args, unreadable
  testsuite dir, no matching files, temp-dir failure). Spell out both
  codes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mfornet
mfornet force-pushed the claude/fix-testsuite-docstrings branch from 769a647 to f800259 Compare July 14, 2026 12:26
@mfornet
mfornet merged commit e9f4ec4 into main Jul 14, 2026
5 checks passed
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.

1 participant