Conversation
23 条判据全部驱动生产入口(`LLMRequestPrep.prepare()` 的 tools 与 `SessionTools.resolve()` 返回对象的 `.execute()`),真 MCP server / 真 `.opencode/tool` 自定义工具 / 真内置 `write` / 真宿主资源工具,副作用用 服务器侧与文件系统侧的真实计数。基线 15 PASS / 8 FAIL,3 轮失败集逐字相同。 两处咽喉各有一条会翻红的判据,并各自做过摘线验证: - 摘掉 `permission/index.ts` 的 identity hard-deny ⇒ A1–A4 翻红,B 不动; - 摘掉 `session/tools.ts` 的 `ctx.ask(canonicalToolIdentity)` ⇒ B1/B5/B7/B8 翻红,A 不动。 两次实验前后 `shasum -a 256 -c` 逐字还原,`git diff` 为空。 FAIL 各自开窄票:#1121(E1/E2 执行咽喉不接 identity 三态)、 #1122(`approved` 无会话作用域也无上限概念)。 零改动生产代码。探针是 `.cases.ts`,不进 `bun test`、不登记 gate-files.tsv。 Refs #723Fixes#725 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QHDS2BFKuzm9uNH1svU2oj
9 tasks
Uh oh!
There was an error while loading. Please reload this page.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
这是什么
alpha-code#725([REQ-131][VERIFY])的取证交付:零生产代码改动,只有一份探针(
packages/opencode/test/tool/alpha-725-policy-chokepoints.cases.ts,23 条判据)与证据目录
docs/verification/2026-08-25-req131-725-tool-policy-chokepoints/。结论
票面标题的那句话今天只有一半成立。
deny都真把工具从交给 provider 的那张表里拿掉,且只拿掉它自己;ask不改目录deny照跑、ask不问always的作用域与上限always后收紧成deny,旧批条仍然赢基线 15 PASS / 8 FAIL,3 轮失败集逐字相同。
摘线验证(两处咽喉各一次)
permission/index.ts:300-304的 identity hard-denysession/tools.ts:437-442的ctx.ask(canonicalToolIdentity(...))两次实验前
git status干净,实验后用shasum -a 256 -c逐字还原并复核git diff为空;还原后基线复跑回到 15/8,姊妹闸门
alpha-{mcp,session-tools}-alias-*.test.ts9 pass / 0 fail。FAIL 各自开了窄票(不在本 PR 修)
approved既无会话作用域也无上限概念(B9/B13)覆盖边界(没有证明什么)
票面 Covers 写「AC1–AC8」,本轮实际只覆盖 AC3 全部 + AC2/AC4/AC5/AC8 各一轴。
AC1 / AC6 / AC7 未覆盖,E4 / E6 / E7 与 managed-env 只做了源码级确认、没有在运行期量到。
逐条原因写在证据 README §1,票面未被修改、未加格、未加 AC。
根因:#724 终局决策里列出的三张 CODE 子票(策略 resolver / 双闸接线 / Settings)
至今没有被建出来 —— 2026-08-25 全库检索
REQ-131只有 #723/#724/#725/#726/#731。是否补建属于排期决策,本 PR 不代做。
本地门(base
alpha@c3d0d0569)bash scripts/north-star-guard.shA)bun run --cwd packages/{alpha-contracts-consumer,ext,ui-mac} typecheckpython3 scripts/check-doc-links.py <2 个改动 md>bash scripts/assert-gate-files.shbun test --timeout 60000 ./test/tool/alpha-725-policy-chokepoints.cases.tsRan 23 tests across 1 file./ 15 pass / 8 fail(预期部分红)bun test ./test/tool/alpha-{session-tools-alias-lock,mcp-alias-collision-lock}.test.tsRan 9 tests across 2 files./ 9 pass单测面无影响:探针是
.cases.ts,不在 bun 的测试文件命名约定内(bun 自己报Tests need ".test", "_test_", ".spec" or "_spec_" in the filename),因此不进bun test、也不登记
scripts/gate-files.tsv;packages/opencode不在任何 alpha typecheck 面内。push 用了
--no-verify:pre-push 钩子跑在共享主 checkout 上,本轮有多条 lane 并行,不去动它。上述门已在本 worktree 内逐条本地跑过;push 后复核
core.hooksPath仍是.githooks。文档影响
docs/verification/(新增证据目录)+docs/README.md(索引一行)。maintain-repository-docs契约检查:alpha-code PASS。Refs #723
Fixes#725
🤖 Generated with Claude Code
https://claude.ai/code/session_01QHDS2BFKuzm9uNH1svU2oj