@objectstack/lint 17.1.0 → 17.3.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.
@@ -35,7 +35,13 @@ interface AuthoringFinding {
35
35
  rule: string;
36
36
  /** Human-readable location, e.g. `object "leave_request"`. */
37
37
  where: string;
38
- /** Config path, e.g. `objects[3].sharingModel`. */
38
+ /**
39
+ * Config path, e.g. `objects[3].sharingModel`. Positional as RULES emit it;
40
+ * on the runtime gate's wire surface the top-level collection index of a
41
+ * collection-resident finding is rewritten to the entry's NAME
42
+ * (`objects.acme_invoice.sharingModel`) — see `nameKeyFindingPath` in
43
+ * `runtime-gate.ts` (#10064).
44
+ */
39
45
  path: string;
40
46
  /** What is wrong. */
41
47
  message: string;
@@ -117,6 +123,19 @@ type AuthoringRuleInputTier = 'normalized' | 'parsed';
117
123
  interface AuthoringRuleContext {
118
124
  /** ADR-0080 SDUI component manifest, when the project ships one. */
119
125
  sduiManifest?: unknown;
126
+ /**
127
+ * [#9313] The singular metadata type of the per-write snapshot being judged
128
+ * — set by the runtime publish gate (`runtime-gate.ts`) on every gated
129
+ * write, ABSENT on the three CLI commands (`runAuthoringRules` never sets
130
+ * it). Exists for the one entry that is itself a registry: the
131
+ * reference-integrity suite dispatches its MEMBERS by this
132
+ * (`ReferenceIntegrityRule.runtimeTypes`), because the entry-level
133
+ * `runtimeTypes` can only say which writes reach the suite, not which
134
+ * members can judge a partial per-write snapshot without inventing
135
+ * findings. No other rule reads it, and none should without the same
136
+ * argument.
137
+ */
138
+ runtimeWriteType?: string;
120
139
  }
121
140
  interface AuthoringRule {
122
141
  /** The exported function's name — the id the wiring guard asserts on. */
@@ -257,6 +276,13 @@ type AnyRec = Record<string, unknown>;
257
276
  * `positions` / `apps` — so those are NOT carried. Widening the snapshot is a
258
277
  * one-key edit here plus a `CONTEXT_STACK_KEYS` entry, made when a rule that
259
278
  * reads the collection actually crosses the wall, never in advance.
279
+ *
280
+ * [#13977] "Derived from this shape" is now the mechanism and not only the
281
+ * intent: the second half of that edit is DEMANDED by the compiler rather than
282
+ * remembered. Add a key here and this package stops building until the
283
+ * collection has its row below — see {@link CONTEXT_STACK_KEYS} for what the
284
+ * old `satisfies` clause could not ask, and what silently happened when the
285
+ * row was forgotten.
260
286
  */
261
287
  interface RuntimeStackContext {
262
288
  /**
@@ -305,6 +331,23 @@ interface RuntimeStackContext {
305
331
  * for (#4463 D4).
306
332
  */
307
333
  datasets?: readonly unknown[];
334
+ /**
335
+ * The live page declarations (stack key `pages`).
336
+ *
337
+ * [#13216] The resolution universe `validateViewPageRefs` resolves a
338
+ * `type: 'page'` list view's `pageName` against. It is carried for the
339
+ * reason `datasets` is carried and states first: without it a per-write
340
+ * `view` snapshot holds NO pages at all, so every legitimate page mount
341
+ * reads as dangling. The widening is the "one-key edit here plus a
342
+ * `CONTEXT_STACK_KEYS` entry, made when a rule that reads the collection
343
+ * actually crosses the wall" this docblock describes — the rule crossed in
344
+ * the same change, never in advance.
345
+ *
346
+ * Carrying it in BOTH differential passes also cancels page-derived findings
347
+ * for every other write type, so a stored page's pre-existing condition is
348
+ * not some unrelated write's to answer for (#4463 D4).
349
+ */
350
+ pages?: readonly unknown[];
308
351
  }
309
352
  /**
310
353
  * Which package a write belongs to, and what that package is allowed to reach.
@@ -35,7 +35,13 @@ interface AuthoringFinding {
35
35
  rule: string;
36
36
  /** Human-readable location, e.g. `object "leave_request"`. */
37
37
  where: string;
38
- /** Config path, e.g. `objects[3].sharingModel`. */
38
+ /**
39
+ * Config path, e.g. `objects[3].sharingModel`. Positional as RULES emit it;
40
+ * on the runtime gate's wire surface the top-level collection index of a
41
+ * collection-resident finding is rewritten to the entry's NAME
42
+ * (`objects.acme_invoice.sharingModel`) — see `nameKeyFindingPath` in
43
+ * `runtime-gate.ts` (#10064).
44
+ */
39
45
  path: string;
40
46
  /** What is wrong. */
41
47
  message: string;
@@ -117,6 +123,19 @@ type AuthoringRuleInputTier = 'normalized' | 'parsed';
117
123
  interface AuthoringRuleContext {
118
124
  /** ADR-0080 SDUI component manifest, when the project ships one. */
119
125
  sduiManifest?: unknown;
126
+ /**
127
+ * [#9313] The singular metadata type of the per-write snapshot being judged
128
+ * — set by the runtime publish gate (`runtime-gate.ts`) on every gated
129
+ * write, ABSENT on the three CLI commands (`runAuthoringRules` never sets
130
+ * it). Exists for the one entry that is itself a registry: the
131
+ * reference-integrity suite dispatches its MEMBERS by this
132
+ * (`ReferenceIntegrityRule.runtimeTypes`), because the entry-level
133
+ * `runtimeTypes` can only say which writes reach the suite, not which
134
+ * members can judge a partial per-write snapshot without inventing
135
+ * findings. No other rule reads it, and none should without the same
136
+ * argument.
137
+ */
138
+ runtimeWriteType?: string;
120
139
  }
121
140
  interface AuthoringRule {
122
141
  /** The exported function's name — the id the wiring guard asserts on. */
@@ -257,6 +276,13 @@ type AnyRec = Record<string, unknown>;
257
276
  * `positions` / `apps` — so those are NOT carried. Widening the snapshot is a
258
277
  * one-key edit here plus a `CONTEXT_STACK_KEYS` entry, made when a rule that
259
278
  * reads the collection actually crosses the wall, never in advance.
279
+ *
280
+ * [#13977] "Derived from this shape" is now the mechanism and not only the
281
+ * intent: the second half of that edit is DEMANDED by the compiler rather than
282
+ * remembered. Add a key here and this package stops building until the
283
+ * collection has its row below — see {@link CONTEXT_STACK_KEYS} for what the
284
+ * old `satisfies` clause could not ask, and what silently happened when the
285
+ * row was forgotten.
260
286
  */
261
287
  interface RuntimeStackContext {
262
288
  /**
@@ -305,6 +331,23 @@ interface RuntimeStackContext {
305
331
  * for (#4463 D4).
306
332
  */
307
333
  datasets?: readonly unknown[];
334
+ /**
335
+ * The live page declarations (stack key `pages`).
336
+ *
337
+ * [#13216] The resolution universe `validateViewPageRefs` resolves a
338
+ * `type: 'page'` list view's `pageName` against. It is carried for the
339
+ * reason `datasets` is carried and states first: without it a per-write
340
+ * `view` snapshot holds NO pages at all, so every legitimate page mount
341
+ * reads as dangling. The widening is the "one-key edit here plus a
342
+ * `CONTEXT_STACK_KEYS` entry, made when a rule that reads the collection
343
+ * actually crosses the wall" this docblock describes — the rule crossed in
344
+ * the same change, never in advance.
345
+ *
346
+ * Carrying it in BOTH differential passes also cancels page-derived findings
347
+ * for every other write type, so a stored page's pre-existing condition is
348
+ * not some unrelated write's to answer for (#4463 D4).
349
+ */
350
+ pages?: readonly unknown[];
308
351
  }
309
352
  /**
310
353
  * Which package a write belongs to, and what that package is allowed to reach.