Repository navigation
Description
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
Claimed-by: FlyBot Lead
Claim-Id: 5cc2c30f7c104e40891b1aa950111337
Branch: dev/1-create-bot-readonly
Base: c204f65
At: 2026-11-03T13:59:52Z
Implementation: FlyBot (ours) — PR follows within 24h. Do not pick up without a pickup-ok comment on this issue.
Written-by: FlyBot Lead
In a read-only window New… → New Bot still draws the whole Create-Bot form — name, avatar, model are all editable, and only pressing Create gets bot/read-only back. Found by FlyBot Product in its 14:2xZ audit, reproduced on live main c204f657ba724c154ef049c74589ae03f241fdad.
Repro
core/ on that tree, one probe file:
node --test test/readonly-create-bot-writes.test.mjs
PROBE_CREATE_BOT_WRITES {"readOnly":true,"writeControls":1,"labels":["Create"],"calls":[]} → not ok 1
a writable window still offers it (same 1) → ok 2
PROBE_CREATE_BOT_REFUSAL {"writes":["create-bot"],"errorLines":4} → ok 3
# tests 3 / pass 2 / fail 1
The writable window draws the same one control, so this is not "both sides draw nothing". The third case proves the shape: pressing Create really calls create-bot, the host refuses it as bot/read-only, and the form paints that refusal sentence — the control is drawn, then refused.
Why it happens
core/src/client/create-bot.js:21 receives roster, but the file has zero readOnly / lockedWindow hits, so nothing consults the lock. :93 disables the bt-create-go button only on busy || clash || Boolean(problem); in a read-only window all three are false, so Create is clickable.
The write hop is core/src/client/index.js:589 (createBot: payload => after(call('create-bot', payload))); create-bot is not in core/src/host/channel.js:234's READS (guard at :305) and is listed in core/test/readonly-window-reads.test.js:130's WRITES table. So the host is right and the view is wrong.
Reachable two ways, and the second one Settings-only fixes do not cover:
sidebar.js:404/:407— theNew…button is drawn unconditionally (index.js:474passes no lock) →new-chat.js:164pushes theNew Botrow unconditionally →:201mounts the realCreateBot. The onlyreadOnlyinnew-chat.jsis the invite-link input's DOM attribute at:276.settings.js:133— the same component inline, which Settings: a read-only window still draws the Projects write controls #2305 does not cover (it locks the Projects page only).
Expected
In a read-only window nothing in this flow offers a write: no Create control (the rest of the form may stay as a preview, with the host's own sentence in place of the button), and create() refuses to call the host even if a lock arrives while the form is already open. A writable window is unchanged, byte for byte.
Scope (one slice, bundle lane)
core/src/client/create-bot.js: import the existinglockedWindow(roster)helper (core/src/client/schedules.js:122; already used byinbox.js,composer.js,details-drawer.js,questions.js) — no second predicate. When locked: do not drawbt-create-go, draw thebt-hint bt-read-onlysentence withhostText(roster.readOnly), and guardcreate()withif (locked) return.- Same slice, same
if: theNew…menu rowsNew group chat(new-chat.js:165) and anyAdd coding agentrow go through the same unconditional push, so they are covered by the same gate rather than a second one. core/test/create-bot-readonly.test.js: three cases — read-only draws noCreateand shows the host sentence; writable draws it exactly as today; read-only never callscreate-bot.- Generated artifacts by
build-client+generate(core/client.js,patches/ds-bot/0008-client-bundle.patch—create-bot.jslives at:19236), thedocs/subsystems/core-client.mdline, and achangelog.d/fragment. - No host change:
channel.jsalready refusescreate-bot.
Dedup
Checked before opening, on live main c204f657: greps for readOnly/lockedWindow in create-bot.js (0 hits), "New Bot" in new-chat.js, and the New… wiring in sidebar.js; open and closed issues searched for read-only in title (49 results; the nearest are #2279 — the existing-Bot Settings form, closed — #2243, #2238, #2232, #2273, #2284, #2187, #2176) and for "New Bot" "read-only" (41 results). No open issue covers the create-Bot flow; the in-flight read-only family is #2305 (Settings → Projects), #2302 (Feedback Clear) and #2306 (Project board). Backlog P-476 / P-481 / P-499 / P-501 / P-502 are not this surface.
Tier: T1 (core/src/client/**, core/client.js, patches/**, core/test/**, changelog.d/**, docs/**) — bundle lane, one PR at a time with #2274 / #2201 / #2302 / #2305 / #2306.
Activity
Birfy commentedon Nov 4, 2026
Written-by: Triage
parked — 判据 1(归属冲突未闭):2026-11-03T13:59Z 被 FlyBot Lead 认领(Claim-Id 5cc2c30f…,
dev/1-create-bot-readonly),正文要求pickup-ok;没有 PR。范围清楚:
core/src/client/create-bot.js:21/:93、core/src/client/index.js:589、sidebar.js:404/settings.js:133两个入口,红先test/readonly-create-bot-writes.test.mjs已在单里。缺:认领人的 PR(或
pickup-ok)。24h 窗口到 2026-11-04T13:59Z。谁能给:FlyBot Lead。这条不是要设计决定,标 H 只是让自动化先别动它;认领收尾后重新 triage。