Skip to content

Commit c88fe84

Browse files
committed
fix(spec,lint,metadata-protocol): the last gate-tier sentences name the props gate's error
Under the amended surface: three conversions/registry.ts docblocks, a metadata-protocol test comment, the row-on-success test header that arrived from main, and the pending page-action-row changeset each said the component-props gate files a warning. It files an error now. Claude-Session: https://claude.ai/code/session_012uFegdfR6K6uqvLzt7XsdZ Co-authored-by: Claude <noreply@anthropic.com>
1 parent ad47593 commit c88fe84

4 files changed

Lines changed: 15 additions & 13 deletions

File tree

‎.changeset/23103-page-action-row-on-success-and-executor.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The page action rows are `action:button` and `action:icon` (`properties`), and e
1515
- **`onSuccess`** was any value (`z.unknown()`). The runner reads only `ActionSchema`'s post-success block, `{ navigate, openIn }`, and classifies `navigate` with the url scheme set. So `onSuccess: { navigate: 'javascript:alert(1)' }` parsed clean, and so did a misspelled key or a callback shape, which the runner gives no reading at all. The rows now hold `ActionSchema.onSuccess`'s own block, the same instance by reference, so a row's verdict on any `onSuccess` value is the action's: the scheme set on `navigate`, the rename prescriptions for `url` / `redirectUrl` / `to` / `route` / `path` / `target` / `navigateTo` / `href`, and the closed `openIn` with its `'self'` default.
1616
- **The executor key** (`actionType` on a node, `type` on a member) is a free string, and the rows judged a url `target` only when it read `'url'`. The runner also dispatches `'navigation'`, its local alias of `'url'`, to the same navigator, so `actionType: 'navigation'` with `target: 'javascript:…'` parsed clean. The url executor now has one spelling on the rows: `'navigation'` is refused at the executor key, with the rename onto `'url'`. The key otherwise stays open: a handler a host registers under another name (`navigate_create`, `navigate_edit`, …) is still dispatched by name.
1717

18-
A page's `properties` bag is outside the stack parse. `os validate` judges it through its props gate, which parses the bag against these same rows, so it reports each refusal at the row's own path with the same text, as a `component-props-invalid` finding (that gate's one tier, a warning). A stored page still saves and loads.
18+
A page's `properties` bag is outside the stack parse. `os validate` judges it through its props gate, which parses the bag against these same rows, so it reports each refusal at the row's own path with the same text, as a `component-props-invalid` finding (an error, like every finding of that gate). A stored page still saves and loads.
1919

2020
### FROM → TO
2121

‎packages/lint/src/validate-component-props-row-on-success.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,9 @@
1111
// whose executor key refuses `'navigation'`, the runner's alias of `'url'`.
1212
// These pins hold that the gate reports each refusal at the row's own path,
1313
// with the parse's own first sentence, and stays silent on the accepted
14-
// control. The finding is a `component-props-invalid` warning, the gate's one
15-
// tier (its module header says why); no code in this package changed for it.
14+
// control. The finding is a `component-props-invalid` error, like every finding
15+
// of the gate (its module header says why); no code in this package changed for
16+
// it.
1617
import { describe, expect, it } from 'vitest';
1718
import { validateComponentProps, COMPONENT_PROPS_INVALID } from './validate-component-props.js';
1819

‎packages/metadata-protocol/src/protocol.stored-migration.test.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,8 +818,9 @@ describe('migrateStoredMetadata — a site the chain leaves as stored is a TODO,
818818
it('MEASURED — the write path judges the two door kinds differently, and the TODO rides on either outcome', async () => {
819819
// `properties.filter` sits in the page component's open `properties` bag:
820820
// the runtime save door does not parse it by `type` (the props gate is
821-
// `@objectstack/lint`'s, advisory). `dataSource.filter` is a declared key
822-
// of the strict component schema, so the save door refuses it there.
821+
// `@objectstack/lint`'s, an error at the CLI doors only).
822+
// `dataSource.filter` is a declared key of the strict component schema,
823+
// so the save door refuses it there.
823824
const bindingMixed = pageRow('deal_room', [
824825
grid({ stage: 'open' }),
825826
{ type: 'object-kanban', dataSource: { object: 'deal', filter: COMBINATOR }, properties: { objectName: 'deal' } },

‎packages/spec/src/conversions/registry.ts‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8031,8 +8031,8 @@ const translationPerAppSettingsRemoved: MetadataConversion = {
80318031
* (`actions[]`, `objects[].actions[]`, an `element:button`'s inline action).
80328032
* Retired from the load path: an author is refused at parse — except on an
80338033
* `element:button`'s inline action, which sits in the open `properties` bag the
8034-
* load path keeps as written, where the refusal is an advisory
8035-
* `component-props-invalid` finding at `os validate` / `os build` / `os lint`
8034+
* load path keeps as written, where the refusal is a
8035+
* `component-props-invalid` error at `os validate` / `os build` / `os lint`
80368036
* (the component-props gate, `@objectstack/lint`) — and data at rest and
80378037
* `os migrate meta` replay it.
80388038
*/
@@ -8331,11 +8331,11 @@ const translationComponentSubmitLabelRemoved: MetadataConversion = {
83318331
* type is that component's own vocabulary and is never read here.
83328332
*
83338333
* `retiredFromLoadPath`: an author is not silently rewritten — `os validate`,
8334-
* `os build` and `os lint` report an old spelling as an advisory
8335-
* `component-props-invalid` finding carrying the prescription (the
8334+
* `os build` and `os lint` report an old spelling as a
8335+
* `component-props-invalid` error carrying the prescription (the
83368336
* component-props gate, `@objectstack/lint`: a retired enum value is a value
8337-
* verdict, a warning; the load path keeps the open `properties` bag as
8338-
* written); stored rows replay it at rehydration
8337+
* verdict, an error like every other; the load path keeps the open `properties`
8338+
* bag as written); stored rows replay it at rehydration
83398339
* (`applyConversionsToStoredItem`) and `os migrate meta` lists the edit for
83408340
* existing sources. Idempotent by construction: the rewrite's output is
83418341
* outside its own input set.
@@ -14925,8 +14925,8 @@ function describeBlock(component: Dict): string {
1492514925
* of the strict page-component schema, so the row's next save is refused
1492614926
* there; `properties.filter` sits in the open
1492714927
* `properties` bag the runtime save does not refuse by component type, so there
14928-
* the refusal is the component-props gate's (`@objectstack/lint`, advisory),
14929-
* and a re-save goes through.
14928+
* the refusal is the component-props gate's (`@objectstack/lint`, an error at
14929+
* `os validate` / `os build` / `os lint`), and a re-save goes through.
1493014930
*
1493114931
* ## Every site left as stored is reported — `context.reportTodo`
1493214932
*

0 commit comments

Comments
 (0)