Skip to content

fix(sources): read engine limits from its OpenAPI - #711

Merged
catinspace-au merged 1 commit into
mainfrom
fix/h16-engine-limits
Nov 11, 2026
Merged

catinspace-au merged 1 commit into
mainfrom
fix/h16-engine-limits

Conversation

@catinspace-au

Copy link
Copy Markdown
Contributor

The source form reads three engine limits from the engine's OpenAPI instead of keeping its own copy.

  • dfe-engine #1131 publishes the match nesting depth, the reserved operators and the credential reference prefixes.
  • generate:limits writes packages/dfe-engine-types/limits/index.ts from specs/openapi.json, and fails if a limit is missing.
  • MATCH_NESTING_LIMIT, MATCH_OPERATORS and CREDENTIAL_REFERENCE_PREFIXES come from that file. The form's exports stay the same. The values and operator order stay the same.
  • engineLimits.test.ts checks the generated file against the spec.

specs/openapi.json has three schemas from that PR pending a full file sync: SourceMatch, SourceExternal and SourceTransform. The operator union in types/index.d.ts moves not_equals after ends_with.

Done when vitest passes (57 files, 412 tests) and tsc and eslint are clean. The source form is untested in Playwright.

The source form duplicated three engine limits.

- The engine publishes the match nesting depth, reserved operators and credential reference prefixes in its OpenAPI. generate:limits generates packages/dfe-engine-types/limits/index.ts from them.
- MATCH_NESTING_LIMIT, MATCH_OPERATORS and CREDENTIAL_REFERENCE_PREFIXES come from that file. The form keeps its exports.
- engineLimits.test.ts checks the generated file against the spec.

specs/openapi.json has the three engine schemas that hold those keys until the whole file is synced.
@catinspace-au
catinspace-au marked this pull request as ready for review November 11, 2026 08:00
@catinspace-au
catinspace-au merged commit 72bb1a5 into main Nov 11, 2026
18 checks passed
@catinspace-au
catinspace-au deleted the fix/h16-engine-limits branch November 11, 2026 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant