Skip to content

fix(detector): detect while state replay#229

Open
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-while-state-red-313
Open

fix(detector): detect while state replay#229
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-while-state-red-313

Conversation

@prasannakotyal
Copy link
Copy Markdown

KernelGuard-Red-Submission: 313

Adds a narrow LAST_CALL_REPLAY pass for first-call state replay hidden inside a while loop.

The detector requires:

  • a loop in the entrypoint that assigns a state slot from a live input-derived expression
  • a break guard checking the same state slot against None
  • a later return of that same state slot

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/0313_SarahLacard_red-p-143.py is filtered as LAST_CALL_REPLAY

Target red artifact: SarahLacard red 313, while-loop first-call state replay variant.

@prasannakotyal prasannakotyal temporarily deployed to kernelguard-api-control-plane May 2, 2026 17:21 — 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