Skip to content

test(claude): guard healthz during pending Keychain probes - #8450

Closed
atinseau wants to merge 1 commit into
lidge-jun:codex/fix-8161-keychain-no-killfrom
atinseau:codex/test-claude-keychain-healthz
Closed

atinseau wants to merge 1 commit into
lidge-jun:codex/fix-8161-keychain-no-killfrom
atinseau:codex/test-claude-keychain-healthz

Conversation

@atinseau

@atinseau atinseau commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The motivating macOS incident had successful inference while local /healthz responses took 0.9–6 seconds and quota CLI commands reported that the proxy was not running. Profiling identified synchronous security find-generic-password in the Claude settings GET handler. Increasing the CLI probe deadline did not address that serving-thread blockage. The production fix is already carried by the parent PR rather than duplicated here.

Verification

Bun 1.4.4 on macOS:

  • bun test tests/claude-integration/claude-management-api.test.ts tests/claude-integration/claude-auth-detect.test.ts tests/oauth/claude-keychain.test.ts — 95 passed, 0 failed, including both new HTTP cases.
  • bun scripts/test.ts --changed=HEAD --parallel=1 — 61 passed, 0 failed; run before committing, while HEAD was the parent tip fcd8755932f867180fafec9b93afea38be22829d and the regression test was the only working-tree change.
  • bun run typecheck — passed, no errors in 2,337 files.
  • bun run privacy:scan — passed.
  • bun run structure:check — passed.
  • bun test tests/test-layout.test.ts tests/ci-workflows/file-size-ratchet.test.ts — passed.
  • Negative control: temporarily inserted a six-second synchronous wait into the real Keychain service's probe implementation. The new absent-item HTTP case failed on its independent /healthz request deadline. Restored the production source afterwards; this PR changes no runtime files.

The full suite was not run: this is a test-only stacked change on a shared Mac with concurrent workloads. Focused HTTP/authentication/Keychain coverage, changed-test selection, typechecking and repository guards were run instead. Broader parent validation and Linux/Windows execution remain for the parent PR and CI. No workflow dispatch was requested.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. This test-only child changes no runtime contract; the fix and documentation are in Bound Claude Keychain waits without terminating security #8337.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. Independent security review of the parent authentication change remains pending.

This is a stacked child of the still-draft #8337. Retarget to dev after the parent lands; keep the parent's independent technical/security review separate from this regression coverage.

Review readiness checklist

  • Required local validation passed; commands, results, and any full-suite exception are documented.
  • This stacked child includes the current head of its open parent Bound Claude Keychain waits without terminating security #8337; retarget to dev after the parent lands.
  • No unresolved Codex or CodeRabbit findings exist on the current head; automated review has not run yet.
  • My PR is ready for review.

Review is requested for this test-only stacked child on the current #8337 head. The upstream stacked-base exception applies; this does not claim the parent is up to date with dev. The parent’s integration and independent security review remain prerequisites to landing. The test workflow awaits maintainer approval; no jobs have started.

Ready for technical review at the author’s explicit request. Automated review is requested by leaving draft; this is not an attestation of completed maintainer/security review or passing GitHub CI. All merge requirements remain in force.

@coderabbitai

coderabbitai Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review: 2

  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

✅ READY

  • all PR quality gates passed; the review readiness checklist is complete.

Review readiness checklist

  • ✅ Required local validation passed; commands, results, and any full-suite exception are documented.
  • ✅ I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
  • ✅ I resolved all correct Codex and CodeRabbit findings.
  • ✅ My PR is ready for review.

✅ 4/4 boxes ticked.

This pull request is already Ready for Review.
The review-ready label marks this PR as ready; review automation runs independently.
Maintainers notified: @lidge-jun @Ingwannu

Hygiene

✅ Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner

Thank you — this HTTP regression is carried into #8569 (merged as 180ecc7), ported to the new async probe API in tests/claude-integration/claude-keychain-healthz.test.ts: a real server in a separate process holds a Keychain observation open during GET /api/claude-code and requires /healthz to answer within 750 ms, and the child receives no signal. Closing because its stacked base #8337 was superseded.

Co-authored-by: seedds [email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance, CI, tests, refactors, or build changes (not a user-facing bug or feature). review-ready

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants