Repository navigation
[PR] fix(#5706): opencode plugin startup lines go to bili.log; "opencode" config key no longer warned as unknown - #5710
ranxianglei wants to merge 2 commits into
Conversation
…ncode config block
FileConfig.opencode ("opencode": {"inline": true}, documented in
CONFIGURATION.md and consumed by src/agent/opencode-native.ts) was missing
from KNOWN_TOP_LEVEL_KEYS, so every config file carrying the documented
lane block logged "[acp-config] ignoring unknown top-level config key(s):
opencode" at load. Add the key to the mirror set and pin it in the
#2062 documented-surface test (that fixture reproduces the exact warning
without this fix).
…the TUI terminal The opencode plugin entries run INSIDE the opencode host process, where stdout/stderr IS the interactive TUI terminal — the seven raw console.* calls in the v1 bootstrap (native entry: zod unavailable, fetch patch installed, no live proxy at startup, v1 active, legacy-lane notes; launcher-lane entry: plugin active, fetch patch installed) landed on the physical screen on every startup and could not be silenced. Route them through logHostEvent (src/agent/host-log.ts — bili.log only, never the terminal), the same channel every other native lane moved onto in #2827/#2831; message texts stay byte-identical, only the channel changes. New regression pin (tests/issue5706-opencode-host-console.test.ts) asserts both directions: neither entry file may contain a raw console.* call, and every relocated diagnostic must still exist riding logHostEvent (a fix cannot just delete the line).
📦 Built Package ArtifactBranch: Latest build — install this exact versionnpm install -g billion-context@0.0.8205-pr.5710.d91a3b6This exact version is immutable and reproducible. The rolling Recent builds (commit → version)
Download artifact
tar xzf billion-context-pr5710.tgz
npm install -g packageInstall instructions are refreshed on each push. |
(ai: vllm-qwen/qwen3.8-27b) PR #5710 审核结论:代码正确、可合入方向成立;CI 红全部为继承性 master 级失败(非本 PR 自致)。 独立读 diff / 既有行为 / 回归产出本结论,未照抄 issue。 中文结构化八问
测试有效性:新增 CI 状态(关键):head 收工判定:代码侧 APPROVE(单模块小修、双向回归钉、diff 干净;§7.4 auto-merge 条件基本满足,唯一拦路 = 全局 CI 绿,而该绿被 master 继承红挡住,非本 PR 责任)。解锁路径:owner 合入 #4599 哨兵收敛(ci-fixes→master)+ 就 #2817 选项 A/B/C 拍板后,master 转绿,本 PR 重跑即绿。agent 不合 PR,等您操作。 |
…TS.md and the ranxianglei#5904 first-byte budget Upstream delta 48ee6a7..3ac3e95 (83 files, 20 commits). The substantive ones: - e3434a3 fix(ranxianglei#5904): phase-1 first-byte budget for upstream summary calls + watchdog/preflight logging - b4a4026 docs(ranxianglei#5904): regenerate config artifacts for upstreamFirstByteMs + ledger entry - 9492212 docs(ranxianglei#5904): align first-byte-knob comments and docs with shipped values - c7db020 fix(opencode): route host console chatter to bili.log and teach the config key (PR ranxianglei#5710, closes ranxianglei#5706) - 984d3dc fix(gate): opencode lane one-time warmup round for fresh storage dirs (PR ranxianglei#3497) - 8f1fca8 docs: live architecture hub + module pages + file-map CI guard - 2a15b5a docs: all 8 architecture module pages live - 44faff0 docs: slim AGENTS.md (KDD text to reference/design-decisions.md, triage table to reference/triage.md) - 6f4f248 docs: add docs/README navigation landing page, en+zh - 3ac3e95 Merge pull request ranxianglei#5917 Conflict surface: only the four generated artifacts, all auto-merged. The lane's chat row is still in the regenerated docs/configuration.md (line 294) after `node tools/gen-config-docs.mjs generate`, and the docs fixed point holds. kernel stayed at 0.0.187 and was rebuilt before measuring. Lane anchors intact: src/server/relay.ts:2070 still calls `pipePluginJson(toClient, res, undefined, prepared.protocol, ...)`, src/storage/mysql.ts:77 still exports MYSQL_SCHEMA_VERSION, symbols unchanged (stripDriftResidue 6, isDraftDump 6, containsRenderTagText 21, mayStartDegenerateRenderTag 6, DRIFT_BARE_MISMATCH 3, DRAFT_CLOSE_TAIL 3). Gates: tsc 0, four guards 0, gen-config-docs fixed point. Tests: issue5175 58/0, tag-echo 79/0, issue2190-degen-close 32/0, golden-storage-render 5/0, storage-engine-proofs 12/0, native-compact-terminal 1/0, issue4666 2/0, and the three new upstream suites: issue5904-upstream-first-byte 4/0, issue5706-opencode-host-console 2/0, issue1815-unknown-top-level-keys 5/0.
Closes #5706
What was wrong
Two symptoms reported on bili 0.1.212, opencode v1 native mode (
bili plugin install opencode):A. False config warning.
"opencode": { ... }is a documented top-level config block (opencode.inline, CONFIGURATION.md) consumed bysrc/agent/opencode-native.ts, but it was missing fromKNOWN_TOP_LEVEL_KEYS(src/config.ts) — so every config file carrying it logged[acp-config] ignoring unknown top-level config key(s): opencodeat load.B. Un-silenceable startup noise. The opencode plugin entries run INSIDE the opencode host process, where stdout/stderr IS the interactive TUI terminal. The v1 bootstrap printed 7 raw
console.*lines on every startup (native entry: zod unavailable / fetch patch installed / no live proxy at startup / v1 active / legacy-lane notes; launcher-lane entry: plugin active / fetch patch installed), landing on the physical screen with no way to silence them.Fix
"opencode"toKNOWN_TOP_LEVEL_KEYS.logHostEvent(src/agent/host-log.ts— appends to bili.log only, never the terminal), the same channel every other native lane moved onto in [Bug][Pi native/TUI] pi-web-access 共存提示 console.log 污染输入框画面,点击重绘后消失(0.1.193) #2827/[Bug][native lane] #2827 同机制的剩余面:其他 native 车道的会话中途 console.* 仍直写宿主终端 #2831 (commit a5f64a1). Message texts stay byte-identical; only the channel changes. No new env var or config knob.Behavior change (old → new)
"opencode"block no longer emit the unknown-key warning at load. Genuinely unknown keys still warn exactly as before.Tests
tests/issue5706-opencode-host-console.test.ts(new): pins BOTH directions per Test Blind Spot Retrospective: Reinforcing Negative Assertion Discipline, Tightening Fake Upstream Strictness, Thin Inst | 测试盲区复盘:补反向断言纪律、假上游严格化、薄安装冒烟、形态矩阵与生命周期覆盖 #3617 gate discipline — neither entry file may contain a rawconsole.*call, AND each relocated diagnostic must still exist ridinglogHostEvent(a future "cleanup" cannot silently delete the line instead of rerouting it). Verified RED on pre-fix source (the pin names the offending calls) and GREEN after.tests/issue1815-unknown-top-level-keys.test.ts: the [docs] CONFIGURATION.md §Server Settings 落后于 src/config.ts 配置面(autoUpdate 族等 16 键无条目) #2062 documented-surface fixture now carriesopencode: { inline: true }— it reproduces the exact reported warning without the allowlist fix and passes with it.dist/agent/opencode-native.jsverified to carry the lines onlogHostEvent. Full-suite verdict = CI on this head.