The earlier durchstich-gewo-14.yaml used the templated
${{ inputs.x }} syntax and rich input declarations
(type / required / description). chain 0.16 expects the
simpler $inputs.x form and flat 'inputs: { name: type }'
maps — see flows/hello.yaml in fai/chain. Rewritten to match.
Adds two siblings:
- test-cohort.yaml: trivial stats.cohort_size-only smoke
test. Confirms a Recl∆Im module loads, instantiates against
the chain:platform/invoke@1.0.0 ABI, and writes a clean
flow.completed event. Useful as the first test you run
when wiring a fresh hub.
- durchstich-from-file.yaml: end-to-end demo without the
http.request permission dance. Takes the source XML as a
bytes input (--input content=@./norm.xml), runs through
text.akoma_normalize, stats.cohort_size and the
system.approval gate, and writes the norm + cohort bag to
the audit log. First end-to-end Recl∆Im flow that survives
a hub restart with audit-trail intact.
Verified locally: chain run flows/test-cohort.yaml → flow.completed
in 5 ms; chain run flows/durchstich-from-file.yaml + approve →
flow.completed in 6 s, output bag carries normalized GewO §14
with paragraphs + source_sha256.
Signed-off-by: flemming-it <sf@flemming.it>
53 lines
1.4 KiB
YAML
53 lines
1.4 KiB
YAML
# Phase-0 vertikaler Durchstich für GewO §14.
|
|
#
|
|
# Minimaler Pfad zum ersten echten flow.completed-Event im
|
|
# Audit-Log — http.request → text.akoma_normalize →
|
|
# stats.cohort_size → system.approval. Beweist, dass die
|
|
# Recl∆Im-Pipeline live gegen den Ch∆In-Hub läuft. Die
|
|
# komplexen Bewertungs-Schritte (econ.skm_score,
|
|
# law.benefit_score, graph.shapley_attribution) bündeln wir in
|
|
# einem zweiten Flow, wenn dieser hier durchläuft.
|
|
#
|
|
# Voraussetzung — alle Module installieren:
|
|
# chain install --link <fai_chain_modules>/<modul>
|
|
# für: http-request, text-akoma-normalize, stats-cohort-size
|
|
#
|
|
# Aufruf:
|
|
# chain run flows/durchstich-gewo-14.yaml \
|
|
# --input norm_url=https://www.gesetze-im-internet.de/gewo/__14.xml \
|
|
# --input cohort_id=berlin-kmu
|
|
|
|
name: durchstich-gewo-14
|
|
|
|
inputs:
|
|
norm_url: text
|
|
cohort_id: text
|
|
|
|
steps:
|
|
- id: pull
|
|
use: http.request@^0
|
|
with:
|
|
url: $inputs.norm_url
|
|
method: "GET"
|
|
|
|
- id: normalize
|
|
use: text.akoma_normalize@^0
|
|
with:
|
|
content: $pull.body
|
|
mime: "application/xml"
|
|
|
|
- id: cohort
|
|
use: stats.cohort_size@^0
|
|
with:
|
|
cohort_id: $inputs.cohort_id
|
|
|
|
- id: review
|
|
use: system.approval@^0
|
|
with:
|
|
title: "Recl∆Im — Review GewO §14"
|
|
payload: $normalize.norm
|
|
|
|
outputs:
|
|
norm: $normalize.norm
|
|
cohort: $cohort.cohort
|
|
decision: $review.decision
|