Skip to content

fix(detector): detect nonlocal value replay#156

Closed
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-200-nonlocal-value-replay
Closed

fix(detector): detect nonlocal value replay#156
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-200-nonlocal-value-replay

Conversation

@prasannakotyal

Copy link
Copy Markdown

KernelGuard-Red-Submission: 200

Adds NONLOCAL_VALUE_REPLAY for factory-built entrypoints that replay a saved output through a nonlocal closure slot. The detector requires:

  • custom_kernel assigned from a local factory call
  • the factory returns an inner function
  • the inner function declares a nonlocal slot initialized to None in the factory
  • an input-independent guard returns that slot without compute calls
  • the same nonlocal slot is assigned from input-derived data elsewhere in the inner function

Local verification:

  • red_87_nonlocal_value_replay.py -> hacked, NONLOCAL_VALUE_REPLAY
  • red_85_lambda_default_replay.py -> valid
  • red_88_bound_method_default_replay.py -> valid
  • red_89_callable_default_replay.py -> valid
  • clean fixtures -> valid
  • python -m py_compile kernelguard.py

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

@SinatrasC SinatrasC closed this Jun 20, 2026
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