Commit fda61e4
* fix(metadata-protocol): audit the batch package publish in Phase 2, outside the transaction
`publishPackageDrafts` (Studio's "publish whole app") wrote no
`sys_metadata_audit` rows at all — neither the allowed-outcome `publish`
rows nor a `denied` row for a refusal. It calls `promoteDraftForPublish`
directly, so #7748's row in `publishMetaItem` never ran for it.
Both outcomes are written in Phase 2, after the ADR-0067 D2 transaction
has closed: the allowed rows off `promoted[]`, the `denied` row from the
rollback `catch`. Inside the transaction the refusal's own row would roll
back with the batch it records, which is the defect #7748 closed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WMpuAfA2KSdDjGF6tm1bH
* test(metadata-protocol): mark the audit-vocabulary literals; add changeset
`check:error-code-casing` correctly flags `code: 'batch_aborted'` in a code
position. Opted out per site with the gate's documented `adr0112-ok: D6b`
marker rather than exempting the whole file, so the rest stays guarded.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WMpuAfA2KSdDjGF6tm1bH
* test(metadata-protocol): pin BOTH audit rows to the draft's own org scope
The existing fixtures used ORG for the draft and for the publishing session,
so an audit row keyed on either would pass. These two differ: an env-wide
draft (organization_id IS NULL) published, and refused, by a non-null-org
caller — the #3115 shape listDrafts surfaces via its $or.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012WMpuAfA2KSdDjGF6tm1bH
---------
Co-authored-by: os-zhuang <jack@objectstack.ai>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
1 parent 0a5dc29 commit fda61e4
4 files changed
Lines changed: 831 additions & 4 deletions
File tree
- .changeset
- packages
- metadata-core/src/objects
- metadata-protocol/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
| |||
0 commit comments