Merge branch 'main' into feat/vehiq-oltp-watermark-extractor
CI (SIAX Cloud) / integration (push) Skipped
masterplan-lock / check (push) Successful in 7s
masterplan-lock / check (pull_request) Successful in 8s
Security Scan (SIAX Cloud) / security (pull_request) Successful in 50s
CI (SIAX Cloud) / security (push) Successful in 54s
CI (SIAX Cloud) / security (pull_request) Successful in 53s
CI (SIAX Cloud) / integration (pull_request) Successful in 1m6s
CI (SIAX Cloud) / quality (pull_request) Successful in 1m24s
CI (SIAX Cloud) / quality (push) Successful in 1m32s
Security Scan (SIAX Cloud) / security (push) Successful in 13s

This commit is contained in:
2026-09-26 14:18:47 +00:00
2 changed files with 152 additions and 1 deletions
+10 -1
View File
@@ -50,8 +50,16 @@ env:
# G17_LICENSE_ALLOW policy in .siax/hooks/G17.sh) and #59 (G20 retry
# logic -- not used by 0pt yet, but the pin picks up main's current tip
# rather than an older commit, matching what a fresh migration reviews).
#
# Re-pin 2026-09-25 (medveten, granskad): 9a3a0aa -> 09504e3a. Deltaet ar
# EN merge, siax-templates #138 "Upload complete release evidence and
# validate artifact receipt". Enda berorda filer under ci/v2 ar
# reference-hooks/{G17.sh, G17-ADR-W16-003.md, lib/emit-release-evidence.py,
# lib/test_emit_release_evidence.py}. Andringen ar bakatkompatibel by
# design: ST0RE-uppladdningen ar OPT-IN via G17_REQUIRE_ST0RE (default 0),
# sa en AUD0-only-konsument som 0pt kor exakt samma vag som forut.
SIAX_TEMPLATES_REF: main
SIAX_TEMPLATES_PINNED_SHA: 9a3a0aa93c28a4538ecdb98658158f19cb23a6f9
SIAX_TEMPLATES_PINNED_SHA: 09504e3a593ee8ce0eaba606df31c349a3d52277
SIAX_TEMPLATES_DIR: /tmp/siax-templates-g17-ref
jobs:
@@ -142,3 +150,4 @@ jobs:
# submission (bar item 7, step above) is already the durable evidence
# record; a convenience local copy is not worth re-triggering that
# known breakage.
+142
View File
@@ -367,6 +367,60 @@ paths:
$ref: "#/components/schemas/ProvenanceRecord"
"401":
$ref: "#/components/responses/Unauthorized"
/v1/0pt/parsing/route:
post:
operationId: 0pt.route_parsing
summary: >
(TARGET) Parser-routing/selektiv OCR-beslut (BTI-DOC-02/03/04/05).
Kontrakt-first — real kod i 0pt-motor/motor/parsing/routing.py
(route_parser m.fl.), INTEGRATION_TESTED men ej driftsatt bakom
denna route.
x-siax-status: target
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/RouteParsingRequest"
responses:
"200":
description: Routingbeslut (parser/OCR-gren) + ev. nyckeltalskonflikter mellan parsers
content:
application/json:
schema:
$ref: "#/components/schemas/RouteParsingResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
/v1/0pt/normalize:
post:
operationId: 0pt.normalize_value
summary: >
(TARGET) Lokal-medveten normalisering — belopp/skala/datum (BTI-NLP-03)
och identifierare/checksummor (BTI-NLP-02). Kontrakt-first — real kod
i 0pt-motor/motor/normalization/{amounts,identifiers}.py,
INTEGRATION_TESTED men ej driftsatt bakom denna route.
x-siax-status: target
security: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/NormalizeValueRequest"
responses:
"200":
description: Normaliserat värde — format_valid/review, aldrig en påhittad korrigering
content:
application/json:
schema:
$ref: "#/components/schemas/NormalizeValueResponse"
"400":
$ref: "#/components/responses/BadRequest"
"401":
$ref: "#/components/responses/Unauthorized"
# ---------------------------------------------------------------------------
# Internal service-to-service (Python-engine bridge) — P-002 internal OpenAPI.
@@ -811,3 +865,91 @@ components:
type: object
additionalProperties:
$ref: "#/components/schemas/FieldProvenance"
RouteParsingRequest:
type: object
required: [digital_text_page]
properties:
digital_text_page:
type: boolean
description: True om sidan har ett digitalt textlager (ej scannad).
ocr_available:
type: boolean
default: false
parser_result:
type: object
description: Föregående parser-försök, om något (tom text = kandidat för OCR-gren).
properties:
parser:
type: string
text:
type: string
key_figures:
type: object
additionalProperties:
type: number
compare_with:
type: object
description: (Valfritt) ett andra parser-resultat att stämma av mot — avvikande nyckeltal blir en konflikt, aldrig en tyst ersättning.
properties:
parser:
type: string
text:
type: string
key_figures:
type: object
additionalProperties:
type: number
RouteParsingResponse:
type: object
required: [routing]
properties:
routing:
type: string
enum: [text_parser, ocr_branch, explicit_unavailable]
conflicts:
type: object
description: Fält där de två parser-resultatens nyckeltal skiljer sig (present endast om compare_with skickades).
additionalProperties: true
NormalizeValueRequest:
type: object
required: [kind, value]
properties:
kind:
type: string
enum: [amount, percent, date, identifier]
description: amount/percent/date = motor/normalization/amounts.py. identifier = motor/normalization/identifiers.py.
value:
type: string
description: Rå textsträng att normalisera (belopp, procentsats, datum eller identifierare).
locale:
type: string
description: (kind=amount, valfritt) comma_decimal|dot_decimal — auto-detekteras annars.
unit:
type: string
description: (kind=amount|percent) t.ex. SEK/KSEK/MSEK/GSEK eller "%"/"pp".
identifier_kind:
type: string
enum: [orgnr, cvr, vat, ocr]
description: (kind=identifier, krävs) vilken identifierartyp som ska valideras.
country:
type: string
description: (kind=identifier, krävs) ISO-3166 alpha-2, t.ex. SE/NO/DK.
description: >
Ett fält, en normalisering. amount/percent/date har alltid en explicit
precision/skala (aldrig en påhittad dag eller sammanblandad enhet).
identifier ger format_valid eller review — aldrig en tyst korrigerad
checksumma; existens i register verifieras inte här.
NormalizeValueResponse:
type: object
required: [kind, status]
properties:
kind:
type: string
enum: [amount, percent, date, identifier]
status:
type: string
enum: [ok, format_valid, format_invalid, review, unparseable]
result:
type: object
description: Normaliserat resultat, formen beror på kind (se motor/normalization/{amounts,identifiers}.py).
additionalProperties: true