Root cause: the 2026-09-28 controlled-projection hardening added the
ErrUnboundControlledProject guard, and the server path got session project
binding backfilled - but two paths missed:
- CLI chat mode never called session.SetProjectID (only -project name)
- coordinator handleAdvanceStage built StageRunRequest without
ProjectID/UserID, so every stage-advance squad task was rejected
Fixes:
- handleChatMode gains projectID param (wired from -project-id flag);
session binding follows the server convention
- handleAdvanceStage passes parseDecimalID(UserCtx.Project/User.ID)
- CLI chat tests get hermetic env (unreachable DB + ALLOW_IN_MEMORY) so
local runs stop accidentally hitting the real dev DB on :5433
- stale test TestBindSessionProjectContext_KeepsExistingProjectID asserted
the pre-fix 'switch does not propagate' bug; updated to assert switch
propagation + bind no-overwrite
Result: go test -short ./... = 75 packages, 0 failures (first time).
Short tests promoted from report-only back into the required CI gate.
os.WriteFile mode is masked by umask (022 in CI turns 0666 into 0644),
making the writable-file rejection test environment-dependent; chmod the
explicit bits after write
Pre-change the hidden report job aggregated 15 failures; this PR fixes 10.
The 5 remaining PG-integration failures are pre-existing (verified against
the old report-job log) and stay name-listed in -skip until fixed; any NEW
failure blocks the gate.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
根因:09-28 受控投影加固加了 ErrUnboundControlledProject 门禁,服务端回填了会话绑定,但 CLI 聊天入口(未调 SetProjectID)与 handleAdvanceStage(StageRunRequest 未带 ProjectID/UserID)两处漏配。
修复:CLI 传参绑定 + 阶段请求回填数字 ID;测试环境封闭化(不再误连真实 dev 库);过时断言(固化切换不传导缺陷)修正。
验证:go test -short ./... 75 包 0 失败(史上首次);短测升回必需 CI 门禁。
issue#2 修复批准:10/15 修复,余 5 显式跟踪。