@objectstack/lint 17.2.0 → 17.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -70,6 +70,15 @@ type AuthoringRuleTier = 'gating' | 'advisory';
70
70
  * `os validate`'s verdict to give), so it runs BOTH tiers on the normalized
71
71
  * stack. Every rule here is written to tolerate that — it is what `os lint`
72
72
  * already did for the reference-integrity suite and the security linter.
73
+ * Since #16095 the `parsed` tier under `os lint` is that same normalized stack
74
+ * with its inline `handler` callables LOWERED to a metadata `body` (the
75
+ * `lowerCallables` pass `os build` runs before its parse) — still unparsed,
76
+ * still the same input, but carrying the `body.source` the `hook-body-*` /
77
+ * `hook-api-update-readonly-*` family opens on. Without it the family judged
78
+ * only hooks authored with an explicit `body`, which the reference app never
79
+ * writes (39 of 39 hooks are `handler` functions), while `os build` judged
80
+ * them all along. `normalized`-tier rules keep the un-lowered input on every
81
+ * command, so a rule that reads a live function value belongs there.
73
82
  *
74
83
  * ## What `normalized` does NOT buy, measured (#6073)
75
84
  *
@@ -189,8 +198,10 @@ interface AuthoringRuleRun extends AuthoringRuleContext {
189
198
  /** `normalizeStackInput` output — pre-Zod-parse. Always required. */
190
199
  normalized: AnyRec$1;
191
200
  /**
192
- * Post-Zod-parse stack. Omitted by `os lint`, which does not parse; `parsed`
193
- * rules then read `normalized` (see `AuthoringRuleInputTier`).
201
+ * Post-Zod-parse stack. `os lint`, which does not parse, hands this the
202
+ * normalized stack with its inline callables lowered to metadata bodies
203
+ * (#16095, see `AuthoringRuleInputTier`); omitted, `parsed` rules read
204
+ * `normalized`.
194
205
  */
195
206
  parsed?: AnyRec$1;
196
207
  }
@@ -276,6 +287,13 @@ type AnyRec = Record<string, unknown>;
276
287
  * `positions` / `apps` — so those are NOT carried. Widening the snapshot is a
277
288
  * one-key edit here plus a `CONTEXT_STACK_KEYS` entry, made when a rule that
278
289
  * reads the collection actually crosses the wall, never in advance.
