Skip to content

CI rehearsal only (do not merge) - #22

Open
michael-moffett wants to merge 6 commits into
mainfrom
pay-kit-108-python-allowlist-generator-a2-next
Open

michael-moffett wants to merge 6 commits into
mainfrom
pay-kit-108-python-allowlist-generator-a2-next

Conversation

@michael-moffett

Copy link
Copy Markdown
Member

Fork CI only. Do not merge.

An opt-in pytest module that builds N negative cases for `_validate_instruction_allowlist` from a fixed seed and checks that every case is refused.

pay-kit item 2, in the shape the maintainer set: a pinned-seed table generator with no new dependency, kept out of default CI.
… python/tests/allowlist_generator.py, run opt-in via `just allowlist-gen`
@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Low risk] Adds optional test infrastructure for instruction allowlist validation.

No blocking code issues were found, but the author explicitly marked this CI rehearsal “Do not merge.”

Findings

  1. P2 Token drains go untested ▶

Summary

Adds a repeatable, opt-in Python instruction-allowlist test generator, a just allowlist-gen command, usage notes, and greptile.json review context.

  • No actionable issues found.
  • Production payment code is unchanged.
  • Tests were not executed.
  • michael-moffett explicitly described this as “Fork CI only. Do not merge.” The generator’s exclusion from default CI is documented as intentional.

Reviews (2) · Last reviewed commit: "greptile.json: review on request only" · Reviewed by Greptile

Comment thread python/tests/allowlist_generator.py Outdated
Comment on lines +124 to +127
def _drain(rng: random.Random) -> _Built:
base = _base(rng, *SPONSORED_SOL)
lamports = rng.choice((base.amount, base.amount - 1, base.amount + 1, 0, 2**64 - 1))
return base, [_sol_transfer(base.fee_payer.pubkey(), base.recipient, lamports)]

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 Token drains go untested

_drain only builds SOL transfers, and BASES omits sponsored USDC. The new randomized suite therefore never checks a token payment authorized by the fee payer or funded from its token account. Existing fixed tests cover these checks, but the generator adds no coverage to that path. Add sponsored-USDC drain cases and a matching valid-payment control.

@greptile-apps greptile-apps 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.

Your organization has used all 50 credits included in the free plan this billing period. To keep receiving reviews, upgrade your plan.

@michael-moffett

Copy link
Copy Markdown
Member Author

@greptileai

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