Skip to content

docs: verification procedure for the REMEMBER_OAUTH_TOKEN fallback - #217

Merged
fdaviddpt merged 1 commit into
mainfrom
docs/197-oauth-verification
Jul 29, 2026
Merged

fdaviddpt merged 1 commit into
mainfrom
docs/197-oauth-verification

Conversation

@fdaviddpt

Copy link
Copy Markdown
Contributor

What

Adds docs/verification.md, a manual runbook for verifying the REMEMBER_OAUTH_TOKEN fallback in pipeline/haiku.py's call_haiku.

Why

The fallback exists for one condition: the Claude Code desktop / Agent-SDK host redacting CLAUDE_CODE_OAUTH_TOKEN from a spawned subprocess. CI never runs under that host, so this path cannot be covered automatically and will not be — the suite proves the precedence order, not that auth actually recovers on a machine that withholds the token. The only evidence it works today is one manual run reported in a comment on #179. That evidence belonged in the repo as a procedure, not scrolling out of a comment thread.

What's in it

Written directly against the current code (_child_env, _looks_like_token, _accept_token, _config_candidates), not a paraphrase of the issue:

  1. Preconditions — a real claude setup-token value, in REMEMBER_OAUTH_TOKEN or haiku.oauth_token in config.json.
  2. Confirm the negative precondition first — CLAUDE_CODE_OAUTH_TOKEN really is absent from the child env before anything else; otherwise the fallback never engages and a "pass" proves nothing.
  3. The positive assertion — call_haiku authenticates, nested claude -p returns is_skip=False.
  4. The negative case — a malformed/too-short token produces the warning with source and length, and never the value (fix(haiku): report a refused OAuth token instead of dropping it in silence #184).
  5. What to record — OS, Python version, package version (.claude-plugin/plugin.json), and date, plus a log table so staleness is visible at a glance. Seeded with the fix(haiku): read persisted OAuth token from the Windows registry when the host redacts it #179 run as the first entry.

Also states when it must be re-run: any change to auth resolution in call_haiku — precedence order, _looks_like_token, or the config layer feeding it.

Linked from the REMEMBER_OAUTH_TOKEN / haiku.oauth_token rows in README.md. CHANGELOG.md gets an ## [Unreleased] / ### Documentation entry (no prior Unreleased section existed).

No production code changes.

Test plan

Closes #197

The condition this fallback exists for — the Claude Code desktop/Agent-SDK
host redacting CLAUDE_CODE_OAUTH_TOKEN from a spawned subprocess — cannot
occur in CI, so the only evidence it works was a manual run reported in a
comment on #179. This writes that procedure down: confirming the negative
precondition, the positive assertion, the malformed-token case (#184), and
what to record so a reader can judge staleness.

Closes #197
@fdaviddpt
fdaviddpt merged commit fddd466 into main Jul 29, 2026
12 checks passed
@fdaviddpt
fdaviddpt deleted the docs/197-oauth-verification branch July 29, 2026 13:12
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.

docs: written verification procedure for the OAuth token fallback path

2 participants