Skip to content

test(claude): wait for complete fixture readiness URLs - #8576

Merged
lidge-jun merged 8 commits into
lidge-jun:devfrom
atinseau:codex/test-keychain-healthz-fixture-lines
Nov 14, 2026
Merged

lidge-jun merged 8 commits into
lidge-jun:devfrom
atinseau:codex/test-keychain-healthz-fixture-lines

Conversation

@atinseau

@atinseau atinseau commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Darwin HTTP regression carried from #8450 into #8569 accepts a readiness marker before its URL is complete. If stdout splits at that point, the test fetches an empty or partial address and fails before exercising the pending Keychain lookup.

Consume newline-terminated lines before parsing the URL, as the other fixture in the file already does. Feed the real child process's stdout through deterministic one-byte chunks to exercise the split marker and URL without depending on OS buffering or sleeps. The fixture still uses a real server and a fake security executable isolated by PATH; no native Keychain is accessed.

Addresses #8569 (comment). Runtime code, child signaling, and the 750 ms health deadline are unchanged. No user documentation update is needed for this test-only fix.

Co-authored-by: lidge-jun [email protected]

Verification

Current-head validation at 86ff98dc91767a016ec739c53552731ed1805c2e after merging dev 873ec9b3b8ddf63f06738748d9132d779abefb42:

  • bun test tests/oauth/claude-keychain-read.test.ts tests/claude-integration/claude-keychain-healthz.test.ts: 29 pass, 0 fail across two files, including all three HTTP cases on this Mac and the unchanged 750 ms health deadline.
  • bun run typecheck: no errors in 2,533 files. bun run privacy:scan, bun run structure:check and git diff --check --cached origin/dev (before this commit): pass.
  • bun test tests/ci-workflows/file-size-ratchet.test.ts: 9 pass, 0 fail.
  • Additional verification after upstream service-orchestration changes: bun test tests/cli/uninstall.test.ts tests/codex-integration/native-profile-healthz.test.ts — 72 pass, 0 fail across two files. The production profile switch uses a real peer-process lock; /healthz answers within 750 ms before releasing it, then switch and auth-file assertions pass.
  • Full local Git comparison confirms all ten watched runtime/test files are byte-identical between 1ba8deed and this new base, including the Claude settings GET route, scanner, credential fence, launchd recovery and production native-profile HTTP regression.
  • The personal patch retains its stable patch ID. Historical red/green at cfaf752c: one-byte stdout chunks make the old parser fail with ERR_INVALID_URL; the complete-line parser passes. That reproduction was not repeated for this base refresh.
  • Resource exception: scoped validation covers this followup on the new base. The shared Mac runs the live proxy; earlier broad runs were costly. The full suite and cross-platform CI were not run locally, and no manual full-CI workflow was dispatched.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed (no user behavior change).
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults (isolated test fixture only).

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.

Ready for review based on the scoped local checks above; this does not claim fresh automated review or upstream CI completion.

@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Nov 11, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • missing_coauthor_credit — This pull request says it reimplements, supersedes, carries, or rebases another author's pull request, but no Co-authored-by trailer names that author. Prose in a commit body is not read by anything; the trailer is what GitHub counts. Add it to the description or a commit, or obtain attribution-approved. Paths: #8569.

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

github-actions Bot commented Nov 11, 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.

@github-actions
github-actions Bot marked this pull request as draft November 11, 2026 23:40
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The macOS integration test now feeds fixture stdout through one-byte chunks. It scans complete newline-delimited lines for the server URL marker and preserves any incomplete line until the next chunk arrives.

Changes: Stdout URL parsing

Layer / File(s) Summary
Fragmented output handling
tests/claude-integration/claude-keychain-healthz.test.ts
The test fragments fixture stdout into one-byte chunks. It scans complete lines for the URL marker and retains the incomplete remainder for the next chunk.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other

Possibly related PRs

Merge Risk: Minimal · up to cfaf7

This change makes a macOS regression test more reliable by waiting for a complete fixture URL before using it. It does not alter runtime behavior, and no actionable merge risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title "test(claude): wait for complete fixture readiness URLs" matches the main change. The raw summary and objectives say the macOS integration test now reads newline-terminated stdout lines and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Full details: Title check

Explanation

The title "test(claude): wait for complete fixture readiness URLs" matches the main change. The raw summary and objectives say the macOS integration test now reads newline-terminated stdout lines and preserves partial lines across byte-sized chunks, so it waits for a complete fixture URL before parsing. The title names the test scope and the readiness-URL fix, and it is specific enough for a teammate scanning history. It omits the byte-level chunking detail, which is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 180ecc7 and cfaf752.

Files selected for processing: 1

  • tests/claude-integration/claude-keychain-healthz.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@github-actions github-actions Bot added review-ready and removed intake: hygiene-blocked Deterministic PR hygiene checks failed labels Nov 11, 2026
@github-actions
github-actions Bot marked this pull request as ready for review November 11, 2026 23:43
@github-actions
github-actions Bot marked this pull request as draft November 12, 2026 10:07
@github-actions
github-actions Bot marked this pull request as ready for review November 12, 2026 10:08
@github-actions
github-actions Bot marked this pull request as draft November 13, 2026 02:07
@github-actions
github-actions Bot marked this pull request as ready for review November 13, 2026 02:08
@github-actions
github-actions Bot marked this pull request as draft November 13, 2026 05:18
@atinseau
atinseau marked this pull request as ready for review November 13, 2026 05:19
@github-actions
github-actions Bot marked this pull request as draft November 13, 2026 08:32
@atinseau
atinseau marked this pull request as ready for review November 13, 2026 08:33
@github-actions
github-actions Bot marked this pull request as draft November 13, 2026 11:36
@atinseau
atinseau marked this pull request as ready for review November 13, 2026 12:13

@Ingwannu Ingwannu left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for exact head 8c757d2dbfe7a1add219c15e5166b622aa0d0926 targeting dev.

The complete one-file test-only diff waits for newline-terminated readiness output before returning the URL, and feeds the real fixture stdout through deterministic one-byte chunks. It retains the isolated fake security executable, original child lifecycle and750ms health deadline. The actual hosted run43418315068 executed both portable pending-metadata HTTP cases successfully; the changed real-security-child case is Darwin-only and was skipped on Ubuntu. The author's current-head macOS29-pass receipt is reported separately, not relabeled as my independent native execution. This approval is source review of the fixture fix plus successful selected CI and the declared author platform validation; it is not new native Keychain/Windows certification.

Fresh Ready/head/review/thread state is clear and the branch is within the policy ancestry limit. Other Cargo workloads occupied the shared local host, so local testing was deferred without overlapping/killing that work or raising limits. Hosted execution and author receipts are identified above. No live service/config/native-account change, scan, new cross-platform dispatch, merge or release was performed.

@github-actions
github-actions Bot marked this pull request as draft November 13, 2026 18:08
@atinseau
atinseau marked this pull request as ready for review November 13, 2026 18:08
@github-actions
github-actions Bot marked this pull request as draft November 14, 2026 00:26
@atinseau
atinseau marked this pull request as ready for review November 14, 2026 00:26
@lidge-jun

Copy link
Copy Markdown
Owner

Maintainer integration into dev (MAINTAINERS.md dev path), recorded by lidge-jun.

Thanks @atinseau.

@lidge-jun
lidge-jun merged commit 64696ca into lidge-jun:dev Nov 14, 2026
34 of 35 checks passed
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.

4 participants