Repository navigation
Fix the room-collaboration fixture check under a symlinked temp directory - #315
Conversation
Node matches --allow-fs-read against the literal flag path while the ESM loader realpaths module paths, so macOS /var -> /private/var denied every read in the fixture checks. Allow the realpath instead. A new test reaches the fixture through an explicit symlink so Linux fails without the fix too. Fixes #314
Birfy
left a comment
There was a problem hiding this comment.
The fix itself looks right (allow realpathSync(directory) so Node's literal --allow-fs-read match agrees with the ESM loader's realpath), and the explicit-symlink test makes it reproducible on Linux. CI is red only because of the arch-docs gate: core/dev/room-collaboration/fixture.mjs is owned by ds-bot-core, so either add a line to docs/subsystems/ds-bot-core.md or put a Docs-not-needed: <reason> trailer on the commit. Heads-up: #319 (queued now) also edits core/test/room-collaboration.test.js (parameterised start() + tests appended at the end), so a rebase on main after it lands will probably be needed. Happy to enqueue once it's green.
…lowLab#319) Fixes ThinkFlowLab#318. Refs ThinkFlowLab#198 (acceptance box "终止/离开的房间不得继续触发工作" had zero coverage). Test-only; no behavior change. Two new fixture tests on the existing `start()` harness (now parameterized by member list): 1. Delete the room while the Writer is mid-work (`working`, round moved on) → its late completion produces no followup, the relay for the deleted room answers `Not a group chat` and dispatches nothing. 2. Remove the Writer mid-work (leaving Chief + Observer) → its late completion neither posts into the room log nor nudges the room; `lateRounds` stays 0. Mutation-checked before writing the PR: the containment is two-layered (event ingress ignores unlinked sessions in `turns.js`; `lateRoomReply`/`lateRoomFailure` re-check room and membership). Removing either layer alone still passes (defense in depth works); removing both makes both new tests fail. `core/` + regenerated `patches/` committed together. What I ran at tip `03af78e`: the room-collaboration suite (new tests pass; the 3 pre-existing tests fail on macOS only, tmpdir-symlink bug fixed in ThinkFlowLab#315, CI Linux unaffected) and full `TZ=UTC npm run verify` — same 3 known macOS failures, all else green. What I did not run: smoke test and bench (no production-code change).
…sions (ThinkFlowLab#317) Fixes ThinkFlowLab#316. Refs ThinkFlowLab#198 (first P0 box: align this issue, the pilot doc and the offline scope). Docs-only. `docs/interop/opencode-pilot.md` now states the settled decisions (decision comment on ThinkFlowLab#198, 2026-10-18) instead of contradicting them: phase 1 is single-owner same-room on the fixture task (edit + run tests, no network; human approval for outbound network/credentials/budget top-up/final acceptance), A2A stays non-required, and the OpenCode process is a FlyBot-driver-owned supervised child rather than an operator-started server. `docs/interop/room-participants.md` records the same phase-1 decisions and replaces the operator-controlled binding with the supervised-child responsibility. The DM/offline experiment's own constraints (Bot Social same-owner rejection, distinct synthetic owners) are kept and clearly scoped to the cross-home path; slices updated (slice 1 merged as ThinkFlowLab#201, slice 2 marked cross-home, slice 4 re-scoped single-owner). The v1 codec/journal/budget/projection contract is untouched. What I ran at tip `ecb6e04`: full `TZ=UTC npm run verify` — all suites green except the 3 known macOS-only `room-collaboration.test.js` failures caused by the tmpdir-symlink bug fixed in ThinkFlowLab#315 (this branch intentionally does not carry that code change; CI runs Linux and is unaffected). What I did not run: smoke test and bench (no code change).
Birfy
left a comment
There was a problem hiding this comment.
Fresh review at tip 647de8a (posted from Birfy's account; the PR author is hsliuustc0106, but this repeats my earlier COMMENT review and I am not recording a PASS while CI is red).
Verdict: needs change (one gate). The code is correct; the PR is blocked only by the arch-docs check.
Findings
- CI red, and it hid the rest.
arch-docs: FAIL — core/dev/room-collaboration/fixture.mjs → ds-bot-core (docs/subsystems/ds-bot-core.md). Theflybot-testsaction stops there, so the unit-test, plugin and patch steps were skipped in that run: the redtestjob says nothing about the tests themselves. Fix: add a line for the fixture/realpath rule todocs/subsystems/ds-bot-core.md, or aDocs-not-needed: <reason>trailer on the commit (needs a new commit/amend, so it needs a fresh review at the new tip). - Heads-up: the last CI run is old (09:13Z). Re-run after the fix so the tests actually execute at the final tip. Against current main the branch merges cleanly (
git merge-tree, no conflicts; #319's edits to the same test file are not a conflict).
Checked
- Root cause and fix are right: Node's
--allow-fs-readmatches the literal path while the ESM loader realpaths, so a symlinked temp root denies every read; passingrealpathSync(directory)grants the same directory and nothing wider.readFileSync(join(directory,'total.mjs'))already requires the directory to exist, sorealpathSyncadds no new failure mode. - The new test reaches the fixture through an explicit symlink, so it reproduces on Linux. I ran it: fails with main's
fixture.mjs, passes at the tip (4/4 inroom-collaboration.test.js). core/andpatches/ds-bot/consistent (ds-bot-patches.mjs checkok). Dev fixture only; no product code, grants, secrets, UI or Bot Social change.
Ran at this tip: core/test/room-collaboration.test.js (4 pass; with main's fixture 3 pass / 1 fail); ds-bot-patches.mjs check; git merge-tree against main.
Not run: full npm run verify (CI never got past arch-docs), macOS repro.
Risk tier: T2 (host/plugin code), so an independent PASS plus green tests-ok allows the standing auto-merge delegation.
Still needed: the docs line or Docs-not-needed: trailer, green CI at the new tip, then an independent PASS from a login in review-policy.json (Birfy is not the author here, but the verdict above is not a PASS until CI is green).
Fixes #314. Refs #198 (unblocks local verification of the same-room fixture work on macOS).
checkWorker/verifyArtifactran the fixture checks with--allow-fs-read=<literal dir>, but Node matches the flag against the literal path while the ESM loader realpaths module paths. On macOSos.tmpdir()is/var/folders/...(/var->/private/var), so every read was denied and all three room-collaboration tests failed locally. The fix allowsrealpathSync(directory).core/andpatches/ds-bot/regenerated together (ds-bot-patches.mjs generate+checkok).What I ran at tip
647de8a: fullTZ=UTC npm run verifygreen (all suites, 0 failing tests; before the fix the 3 existing room-collaboration tests plus the new one failed 4/4). What I did not run: smoke test and mock bench (no change toindex.js/src/host/beyond the dev fixture and its test).