@beehexa/hexasync-template-validate 2608.15.1 → 2608.20.18

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.
Files changed (121) hide show
  1. package/package.json +6 -6
  2. package/dist/index.d.ts +0 -39
  3. package/dist/index.d.ts.map +0 -1
  4. package/dist/index.js +0 -39
  5. package/dist/index.js.map +0 -1
  6. package/dist/validate/agentAnswers.d.ts +0 -48
  7. package/dist/validate/agentAnswers.d.ts.map +0 -1
  8. package/dist/validate/agentAnswers.js +0 -84
  9. package/dist/validate/agentAnswers.js.map +0 -1
  10. package/dist/validate/agentTools.d.ts +0 -37
  11. package/dist/validate/agentTools.d.ts.map +0 -1
  12. package/dist/validate/agentTools.js +0 -141
  13. package/dist/validate/agentTools.js.map +0 -1
  14. package/dist/validate/buildValidationModel.d.ts +0 -31
  15. package/dist/validate/buildValidationModel.d.ts.map +0 -1
  16. package/dist/validate/buildValidationModel.js +0 -68
  17. package/dist/validate/buildValidationModel.js.map +0 -1
  18. package/dist/validate/context.d.ts +0 -108
  19. package/dist/validate/context.d.ts.map +0 -1
  20. package/dist/validate/context.js +0 -95
  21. package/dist/validate/context.js.map +0 -1
  22. package/dist/validate/contextFromGraph.d.ts +0 -68
  23. package/dist/validate/contextFromGraph.d.ts.map +0 -1
  24. package/dist/validate/contextFromGraph.js +0 -81
  25. package/dist/validate/contextFromGraph.js.map +0 -1
  26. package/dist/validate/harvestPullerTaskIds.d.ts +0 -60
  27. package/dist/validate/harvestPullerTaskIds.d.ts.map +0 -1
  28. package/dist/validate/harvestPullerTaskIds.js +0 -116
  29. package/dist/validate/harvestPullerTaskIds.js.map +0 -1
  30. package/dist/validate/model.d.ts +0 -14
  31. package/dist/validate/model.d.ts.map +0 -1
  32. package/dist/validate/model.js +0 -97
  33. package/dist/validate/model.js.map +0 -1
  34. package/dist/validate/registry.d.ts +0 -24
  35. package/dist/validate/registry.d.ts.map +0 -1
  36. package/dist/validate/registry.js +0 -101
  37. package/dist/validate/registry.js.map +0 -1
  38. package/dist/validate/retrieve.d.ts +0 -125
  39. package/dist/validate/retrieve.d.ts.map +0 -1
  40. package/dist/validate/retrieve.js +0 -272
  41. package/dist/validate/retrieve.js.map +0 -1
  42. package/dist/validate/rule.d.ts +0 -18
  43. package/dist/validate/rule.d.ts.map +0 -1
  44. package/dist/validate/rule.js +0 -2
  45. package/dist/validate/rule.js.map +0 -1
  46. package/dist/validate/ruleCatalog.d.ts +0 -22
  47. package/dist/validate/ruleCatalog.d.ts.map +0 -1
  48. package/dist/validate/ruleCatalog.js +0 -473
  49. package/dist/validate/ruleCatalog.js.map +0 -1
  50. package/dist/validate/rules/apiShape.d.ts +0 -51
  51. package/dist/validate/rules/apiShape.d.ts.map +0 -1
  52. package/dist/validate/rules/apiShape.js +0 -150
  53. package/dist/validate/rules/apiShape.js.map +0 -1
  54. package/dist/validate/rules/arguments.d.ts +0 -3
  55. package/dist/validate/rules/arguments.d.ts.map +0 -1
  56. package/dist/validate/rules/arguments.js +0 -301
  57. package/dist/validate/rules/arguments.js.map +0 -1
  58. package/dist/validate/rules/connectorIdentity.d.ts +0 -3
  59. package/dist/validate/rules/connectorIdentity.d.ts.map +0 -1
  60. package/dist/validate/rules/connectorIdentity.js +0 -347
  61. package/dist/validate/rules/connectorIdentity.js.map +0 -1
  62. package/dist/validate/rules/context.d.ts +0 -42
  63. package/dist/validate/rules/context.d.ts.map +0 -1
  64. package/dist/validate/rules/context.js +0 -92
  65. package/dist/validate/rules/context.js.map +0 -1
  66. package/dist/validate/rules/dependencyIntegrity.d.ts +0 -60
  67. package/dist/validate/rules/dependencyIntegrity.d.ts.map +0 -1
  68. package/dist/validate/rules/dependencyIntegrity.js +0 -296
  69. package/dist/validate/rules/dependencyIntegrity.js.map +0 -1
  70. package/dist/validate/rules/duplicates.d.ts +0 -27
  71. package/dist/validate/rules/duplicates.d.ts.map +0 -1
  72. package/dist/validate/rules/duplicates.js +0 -337
  73. package/dist/validate/rules/duplicates.js.map +0 -1
  74. package/dist/validate/rules/flow.d.ts +0 -57
  75. package/dist/validate/rules/flow.d.ts.map +0 -1
  76. package/dist/validate/rules/flow.js +0 -714
  77. package/dist/validate/rules/flow.js.map +0 -1
  78. package/dist/validate/rules/overwriteLoss.d.ts +0 -23
  79. package/dist/validate/rules/overwriteLoss.d.ts.map +0 -1
  80. package/dist/validate/rules/overwriteLoss.js +0 -40
  81. package/dist/validate/rules/overwriteLoss.js.map +0 -1
  82. package/dist/validate/rules/pullerKind.d.ts +0 -3
  83. package/dist/validate/rules/pullerKind.d.ts.map +0 -1
  84. package/dist/validate/rules/pullerKind.js +0 -92
  85. package/dist/validate/rules/pullerKind.js.map +0 -1
  86. package/dist/validate/rules/reference.d.ts +0 -44
  87. package/dist/validate/rules/reference.d.ts.map +0 -1
  88. package/dist/validate/rules/reference.js +0 -405
  89. package/dist/validate/rules/reference.js.map +0 -1
  90. package/dist/validate/rules/referenceKind.d.ts +0 -25
  91. package/dist/validate/rules/referenceKind.d.ts.map +0 -1
  92. package/dist/validate/rules/referenceKind.js +0 -235
  93. package/dist/validate/rules/referenceKind.js.map +0 -1
  94. package/dist/validate/rules/retiredType.d.ts +0 -149
  95. package/dist/validate/rules/retiredType.d.ts.map +0 -1
  96. package/dist/validate/rules/retiredType.js +0 -235
  97. package/dist/validate/rules/retiredType.js.map +0 -1
  98. package/dist/validate/rules/stepData.d.ts +0 -122
  99. package/dist/validate/rules/stepData.d.ts.map +0 -1
  100. package/dist/validate/rules/stepData.js +0 -249
  101. package/dist/validate/rules/stepData.js.map +0 -1
  102. package/dist/validate/rules/stepIterations.d.ts +0 -49
  103. package/dist/validate/rules/stepIterations.d.ts.map +0 -1
  104. package/dist/validate/rules/stepIterations.js +0 -156
  105. package/dist/validate/rules/stepIterations.js.map +0 -1
  106. package/dist/validate/rules/tables.d.ts +0 -8
  107. package/dist/validate/rules/tables.d.ts.map +0 -1
  108. package/dist/validate/rules/tables.js +0 -116
  109. package/dist/validate/rules/tables.js.map +0 -1
  110. package/dist/validate/rules/variableDrift.d.ts +0 -63
  111. package/dist/validate/rules/variableDrift.d.ts.map +0 -1
  112. package/dist/validate/rules/variableDrift.js +0 -132
  113. package/dist/validate/rules/variableDrift.js.map +0 -1
  114. package/dist/validate/rules/variables.d.ts +0 -12
  115. package/dist/validate/rules/variables.d.ts.map +0 -1
  116. package/dist/validate/rules/variables.js +0 -207
  117. package/dist/validate/rules/variables.js.map +0 -1
  118. package/dist/validate/sourceLocator.d.ts +0 -32
  119. package/dist/validate/sourceLocator.d.ts.map +0 -1
  120. package/dist/validate/sourceLocator.js +0 -166
  121. package/dist/validate/sourceLocator.js.map +0 -1
