Skip to content

Merge main PR #266 into dev/compat: bounded log sinks and test home isolation - #267

Merged
onlyfeng merged 5 commits into
dev/compatfrom
fix/compat-log-stall-and-test-home
Nov 22, 2026
Merged

onlyfeng merged 5 commits into
dev/compatfrom
fix/compat-log-stall-and-test-home

Conversation

@onlyfeng

Copy link
Copy Markdown
Owner

Summary

Propagates main PR #266 (36b51001) into dev/compat:

  • FC-054: a log sink write, open or close that stops answering cannot hold the log queue.
  • FC-008: the test preload points os.homedir() at the isolated home, and the first log-queue stall per process is reported.
  • The race fix for the full-context MCP frozen-schema tests.

DC-SESSION-001 lists test/preload.ts as a harness surface. Its ProcessLiveness.release() teardown before the data directory is removed is unchanged, and a dated review note is added to the compat registry.

Validation

  • packages/cli typecheck passes.
  • Local runs with the pinned Bun 1.3.14 pass: the session-owner suites, log.test.ts and fixture-root.test.ts (27/27), plus the logger, fixture-root, prompt-skill-command-multi, stream-error-log and compat-capture suites and the full-context MCP prompt-effect cases (37 + 7).
  • test is dispatched with windows_runtime=true, since the preload and file-stream behavior differ on Windows.

🤖 Generated with Claude Code

onlyfeng and others added 5 commits November 22, 2026 14:21
…not hold the queue

On Linux CI a log write's callback never arrived; every later record,
flush, Log.init and Log.shutdown queued behind it (FC-008 isolated the
bus-integration trigger, but the mechanism inside Bun's file stream is
unknown and production shutdown waits on the same queue). A write, open
or close that has not settled within writeTimeout (5 s, Log.init option)
now stops holding the queue: a stalled write abandons its stream and keeps
appending to the same file through a new one; a stalled close destroys
the stream. Recorded as FC-054.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bun caches os.homedir() at process start, so the preload's HOME never
reached the ~30 production call sites that use it; instruction.ts put the
developer's real ~/.claude/CLAUDE.md into test system prompts. The
preload now points os.homedir() at the isolated home (FC-008), and
fixture-root.test.ts fails without it.

That change shifted timing in the full-context MCP frozen-schema cases:
the parent session's title request raced the actor for the scripted tool
call. An explicit title removes the race (it also failed on main ~1 in 3).

The bounded flush in test/lib/effect.ts now reports the first stall per
process (a ::warning:: annotation in Actions) instead of showing only as
later tests running a second slower.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Append dated follow-ups to the 2026-11-13, -16, -18, -19 and -21 records:
their CI acceptance was established on 2026-11-22, and the cases they
called pre-existing that were regressions from 2026-11-13 are named.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix(log)/test: bound stalled log sinks (FC-054) and isolate os.homedir() in tests
… isolation

Inherit FC-054 (a log write, open or close that stops answering cannot
hold the log queue) and FC-008's os.homedir() isolation and stall
warning. DC-SESSION-001's preload teardown (release() before the data
directory is removed) is unchanged; its session-owner suites pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T06:33:49.661597Z d52bfc2 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@onlyfeng
onlyfeng merged commit 5ab39e4 into dev/compat Nov 22, 2026
21 checks passed
@onlyfeng
onlyfeng deleted the fix/compat-log-stall-and-test-home branch November 22, 2026 06:42
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.

1 participant