Repository navigation
Commit c351a84
fix(objectql,cli): a navigation contribution relocated past a missing group now says so, at
* feat(objectql,cli): make a relocated navigation contribution a real diagnostic
`SchemaRegistry.applyNavContributions` relocates a contribution whose `group`
names no group in the target app to the app's top level. That stays — the
read-time fold is order-independent by design and contributions into optional
groups must keep working — but the only trace was one `log()` call gated at
`info`/`debug`, so at `OS_REGISTRY_LOG=warn` an app's information architecture
changed in complete silence.
The trace is now an ADR-0038 BuildIssue-family record (ADR-0112 D6c: a
diagnostics code, lowercase and out of the error ledger) naming the
contributing package, the app, the missing group id and the relocated items.
It is carried on the app (`getAppNavDiagnostics`) and announced through a new
level-aware `warn()`, once per registry per distinct mis-aim.
`os build` answers the same question at compile time over a composed artifact,
through the same predicate, and reports it loudly without refusing.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* test(cli): pin the nav-group check through the command's own parse chain
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* chore: classify the new diagnostic code, changeset, and gate repairs
- `packages/runtime/src/dispatcher-error-vocabulary.ts`: classify
`nav_contribution_group_missing` as `foreign-vocabulary` / door `none`.
ADR-0112 D6c on all four of its tests — payload of a success, describes an
artifact, severity `warning`, never routed to `error.code` — so it is
lowercase and stays OUT of the error-code ledger. The gate reports it here
rather than delegating to `check:error-code-casing` because the constant is
referenced (`objlitconst`), not quoted at the stamp.
- `content/docs/permissions/system-context.mdx`: line rot repaired by
`check-system-context-census --fix` after the registry edit shifted anchors.
- `packages/cli/src/utils/nav-contribution-groups.test.ts`: module-top
side-effect load of the dist-resolved dependency, per
`check:test-source-alias` — a first load inside a clocked window is the
measured cliff that gate exists to stop.
- changeset: objectql + cli patch.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* chore(runtime): keep the tracker id out of the classification row's prose
`check:doc-authoring` — a runtime string reaches authors, operators and
generated surfaces, none of whom can resolve `#NNNN`. The anchor moves to an
adjacent comment, where the reader who can resolve it is already looking.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* docs(ui): state what happens when a nav contribution names an anchor that is not there
The Setup app page explains the shell/anchor mechanism — the shell publishes
empty group anchors and capability plugins contribute into them — but stopped
short of the failure the anchor id makes possible. A contributor cannot see the
shell's ids at authoring time, so a typo is undetectable from its own source,
and the platform relocates rather than refusing: the menu renders, a smoke test
passes, and the entry has moved one level up.
Documents the rule and the diagnostic that now reports it: the `warn`-level
`nav_contribution_group_missing`, the per-app `getAppNavDiagnostics` reader, and
the `os build --json` `navigationGroupDiagnostics` key — following the
`bodyExtractionWarnings` precedent, which documents a build-only JSON key on the
page that owns the behaviour rather than in a CLI schema dump.
No hand-written page was falsified by the code change; this fills a gap rather
than correcting an error. The `packages/spec` describe() for the key has the
same gap and is filed separately — that string is embedded in ~14 generated
artifacts, so it belongs in its own PR.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* docs(ui): home the mis-aimed-anchor section under Navigation
It landed mid-intro on the first pass, which orphaned the intro's closing
paragraph under an H3 and put that H3 ahead of the page's first H2. It now sits
at the end of `## Navigation`, directly after the anchor table — where a reader
has just learned the anchor ids and would ask what happens if one is wrong.
Content unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* fix(cli): fill the declared `warnings` key instead of adding a payload key
Two standing pins caught the first cut and both are right:
`build-json-advisory-parity.e2e.test.ts` and
`build-json-undeclared-key-parity.e2e.test.ts`, each titled "adds NO new
top-level key to the payload — this fills a declared key, it is not a new
surface". #11643 and #11727 each faced this choice and filled `warnings`; that
payload's shape is mirrored from `os validate --json` so a consumer reads one
shape per class from either command. `navigationGroupDiagnostics` is gone and
the findings ride `warnings`.
A third pin in the same file settles what that implies: the only permitted
residue between the two payloads is the structural advisory set, and "nothing
rides in build that validate does not also report". So `os validate` computes
the same list — which is the better answer on its own terms, since an author
running `validate` should see a mis-aimed contribution exactly as one running
`build` does.
`findNavGroupDiagnostics` now derives the artifact's package entries itself
(`artifactPackagesOf`), so both commands reach the check through one call that
needs only the parsed stack, and the test uses that shipped derivation rather
than a second copy of the id rule.
`...navGroupWarnings` is APPENDED after `structuralWarnings` in validate, and
that position is load-bearing: #12047's `the order lives at ONE site` pin
matches the five existing members as contiguous source text, which is how it
proves the order is defined once rather than re-spelled per exit. Appending
keeps that pin guarding exactly what it was written to guard — no gate was
loosened to get green.
Reproduced first: 2 failed / 12 passed on the two key-set pins, naming
`navigationGroupDiagnostics`; 14 passed after. The #12047 pin was then caught
locally by the same discipline and is green with the other three (27 passed
across the four files). Full cli unit project: 165 files / 2176 tests.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
* docs: correct four places whose prose the payload-shape fix falsified
All four were self-inflicted by the previous commit, which deleted the
`navigationGroupDiagnostics` key and made `os validate` compute the list — and
all four are exactly the class the docs-drift bot says it cannot detect, since a
page stating a rule by its inputs shares no identifier with the emitter.
1. `content/docs/ui/setup-app.mdx` documented the deleted key. That page is what
a contributor reads before authoring an anchor id, so it is the worst place
in the repo for the sentence to be wrong. It now says the findings ride the
declared `warnings` key and that `os validate` reports them too.
2. The changeset named the deleted key. This one propagates: the changeset is
this PR's input to the release notes, so a wrong key here would have become a
wrong key in a published release.
3. `nav-contribution-diagnostics.ts` claimed this file is registered in
`check-error-code-casing`'s `EXEMPT_FILES`. It is not, and the reason is the
discovery the previous commits recorded: the code is REFERENCED at the stamp
(`objlitconst`), so that gate's lowercase delegation never reaches this
position and `dispatcher-error-vocabulary` classifies it instead. The
docstring was the pre-discovery version and sent the next reader to the wrong
file to look for a row that is not in it. It now describes what was actually
done, and says not to add an `EXEMPT_FILES` entry — that list exempts files
from a gate this one does not trip.
4. The vocabulary row's own `why` prose carried the dead key. Corrected to the
`warnings` list of both commands; the four-test D6c argument is untouched.
The historical note in `nav-contribution-groups.ts` keeps the old key name on
purpose — it describes what the first cut did and why the pins rejected it.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UHvF5hyiZjnCyExFnfQB8m
---------
Co-authored-by: Claude <noreply@anthropic.com>warn and at build time (#14920)1 parent 7bc5d37 commit c351a84
15 files changed
Lines changed: 1275 additions & 47 deletions
File tree
- .changeset
- content/docs
- permissions
- ui
- examples/app-multi-package/src/packages
- core
- orders
- packages
- cli/src
- commands
- utils
- objectql/src
- runtime/src
Lines changed: 51 additions & 0 deletions
| 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 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
253 | 253 | | |
254 | 254 | | |
255 | 255 | | |
256 | | - | |
| 256 | + | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 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 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
82 | 113 | | |
83 | 114 | | |
84 | 115 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
47 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
48 | 60 | | |
49 | 61 | | |
50 | 62 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
35 | 51 | | |
36 | 52 | | |
37 | 53 | | |
| |||
46 | 62 | | |
47 | 63 | | |
48 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
49 | 78 | | |
50 | 79 | | |
51 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
46 | 50 | | |
47 | 51 | | |
48 | 52 | | |
| |||
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
181 | 196 | | |
182 | 197 | | |
183 | 198 | | |
184 | 199 | | |
185 | 200 | | |
| 201 | + | |
186 | 202 | | |
187 | 203 | | |
188 | 204 | | |
| |||
445 | 461 | | |
446 | 462 | | |
447 | 463 | | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
448 | 495 | | |
449 | 496 | | |
450 | 497 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
| 35 | + | |
34 | 36 | | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
121 | 127 | | |
122 | 128 | | |
123 | 129 | | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
124 | 135 | | |
125 | 136 | | |
126 | 137 | | |
127 | 138 | | |
128 | 139 | | |
129 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
130 | 149 | | |
131 | 150 | | |
132 | 151 | | |
| |||
270 | 289 | | |
271 | 290 | | |
272 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
273 | 312 | | |
274 | 313 | | |
275 | 314 | | |
| |||
0 commit comments