Repository navigation
Commit dc9e29b
docs(plugin-dev): document the malformed-stack boot posture and pin its division (#19602)
Fixes #15292
Clause-②: no
Ruling C (`5644710907`, director seat, decision batch #123 item 4,
maintainer 「同意」 2026-09-12) settled this card and returned it to
`pm:queue`. This PR is **item 2** (the ordered reading, which came
first) and **item 3** (the posture text).
⛔ It is deliberately **not item 1**. Making `DevPlugin.init` emit the
malformed-metadata diagnostic, and adding the skipped app to the CLI
startup summary, is the cli seat's sibling PR — the ruling's own State
line: 「posture text is the spec seat's; the diagnostic implementation is
the cli seat's sibling PR」.
---
## Item 2 — the reading, and which arm it lands on
Ruling C, verbatim:
> read the two branches twenty lines apart (`dev-plugin.ts:505` vs
`:856+`) and write down their triggering conditions. If they are two
different malformations with an unwritten division (structural refusal
vs. missing-field degrade), the division is DOCUMENTED as the posture,
and the loud diagnostic applies to the degrade branch; if they really
are the same defect handled two ways, the degrade+loud posture wins on
both.
### Verdict: **arm 1 — two different malformations, and the division is
now documented.**
With one correction the ruling could not have made from the card:
**there is no refusal half.** Neither branch refuses today. Both already
degrade.
### Finding the branches
Coordinates were resolved by shape, then checked against the numbers
rather than trusted:
- `dev-plugin.ts` last changed on **2026-09-10** (`50bc9c73b5`, a
9-insert / 9-delete in-place edit), *before* the ruling — so `:505`
(`new AppPlugin(this.options.stack)`) and `:512`
(`reportOptionalLoadFailure(`) still land exactly where the card cites
them.
- `:856+` does **not**. The card's prose attaches it to *"Every child
`init()` failure is likewise caught ... with exactly one deliberate
exception (#5301, organizations)"* — that is the **child-`init()`
loop**, which sits at `:891` in the post-#15232 tree the `:505`/`:512`
numbers come from. At literal `:856` in that same tree sits the
unrelated `@objectstack/rest` optional-load catch. The card mixed
coordinates from two trees: in the pre-#15232 tree (main on the card's
filing date, 2026-09-04) `:856` **is** `await plugin.init(ctx)`, but
there `:505` is not `new AppPlugin`. Resolved in favour of the prose,
which is unambiguous.
### Triggering conditions — measured, with a lit control
| input | `new AppPlugin(bundle)` — branch `:505` | the package-list
parse — reached from `AppPlugin.init()`, i.e. the child-`init()` loop |
|---|---|---|
| app payload, no `manifest.id` / `manifest.name` | **THREW**
`[AppPlugin] bundle has app payload but no manifest.id / manifest.name`
— a bare `Error`, no ADR-0112 `code` / `status` | no throw |
| `packages[]` entry with its body inlined instead of wrapped | **no
throw** | **THREW** `INVALID_ARTIFACT_PACKAGE_ENTRY` / `422` |
| healthy control (neither malformation) | no throw | no throw |
The two defect rows are **exact complements**, and the control row is
silent on both — so neither instrument is stuck-on-throw and neither
branch is a second opinion on the other. The control earned its place
twice: two earlier probe designs produced a green that the control
exposed as meaningless (mocking `@objectstack/objectql` breaks
`@objectstack/runtime`'s own import, collapsing every case onto "runtime
not installed"; and a mock context too thin for `AppPlugin.init` killed
it before the parse, so the malformed case and the healthy case emitted
the same line).
### The load-bearing correction
Before this PR, the in-file comment then at `:509` read — 1 parent 1c16889 commit dc9e29b
5 files changed
Lines changed: 395 additions & 7 deletions
File tree
- .changeset
- content/docs/plugins
- packages/plugins/plugin-dev/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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
363 | 363 | | |
364 | 364 | | |
365 | 365 | | |
| 366 | + | |
366 | 367 | | |
367 | 368 | | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
368 | 412 | | |
369 | 413 | | |
370 | 414 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
365 | 365 | | |
366 | 366 | | |
367 | 367 | | |
368 | | - | |
369 | | - | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
370 | 374 | | |
371 | 375 | | |
372 | 376 | | |
| |||
0 commit comments