Skip to content

fix(detector): detect object dict replay#144

Closed
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-147-object-dict-replay
Closed

fix(detector): detect object dict replay#144
prasannakotyal wants to merge 1 commit into
gpu-mode:mainfrom
prasannakotyal:kg-blue-147-object-dict-replay

Conversation

@prasannakotyal

Copy link
Copy Markdown

Summary

Targets KG red #147, where custom_kernel aliases an object instance __dict__, stores the first input-derived output through that dict alias, then returns the alias subscript from an input-independent fast path.

This adds a narrow OBJECT_DICT_REPLAY detector. It requires:

  • a module-level object instance, excluding ModuleType
  • an entrypoint local alias assigned from obj.__dict__ or vars(obj)
  • an input-derived assignment to a subscript of that alias
  • an input-independent guard over the same alias
  • a call-free replay body returning a subscript of that alias

ModuleType dict replay, function vars(...) state, and normal computing paths stay out of scope.

KernelGuard-Red-Submission: 147

Local verification

  • red_27_object_dict_replay -> OBJECT_DICT_REPLAY, should_filter=True
  • red_56_vars_box_replay -> OBJECT_DICT_REPLAY, should_filter=True
  • red_121_namespace_dict_replay -> OBJECT_DICT_REPLAY, should_filter=True
  • red_144_module_dict_replay stayed valid
  • red_214_vars_function_setdefault_replay stayed valid
  • clean fixtures in eval_blue_patch.py stayed valid
  • uv run python -m py_compile kernelguard.py

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