Repository navigation
fix(plugin-webhooks, runtime): webhook remedies name the ?package= address, and a name refused whole answers 409 at every address - #33450
objectstack-fleet[bot] wants to merge 3 commits into
Conversation
…lder's exact address; a name refused whole is refused at every address The name guard, the redelivery veto and the dispatcher's withheld and unowned-row warnings named the namespace address (webhook/NS/NAME), which refuses two co-owners of one namespace and does not exist for a package that declares no namespace. They now name webhook/NAME?package=PACKAGE, the exact qualifier that switches one holder (ADR-0150 D2/D5). On the metadata-service path, the environment's declaration listed beside a package's is refused whole (ADR-0150 D3). Its refusal now says no declaration is dispatched and no address switches one, naming both holders; the activation door answers that refusal 409 at the exact and the namespace address (was 404 "no enabled package declares the name"), the name guard quotes it, and the redelivery veto refuses with it instead of calling the package disabled. Record nit N5: the upgrade impact report's withheld-webhook line said a disabled package's address answers 409; it answers 404 while that package is the name's only holder. Docs: the declared-webhook switch paragraph says a departed package's row switches no remaining holder (ADR-0150 D8). Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 3 package(s): 4 hand-written doc(s) NAME something this change touched and may need an implementation-accuracy re-verification:
⛔ 1 release-owned page(s) also name something this change touched. These are read-only:
What this run could not see
Coarse fallback — 42 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin d761cdad9d2c11ade8e7c68a729fb0733996cb62 && git checkout d761cdad9d2c11ade8e7c68a729fb0733996cb62
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 7e61983e18f9f39dc04ba4255f5a8817af688383 f5a399c56a91d4f003921207f4b9431c6d514aa6 && git checkout -B drift-repro 7e61983e18f9f39dc04ba4255f5a8817af688383 && git merge --no-ff f5a399c56a91d4f003921207f4b9431c6d514aa6
node scripts/docs-audit/affected-docs.mjs --json 7e61983e18f9f39dc04ba4255f5a8817af688383
|
…, and the name guard's conflict is typed Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw Co-authored-by: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WV4cyrFFk86Jqf7Mp5Rzw Co-authored-by: Claude <noreply@anthropic.com>
|
domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw |
|
Contract-review-claim: session_016WV4d1PGptBW3QRQNmy5e6 · head f5a399c · 2026-11-14T23:16Z review#3. |
Review — PASSHead-sha: Clause-②: The change is right.
Notes (non-blocking):
CI at this head: 40 success, 17 skipped, none failing. The ACCEPT re-reads every check at the landing head. Implemented-by: |
|
domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw
|
⛔ merge queue 构建失败 — 先分诊,再决定要不要重排队列构建 43663304554 红了。队列跑的是全量套件(PR 侧 CI 只跑 affected 子集), 分类: 失败的 job(日志抽取,best effort):
跨 PR 相同签名(24h,按失败测试文件聚合):
历史信号:
分诊清单:
Generated by Claude Code · merge-queue-triage workflow (#4859) |
|
domain:server#5 · os-elon-musk · session_016WV4cyrFFk86Jqf7Mp5Rzw Queue build 43663304554 failed on |
Requested by Elon · project thread
Fixes #33263
Clause-②: no
Metadata-protocol: none
维护者速读
webhook/NAME?package=PACKAGE;元数据服务路径下"环境自有声明 + 一个包声明同名"的整名拒绝,现在在所有地址上都回 409 并点名两个持有者;升级影响报告里禁用包地址"回 409"的说法更正为"唯一持有者回 404,有其他持有者时回 409"。?package=回 404"没有启用的包声明此名",与事实相反。packages/runtime/src/domains/catalog-activation.ts的wholeWebhookNameRefusal与两处调用;packages/plugins/plugin-webhooks/src/declared-webhooks.ts的listedRefusal、wholeNameRefusal、名称守卫;packages/plugins/plugin-webhooks/src/redeliver-guard.ts的judgeDeclared。pnpm --filter @objectstack/plugin-webhooks exec vitest run --maxWorkers=2 src/declared-webhooks.test.ts,预期全部通过,含新增的 "a name the metadata service lists for the environment beside a package" 一组。What changes
Card items, in order:
declaredWebhookActivationPath(name, packageId?)now spellsPOST /api/v1/security/_activation/webhook/NAME?package=PACKAGEfor a package's declaration (the bare address for the environment's own). The name guard's conflict, the redelivery veto's switched-off refusal and the dispatcher's withheld-row warning all name it, so two co-owners of one namespace, and a package that declares no namespace, each get an address that switches exactly that holder. The namespace address stays served by the door; nothing names it as a remedy any more.409 RESOURCE_CONFLICT, candidates naming the environment and the package, at?package=PACKAGEand at the namespace address too (both answered404"no enabled package declares the name"); a read that fails while looking is503, never a404;declared:PACKAGE/NAMEdelivery with the refusal instead of calling the package disabled.A disabled sole holder still answers
404at its address, and two packages listed once each are still served and switched each at its own address.packageDisabledfield doc) said a disabled package's address answers 409; it answers 404 while that package is the name's only holder and 409 naming the other holders beside another.Fold-in (docs):
content/docs/automation/webhooks.mdxsays an activation row naming a package that no longer declares the name switches no remaining holder (ADR-0150 D8), and the operator keeps a webhook off by switching each holder at the?package=address.In-place fix under the bounded exemption: the dispatcher's two-holder warning for a row naming no package also named the namespace address (as a placeholder); it now names
?package=PACKAGE, the same defect class and the same file as item 1.Tests
Pinned in
declared-webhooks.test.ts(plugin-webhooks): the remedies name each holder's?package=address (FROM namespace address); two co-owners of one namespace get two distinct exact addresses in the name guard and the redelivery veto; the unowned-row warning names?package=PACKAGE; a new top-level describe for the environment beside a package on the metadata-service path (bare refusal, name guard, redelivery veto) with controls for two listed packages and one holder listed twice. Incatalog-activation-door.test.ts(runtime): a name refused whole answers 409 naming both holders at the bare, exact and namespace addresses, nothing written, and a failed read there is 503. Inupgrade-impact-report.test.ts(plugin-security): the N5 sentence.Local readings at
f5a399c, under the verify lock:@objectstack/driver-tursobuilt first for two untouched main test files; the test-typecheck ledger is unchanged.--no-inline-configon the 8 changed source files: exit 0.Acceptance notes
webhook/NS/NAMEis still served and still refuses two co-owners of one namespace (by design: the path names a namespace, not a package); only the remedies stopped naming it.Verification
Ablations and gates
Ablations used
scripts/ablation-replace.mjs. Each leg landed its mutation and was restored to the HEAD blob.?package=suffix dropped fromdeclaredWebhookActivationPath: 4 red.dispatch-gates --commandsderived 99 families. 96 ran with exit 0. 3 are NOT MEASURED locally (exit 3, prerequisite not met):check:skill-examples,check:dual-build-cjs-loadsandcheck:type-check-debt. CI covers the last one in "Type Check · debt ledger". Every CI check atf5a399cis green.Generated by Claude Code