feat(contract): add routing + normalization operationIds (ADR-027) #118

Merged
admin merged 1 commits from feat/contract-routing-normalization-operationids-20260926 into main 2026-09-26 11:19:44 +00:00
Owner

Adder routing + normalization operationIds till 0pt:s egen HTTP-kontrakt, per ADR-027.

Bakgrund

cl0ud PR#270 (mergad igar) registrerade 5 av ADR-027:s 7 0pt.structure.* omraden i capability-registryn -- men explicit INTE routing/normalization, eftersom detta repos contracts/openapi.yaml saknade operationId/path for dem an (se docstring i packages/capability-registry/src/0pt-structure-capabilities.ts i cl0ud). Koden finns redan, INTEGRATION_TESTED, i sax3l/0pt-motor:

  • motor/parsing/routing.py (route_parser m.fl.)
  • motor/normalization/{amounts,identifiers}.py

Andring

Contract-only. Foljer exakt samma monster som 0pt.resolve_entities / 0pt.get_provenance (TARGET-prefix, x-siax-status: target, security: [], egna request/response-scheman):

  • POST /v1/0pt/parsing/route -> operationId 0pt.route_parsing
  • POST /v1/0pt/normalize -> operationId 0pt.normalize_value

Ingen route-handler finns an (korrekt speglat av x-siax-status: target). Registrering i cl0uds capability-registry ar ett separat uppfoljande PR i det repot, inte del av denna.

projections ror jag INTE -- ingen kod finns nagonstans for det, skulle bli en tom stub.

Verifiering lokalt

  • python3 -c "import yaml; yaml.safe_load(open('contracts/openapi.yaml'))" -- parsar rent, inga dubbla operationIds.
  • pnpm vitest run tests/p0/quality-service.test.ts -- 13/13 gront (enda testfilen som refererar contracts/openapi.yaml; strang-innehall-koll, inte pahektad av tillagget).

Test plan

  • CI (SIAX Cloud) gront: quality (typecheck/test/lint/build), integration, security
  • Merge via siax-bot-review-proceduren

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Adder routing + normalization operationIds till 0pt:s egen HTTP-kontrakt, per ADR-027. ## Bakgrund cl0ud PR#270 (mergad igar) registrerade 5 av ADR-027:s 7 0pt.structure.* omraden i capability-registryn -- men explicit INTE routing/normalization, eftersom detta repos contracts/openapi.yaml saknade operationId/path for dem an (se docstring i packages/capability-registry/src/0pt-structure-capabilities.ts i cl0ud). Koden finns redan, INTEGRATION_TESTED, i sax3l/0pt-motor: - motor/parsing/routing.py (route_parser m.fl.) - motor/normalization/{amounts,identifiers}.py ## Andring Contract-only. Foljer exakt samma monster som 0pt.resolve_entities / 0pt.get_provenance (TARGET-prefix, x-siax-status: target, security: [], egna request/response-scheman): - POST /v1/0pt/parsing/route -> operationId 0pt.route_parsing - POST /v1/0pt/normalize -> operationId 0pt.normalize_value Ingen route-handler finns an (korrekt speglat av x-siax-status: target). Registrering i cl0uds capability-registry ar ett separat uppfoljande PR i det repot, inte del av denna. `projections` ror jag INTE -- ingen kod finns nagonstans for det, skulle bli en tom stub. ## Verifiering lokalt - `python3 -c "import yaml; yaml.safe_load(open('contracts/openapi.yaml'))"` -- parsar rent, inga dubbla operationIds. - `pnpm vitest run tests/p0/quality-service.test.ts` -- 13/13 gront (enda testfilen som refererar contracts/openapi.yaml; strang-innehall-koll, inte pahektad av tillagget). ## Test plan - [ ] CI (SIAX Cloud) gront: quality (typecheck/test/lint/build), integration, security - [ ] Merge via siax-bot-review-proceduren Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
admin added 1 commit 2026-09-26 11:18:20 +00:00
feat(contract): add routing + normalization operationIds per ADR-027
CI (SIAX Cloud) / integration (push) Skipped
masterplan-lock / check (push) Successful in 9s
CI (SIAX Cloud) / security (push) Successful in 21s
masterplan-lock / check (pull_request) Successful in 8s
Security Scan (SIAX Cloud) / security (push) Successful in 29s
CI (SIAX Cloud) / security (pull_request) Successful in 18s
CI (SIAX Cloud) / quality (push) Successful in 47s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 39s
CI (SIAX Cloud) / quality (pull_request) Successful in 45s
CI (SIAX Cloud) / integration (pull_request) Successful in 1m4s
2ddb21e568
0pt.structure.* registered 5 of ADR-027's 7 areas yesterday (cl0ud
PR#270, grounded at this repo's main@ec48774): entity resolution,
lineage, quality (x4) and parsing-orchestration. routing and
normalization were left out because this repo's own contract had no
operationId/path for either yet, even though both have real,
INTEGRATION_TESTED code in sax3l/0pt-motor
(motor/parsing/routing.py, motor/normalization/{amounts,identifiers}.py)
that is simply not deployed behind an HTTP route.

Adds the two target-status operationIds, following the exact pattern
of 0pt.resolve_entities / 0pt.get_provenance already in this file
(TARGET summary prefix, x-siax-status: target, security: [], dedicated
request/response schemas):

- POST /v1/0pt/parsing/route -> 0pt.route_parsing
  (BTI-DOC-02/03/04/05 parser-routing / selective-OCR decision)
- POST /v1/0pt/normalize -> 0pt.normalize_value
  (BTI-NLP-02/03 amount/percent/date normalization + identifier
  checksum validation, one operationId per ADR-027's "normalization"
  being a single area)

Contract-only change; no route handler exists yet (correctly reflected
by x-siax-status: target). Registering these in cl0ud's capability
registry is deliberately deferred to a follow-up PR in that repo.

projections is NOT touched here -- no code exists anywhere for it, so
it stays unregistered rather than becoming an empty stub.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
CODEOWNERS rules requested review from sax3l 2026-09-26 11:18:20 +00:00
siax-bot approved these changes 2026-09-26 11:18:27 +00:00
siax-bot left a comment
Collaborator

Automated review: contract-only ADR-027 routing+normalization operationId addition, follows existing target-status pattern, YAML validated, existing contract test green.

Automated review: contract-only ADR-027 routing+normalization operationId addition, follows existing target-status pattern, YAML validated, existing contract test green.
siax-bot approved these changes 2026-09-26 11:18:53 +00:00
siax-bot left a comment
Collaborator

Automated review: contract-only ADR-027 routing+normalization operationId addition, follows existing target-status pattern, YAML validated, existing contract test green.

Automated review: contract-only ADR-027 routing+normalization operationId addition, follows existing target-status pattern, YAML validated, existing contract test green.
admin merged commit 410339e697 into main 2026-09-26 11:19:44 +00:00
Sign in to join this conversation.
No Reviewers
No labels
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: admin/0pt#118