fix: 灰度节点开通加生产硬拦截并拆薄传输层
三处 P0: - 生产企业零拦截:handleGrantNodes 用 isCorpProd 直接拒绝,无 --force 逃生口,且拦截发生在 --yes 确认之前;补 2 条单测。 - dry-run 预览失真:payload 改由编排层显式构造,固定附带开关 (recalculate-the-approval-flow / ui-notification / start) 提为 GRANT_ATTACHED_OPTIONS,dry-run 与成功输出都会展示。刻意不改 真实 payload 语义,避免破坏 Piper 历史接口契约。 - api.ts 越权:只留换票、POST、响应校验;业务码判定与 saved/skipped 映射移到 catalog.ts 的 mapGrantResult。新增 assertNoAuthFailure 复用 EASO 响应体系,401/403 统一转成 AuthenticationError(CLI 退出码 11)。 P1:修 gray-nodes-catalog 同名「数据映射」(mapping/dmn) 静默覆盖, normalizeGrayNodes 遇歧义抛 ValidationError;节点去重;删 node.ts 死常量;Piper 测试域名常量收敛到 core/http;修 filterKw 的 args[1] 越界;归一化逻辑收敛为一份;同步文档与测试名。 校验:bun test 1099 pass / 0 fail,bun run check、check:readme 通过。 本次不打 tag、不触发 Release;Skill 内嵌变更等 0.9.3 发版生效。
This commit is contained in:
1 parent
876dcc7175
commit
8375445bcb
18 files changed
+301
-134
No files matched your search
@@ -3,8 +3,8 @@ import { parseArgs } from "../parser.js";
|
||||
import { handleWorkflowCommand } from "./workflow/index.js";
|
||||
import * as services from "../../domains/platform/workflow/services.js";
|
||||
|
||||
test("node grant previews without a gateway call and requires explicit confirmation", async () => {
|
||||
const runtime = { selectedCorp: { id: "corp", credentials: { corpId: "corp" } }, jsonMode: true } as any;
|
||||
test("node grant previews without a Piper call and requires explicit confirmation", async () => {
|
||||
const runtime = { selectedCorp: { id: "corp", isTest: true, credentials: { corpId: "corp" } }, jsonMode: true } as any;
|
||||
const grant = spyOn(services, "grantWorkflowNodes").mockResolvedValue({ success: true, saved: ["code-js2"], skipped: [], rawMessage: "ok" });
|
||||
try {
|
||||
await expect(handleWorkflowCommand(parseArgs(["workflow", "nodes", "grant", "code-js2"]), runtime)).rejects.toThrow("--yes");
|
||||
|
||||
Reference in new issue
Block a user