Skip to content

test(withdraw): check the parse context by behavior, not source text - #457

Open
astrovm wants to merge 1 commit into
mainfrom
test/withdraw-parse-context
Open

astrovm wants to merge 1 commit into
mainfrom
test/withdraw-parse-context

Conversation

@astrovm

@astrovm astrovm commented Nov 29, 2026 •

Copy link
Copy Markdown
Member

The weekly mutation run failed on 2026-11-21 in part 4 (run). Stryker's dry run stopped because tests/withdraw.sol.parsing.test.ts failed: that test read src/bot.ts as text and searched for a line of code. Stryker rewrites src/bot.ts with its instrumentation, so the line is gone and the test fails. Part 4 mutates src/bot.ts, so every fourth week the run fails and reports nothing for that part.

What changed

  1. tests/withdraw.sol.parsing.test.ts: removed. It checked source text, not behavior.
  2. tests/bot-commands.flows.test.ts: parseAmount in the fake token manager is now a mock. "sends SOL amounts natively" checks that /withdraw <address> 2 SOL reads the amount with the "tip" context, the same thing the old test checked.

Done when

  • tests/bot-commands.flows.test.ts passes (25 tests) and bun run typecheck passes, in a container.
  • The new check fails when src/bot.ts passes "game" instead of "tip" (tried locally).
  • CI passes.
  • Agent review: one Sonnet review after CI passed (Room 0). See Review.

Part of Issue #451 (the weekly report), which stays open.

Review

  1. No findings. The reviewer checked that the new assertion covers everything the removed test checked: the "tip" context, the argument index, the chat id, and the argument list. It is stronger than the removed source-text test. No other file used the removed test.

@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
🔒 Security Review ✅ Completed 2026-11-29T00:51:59.362106Z ccad4e9 PR opened
ℹ️ 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.

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