Skip to content

fix(detector): detect namedexpr state replay#227

Open
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-namedexpr-state-red-263
Open

fix(detector): detect namedexpr state replay#227
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-namedexpr-state-red-263

Conversation

@prasannakotyal
Copy link
Copy Markdown

KernelGuard-Red-Submission: 263

Adds a narrow LAST_CALL_REPLAY pass for assignment-expression aliases of replay state.

The detector requires:

  • an entrypoint if test containing a named expression like (_x := _STATE)
  • the else branch returning the alias
  • the if body assigning the original state from a live input-derived expression
  • the if body returning that same state

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

Target red artifact: SarahLacard red 263, assignment-expression guard variant.

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