Repository navigation
Commit c6558d0
fix(metadata-protocol): the storage-sync-refused notice names no door (#35432)
<!-- claude-projects-attribution: {"github_login":"os-bill"} -->
_Requested by **Bill** · [project
thread](https://claude.ai/code/project/chan_016iMXWSZDzqWRWvWzdNo8wg?thread=cmsg_016iMXWSZDzqWRWvWzdNo8wgPKDiLo5gfWzDLyAK6J6UjZ)_
Fixes #32958
Clause-②: no
Metadata-protocol: none
## 维护者速读
1.
用户能看到什么变化:管理员在回滚、撤销提交或发布对象后,若数据库没能跟上对象结构,看到的警告不再说"这次保存"、也不再叫人"重新发布",而是给出在任何入口都管用的补救办法(重启服务,或再次正式写入该对象)。
2. 为什么做:删除对象扩展后存量数据未重算那张卡的剩余一项,提示文字在保存以外的入口上说错了话。
3. 出错会怎样:只是警告文字变化,规则编号和严重级别不变,最坏情况是措辞不顺,直接回滚即可。
4. 要你做什么:无,席位落地。
## 席位核对
### What changes
- `objectStorageSyncRefusedNotice`
(`packages/metadata-protocol/src/protocol-registry-hydration.ts`), that
function only: message says "is registered and served" and "the columns
this change added"; hint says to run the storage sync again: a restart,
or the next live write of the object. Rule id, severity, `where`, `path`
and the driver-reason quoting rule are unchanged.
- Read first: that function; then the new pin file; then the one added
assertion in `protocol.revert-commit-honest-outcome.test.ts`.
### Premise readings at origin/main 7ece020
- A1 holds: the message said "was saved and is served ... this save
added"; the hint said "publish the object again".
- A2: one builder. Callers that put its value on an answer:
`saveMetaItem` publish mode (`protocol-save.ts`),
`runPublishSideEffects` (`publishMetaItem`, `publishPackageDrafts`),
`rollbackMetaItemUnaudited` and `revertCommit`
(`protocol-package-commits.ts`). Callers that discard it: remote
mutation apply (`protocol-class-head.ts`), batch object registration.
The delete door (`deleteMetaItem`, `protocol-diff-delete-load.ts`) does
not run the sync and does not raise this notice (it calls
`fillStoredExpressionChange` without `storageRefused`), so the
dispatch's "it also rides the delete door's answer" did not hold on this
tree.
- A3: no server test pinned the notice's wording;
`protocol.publish-side-effects-canonical-type.test.ts` pins "publish the
object again" on the separate `console.error` line (left alone, outside
the fence). Two `ui/` tests carry a hand-written copy of the old text as
fixture data; they parse nothing from the server.
- A4: the save door in publish mode runs `ensureObjectStorage` on every
live write, and rollback and revert run it too; a restart syncs every
registered object. So both named remedies work from every door that
raises it. "Publish again" was true only by way of the save door, so it
is no longer named.
### Tests
- New `protocol.storage-sync-refused-notice-wording.test.ts`: the notice
names no save and no publish; CONTROL: it still names the object, the
failure and both remedies.
- `protocol.revert-commit-honest-outcome.test.ts`: the revert door's
advisory equals the builder's value, whole, and names no save or
publish.
- Ablation (committed fix, `scripts/ablation-replace.mjs`, source import
so no build): "this change added" back to "this save added" landed
(anchor 1 to 0, blob 445e3e1 to 2753623b), 2 failed / 31 passed;
restored to blob 445e3e1, `git diff HEAD` empty.
<details><summary>Verification at a171c69</summary>
- `pnpm --filter @objectstack/metadata-protocol test`: Test Files 359
passed, 9 skipped (368); Tests 23228 passed, 45 skipped. Lock VERDICT
command-exit 0.
- `pnpm --filter @objectstack/metadata-protocol typecheck` (tsc
--noEmit, includes src test files): exit 0.
- `dispatch-gates --commands` (68 commands): 66 exit 0 locally.
`check:dual-build-cjs-loads` exit 3, NOT MEASURED (needs the whole
workspace built), left to CI. `check:lean-entry-closure` exit 3 before
the closure build, exit 0 after it. `check:test-source-alias` was red on
the new file and is green after the module-top lint import.
- `overlap-check --branch=HEAD`: VERDICT clean exit 0.
</details>
### Acceptance notes
- The delete door does not raise this notice, so nothing changed there.
- Not changed, outside the fence: the operator-facing `console.error`
line in `ensureObjectStorage` still says "was published" and "publish
the object again". It is a server log line, not an answer, and a test
pins it.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01Utp6CbP6iSEGkWb5fn8yqd
Co-authored-by: Claude <noreply@anthropic.com>1 parent a5ddeb6 commit c6558d0
4 files changed
Lines changed: 68 additions & 4 deletions
File tree
- .changeset
- packages/metadata-protocol/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2519 | 2519 | | |
2520 | 2520 | | |
2521 | 2521 | | |
| 2522 | + | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
| 2526 | + | |
2522 | 2527 | | |
2523 | 2528 | | |
2524 | 2529 | | |
| |||
2528 | 2533 | | |
2529 | 2534 | | |
2530 | 2535 | | |
2531 | | - | |
| 2536 | + | |
2532 | 2537 | | |
2533 | | - | |
| 2538 | + | |
2534 | 2539 | | |
2535 | | - | |
2536 | | - | |
| 2540 | + | |
| 2541 | + | |
2537 | 2542 | | |
2538 | 2543 | | |
2539 | 2544 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
322 | 328 | | |
323 | 329 | | |
324 | 330 | | |
| |||
| 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 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
0 commit comments