Skip to content

fix(sleep): refuse uncontrolled Claude OAuth replays - #336

Open
Daniel Peng (original4422) wants to merge 1 commit into
microsoft:mainfrom
original4422:fix/oauth-context-contamination
Open

Daniel Peng (original4422) wants to merge 1 commit into
microsoft:mainfrom
original4422:fix/oauth-context-contamination

Conversation

@original4422

Copy link
Copy Markdown

Summary

Claude Code subscription/OAuth replay cannot use --bare, so user-level instructions and hooks may enter SkillOpt evaluations and invalidate baseline/candidate measurements. Refuse Claude replay without an explicit ANTHROPIC_API_KEY, always use --bare when allowed, and propagate the refusal as a cycle-level failure instead of a scored row. Document the limitation.

The deterministic tests use fake CLI calls and a harmless test-key marker. No real Claude home, hooks, credentials, or live authentication were accessed.

Closes #335

Validation

  • python -m pytest -q (1,990 passed, 24 skipped, 4 xfailed; 381 subtests passed)
  • python -m mkdocs build --strict
  • git diff --check

This branch has not been deployed

No deployments
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.

Sleep: on Claude subscription auth the replay runs with full user context, so every score is contaminated

1 participant