Skip to content

fix(detector): detect replay from mutated captured subscripts#172

Closed
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-248-subscript-mutated-capture
Closed

fix(detector): detect replay from mutated captured subscripts#172
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-248-subscript-mutated-capture

Conversation

@prasannakotyal

Copy link
Copy Markdown

KernelGuard-Red-Submission: 248

Adds a fourth LAST_CALL_REPLAY pass for state-only fast paths that return a subscripted value rooted on captured state mutated by the entrypoint.

The pass requires:

  • the fast-path if-body to contain no real compute calls
  • the guard to avoid input-parameter references
  • the returned value to be a Subscript rooted on a mutated capture, directly or through a local loaded from that subscript
  • the capture to be mutated by subscript/attribute assignment, AugAssign, global assignment, or a known mutating method call

Local validation:

  • uv run python -m py_compile kernelguard.py
  • uv run python /home/nino/repos/paradigma/kernelguard_bypasses/eval_blue_patch.py /home/nino/repos/paradigma/competition_state/kernelguard_mirror/kernelguard.py

Target red fixture: red_123_userdict_data_replay.py

@prasannakotyal prasannakotyal temporarily deployed to kernelguard-api-control-plane May 2, 2026 14:12 — with GitHub Actions Inactive
@github-actions

github-actions Bot commented May 2, 2026

Copy link
Copy Markdown

KernelGuard Blue Evaluation

@SinatrasC

Copy link
Copy Markdown
Collaborator

Thanks for the KernelGuard Flywheel Campaign contribution. This PR is now superseded by the consolidated rule-family implementation in #273, which folds this detector coverage together with the related passing-eval variants.

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.

2 participants