Repository navigation
refactor(app-shell): bind or rename the six spec-symbol mirrors, shrinking the ledger 11 to 5 (objectui#7265 app-shell slice) - #9465
Conversation
…shrink the ledger
Six names, seven sites, four routes — not one mechanical pass.
Bound to the spec (same concept, so the key set stops being hand-maintained):
- RemoteTable imported from @objectstack/spec/contracts. The sibling client
in this same package already re-exports it rather than mirroring it; the
copy here had columnCount optional where the contract requires it.
- AdminScope / FlowRuntimeState derived as Partial<> of the spec type. Both
are draft/wire buffers, so the widening is confined to requiredness and
documented at the site.
- ObjectLike (useTrackRouteAsRecent) PICKed down to the two members it reads.
Renamed (different concept wearing the spec's name, so the name goes back):
- AppLike -> AppRouteLike. Keyed on _packageId, which the spec's translator
shape does not declare and would surrender to an index signature.
- ObjectLike (deriveRelatedLists) -> MergedObjectLike. Carries `list`, merged
on by MetadataProvider; the spec's shape is closed and has no member for it.
- FlowEdge -> the package's own declared dialect FlowDesignerEdge, of which it
was a third hand copy.
Both ledgers regenerated mechanically, never hand-edited. CLAIM_DEBT came back
byte-identical, so no rule 2 claim was left behind this time.
Co-Authored-By: Claude <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011QreXiyMEqKLN4U5daMPVa
…g nothing Empty frontmatter, and the declaration is measured rather than assumed: the built .js tree is byte-identical across all 461 emitted files, no name enters or leaves the published export set, and the one derivation that reaches consumers is pinned at compile time to the shape it replaced. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011QreXiyMEqKLN4U5daMPVa
✅ Console Performance Budget
The eager closure is every chunk the entry reaches through static imports — what the browser fetches and parses before the app renders. The entry chunk on its own is a small fraction of it. 📦 Bundle Size Report
Size Limits
|
Contract reviewHead reviewed: ① Derived judgments⭐ The declaration was MEASURED structurally, not argued. Corroborated independently at this seat: ⭐ And the dev did NOT re-declare to ⇒ This seat's ruling: the Six names, seven sites, four routes — deliberately not one pass, which is what the dispatch asked for and what a blanket "import from spec" would have destroyed:
Verified here: the ledger diff removes the whole ② SemverNo package bump at all — the changeset declares "Internal refactor only — releases nothing." Correct, and now independently supported: the emitted ③ Boundary flags
Ablation — three legs, and the third is why I trust the secondPredicted in writing before running. Leg A (IN): restore the That third leg is the difference between a mutation that reddens and a mutation that reddens for the reason claimed. VerdictPASS. Carriers stripped in this same stroke; landing follows on a full green read. Generated by Claude Code |
…ectstack-ai#6286 release note (objectui#9528) (objectstack-ai#10970) Fixes objectstack-ai#9528 Clause-②: no — release-note prose; no contract, accept set or public surface changes (a contract review is still owed: the diff is `.changeset` prose) ## What changes One sentence in the **pending** `.changeset/6286-explain-batch-cap-from-spec.md`. That body publishes verbatim into `@object-ui/plugin-grid`'s CHANGELOG at the next release, and the release PR objectui#5400 regenerates from `main`, so this only helps if it lands before that PR merges. The frontmatter is untouched: `check-changeset-overwrite.mjs` prints `declared at base: @object-ui/plugin-grid: patch` and `declares now: @object-ui/plugin-grid: patch`. Before: > … is exactly the drift `scripts/check-spec-symbol-derivation.mjs` argues about — and could not catch here, because both of its scanners skip non-exported declarations and this const was module-local (objectui#5899). After: > … is exactly the drift `scripts/check-spec-symbol-derivation.mjs` argues about — and could not catch here: when this change landed, both of its scanners skipped non-exported declarations, and this const was module-local (objectui#5899). objectui#6291 has since removed that filter from both scanners. ## Why this wording, and why the history stays The sentence was **true when written and went false later**. It is not a false sentence from the start. So the fix keeps the explanation, puts it in the past tense and dates it. Deleting it would lose true history. **1. True when the changeset landed.** `c38162d7c9` (objectstack-ai#6333, 2026-08-25) added the changeset. At that commit, both scanners in the gate open with the same filter line, once in `scanFileForClaims` (rule 2) and once in `scanFile` (rule 1): ``` if (!hasExportModifier(stmt)) continue; ``` The table below counts that line and two related markers in each revision of the gate file (`git show REV:scripts/check-spec-symbol-derivation.mjs | grep -c …`): | revision | `if (!hasExportModifier(stmt)) continue;` | `const hasExportModifier` | `// No export filter` | |---|---|---|---| | `c38162d7c9` (objectstack-ai#6333 lands) | 2 | 1 | 0 | | `9207c53e45^` | 2 | 1 | 0 | | `9207c53e45` (objectstack-ai#7274, objectui#6291) | 0 | 1 | 2 | | `b120b66077` (this PR's base) | 0 | 0 | 3 (two code comments plus one header mention of them) | **2. False since `9207c53e45`** (objectstack-ai#7274, objectui#6291, 2026-09-02). On the base, the two scanners now carry `// No export filter: a module-local declaration carrying a spec-alignment` in `scanFileForClaims` and `// No export filter (objectui#6291). A module-local declaration under a spec` in `scanFile`. The gate's own header says the same thing: "⛔ HISTORY, NOT BEHAVIOUR. Neither scanner has an export filter today." The order of the two commits was checked on a shallow checkout, so it needs a control leg: - `git merge-base --is-ancestor c38162d 9207c53` exits 0. - The reverse check exits 1. - Control leg: `git merge-base --is-ancestor 62311b6 c38162d` exits 0. `62311b6419` is the gate's first commit (2026-07-30), older than both. **3. Which rule would catch this const, then and now.** I measured this with a 2×2 probe, not read it off the header: - **Fixture A** is the pre-objectstack-ai#6333 hook source, `git show c38162d^:packages/plugin-grid/src/hooks/useRecordCrudVerdicts.ts`. In it, `const EXPLAIN_BATCH_MAX_RECORD_IDS = 200;` is module-local. - **Fixture B** is the same file with `export` added. It is the control. - Both fixtures were fed to the scanners of both gate versions, using today's spec export set (5085 names; `EXPLAIN_BATCH_MAX_RECORD_IDS` maps to `@objectstack/spec/security`). - The only change to the `c38162d7c9` copy was exporting its `scanFile`. The anchor count was checked on disk: 1 plain before and 0 after; 0 exported before and 1 after. | fixture | gate at `c38162d7c9`: rule 1 | rule 2 | gate at `b120b66077`: rule 1 | rule 2 | |---|---|---|---|---| | A — module-local (verbatim) | none | none | `const` finding | none | | B — `export` added (control) | `const` finding | none | `const` finding | none | What the probe shows: - **When objectstack-ai#6286 landed, the export filter is what hid the const from rule 1.** The control proves the old rule 1 flags the const as soon as it is exported. - **Today rule 1 (the name match) reports it.** `DEBT` is empty and no `ALLOW` key names it, so it would be a fresh finding and the gate would exit 1. - **Rule 2 reports it in no cell, and no filter is involved.** `findClaim` returns `null` on the const's doc comment. The comment names `@objectstack/spec@17.0.0-rc.6` but contains none of the `CLAIM_PATTERNS` phrases. - So for this const, the card is right that rule 1 is the operative rule. The claim note's point is also true: both scanners dropped the filter. But that matters for rule 2 only in general, not for this const. The new sentence therefore states only history: the filter existed when the change landed, and objectui#6291 removed it from both scanners. It asserts no live capability of the gate, so a later change to the gate cannot make it false the way the old sentence became false (AGENTS.md objectstack-ai#9). ## The other pending changesets that name the gate `git grep -l check-spec-symbol-derivation b120b66 -- .changeset` lists **seven** files. As a positive control, the same form of search for `plugin-grid` in the 6286 file counts 1. I widened the search to every spelling of the gate (`spec-symbol`, `check:spec-symbols`), which gives **17** files, and read all 17 in full. I also grepped every pending body for `non-exported|unexported|not exported|export filter|hasExportModifier|export modifier|exported only` and for `module-local`. **Only the 6286 file states the export-filter property.** The other 16 say nothing about it: - `7265-core-context-token-mirrors`, `7265-data-objectstack-filter-operator-rename`, `7265-components-sort-direction-bound`, `7265-plugin-detail-record-alert-renderer-props`, `spec-symbol-mirrors-app-shell-7265`, `7265-types-user-filter-field-derives`, `9596-debt-issue-anchor-truthiness`: these describe module-local mirrors that the rule-1 `DEBT` ledger carried, which fits today's behaviour. - `console-form-container-specs-one-declaration-5596`: says derivation is the gate's sanctioned form. - `listview-comment-pair-4559`: says rule 2 reads the *attached* comment block. - `9542-result-dialog-i18nlabel`: names the rule-2 failure class. - `3162-types-ledger-batch8-verdicts`, `spec-pin-17-1-0-5328`, `spec-refresh-17-2-0-5668`: ledger and pin history. - `ci-decide-markdown-trace-9241`: says the gate opens `content/docs/**`. - `8841-tree-view-config-derive` and `date-range-default-range-binding-4984`: explain a miss by **name matching** (and, in 4984, rule 2's tie test). That is a different property, which I did not re-measure here. ## Gates (all read at HEAD `25b8b6eeb2`, the only commit on this branch) | command | exit | verdict line | |---|---|---| | `pnpm check:changeset-claims` | 0 | `✅ No pending changeset names a file this change touches.`; self-contradiction: `Every package declared across those 1 body(ies) is either not negated in its own prose, …`; born-false: `Line addresses read in them: 0.` | | `node scripts/check-changeset-presence.mjs` | 0 | `✅ No source or published contract of a released package changed in this range, so no changeset is owed.` | | `node scripts/check-changeset-overwrite.mjs` | 0 (report-only) | `1 modified` — case 2, "CORRECTING a declaration on purpose … prose that no longer matches the change"; the declared package set is unchanged | | `node scripts/check-changeset-no-major.mjs` | 0 | ✅ No changeset declares a major bump. | | `node scripts/check-changeset-fixed.mjs` | 0 | `✅ All workspace packages are in the changeset fixed group.` | | `pnpm check:control-bytes` | 0 | `✅ check-control-bytes: OK (scanned 9240 tracked text file(s); skipped 85 binary).` | | `pnpm check:new-line-citations` | 0 | `VERDICT new-cross-file-line-citations: 0 new citation(s), enforcement report-only -> exit 0` | | `pnpm exec vitest run --maxWorkers=2` on the 24 `scripts/__tests__/*.test.ts` that mention `.changeset` (via `os-verify-lock.sh`) | 0 | `Test Files 24 passed (24)` / `Tests 914 passed (914)` / `VERDICT command-exit 0` | The 24-file set is a superset of what `node scripts/markdown-test-inputs.mjs --changed -` returns for this file. That helper records `.changeset/**` as the input of `check-changeset-no-major.test.ts`; the positive control is `packages/plugin-dashboard/README.md`, which it echoes back. No package source, gate or test is touched, so nothing else is owed. `node scripts/check-governed-queue-guard.mjs --test` on the file answers `✅ NOT GOVERNED`. ## Acceptance notes - `spec-symbol-mirrors-app-shell-7265` reads "held six declarations … Four are now bound … and three were renamed". That is 4 + 3 against six. Its commit (`14a1b92035`, objectstack-ai#9465) removes six app-shell names from `DEBT`, so one name may have held two declarations. **I did not measure this.** That changeset has empty frontmatter, so it publishes nothing. Nobody is carrying this; it is only noted here. - The 24-file test run printed one `fatal: Invalid symmetric difference expression 0000…` line on stderr while every test passed. The SHA in it is all zeros; `check-changeset-overwrite.test.ts` and `docs-build-trigger.test.ts` are the two files in the set that spell such a SHA. I did not trace it further. It is not a failure. ## Contract review A contract review is owed and the PM seat commissions it. Everything above is meant to be re-runnable: every quoted code string, commit and command reproduces on this repo. This PR touches no gate, adds no checker, and leaves the frontmatter and bump level unchanged. Session: `https://claude.ai/code/session_01EBx9rvB7dufCz4at53x35U` --- _Generated by [Claude Code](https://claude.ai/code/session_01EBx9rvB7dufCz4at53x35U)_ Co-authored-by: Claude <noreply@anthropic.com>
Part of objectui#7265 — the⚠️ That card stays open: it is one ledger worked in slices by design, and this takes one package's worth of it. Slice 1 (
@object-ui/app-shellslice.@object-ui/core, 2 entries) landed as objectui#9127.First: the ledger, re-derived rather than inherited
The card's body says 14. The seat that landed slice 1 said 11 and said plainly it could not re-measure. Neither number was taken on faith —
--ledgeris the script's own authoritative reading and it was run here, in a worktree with dependencies installed, exit code captured by redirect before any pipe:Before this PR: 11 names in 5 packages. The gate's own banner agrees, which is the second reading of the same population:
11 untriaged collisions in 5 packages.@object-ui/app-shell@object-ui/types@object-ui/components@object-ui/data-objectstack@object-ui/plugin-detail@object-ui/plugin-tree/TreeConfigis genuinely gone — the card's 14 is stale by one entry beyond slice 1's two, exactly as slice 1 reported.CLAIM_DEBTcame back byte-identical from--claim-ledger. Slice 1 was FORCED to regenerate it too, because the const it deleted carried aMirrors …comment; none of the seven declarations here carried a spec-alignment claim, so that coupling did not repeat. Worth recording, since slice 1 told the next slice to expect it.Both blocks were regenerated mechanically. Neither was hand-edited.
Six names, seven sites, four routes — ⛔ not one mechanical pass
ObjectLikehad two sites, and they did not get the same answer, which is the whole argument for reading each entry rather than sweeping them.RemoteTabledatasource/DatasourceResourcePage.tsxGET …/remote-tablesreturns. The sibling client one directory over (external/api.ts) already re-exports the spec's type, with the drift that motivated that call written down in place. The copy here hadcolumnCountoptional where the contract requires it.AdminScopemetadata-admin/PermissionAdvancedFacets.tsxPartial<>of the spec's authoring shape. Same six keys, same order; the editor materializes the facet fromasObject(draft.adminScope), so a half-filled draft is the normal mid-edit state and the widening is confined to requiredness.FlowRuntimeStatestudio-design/StudioDesignSurface.tsxPartial<>of the spec's report. It is the samegetFlowRuntimeStatescontract, read as UNVALIDATED wire JSON from a possibly-older backend — the effect already narrows all three by hand. The local copy was three keys behind the contract.ObjectLike(site 1)hooks/useTrackRouteAsRecent.tsPickof the spec's minimal object document, down to the two members the hook reads.ObjectLike(site 2)utils/deriveRelatedLists.tsMergedObjectLikelist, whichMetadataProvider.mergeViewsIntoObjectsmerges on after authoring. The spec's shape is closed and has no member for it, andnameis optional here because this also describes an object still loading. A different layer, so the spec's name goes back.AppLikeutils/appRoute.tsAppRouteLikeAppLikeis whattranslateAppconsumes. These helpers read_packageId(the ADR-0048 route key) first, which that shape does not declare — it would arrive through its index signature asany, taking thetypeof packageId !== 'string'guard with it. AndresolveHostAppSegment's documented step 4 exists FOR an app with neither_packageIdnorname, so a requirednamewould assert away the branch it was written to serve.FlowEdgemetadata-admin/inspectors/FlowEdgeInspector.tsxFlowDesignerEdgeFlowDesignerEdge, which two sibling files already take fromflow-canvas-layoutand where the divergence from the spec is already reasoned. No new name was invented.⇒ 4 bound to the spec, 3 renamed, 0 moved to
ALLOW, 0 left in place. NoALLOWentry was added, so the declared-dialect count is unchanged at 17 — a reasoned waiver would have been the wrong tool for all seven sites.Both renames get the two-way ratchet the package already runs in
spec-symbol-parity.test.ts: the spec must not own the new name, and must still own the old one, so neither workaround can outlive its reason.Evidence
Test scope. The WHOLE
packages/app-shelltree, ⛔ not just the edited files, run from the repo root through the shared verify lock, which printed its own verdict line:Plus the scripts-side suite the edited gate owes (found with
git grep -l, not recalled): 5 files, 178 tests, exit 0.type-checkexit 0 for both projects;--listFilesconfirms all seven edited files are in the compiled set, with a negative control that returns 0.Ablation — prediction written BEFORE running, both legs.
RemoteTablemirror at its site, ledger left as this PR leaves itRemoteTablereported as an untriaged collision atDatasourceResourcePage.tsx:138; new pin failed withexpected [ 'RemoteTable' ] to deeply equal [], 1 failed / 18 passedSortDirection,@object-ui/components) from the block, ⛔ zero source files touchedSortDirectionatpackages/components/src/renderers/complex/data-table.tsx:65; app-shell pins 19 passedLeg B is the one that matters: a sibling card this shift showed that mutating only the IN legs proves nothing about the OUT legs. Every mutation was proven on disk by anchor count AND blob hash before any result was read, and every restore was proven by state —
git diff HEADempty and the blob hash back to HEAD's — ⛔ never by an exit code. Each script carriedtrap … EXIT INT TERMwith absolute repo-root paths.The compile-time pins are compiled. This file's own header records that its
Assertlines were once literally commentary. Falsifying the new published-face pin redstsc -p tsconfig.test.jsonwithTS2344: Type 'false' does not satisfy the constraint 'true'at the exact line, so they can fail.Gates.
check:spec-symbolscheck:control-bytescheck:new-line-citationscheck:changeset-claimscheck:unreferenced-sourcescheck:test-path-rootscheck:comment-mask-corpuscheck:installed-pin-claimscheck:phantom-depscheck:unused-deps— all exit 0.check-changeset-presenceandcheck-changeset-no-majorexit 0.check-governed-queue-guard --teston all 11 paths: NOT GOVERNED.check:spec-floorsexits 1 with 3 findings, allno-artifactforplugin-gantt/plugin-timeline/plugin-tree— a whole-workspace-build PRECONDITION this run did not meet, ⛔ NOT MEASURED rather than red.@object-ui/app-shellis judged and clean in the same run (18 of 39 packages inspected, 309 pairs judged). The floor question was also answered directly: all four newly imported symbols are present in@objectstack/spec@17.0.0— the declared floor — checked against the registry tarball with a negative control name that returned 0 hits.pnpm lintis a whole-farm run and belongs to CI; the narrowing here is declared with its three readings. Population: 4965 of 4967 lintable tracked files in scope, read from eslint's own resolved config viaisPathIgnored. Narrowed run: 10 files counted from--format json, exit 0, 0 errors / 35 warnings — and the SAME command over the same paths at the branch point gives 0 errors / 35 warnings, so this diff adds no finding. Invariance: this repo does not enable type-aware linting (tseslint.configs.recommended, noparserOptions.project, noprojectService), so the diff cannot move any untouched file's verdict.Clause-② — declared
yeson the claim, and the diff was measuredThe measurement, taken by building
packages/app-shellat this branch's head and again with the seven source paths reverted to the branch point:.jsfiles are byte-identical,diff -rqexit 0. The same command reported 3 differences on the.d.tspass in the same session, so it is an instrument that can report one;.d.tsfiles move BYTES. Two are identical once comments are stripped and the renamed identifier is substituted — and neither identifier was ever exported, so no consumer can name either;useTrackRouteAsRecent) reaches consumers through the exportedUseTrackRouteAsRecentOptions, and is pinned at compile time to the exact shape the hand-written interface declared;@objectstack/spec/systemwas already imported there, and the package is a directdependenciesentry.⇒ On the structural reading the honest answer is that this diff moves no published face.⚠️ The label is attached anyway, on both carriers, because the declaration limb the live carrier check reads is the CARD'S CLAIM COMMENT, which says
Clause-②: yes— a seat re-declaring that unilaterally would create exactly the carrier half-state the patrol exists to catch. The measurement above is offered so a reviewer can clear it quickly, ⛔ not as a reason to skip the review.Acceptance notes
adminScopethe spec rejects: every control there patches key-by-key, so flipping a switch before naming a business unit writes{ includeSubtree: true }, whichAdminScopeSchemarefuses (businessUnitis its one required key). There is no client-side parse before Save, and the section's own summary badge reads0in that state, pointing the author away from the cause. Behaviour is IDENTICAL before and after this diff — binding the type made the divergence legible, it did not create it. Dedup ran one targeted semantic search with a lit control in the same minute: control 2 hits including a closed card, subject 0.FlowNodeInspector.tsxandFlowPreview.tsxstill writetype FlowEdge = FlowDesignerEdge, keeping a spec-owned name as a local alias. The gate skips these deliberately (isPureAlias), so they are not ledger entries and not a defect — but the reader hazard the ledger exists for is the same one. Carrier: none; recorded here rather than filed because the gate's narrowing is a decision, not an oversight.Notes for the next slice
The five that remain are ⛔ not one class, and the two hardest are still there:
normalizeFilterOperatoris a second normalizer over the spec's (a behaviour question, not a mirror deletion) and the@object-ui/typespair sits ondomain:spec, which triage flagged for hand-off. What this slice adds to slice 1's method: where the concept really is the spec's but the local type must stay wider, a type OPERATOR (Partial/Pick) over the spec's symbol keeps the key set bound while stating the widening in one place — the local declaration stops being able to drift, which a hand copy with the same members cannot promise.Session:
https://claude.ai/code/session_011QreXiyMEqKLN4U5daMPVaGenerated by Claude Code