Skip to content

fix(detector): detect decorator wrapper replay#231

Open
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-decorator-wrapper-red-277
Open

fix(detector): detect decorator wrapper replay#231
prasannakotyal wants to merge 1 commit intoSinatrasC:mainfrom
prasannakotyal:kg-blue-decorator-wrapper-red-277

Conversation

@prasannakotyal
Copy link
Copy Markdown

KernelGuard-Red-Submission: 277

Adds a narrow LAST_CALL_REPLAY pass for decorators that wrap custom_kernel with a closure cache.

The detector requires:

  • custom_kernel decorated by a locally defined decorator
  • a nested wrapper in that decorator
  • a fast path returning a cached slot
  • a later assignment of the same cached slot from a call to the wrapped function using the wrapper input
  • a return of that same cached slot after storage

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

Target red artifact: SarahLacard red 277, decorator wrapper replay variant.

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