Repository navigation
Commit fa31010
docs(qa): draft-publish-lifecycle audit clause expects the catalogued refusal's denied row (#29169)
<!-- claude-projects-attribution: {"github_login":"os-warren"} -->
_Requested by **Warren** · [project
thread](https://claude.ai/code/project/chan_01U5RdnAAmkSQmZbqh6FtqZ8?thread=cmsg_01U5RdnAAmkSQmZbqh6FtqZ8QHK3iqqgqvPgxTg59PhVfa)_
Fixes #29013
Clause-②: no
Metadata-protocol: none
## 维护者速读
- 改了什么:发版检查清单 `studio-authoring.draft-publish-lifecycle` 的
acceptance[10] 改为:受编目的拒绝(四个码)各写一行 denied
审计,带操作者与小写码;NO_DRAFT、INVALID_REQUEST、5xx 不写。acceptance[3] 写明线上码
METADATA_CONFLICT,并说明过期 If-Match 要在草稿存在时发。
- 为什么改:#28355 之后产品对 422 INVALID_METADATA 会写一行 denied 审计,旧条款仍说「不写」,QA
每轮都判 FAIL,让测试者习惯忽略红灯。
- 风险与回滚:只改一份 QA 清单 JSON,不发布任何包、不动产品代码;回滚即 revert 本 PR。
- 先看:`docs/qa/platform-checklist/areas/studio-authoring.json` 中该条目的
acceptance[10] clause/verify,其次 acceptance[3].verify 与新增的 revision 11
history 行。
- 两分钟验证:`pnpm check:platform-checklist`,预期输出 `check-platform-checklist:
OK — 16 areas, 352 items`。
- 需要你做的:无,席位落地。
## What changes
One file, `docs/qa/platform-checklist/areas/studio-authoring.json` (+7 /
-6), the item `studio-authoring.draft-publish-lifecycle` only:
1. **acceptance[10].clause** — the denials list gains the four
catalogued refusals the single-item doors (save, publish, rollback,
delete) now audit after #28355: `invalid_metadata` (422
INVALID_METADATA), `not_overridable`, `not_creatable`,
`destructive_change`, each exactly one `denied` row with the lower-case
code. The sentence "A 422 INVALID_METADATA spec refusal ... write no
row" is replaced by: a refusal outside that set writes no row (404
NO_DRAFT, 400 INVALID_REQUEST, any 5xx). Source pointer:
`packages/metadata-protocol/src/protocol-refusal-audit.ts#REFUSAL_AUDIT_CODES`.
2. **acceptance[10].verify** — asks for steps[7]'s stray-key 422 as
exactly ONE `denied` / `invalid_metadata` / `save` row (source
`protocol.saveMetaItem`) with the authenticated actor, and for no row
from steps[12]'s 400 INVALID_REQUEST or a publish with no pending draft
(404 NO_DRAFT). A missing row, a duplicate row, a SCREAMING-coded row,
or a row for NO_DRAFT / INVALID_REQUEST is a FAIL.
3. **acceptance[3]** — the clause spells the wire code
`METADATA_CONFLICT`; the verify says to send the stale If-Match while a
draft row exists, because with no draft row the `?mode=draft` door
answers 409 "(current is null)" for any token, the published version
included (`protocol-lock-version-gates.ts#storedParentForToken`), which
does not exercise the stale-token guard.
4. `revision` 10 → 11 and one `history` row (ref #29013).
## Why
QA run #29002 (subject 7fa9873) scored acceptance[10] FAIL: the
stray-key dashboard draft save answered 422 INVALID_METADATA and
`/audit` held a `denied` / `invalid_metadata` row with the actor. That
is what #28355 decided, so the clause, not the product, was stale. The
rewrite is stronger, not weaker: a 422 that used to score a row as a
FAIL now owes one, and two uncatalogued refusals are named as owing
none.
## Tests
No product code changed, so no test was added. The premise was
re-measured on `origin/main` 0a41075 through the real protocol doors
(`ObjectStackProtocolImplementation`, the persisting fake engine of
`protocol.refusal-audit-rows.test.ts`) with a throwaway probe file,
deleted before commit:
<details><summary>Probe readings (vitest, 5/5 cases ran)</summary>
| Case | Answer | Audit rows |
|:---|:---|:---|
| dashboard draft save, widget with a stray key, actor usr_admin | 422
INVALID_METADATA (`widgets.0` unrecognized key) | one: save / denied /
invalid_metadata / actor usr_admin / protocol.saveMetaItem |
| control: valid dashboard draft save | 200, state draft | one: save /
allowed / ok |
| publish, no pending draft | 404 NO_DRAFT | none |
| rollback, no toVersion | 400 INVALID_REQUEST | none |
| draft save with the published version as If-Match, no draft row | 409
METADATA_CONFLICT "... (current is null)", currentVersion null | one:
save / denied / metadata_conflict |
A sixth case (stale If-Match while a draft exists) is NOT MEASURED: that
fake engine's `update` does not mutate rows, so the stored draft never
moved and the token stayed current. The clause's stale-draft half is
unchanged and was read as holding by QA run #29002.
</details>
## Acceptance notes
- `steps` were not edited (file surface: acceptance[10], acceptance[3],
revision, history). The NO_DRAFT leg in the new verify is a publish sent
when no draft is pending, which a runner can send after steps[3] without
a new step.
- The batch-publish codes (`batch_aborted`, `namespace_prefix`,
`stored_type_not_canonical`) and `item_locked` are carried over
unchanged from revision 10.
## Verification
<details><summary>Gate run on e6afed5 — 16 derived, 16 run, 0
NOT-MEASURED</summary>
`node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 16 families for this one-file
change; all 16 ran and exited 0, including `pnpm
check:platform-checklist` (`OK — 16 areas, 352 items (347 active, 1
planned)`; symbol anchors 1088/1098 resolved, 10 on the named #16898
residual) and `pnpm --filter @objectstack/lint run
check:doc-formula-expressions`. `dispatch-gates --ran FILE` → `Run
reconciliation — 16 derived, 16 run, 0 NOT-MEASURED, 0 UNRUN`. CI-owned
families (lint, Test Core and the rest) are not re-run locally.
</details>
---
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01JQwxbWcvRkRqeQHg9HPzVi
Co-authored-by: Claude <noreply@anthropic.com>1 parent d089dac commit fa31010
1 file changed
Lines changed: 7 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
410 | 410 | | |
411 | 411 | | |
412 | 412 | | |
| |||
456 | 456 | | |
457 | 457 | | |
458 | 458 | | |
459 | | - | |
| 459 | + | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| |||
498 | 498 | | |
499 | 499 | | |
500 | 500 | | |
501 | | - | |
| 501 | + | |
502 | 502 | | |
503 | | - | |
| 503 | + | |
504 | 504 | | |
505 | 505 | | |
506 | 506 | | |
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
540 | | - | |
| 540 | + | |
| 541 | + | |
541 | 542 | | |
542 | 543 | | |
543 | 544 | | |
| |||
0 commit comments