290
+ *
291
+ * [#13977] "Derived from this shape" is now the mechanism and not only the
292
+ * intent: the second half of that edit is DEMANDED by the compiler rather than
293
+ * remembered. Add a key here and this package stops building until the
294
+ * collection has its row below — see {@link CONTEXT_STACK_KEYS} for what the
295
+ * old `satisfies` clause could not ask, and what silently happened when the
296
+ * row was forgotten.
279
297
  */
280
298
  interface RuntimeStackContext {
281
299
  /**
@@ -324,6 +342,23 @@ interface RuntimeStackContext {
324
342
  * for (#4463 D4).
325
343
  */
326
344
  datasets?: readonly unknown[];
345
+ /**
346
+ * The live page declarations (stack key `pages`).
347
+ *
348
+ * [#13216] The resolution universe `validateViewPageRefs` resolves a
349
+ * `type: 'page'` list view's `pageName` against. It is carried for the
350
+ * reason `datasets` is carried and states first: without it a per-write
351
+ * `view` snapshot holds NO pages at all, so every legitimate page mount
352
+ * reads as dangling. The widening is the "one-key edit here plus a
353
+ * `CONTEXT_STACK_KEYS` entry, made when a rule that reads the collection
354
+ * actually crosses the wall" this docblock describes — the rule crossed in
355
+ * the same change, never in advance.
356
+ *
357
+ * Carrying it in BOTH differential passes also cancels page-derived findings
358
+ * for every other write type, so a stored page's pre-existing condition is
359
+ * not some unrelated write's to answer for (#4463 D4).
360
+ */
361
+ pages?: readonly unknown[];
327
362
  }
328
363
  /**
329
364
  * Which package a write belongs to, and what that package is allowed to reach.
@@ -70,6 +70,15 @@ type AuthoringRuleTier = 'gating' | 'advisory';
70
70
  * `os validate`'s verdict to give), so it runs BOTH tiers on the normalized
71
71
  * stack. Every rule here is written to tolerate that — it is what `os lint`
72
72
  * already did for the reference-integrity suite and the security linter.
73
+ * Since #16095 the `parsed` tier under `os lint` is that same normalized stack
74
+ * with its inline `handler` callables LOWERED to a metadata `body` (the
75
+ * `lowerCallables` pass `os build` runs before its parse) — still unparsed,
76
+ * still the same input, but carrying the `body.source` the `hook-body-*` /
77
+ * `hook-api-update-readonly-*` family opens on. Without it the family judged
78
+ * only hooks authored with an explicit `body`, which the reference app never
79
+ * writes (39 of 39 hooks are `handler` functions), while `os build` judged
80
+ * them all along. `normalized`-tier rules keep the un-lowered input on every
81
+ * command, so a rule that reads a live function value belongs there.
73
82
  *
74
83
  * ## What `normalized` does NOT buy, measured (#6073)
75
84
  *
@@ -189,8 +198,10 @@ interface AuthoringRuleRun extends AuthoringRuleContext {
189
198
  /** `normalizeStackInput` output — pre-Zod-parse. Always required. */
190
199
  normalized: AnyRec$1;
191
200
  /**
192
- * Post-Zod-parse stack. Omitted by `os lint`, which does not parse; `parsed`
193
- * rules then read `normalized` (see `AuthoringRuleInputTier`).
201
+ * Post-Zod-parse stack. `os lint`, which does not parse, hands this the
202
+ * normalized stack with its inline callables lowered to metadata bodies
203
+ * (#16095, see `AuthoringRuleInputTier`); omitted, `parsed` rules read
204
+ * `normalized`.
194
205
  */
195
206
  parsed?: AnyRec$1;
196
207
  }
@@ -276,6 +287,13 @@ type AnyRec = Record<string, unknown>;
276
287
  * `positions` / `apps` — so those are NOT carried. Widening the snapshot is a
277
288
  * one-key edit here plus a `CONTEXT_STACK_KEYS` entry, made when a rule that
278
289
  * reads the collection actually crosses the wall, never in advance.
290
+ *
291
+ * [#13977] "Derived from this shape" is now the mechanism and not only the
292
+ * intent: the second half of that edit is DEMANDED by the compiler rather than
293
+ * remembered. Add a key here and this package stops building until the
294
+ * collection has its row below — see {@link CONTEXT_STACK_KEYS} for what the
295
+ * old `satisfies` clause could not ask, and what silently happened when the
296
+ * row was forgotten.
279
297
  */
280
298
  interface RuntimeStackContext {
281
299
  /**
@@ -324,6 +342,23 @@ interface RuntimeStackContext {
324
342
  * for (#4463 D4).
325
343
  */
326
344
  datasets?: readonly unknown[];
345
+ /**
346
+ * The live page declarations (stack key `pages`).
347
+ *
348
+ * [#13216] The resolution universe `validateViewPageRefs` resolves a
349
+ * `type: 'page'` list view's `pageName` against. It is carried for the
350
+ * reason `datasets` is carried and states first: without it a per-write
351
+ * `view` snapshot holds NO pages at all, so every legitimate page mount
352
+ * reads as dangling. The widening is the "one-key edit here plus a
353
+ * `CONTEXT_STACK_KEYS` entry, made when a rule that reads the collection
354
+ * actually crosses the wall" this docblock describes — the rule crossed in
355
+ * the same change, never in advance.
356
+ *
357
+ * Carrying it in BOTH differential passes also cancels page-derived findings
358
+ * for every other write type, so a stored page's pre-existing condition is
359
+ * not some unrelated write's to answer for (#4463 D4).
360
+ */
361
+ pages?: readonly unknown[];
327
362
  }
328
363
  /**
329
364
  * Which package a write belongs to, and what that package is allowed to reach.