Commit 97b0798
* fix(spec,rest,runtime)!: the ADR-0045 publish gate gets its own machine-managed key (#4829)
`filterAppForUser` read `app.hidden` as an access gate. `hidden` does not mean
that — its contract, written in `app.zod.ts` the day the key was born alongside
the built-in Account app, is navigation presentation: hidden apps stay fully
routable and permission-checked, they just do not appear in the App Switcher.
So the platform's own `account` app, authored `hidden: true` on purpose, was
erased from `GET /meta/app` for every user without builder access — password,
avatar, sessions and inbox unreachable behind "App not available", while any
admin saw a healthy system.
ADR-0045 §3 never introduced `hidden`; it borrowed it, citing an "ADR-0019
launcher contract" that does not exist (ADR-0019 contains no `hidden`). One
boolean carried two contracts that disagree on whether a normal user may reach
the app.
Per the maintainer's 2026-08-04 ruling (direction A1) and the 2026-08-07 window
re-ruling (lands in v17):
- `AppSchema` declares `_unpublished`, the machine-managed publish gate. The `_`
prefix is this repo's existing marker for the channel tooling stamps onto
artifacts (ADR-0010's `_lock` envelope). Declared rather than omitted because
the write path validates against this schema, so an undeclared key would make
the platform's own flip unwritable. The strict door answers `unpublished` /
`published` / `draft` with "publish state is not authorable".
- `hidden` returns to navigation semantics only; its docblock carries the incident.
- The REST gate judges `_unpublished`; pins now assert both directions, plus an
end-to-end wire pin of the account-app repro (`meta-app-publish-gate.test.ts`).
- `publish-drafts` clears `_unpublished` and copies `hidden` through untouched.
- ADR-0045 amended, its dangling ADR-0019 reference corrected, and both
implementation sites anchored in `scripts/adr-anchors.json` — neither carried
an anchor before, which is why §3 could be changed without anyone knowing a
decision was being changed.
- ADR-0087 conversion `app-hidden-to-unpublished` carries stored rows across.
`retiredFromLoadPath` is load-bearing here: it confines the rewrite to stored
rows, so an authored `hidden: true` — the Account app included — is never
converted into an app no normal user may reach.
Fixes #4829
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEKYRu2XjMPRA2AR4ueKUu
* test(spec): pin the `_unpublished` acceptance face in both directions (#4829)
`_unpublished` is machine-managed but DECLARED — the write path validates
against AppSchema, so an undeclared key would make the platform's own
visibility flip unwritable. What keeps it out of an author's hands is the `_`
prefix plus the strict-door prescriptions, so both halves are pinned rather
than asserted in a comment: the schema accepts the gate, the author-shaped
spellings (`unpublished` / `published` / `draft`) get "publish state is not
authorable" instead of a rename suggestion, and `hidden` still parses because
the key was never the wrong one.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CEKYRu2XjMPRA2AR4ueKUu
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 73bff86 commit 97b0798
19 files changed
Lines changed: 870 additions & 95 deletions
File tree
- .changeset
- content/docs/references/ui
- docs
- adr
- packages
- objectql/src
- rest/src
- runtime/src
- domains
- spec
- authorable-surface
- liveness
- src
- conversions
- migrations
- ui
- scripts
| 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 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
| 76 | + | |
76 | 77 | | |
77 | 78 | | |
78 | 79 | | |
| |||
0 commit comments