Skip to content

audit: add CI sync checks for internalFunctionPrefix and special entrypoints#674

Merged
Th0rgal merged 1 commit into
mainfrom
audit/sync-prefix-and-entrypoints
Feb 22, 2026
Merged

audit: add CI sync checks for internalFunctionPrefix and special entrypoints#674
Th0rgal merged 1 commit into
mainfrom
audit/sync-prefix-and-entrypoints

Conversation

@Th0rgal
Copy link
Copy Markdown
Member

@Th0rgal Th0rgal commented Feb 22, 2026

Summary

Why this matters

If someone adds a new special entrypoint to the Lean code (e.g., for a new interop feature) without updating the Python CI script, the collision check would use stale data — silently missing real Yul namespace collisions. Same for the internal function prefix.

What changed

File Change
scripts/check_selectors.py New check_internal_prefix_sync() and check_special_entrypoints_sync()
AUDIT.md Updated CI validation description

Test plan

  • check_selectors.py passes locally (includes both new sync checks)
  • Full CI (Lean build + Foundry tests)

🤖 Generated with Claude Code


Note

Low Risk
CI/documentation-only changes that add extra consistency checks; no production compiler logic is modified, with minimal risk aside from potential false negatives if the Lean parsing regex is too strict.

Overview
Strengthens the selector CI suite by adding two new validations in scripts/check_selectors.py that fail CI if the Python constants diverge from Lean.

The script now checks that _INTERNAL_FUNCTION_PREFIX matches ContractSpec.internalFunctionPrefix, and that _SPECIAL_ENTRYPOINTS matches the list used by ContractSpec.isInteropEntrypointName (e.g., fallback/receive). AUDIT.md is updated to document these additional CI guarantees.

Written by Cursor Bugbot for commit efdf8db. This will update automatically on new commits. Configure here.

…ypoints

check_selectors.py hardcodes _INTERNAL_FUNCTION_PREFIX ("internal_")
and _SPECIAL_ENTRYPOINTS ({"fallback", "receive"}) used in collision
and filtering checks.  These were validated only by code comments
saying "Must match ContractSpec.lean" — no automated enforcement.

Add checks #10 and #11 that regex-extract the canonical Lean
definitions and validate both Python constants match, following
the same pattern as checks #7–9.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
dumbcontracts Ready Ready Preview, Comment Feb 22, 2026 3:43am

Request Review

@Th0rgal Th0rgal merged commit 7b4148d into main Feb 22, 2026
23 checks passed
@Th0rgal Th0rgal deleted the audit/sync-prefix-and-entrypoints branch February 22, 2026 03:46
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