@@ -1,347 +0,0 @@
1
- import { CATALOG_CHECKS_SKIPPED, catalogFactsOf, entriesForConnector, entriesForSystemCode, entriesForSystemId, entryForPair, isUniversalConnector, isUnresolvedToken, isWellFormedConnectorIdentity, resolvedConnectorIdOf, UNSUPPORTED_CONNECTOR_SHORT, } from '@beehexa/hexasync-template-model';
2
- /**
3
- * The CONN family — a connection's identity (FR-9). Story 2.1 lands `CONN-3`.
4
- *
5
- * The id is `CONN-3`, letters-then-digits, because `ruleCatalog`'s `splitRuleId` parses exactly that shape to
6
- * sort the catalog. It is `-3` rather than `-1` because `connectionIdentityFixtures.ts` — written BEFORE the
7
- * rules, deliberately, as the contract they are implemented against — already assigns `CONN-1` to the
8
- * uncatalogued connector, `CONN-2` to the cross-entry system code, `CONN-4` to a V3 without a system code and
9
- * `CONN-5` to a V2 carrying one. Renumbering to suit the implementation order would break the contract.
10
- *
11
- * ### Judged on the COMPOSED document, never the authored token
12
- *
13
- * `ctx.outputForm`, not `ctx.tokenForm`. 105 of the corpus's 363 authored connection identities are written as
14
- * `**Token**` — a rule reading the authored form would report every one of them, which is precisely the noise
15
- * G-7 exists to prevent. The composed form has the variable already substituted, so what is judged is what the
16
- * worker will actually receive.
17
- *
18
- * A token that is STILL a token in composed output means the variable did not resolve. That is `VAR-1`'s
19
- * finding, not this one: two findings for one cause is how a Problems panel stops being read.
20
- *
21
- * ### Severity, and why it is not the top band
22
- *
23
- * `high` — `SEVERITY_BANDS.cannotWork`. It maps to an error in the editor, which is right: a connection with no
24
- * usable identity cannot reach any system, so nothing downstream of it can work.
25
- *
26
- * `critical` is deliberately NOT used here. That band belongs to Story 2.3, for a connection that *works* and
27
- * authenticates against the WRONG system — dangerous strictly beats broken, because broken announces itself
28
- * (AD-30: severity is a function of consequence, decided once).
29
- *
30
- * ### What this rule must NOT do
31
- *
32
- * Report on anything Stories 2.2-2.5 own. A `CONN-3` that also fired on a V3 without a system code would steal
33
- * `CONN-4`'s finding and make the two indistinguishable — the fixture set is what pins that boundary, and five
34
- * of its eight entries must stay silent under this rule.
35
- *
36
- * And it never invents an identity (G-6): it reports, and offers no value.
37
- */
38
- const SEVERITY = 'high';
39
- /** Both spellings, always. The author's file uses one of them, and naming only the other reads as a different field. */
40
- const BOTH_SPELLINGS = '`connectorId`/`providerId`';
41
- /**
42
- * `family` and `why`, which every issue in this file was missing (Epic 2 review).
43
- *
44
- * `ValidationIssue` declares both as REQUIRED, and all eight sibling rules set both on every issue. This file
45
- * set `family` once — on the rule object, never on an issue — and had no `why` at all. Every push carried an
46
- * `as ValidationIssue` cast, and the cast is precisely what stopped `tsc` from saying so. The casts are gone;
47
- * the compiler is the guard now.
48
- *
49
- * The cost was live and threefold: `CONN` was the only family whose report entries rendered no *"why it
50
- * matters"* line (`renderValidation.ts` prints it behind `if (i.why)`), the editor dropped it, and the
51
- * characterization test this epic deleted — `issues.filter(i => i.family === 'CONN')` — could never have failed,
52
- * because that filter matched nothing even with all five rules live.
53
- *
54
- * `why` is the WORKER consequence in one line, the same register the other families use.
55
- */
56
- const FAMILY = 'CONN';
57
- const WHY_NO_CONNECTOR = 'a connection with no usable connector id cannot reach any system, so every task, puller and pusher that uses it fails at run time';
58
- const WHY_WRONG_SYSTEM = 'the connection works and authenticates, but against the wrong system — data moves to the wrong place with nothing failing visibly';
59
- const WHY_NOT_CATALOGUED = 'the tooling cannot verify this connector, so it can offer no icon, no system name and no dispatch check for it — the connection itself may be fine';
60
- /**
61
- * What the author actually wrote, when `resolvedConnectorIdOf` declined it (Epic 2 review).
62
- *
63
- * The resolver folds four states into one `undefined`: absent, blank, an all-zeros GUID, and any value YAML
64
- * permits that is not a string or number (`true`, `{}`, `[]`). The first two genuinely are "not set"; the last
65
- * two are set, wrongly, on a line the tool can point at — and telling that author *"neither is set"* hands them
66
- * a message their own file contradicts.
67
- *
68
- * Reads `connectorId` before `providerId` (AD-24), so the message names the field the author is expected to
69
- * write. Returns undefined when the identity is genuinely absent, which is what keeps the original wording for
70
- * the case it was written for.
71
- */
72
- function declaredButUnusable(connection) {
73
- for (const key of ['connectorId', 'providerId']) {
74
- const raw = connection[key];
75
- if (raw === undefined || raw === null)
76
- continue;
77
- const text = typeof raw === 'string' ? raw.trim() : String(raw);
78
- if (text === '')
79
- continue;
80
- return { value: text };
81
- }
82
- return undefined;
83
- }
84
- export const connectorIdentityRule = {
85
- id: 'CONN-3',
86
- family: 'CONN',
87
- run(ctx) {
88
- const issues = [];
89
- const doc = ctx.outputForm;
90
- if (!doc || typeof doc !== 'object')
91
- return issues;
92
- const connectors = doc.connectors;
93
- if (!Array.isArray(connectors))
94
- return issues;
95
- /** Set when a well-formed identity could not be checked because no catalog was supplied. */
96
- let skippedForWantOfCatalog = false;
97
- for (const entry of connectors) {
98
- if (!entry || typeof entry !== 'object' || Array.isArray(entry))
99
- continue;
100
- const connection = entry;
101
- const idOrKey = typeof connection.id === 'string' ? connection.id : undefined;
102
- const identity = resolvedConnectorIdOf(connection);
103
- if (identity === undefined) {
104
- /**
105
- * "Names no connector" has FOUR shapes, not three, and the message has to fit whichever one is in the
106
- * file (Epic 2 review).
107
- *
108
- * `resolvedConnectorIdOf` folds absent, blank, and an all-zeros GUID into one `undefined`, and the
109
- * original message said *"neither is set"* for all of them. For a zeros GUID — or for any non-string
110
- * YAML value like `connectorId: true` — that sentence is false: the field IS set, on a line the tool
111
- * can see, and the author reads a message contradicting their own file. `written` recovers what was
112
- * there so the message can name it and `locateValue` can underline it.
113
- */
114
- const written = declaredButUnusable(connection);
115
- issues.push({
116
- ruleId: 'CONN-3',
117
- family: FAMILY,
118
- severity: SEVERITY,
119
- message: written
120
- ? `\`${written.value}\` is not a usable connector id, so this connection names no connector. ` +
121
- `A connection without a connector cannot reach any system, so nothing that uses it can run.`
122
- : `This connection names no connector: neither ${BOTH_SPELLINGS} is set. ` +
123
- `A connection without a connector cannot reach any system, so nothing that uses it can run.`,
124
- why: WHY_NO_CONNECTOR,
125
- parentKey: 'connectors',
126
- ...(idOrKey ? { idOrKey } : {}),
127
- // `locateValue` only when there IS a value to underline. On a genuinely absent identity the finding
128
- // lands on the component, which is the honest answer — pointing at a property that is not in the file
129
- // is worse than pointing at the block.
130
- ...(written ? { locateValue: written.value } : {}),
131
- });
132
- continue;
133
- }
134
- // Still a token after composition ⇒ the VARIABLE failed, and VAR-1 owns that.
135
- if (isUnresolvedToken(identity))
136
- continue;
137
- if (!isWellFormedConnectorIdentity(identity)) {
138
- issues.push({
139
- ruleId: 'CONN-3',
140
- family: FAMILY,
141
- severity: SEVERITY,
142
- message: `\`${identity}\` is not a well-formed connector id. The platform's connector registry is keyed by ` +
143
- `GUID, so a name or slug cannot resolve however plausible it looks. Set ${BOTH_SPELLINGS} to the ` +
144
- `connector's GUID.`,
145
- why: WHY_NO_CONNECTOR,
146
- parentKey: 'connectors',
147
- ...(idOrKey ? { idOrKey } : {}),
148
- locateValue: identity,
149
- });
150
- continue;
151
- }
152
- // ── From here the identity is a well-formed GUID, and every remaining band needs the CATALOG. ──
153
- const catalog = ctx.connectorCatalog;
154
- if (!catalog) {
155
- skippedForWantOfCatalog = true;
156
- continue;
157
- }
158
- const facts = catalogFactsOf(catalog);
159
- const systemCode = typeof connection.systemCode === 'string' &&
160
- connection.systemCode.trim() !== ''
161
- ? connection.systemCode.trim()
162
- : undefined;
163
- const locate = {
164
- parentKey: 'connectors',
165
- ...(idOrKey ? { idOrKey } : {}),
166
- };
167
- if (isUniversalConnector(catalog, identity)) {
168
- // ── Gateway V3. Every V3 row shares one connector id, so the identity is the PAIR (addendum §2). ──
169
- if (systemCode === undefined) {
170
- // CONN-4 (Story 2.2). Keyed on the universal connector ID, not on `generation: v3`: the id is the
171
- // fact the gateway routes on, and it is the only one present in the document.
172
- issues.push({
173
- ruleId: 'CONN-4',
174
- family: FAMILY,
175
- // `high`, which the editor maps to an ERROR — Jazz's requirement, and AD-30's answer: a V3
176
- // connection with no system code reaches no system at all, so there is no version of it that
177
- // works. NOT `critical`: that band is reserved for CONN-2, where the connection works and quietly
178
- // reaches the WRONG system. Broken announces itself; dangerous does not.
179
- severity: 'high',
180
- message: 'This is a Gateway V3 connection with no `systemCode`. Every V3 system shares one connector id, ' +
181
- 'so the system code is the only thing dispatch can route on — without it the connection reaches ' +
182
- 'no system at all. Set `systemCode` to the system this connection is for.',
183
- why: 'Gateway V3 dispatch routes on the system code alone, because every V3 system shares one connector id — without it the message reaches no system',
184
- ...locate,
185
- });
186
- continue;
187
- }
188
- const systemId = typeof connection.systemId === 'string' &&
189
- connection.systemId.trim() !== ''
190
- ? connection.systemId.trim()
191
- : undefined;
192
- const byCode = entriesForSystemCode(catalog, systemCode);
193
- const byId = systemId === undefined ? [] : entriesForSystemId(catalog, systemId);
194
- /**
195
- * CONN-2 (Story 2.3) — the copy-paste, and the only CRITICAL in this family.
196
- *
197
- * ⛔ JAZZ, 2026-08-09: **`systemId` and `systemCode` are 1:1.** Each catalog entry has exactly one of
198
- * each, and neither is shared. That is what makes a disagreement *definitively* wrong rather than
199
- * merely suspicious — there is no legitimate document in which they name different entries, so this
200
- * needs no "unless" and no hedge. `catalogIsOneToOne` in the corpus spec asserts the property the rule
201
- * rests on, because a rule founded on a 1:1 assumption should fail loudly if the catalog stops being 1:1.
202
- *
203
- * The mistake is not "an unknown system code": it is `systemId` and `systemCode` naming DIFFERENT
204
- * catalog entries, which is what happens when one field is pasted from another connection and the other
205
- * is left behind. The first implementation of this compared the `(connectorId, systemCode)` pair, which
206
- * every V3 row satisfies by construction — so it never fired, and the fixture is what caught that.
207
- *
208
- * Critical rather than high because the connection WORKS: dispatch routes on `systemCode`, so it reaches
209
- * the system that code names and authenticates with credentials issued for the one `systemId` names.
210
- * Nothing fails visibly. Dangerous beats broken, because broken announces itself (AD-30).
211
- *
212
- * Both entries are named, because the whole value of the finding is knowing which two were confused.
213
- */
214
- if (byId.length > 0 &&
215
- byCode.length > 0 &&
216
- // SET DISJOINTNESS, not first-element inequality (Epic 2 review). `byId`/`byCode` are `filter`
217
- // results, so `[0]` meant "first in catalog order" — and the two lists have asymmetric membership
218
- // whenever a row carries one field but not the other. Eight shipped rows have both blank and the
219
- // catalog's own note says they are to be filled, so a V2 row gaining a `systemCode` its V3 twin
220
- // shares produced a false CRITICAL on a CORRECT connection, fired before `entryForPair` could
221
- // clear it. Overlap is order-independent and handles one system spanning two generations.
222
- !byId.some((entry) => byCode.includes(entry))) {
223
- issues.push({
224
- ruleId: 'CONN-2',
225
- family: FAMILY,
226
- severity: 'critical',
227
- message:
228
- // NAMES, and the author's OWN value (Epic 2 review). This printed `byId[0].key` — a catalog row
229
- // key — in a sentence saying "this connection's `systemId` is …", while the file holds a GUID. On
230
- // the family's only critical finding the author was sent looking for a string not in their file,
231
- // and because a key like `lightspeed-x-series` is a `systemCode` value elsewhere in the catalog,
232
- // the sentence read as though `systemId` held a system code.
233
- `\`${systemCode}\` belongs to \`${byCode[0].name}\`, but this connection's \`systemId\` ` +
234
- `(\`${systemId}\`) is \`${byId[0].name}\`. Dispatch routes on the system code, so the ` +
235
- `connection would reach ${byCode[0].name} using credentials issued for ${byId[0].name}. One of ` +
236
- `the two was pasted from another connection — fix whichever is wrong.`,
237
- why: WHY_WRONG_SYSTEM,
238
- ...locate,
239
- locateValue: systemCode,
240
- });
241
- continue;
242
- }
243
- if (entryForPair(catalog, identity, systemCode))
244
- continue; // the pair is registered: correct.
245
- if (byCode.length > 0) {
246
- /**
247
- * The code is real but belongs to a row this connector does not cover — `critical`, same as above.
248
- *
249
- * DECIDED (Jazz, 2026-08-09) after the Epic 2 review asked whether V3 dispatch can reach a system
250
- * registered only on a Gateway V2 row. The band follows the consequence that is actually plausible:
251
- * the code names a real catalogued system and dispatch routes on the code, so the connection reaches
252
- * that system carrying credentials issued for another. Broken-instead-of-dangerous would be the safer
253
- * guess, and guessing safe is how a `critical` becomes a warning nobody acts on (AD-30).
254
- */
255
- const own = entriesForConnector(catalog, identity)
256
- .map((entry) => entry.systemCode)
257
- .filter((code) => Boolean(code));
258
- issues.push({
259
- ruleId: 'CONN-2',
260
- family: FAMILY,
261
- severity: 'critical',
262
- message: `\`${systemCode}\` is registered to \`${byCode[0].name}\`, which this connector does not cover. ` +
263
- `The connection would authenticate against the wrong system` +
264
- (own.length > 0
265
- ? `. Valid codes here include \`${own.slice(0, 3).join('`, `')}\`.`
266
- : '.'),
267
- why: WHY_WRONG_SYSTEM,
268
- ...locate,
269
- locateValue: systemCode,
270
- });
271
- continue;
272
- }
273
- // A system code in NO entry at all: the unknown-connector path applies instead, so the two never
274
- // both fire for one cause (Story 2.3 AC-3).
275
- issues.push({
276
- ruleId: 'CONN-1',
277
- family: FAMILY,
278
- severity: 'low',
279
- message: `\`${systemCode}\` is in no entry of the shipped catalog (catalogVersion ${facts.catalogVersion}, ` +
280
- `${facts.connectorCount} connectors). ${UNSUPPORTED_CONNECTOR_SHORT}`,
281
- why: WHY_NOT_CATALOGUED,
282
- ...locate,
283
- locateValue: systemCode,
284
- });
285
- continue;
286
- }
287
- // ── Not the universal connector: Gateway V2 or V1. ──
288
- if (entriesForConnector(catalog, identity).length === 0) {
289
- // CONN-1 (Story 2.4). INFO, deliberately, and the catalog version is named because a catalog that is
290
- // behind is the TOOL's fault, not the author's. Measured: ~60 distinct connector ids in the corpus and
291
- // only ~23 in Gateway V2/V3 scope, so an error here would mark most of the existing corpus broken.
292
- issues.push({
293
- ruleId: 'CONN-1',
294
- family: FAMILY,
295
- severity: 'low',
296
- message: `\`${identity}\` is not in the shipped catalog (catalogVersion ${facts.catalogVersion}, ` +
297
- `${facts.connectorCount} connectors). ${UNSUPPORTED_CONNECTOR_SHORT}`,
298
- why: WHY_NOT_CATALOGUED,
299
- ...locate,
300
- locateValue: identity,
301
- });
302
- continue;
303
- }
304
- if (systemCode !== undefined) {
305
- /**
306
- * CONN-5 (Story 2.4) — INFORMATION, and the wording matters.
307
- *
308
- * ⛔ JAZZ, 2026-08-09: on a V2 connection `systemCode` and `systemId` are **optional**. So this is not a
309
- * mistake being reported — it is a fact being surfaced, because an author who set the field expects it to
310
- * do something and V2 dispatch does not read it. The first version said *"remove it if it is
311
- * misleading"*, which framed a legitimate optional field as undesirable; keeping it is perfectly
312
- * reasonable, not least for a later V3 migration.
313
- */
314
- issues.push({
315
- ruleId: 'CONN-5',
316
- family: FAMILY,
317
- severity: 'low',
318
- message: 'V2 dispatch routes on the connector id alone, so `systemCode` is ignored here. The field is ' +
319
- 'optional on a V2 connection — this is worth knowing, not something to fix.',
320
- why: 'V2 dispatch reads only the connector id, so the field has no effect here — it is not a defect',
321
- ...locate,
322
- locateValue: systemCode,
323
- });
324
- }
325
- }
326
- /**
327
- * DECLINING OUT LOUD.
328
- *
329
- * A bare `hexasync compose` has no catalog, so four of the five bands cannot run. Saying nothing would make
330
- * "no catalog" indistinguishable from "everything is fine" — which is exactly how Story 1.5 shipped a
331
- * deprecation that reached no surface, and how a corpus gate reported green having asserted nothing. Both
332
- * were found by the Epic 1 review; this is the lesson applied before it can happen a third time.
333
- */
334
- if (skippedForWantOfCatalog) {
335
- issues.push({
336
- ruleId: 'CONN-0',
337
- family: FAMILY,
338
- severity: 'low',
339
- message: CATALOG_CHECKS_SKIPPED,
340
- why: 'four of the five connector checks need the shipped catalog, so this run could not answer them — said out loud because "no catalog" must never look like "everything is fine"',
341
- parentKey: 'connectors',
342
- });
343
- }
344
- return issues;
345
- },
346
- };
347
- //# sourceMappingURL=connectorIdentity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"connectorIdentity.js","sourceRoot":"","sources":["../../../src/validate/rules/connectorIdentity.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,kBAAkB,EAClB,YAAY,EACZ,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,kCAAkC,CAAC;AAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,QAAQ,GAAG,MAAM,CAAC;AAExB,wHAAwH;AACxH,MAAM,cAAc,GAAG,4BAA4B,CAAC;AAEpD;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,GAAG,MAAM,CAAC;AACtB,MAAM,gBAAgB,GACpB,mIAAmI,CAAC;AACtI,MAAM,gBAAgB,GACpB,mIAAmI,CAAC;AACtI,MAAM,kBAAkB,GACtB,oJAAoJ,CAAC;AAEvJ;;;;;;;;;;;GAWG;AACH,SAAS,mBAAmB,CAC1B,UAAmC;IAEnC,KAAK,MAAM,GAAG,IAAI,CAAC,aAAa,EAAE,YAAY,CAAU,EAAE,CAAC;QACzD,MAAM,GAAG,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC;QAC5B,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI;YAAE,SAAS;QAChD,MAAM,IAAI,GAAG,OAAO,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChE,IAAI,IAAI,KAAK,EAAE;YAAE,SAAS;QAC1B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;IACzB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAmB;IACnD,EAAE,EAAE,QAAQ;IAC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,CAAC;YAED,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;gBAC7B;;;;;;;;mBAQG;gBACH,MAAM,CAAC,IAAI,CAAC;oBACV,MAAM,EAAE,QAAQ;oBAChB,MAAM,EAAE,MAAM;oBACd,QAAQ,EAAE,KAAK;oBACf,OAAO,EACL,8FAA8F;wBAC9F,4EAA4E;oBAC9E,GAAG,EAAE,+FAA+F;oBACpG,GAAG,MAAM;oBACT,WAAW,EAAE,UAAU;iBACxB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED;;;;;;;WAOG;QACH,IAAI,uBAAuB,EAAE,CAAC;YAC5B,MAAM,CAAC,IAAI,CAAC;gBACV,MAAM,EAAE,QAAQ;gBAChB,MAAM,EAAE,MAAM;gBACd,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,sBAAsB;gBAC/B,GAAG,EAAE,8KAA8K;gBACnL,SAAS,EAAE,YAAY;aACxB,CAAC,CAAC;QACL,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
@@ -1,42 +0,0 @@
1
- /**
2
- * CTX — a context path the runtime cannot provide (Story 8.13).
3
- *
4
- * ### The gap this closes
5
- *
6
- * Story 8.6 built these checks, measured them against the corpus and pinned them with tests — and then wired them to
7
- * nothing. `hexasync-template-validate` did not depend on `hexasync-template-context`, and the extension imported it
8
- * only for completion, so every *"when diagnostics run"* clause in that story was satisfied by no surface at all.
9
- * **94 findings reached nobody.** This is the entry that makes them reachable; the computation is unchanged.
10
- *
11
- * ### One rule, two surfaces
12
- *
13
- * The editor's Problems panel and the composition report both run `VALIDATION_RULES`, so this is one computation
14
- * rather than two kept in step (NFR-1). The walk itself lives in the context package and is shared with that
15
- * package's corpus measurement, so the number an author sees and the number the measurement records cannot drift.
16
- *
17
- * ⚠️ **"Reaches both with no extension change" is the registry's claim, and it is only half true.** The extension
18
- * pins PUBLISHED `@beehexa/*` versions (`2608.8.3` today) and `diagnostics.ts` runs that copy of `runValidation`, so
19
- * a rule added here reaches the Problems panel only once the pin moves. The report — run by this CLI from source —
20
- * gets it immediately. Stated because the sibling comments in `registry.ts` assert the stronger version, and a rule
21
- * that is registered but invisible in the editor is the exact failure this story was written to close.
22
- *
23
- * ### Severity, chosen from the measurement (G-7)
24
- *
25
- * | rule | corpus findings | severity |
26
- * | --- | --- | --- |
27
- * | `CTX-1` a root has no such child | **0** | `high` — preventative; it cannot resolve under any composition |
28
- * | `CTX-2` a step key the phase does not contain | **94** | `high` — a typo or a renamed step, empty on every run |
29
- *
30
- * `CTX-1` firing on nothing today is stated rather than left to be discovered: "fires on nothing" and "is broken"
31
- * look identical in a log. `CTX-2`'s 94 are real — 53 of them reachable only through the `history`/`lastToken`
32
- * alias, and two verified by hand: an incremental watermark reading a step that was renamed
33
- * (`puller.history.GET_LAST_MODIFIED_DATE` where only `GET_LAST_UPDATED` exists) and a routing guard reading
34
- * `GET_ITEM_TO_MARK_REMOVE` where the key is `…REMOVED`, spelled correctly two lines below in the same expression.
35
- * Both are guards whose `else` branch has always been the only branch taken.
36
- *
37
- * ⚠️ Neither is `critical`: every one of these degrades silently rather than failing a run, which is exactly what
38
- * makes them hard to find — but a compose that would otherwise succeed must not be made to look broken (G-10).
39
- */
40
- import type { ValidationRule } from '../rule.js';
41
- export declare const contextRule: ValidationRule;
42
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/validate/rules/context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAqBjD,eAAO,MAAM,WAAW,EAAE,cAsFzB,CAAC"}
@@ -1,92 +0,0 @@
1
- import { contextFindingsFor } from '@beehexa/hexasync-template-context';
2
- const arr = (value, key) => Array.isArray(value?.[key]) ? value[key] : [];
3
- /** Every stage key a step can live under, used to spot stages declared outside a component. */
4
- const STAGES = [
5
- 'beforePullSteps',
6
- 'pullSteps',
7
- 'afterPullSteps',
8
- 'steps',
9
- 'onErrorSteps',
10
- 'finalSteps',
11
- 'beforePushSteps',
12
- 'pushSteps',
13
- 'afterPushSteps',
14
- ];
15
- export const contextRule = {
16
- id: 'CTX',
17
- family: 'CTX',
18
- run(ctx) {
19
- const cnf = ctx.tokenForm;
20
- if (!cnf || typeof cnf !== 'object')
21
- return [];
22
- const issues = [];
23
- const check = (component, collection, parentKey, idOrKey) => {
24
- for (const finding of contextFindingsFor(component, collection)) {
25
- issues.push({
26
- ruleId: finding.rule === 'root-has-no-child' ? 'CTX-1' : 'CTX-2',
27
- family: 'CTX',
28
- severity: 'high',
29
- parentKey,
30
- idOrKey,
31
- message: `step "${finding.stepKey}" reads \`${finding.path}\`, which no runtime provides — ` +
32
- finding.reason,
33
- why: finding.rule === 'root-has-no-child'
34
- ? 'the path resolves to nothing under any composition, so whatever reads it gets an empty value'
35
- : 'the path resolves to nothing on every run, so a guard around it never fires and its `else` branch is the only one ever taken',
36
- /**
37
- * The PATH, not the step key. A step commonly reads several paths and only one of them is wrong; locating
38
- * the step would put the snippet on the `key:` line rather than on the expression the author must edit.
39
- */
40
- locateValue: finding.path,
41
- });
42
- }
43
- };
44
- for (const collection of ['pullers', 'pushers']) {
45
- for (const component of arr(cnf, collection)) {
46
- const id = component?.id != null ? String(component.id) : undefined;
47
- check(component, collection, collection, id);
48
- }
49
- }
50
- /**
51
- * ⛔ **WEBHOOKS ARE NOT CHECKED, and saying so is the honest version of what was here before.**
52
- *
53
- * The first version walked `webhooks[].targets.<TARGET>.pullSteps` and resolved each target as a legacy puller —
54
- * the loop was right, the ALPHABET was wrong. A legacy puller's roots are
55
- * `puller`/`env`/`_outputs`/`__this`/`runStart`/`__related_tasks`, and measured across all **245 real corpus
56
- * targets** the root actually used is `webhook` (**287 reads**; `puller` appears **0** times). The walk drops
57
- * unknown roots, so every finding was discarded: the branch reported nothing, ever, while its comment claimed to
58
- * have closed a known trap. That is worse than the missing loop it replaced, because it reads as coverage.
59
- *
60
- * A webhook needs a POSITION the engine does not have: `position.ts` declares five and `CONTEXT-MODEL.md` models
61
- * none for webhooks. Inventing a `webhook` root here would be this rule guessing an alphabet the model has not
62
- * stated — a spec change, not a review patch. Recorded in `deferred-work.md`, and pinned as an ABSENCE by
63
- * `context.spec.ts` so nobody reads the silence as coverage.
64
- */
65
- /**
66
- * ⛔ STEPS AT THE DOCUMENT ROOT are an incorrect authoring shape, and were previously invisible.
67
- *
68
- * `001-projects/variux/ffw/output.yaml` composes a pusher partial at the root, so its steps land at
69
- * `$.pushSteps[]` rather than under `pushers[]`. Every rule in both repos walks the collections, so those
70
- * steps are validated by NOTHING — 3 authored API steps today, found by the Epic 10 review.
71
- *
72
- * Ruled incorrect (Jazz, 2026-08-15), so it is reported rather than supported: making five rules walk a shape
73
- * that should not exist would entrench it.
74
- */
75
- for (const stage of STAGES) {
76
- const rootSteps = arr(cnf, stage);
77
- if (rootSteps.length === 0)
78
- continue;
79
- issues.push({
80
- ruleId: 'CTX-3',
81
- family: 'CTX',
82
- severity: 'high',
83
- message: `\`${stage}\` is declared at the top level of the document, outside any puller or pusher — ` +
84
- `${rootSteps.length} step${rootSteps.length === 1 ? '' : 's'}`,
85
- why: 'a step only belongs to a component, so nothing runs these and no rule validates them — they are invisible rather than wrong',
86
- locateValue: stage,
87
- });
88
- }
89
- return issues;
90
- },
91
- };
92
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/validate/rules/context.ts"],"names":[],"mappings":"AA0CA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAExE,MAAM,GAAG,GAAG,CAAC,KAAU,EAAE,GAAW,EAAS,EAAE,CAC7C,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CA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AAI,GAAG,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE,CAAC;gBAC7C,MAAM,EAAE,GAAG,SAAS,EAAE,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;gBACpE,KAAK,CAAC,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;YAC/C,CAAC;QACH,CAAC;QAED;;;;;;;;;;;;;;WAcG;QACH;;;;;;;;;WASG;QACH,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,SAAS,GAAG,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC;YAClC,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC;gBAAE,SAAS;YACrC,MAAM,CAAC,IAAI,CAAC;gBACV,MAAM,EAAE,OAAO;gBACf,MAAM,EAAE,KAAK;gBACb,QAAQ,EAAE,MAAM;gBAChB,OAAO,EACL,KAAK,KAAK,kFAAkF;oBAC5F,GAAG,SAAS,CAAC,MAAM,QAAQ,SAAS,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE;gBAChE,GAAG,EAAE,6HAA6H;gBAClI,WAAW,EAAE,KAAK;aACnB,CAAC,CAAC;QACL,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CACF,CAAC"}
@@ -1,60 +0,0 @@
1
- /**
2
- * Integrity of the `dependencies[]` graph (Phase 2 Story 1.9, FR-56).
3
- *
4
- * Two of the classes AC 1 names, and both live here because both read `dependencies[]`:
5
- *
6
- * - **DEP-1, a circular dependency.** `REF-6` already checks that each edge's endpoints exist; the
7
- * SHAPE of the graph they form was never examined.
8
- * - **COL-1, an invalid column reference.** `data.keys` maps a column on the depending task's table
9
- * to one on the depended-on task's table. It is the corpus's only statically checkable column
10
- * reference — everything else lives inside `filterSql`, and parsing SQL to find columns is a
11
- * different project with a much worse failure mode.
12
- *
13
- * Both were measured before being written, and both measurements changed the design.
14
- */
15
- import type { ValidationRule } from '../rule.js';
16
- /**
17
- * DEP-1 — a cycle in the dependency graph.
18
- *
19
- * **Self-dependencies are excluded, and that is the whole of the measurement.** 51 cycles exist in the
20
- * corpus and 45 of them are `A -> A`: a task depending on itself is a SELF-JOIN, the ordinary way a
21
- * parent/child hierarchy is resolved within one task — `LEFT JOIN variants root_v ON root_v.id =
22
- * v.packsize_root_id`. Reporting those would make the rule wrong about 88% of what it found.
23
- *
24
- * What remains is 8 cycles across 7 projects, and they are real. `hapas` has *Sales Order Payments
25
- * depends on Sales Orders* and *Sales Orders depends on Sales Order Payments*, both `nullable: false`
26
- * with `constraints: [synced]` — a mutual readiness requirement where neither side can be satisfied
27
- * first.
28
- *
29
- * The finding states the CYCLE and stops there. Whether the worker deadlocks, retries or breaks the
30
- * tie is runtime behaviour this rule does not know, and asserting it would be the NFR-1 violation the
31
- * two-surface architecture exists to prevent. `high` rather than `critical` for the same reason.
32
- *
33
- * Iterative rather than recursive: a corpus dependency graph is small, but the guard costs nothing and
34
- * a stack overflow inside a rule is swallowed by `runValidation` — it would disable the rule
35
- * SILENTLY, which is the worst way for this to fail.
36
- */
37
- export declare const dependencyCycleRule: ValidationRule;
38
- /**
39
- * COL-1 — a dependency's `data.keys` names a column the table does not declare.
40
- *
41
- * `keys: { customer_id: id }` on a dependency from Sales Orders to Customers means "join my
42
- * `customer_id` to their `id`". Both sides are column names on the respective tasks' tables, reachable
43
- * through `objectAssociations[taskId].table.id` → `tables[].columns`.
44
- *
45
- * Two exclusions, both from measurement, and each one is the difference between a usable rule and an
46
- * unusable one:
47
- *
48
- * - **`__`-prefixed names are never checked.** `__id`, `__source_id`, `__destination_id` are managed
49
- * by the worker and are not declared in `columns`: of 119,575 authored column keys in the corpus,
50
- * exactly 2 begin with `__`, against thousands of references to them. Without this exclusion 17 of
51
- * 25 findings were these, all false.
52
- * - **An unresolvable chain reports nothing.** When the task has no association, or the association's
53
- * table does not exist, or the table declares no columns, this rule is silent — 18 of 208 key
54
- * references are in that state, and every one of them is already `REF-3`/`REF-5`'s finding. Two
55
- * rules reporting one defect makes the panel look twice as bad as the project is.
56
- *
57
- * What survives: 12 of 190 resolvable references, across 5 projects.
58
- */
59
- export declare const dependencyColumnRule: ValidationRule;
60
- //# sourceMappingURL=dependencyIntegrity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"dependencyIntegrity.d.ts","sourceRoot":"","sources":["../../../src/validate/rules/dependencyIntegrity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAsBjD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,mBAAmB,EAAE,cAkJjC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,oBAAoB,EAAE,cA6GlC,CAAC"}