Repository navigation
Commit d2f19cb
test(plugin-view,plugin-list,plugin-calendar): drop the retired target key from three tree fixtures (objectui#8031) (#9818)
Fixes #8031
Test-only. Three `type: 'tree'` fixture fields drop the retired
snake_case target key —
in `plugin-view`'s expand-gate suite, `plugin-list`'s relational-sort
suite and
`plugin-calendar`'s expand-gate suite — plus one empty-frontmatter
changeset declaring
that nothing releases. No renderer, no `detectParentField`, no sibling
field touched.
## Every suite's verdict is unchanged, measured both ways
Same command before and after the edit, from the repo root, through the
shared
serialisation lock:
```
pnpm exec vitest run --reporter=verbose \
packages/plugin-view/src/__tests__/ObjectView.expandGate.test.tsx \
packages/plugin-list/src/__tests__/ListView.relationalSort.test.tsx \
packages/plugin-calendar/src/__tests__/ObjectCalendar.expandGate-6453.test.tsx
```
| reading | before | after |
|---|---|---|
| summary | `Test Files 3 passed (3)` · `Tests 23 passed (23)` |
identical |
| per file | plugin-view 8 · plugin-list 6 · plugin-calendar 9 |
identical |
| test-name set | — | `diff` of the two sorted verbose logs is EMPTY |
`turbo run type-check` for the three packages (each runs `tsc --noEmit`
and then
`tsc -p tsconfig.test.json`, so the edited test programs are in it): 19
tasks
successful, 19 total. `check-changeset-presence`, `check-control-bytes`,
`check-new-cross-file-line-citations`, `check-test-path-roots` and
`check-governed-queue-guard --test` all exit 0; the last prints
`NOT GOVERNED — 4 path(s) checked`.
## Why DROP and not rename — re-measured on the installed copy
`@objectstack/spec@17.4.0`, `FieldSchema.safeParse`, with a nonsense key
as the
negative control:
| input on a `tree` field | verdict |
|---|---|
| no target key (what this PR leaves) | ACCEPT |
| retired snake_case target key | REFUSE — `unrecognized_keys` **plus**
a rename hint |
| nonsense key `zz_nonsense_key` | REFUSE — `unrecognized_keys`, **no**
hint |
| declared `reference`, this object's own name | ACCEPT |
| declared `reference`, another object's name | ACCEPT |
The hint is attached to a refusal, not to an acceptance — the card's
two-directional
measurement reproduces at 17.4.0. On the read side `detectParentField`
has read only
the declared spelling since objectui#6837 half 2, and the list sort
picker's
object-def branch reads only that spelling too. So the key was refused
by the schema
and read by nobody, and a refused key annotates nothing: renaming it
would turn a
refusal into an ACCEPTED self-annotation these fixtures never made.
## Three premises corrected — read this before reusing the card's
framing
1. 1 parent b0e5660 commit d2f19cb
4 files changed
Lines changed: 68 additions & 3 deletions
File tree
- .changeset
- packages
- plugin-calendar/src/__tests__
- plugin-list/src/__tests__
- plugin-view/src/__tests__
| 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 | + | |
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
126 | 133 | | |
127 | 134 | | |
128 | 135 | | |
| |||
0 commit comments