Skip to content

fix(ci): close the partial/covering escape; a failed rev-parse fails the Agda receipt - #520

Merged
hyperpolymath merged 2 commits into
mainfrom
claude/new-session-th4e9w-totality-gates
Nov 17, 2026
Merged

hyperpolymath merged 2 commits into
mainfrom
claude/new-session-th4e9w-totality-gates

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

Summary

This follows up on #509 and #510, both already merged. An independent review of that batch raised two gaps, and this PR closes them.

Changes

  • dogfood-proofs-ci.yml (verif-idris gate from fix(proofs): NatLte declares %default total, and CI requires it of every module #509). The gate only checked that %default total is present. A later partial or covering annotation, or a %default partial|covering, switches the totality check off again, and the package still builds. Idris 2 defaults to covering, and under covering bad : Void; bad = bad type-checks. The gate now rejects both forms.
  • idris2-abi-ci.yml. A new step applies the same ban to src/abi/. It runs on every event, because it is cheap.
  • scripts/ci/check-agda.sh (from fix(ci): the Agda receipt names the commit that was actually checked #510). git rev-parse HEAD ran inside echo's arguments, where a failure escapes set -e. The receipt would then name an empty commit and the script would still pass. The commit is now read on its own line.

Not in this PR: requiring %default total in every src/abi/ module. That waits for #513, which moves the one module that lacks it (NeSyAssistTesting.idr) out of src/abi/.

RSR Quality Checklist

Required

  • Tests pass: both new gates were run against the current tree and against a broken copy (see Testing).
  • Code is formatted: no Rust changed.
  • Linter is clean: actionlint was not available in this session. The repo's Workflow Security Linter runs on this PR.
  • No banned language patterns
  • No unsafe blocks without // SAFETY: comments: not applicable.
  • No banned functions
  • SPDX license headers present: no new files.
  • No secrets, credentials, or .env files included

Testing

  • verif-idris step: extracted with yq and run on the current tree, exit 0. On a scratch corpus where B.idr has a covering line, it prints ::error file=…B.idr::module declares a partial or covering definition or default and exits 1.
  • src/abi step: run on the current tree, exit 0. On a scratch src/abi/X.idr with a partial line, it prints the error and exits 1.
  • check-agda.sh: bash -n passes. The changed line was not exercised in this session: Agda is not installed here.

Generated by Claude Code

…the Agda receipt

The verif-idris gate (#509) checked only that each module declares
`%default total`. A later `partial` or `covering` annotation, or a
`%default partial|covering`, turns the totality check off again, and the
package still builds. Idris 2 defaults to covering, under which
`bad : Void; bad = bad` checks. The gate now rejects both forms. A new
step in idris2-abi-ci.yml does the same for src/abi/. Both were tested
against the current tree (pass) and against a module with a `covering`
or `partial` line (error, exit 1).

scripts/ci/check-agda.sh ran `git rev-parse HEAD` inside echo's
arguments, where a failure escapes `set -e`. The receipt then named an
empty commit and the script passed. The commit is now read on its own
line.

Requiring `%default total` in every src/abi/ module waits for #513,
which moves the one module that lacks it out of src/abi/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3
It belongs to the separate coprocessor-tags change and was swept in by
mistake. Nothing on this branch calls it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019a95kk88TZ1iegsBK3kox3
@sonarqubecloud

Copy link
Copy Markdown

Repository owner deleted a comment from coderabbitai Bot Nov 17, 2026
@hyperpolymath
hyperpolymath marked this pull request as ready for review November 17, 2026 00:51
@hyperpolymath
hyperpolymath enabled auto-merge (squash) November 17, 2026 00:51
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-17T00:56:25.990819Z cd52c7b Draft marked ready
🔒 Security Review ❌ Failed 2026-11-17T00:51:07.692073Z
We couldn’t complete this review. Comment @codex security review to try again.
cd52c7b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins.

@coderabbitai

coderabbitai Bot commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 44 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 3f5e9384-ee72-43b6-be15-44209abae2a8
Commits

Reviewing files that changed from the base of the PR and between 4779be0 and cd52c7b.

Files selected for processing: 3

  • .github/workflows/dogfood-proofs-ci.yml
  • .github/workflows/idris2-abi-ci.yml
  • scripts/ci/check-agda.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@hyperpolymath
hyperpolymath merged commit d70fc7b into main Nov 17, 2026
79 checks passed
@hyperpolymath
hyperpolymath deleted the claude/new-session-th4e9w-totality-gates branch November 17, 2026 00:52

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cd52c7b04d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# A `partial` or `covering` annotation, or a later `%default partial` or
# `%default covering`, switches the check off again (Idris 2 defaults to
# covering, under which `bad : Void; bad = bad` checks).
if grep -nE '^[[:space:]]*(partial|covering)\b|^%default[[:space:]]+(partial|covering)\b' "$f"; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Match indented %default escape directives

When %default partial or %default covering is nested under an indented construct such as namespace N, the second regex alternative does not match because it requires %default at column zero. A module can therefore retain the required top-level %default total, add %default partial before a divergent definition, and still pass this gate; the identical regex in .github/workflows/idris2-abi-ci.yml has the same bypass. Allow leading whitespace before %default in both checks.

Useful? React with 👍 / 👎.

# what follows and the package still builds. Runs on every event: cheap.
run: |
set -euo pipefail
hits=$({ grep -rnE '^[[:space:]]*(partial|covering)\b|^%default[[:space:]]+(partial|covering)\b' src/abi/ --include="*.idr" || true; })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Ignore comments when scanning totality modifiers

Because this grep scans raw source, a valid Idris block comment containing a line whose prose begins with partial or covering is treated as a declaration and fails the job even though the compiler ignores it. The dogfood workflow's identical scan has the same false positive, so harmless documentation changes can block both checks; strip Idris comments before matching or use a syntax-aware check.

Useful? React with 👍 / 👎.

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.

3 participants