Repository navigation
feat(core-only): expose safe session host facts - #1761
Conversation
dd201ae to
33b6d23
Compare
|
你好 @Oliver-Ysq,这个 PR 的评审群已经建好,欢迎进群跟进评审讨论(一年有效入群链接): 目前自动拉群名单里暂时没有你的飞书信息(可在此名单文档按 GitHub 账号补录,后续评审会自动拉你进群): 这是自动评审流程发出的消息,如有不便敬请谅解。 |
|
Thanks for the PR! This is an automated first-pass review (final call always rests with the maintainer). The overall design looks solid — the tri-state liveness ( One blocking issue and a couple of test gaps: P1 — fresh boot with The eager Repro (on Linux, mkdirSync('/tmp/<state>', { recursive: true, mode: 0o700 });
loadOrCreateDispatchReportBindingSecret('/tmp/<state>', { coreOnly: true });
// throws UnsafeHostAuthorityFileError: 宿主凭证目录可被组内或其它用户写入Observed matrix: direct child of Suggested direction (validated locally with a temporary patch; existing 7 binding tests stay green): gate the legacy read on leaf existence first — let legacyPresent = false;
try { lstatSync(legacyPath); legacyPresent = true; }
catch (err) { if ((err as NodeJS.ErrnoException).code !== 'ENOENT') throw err; }
const legacy = legacyPresent ? readSecureHostFileSync(legacyPath, 256)?.trim() : null;A present leaf still goes through the strict read and fails closed (0644/symlink throw as before); a genuinely absent leaf under an untrusted shared parent simply proceeds to mint the new key inside the state dir. A direct regression test using a state directory whose parent is a 1777 sticky dir would lock this in. P2 — the P3 — the projector unit tests survive straightforward mutations. There's no Minor nits: Heads-up on the rebase conflict: the last test commit collides with #1759 (merged to Happy to help with any of the above; please take this as preliminary input — the maintainer's review is authoritative. |
|
Thanks — this is an automated second-pass (independent verification) review; the maintainer's call remains authoritative. I independently reproduced the first-pass findings on a fresh rebase over current P1 — reproduced end-to-end, not just at the unit level. Booting the real entrypoint with a state dir that is a direct child of the sticky
Two nuances worth folding into the fix:
I validated the P2 — confirmed. Deleting all three guards ( P3 — confirmed. 7/7 straightforward projector mutations survive ( One extra observation (minor). The handler calls Rebase note. |
|
Quick consolidation now that the independent second pass has landed above — both reviews converge, so here is the single must-address list to make re-review fast:
Nit (non-blocking): Plus the rebase note: when rebasing onto current Thanks again — automated preliminary input; maintainer review remains authoritative. |
28bfbef to
5aa3b74
Compare
|
Automated re-review after the new push ( All three blocking/gap findings from the prior rounds are resolved:
One incidental commit worth calling out positively: Verification on the rebased tree: Remaining (non-blocking, can be follow-up):
From this review's standpoint this is mergeable once the maintainer is happy with those non-blocking items (or defers them to follow-up). Thanks for the thorough revision. |
|
Independent cross-check complete (automated second reviewer; maintainer's call remains authoritative). Rebased the new head onto current ✅ Both directions of the author's chosen policy hold: absent legacy leaf under a 1777 parent → new in-state key; present 0600 legacy leaf under a 1777 parent → hard fail with no in-state key (verified via a temp 1777 fixture). ✅ The master send test really is red, and the PR commit is test-only. On pristine ✅ Mutations killed. Deleted the
✅ Local checks. Non-blocking nit still open. From the review side this is 0-blocker and mergeable pending your sign-off; the only human-acceptance debt left is real-machine core-only PTY and default tmux session bring-up (I verified boot/bind, not a driven turn). I'll re-verify the head once more if it changes before you give the go-ahead. |
# Conflicts: # test/cli-send-doc-comment.test.ts
|
Pre-merge re-verification of head ✅ Integration commit is structurally sound. ✅ Resolution verified against both bases. ℹ️ Forward-looking: master advanced once more, to From my side: 0 blocker, resolution is the correct one, ready to merge as soon as the new CI run is fully green. |
|
Independent cross-check of the latest synthetic tree done (automated second reviewer; your execution remains authoritative). I did a real merge (not just ✅ Zero conflicts, zero markers. Real ✅ Content is what you describe. ✅ Checks on the merged tree: CI is now fully green for From my side: clear to squash-merge. I'll stand down unless the head oid changes. |
|
🚀 Released in v3.41.0 |
改动
botmux serve --api-only支持显式选择tmux或pty后端,默认仍为 tmux。兼容性与影响面
验证
./node_modules/.bin/tsc --noEmitbun run typecheck:scriptsbun run typecheck:test-mocksbun run test -- test/bot-registry.test.ts test/api-only-mode-wiring.test.ts test/core-only-host-facts.test.ts test/dispatch-report-binding.test.ts(224 passed)Closes #1760