Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ The core module is `kernelguard.py`, which can:

- `kernelguard.py`
Main detector and audit tool.
- `kernelguard_api.py`
HTTP API for the competition (kernels, validation suites, red/blue submissions).
- `kernelguard_mcp.py`
MCP server exposing `analyze_code` to MCP clients.

## Install

Expand Down
6 changes: 5 additions & 1 deletion kernelguard.py
Original file line number Diff line number Diff line change
Expand Up @@ -2161,7 +2161,11 @@ def _is_data_ptr_call(expr: ast.AST | None) -> bool:


def detect_last_call_replay(code: str | SubmissionFacts) -> list[dict]:
"""Pattern: saved-output replay when prior call signature matches current state."""
"""Pattern: saved-output replay when prior call signature matches current state.

Covers identity-keyed (``data is _LAST``), pointer/version-signature
(``data.data_ptr() == _LAST_PTR``), and tuple-of-input replay shapes.
"""
facts = ensure_submission_facts(code)
tree = facts.ast_tree
if tree is None:
Expand Down