Skip to content

fix(detector): detect generator send replay#225

Open
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-generator-send-red-86
Open

fix(detector): detect generator send replay#225
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-generator-send-red-86

Conversation

@prasannakotyal
Copy link
Copy Markdown

KernelGuard-Red-Submission: 86

Adds a narrow LAST_CALL_REPLAY pass for generator .send() state machines that replay the prior output on object-identity match.

The detector requires:

  • a generator function that receives a live value through yield assignment
  • an identity guard comparing that yielded value to saved state
  • a fast-path yield of saved output
  • an else update of saved output from the yielded value
  • the custom_kernel entrypoint sending its live input into a generator

Local validation:

  • UV_CACHE_DIR=/tmp/uvcache uv run python -m py_compile competition_state/kernelguard_mirror/kernelguard.py
  • UV_CACHE_DIR=/tmp/uvcache uv run python kernelguard_bypasses/eval_blue_patch.py competition_state/kernelguard_mirror/kernelguard.py
  • target artifact /tmp/kg_external_reds/0086_SarahLacard_red-gensend-2026-05-01.py is filtered as LAST_CALL_REPLAY

Target red artifact: SarahLacard red 86, generator .send() state machine.

@prasannakotyal prasannakotyal temporarily deployed to kernelguard-api-control-plane May 2, 2026 17:16 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 2, 2026

KernelGuard Blue Evaluation

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