Validation must give the same result for semantically equivalent source before and after formatting. During UltraModern.js adoption in OntOS, a valid governed provider client was rejected solely because optional trailing commas were absent.
Observed failure:
verticals/party-registry/api/counterparties-search-server.ts:
generated search and report clients require the shared client runtime,
owner-local contract, operation gateway, authorization, and correlation metadata
The API, provider read contract, authorization, server, gateway, manifest, and registration predicates all passed. The client predicate failed. The diagnostic also pointed at the server although the rejected predicate concerned its client.
The checker currently lives in OntOS at app/scripts/generated-module-api-boundary.mts, called by app/scripts/check-module-entrypoint-boundaries.mts. This issue tracks the durable shared solution in UltraModern.js and the audit of equivalent framework checks. Related adoption: TechsioCZ/ontos#508.
The exact token sequences in hasGovernedTransportInvocation required trailing commas after the last object property and final call argument. hasExactGeneratedOperationParameters also required a trailing comma after the helper's last parameter. For example, these equivalent forms produced different validation results:
makeGovernedEffectBffClient(
{ api: InventoryItemsSearchApi, credential,
defaultApiPrefix: '/inventory-stock-api', requestCorrelation, },
options,
);
makeGovernedEffectBffClient(
{ api: InventoryItemsSearchApi, credential,
defaultApiPrefix: '/inventory-stock-api', requestCorrelation },
options
);
Required outcome:
- Move reusable validation into its owning UltraModern package and replace formatting-dependent matching with structural validation of the actual imports, bindings, calls, and arguments.
- Audit other exact-source, regex, and token-sequence checks for formatting sensitivity. Whitespace, comments, quote style, line wrapping, and optional punctuation must not change the result when program semantics are unchanged.
- Add regression coverage that formats valid fixtures with the supported formatter configuration and proves identical results before and after. Cover all combinations of optional trailing commas in parameters, objects, and calls.
- Keep negative coverage for changed credentials, correlation metadata, API prefixes, gateway bypasses, extra executable statements, and shadowed imports. Formatting tolerance must not weaken those checks.
- Report the actual failing file and invariant rather than a generic multi-file failure.
- Validate the shared fix against OntOS, Tractor, and ERP-10, then remove redundant consumer implementations.
A narrow OntOS repair and regressions are being validated during current release acceptance. This issue remains necessary for the structural fix and broader audit; adding punctuation exceptions one at a time is not the long-term solution.
Validation must give the same result for semantically equivalent source before and after formatting. During UltraModern.js adoption in OntOS, a valid governed provider client was rejected solely because optional trailing commas were absent.
Observed failure:
The API, provider read contract, authorization, server, gateway, manifest, and registration predicates all passed. The client predicate failed. The diagnostic also pointed at the server although the rejected predicate concerned its client.
The checker currently lives in OntOS at
app/scripts/generated-module-api-boundary.mts, called byapp/scripts/check-module-entrypoint-boundaries.mts. This issue tracks the durable shared solution in UltraModern.js and the audit of equivalent framework checks. Related adoption: TechsioCZ/ontos#508.The exact token sequences in
hasGovernedTransportInvocationrequired trailing commas after the last object property and final call argument.hasExactGeneratedOperationParametersalso required a trailing comma after the helper's last parameter. For example, these equivalent forms produced different validation results:Required outcome:
A narrow OntOS repair and regressions are being validated during current release acceptance. This issue remains necessary for the structural fix and broader audit; adding punctuation exceptions one at a time is not the long-term solution.