You've already forked dokumenta-semantiska-analize
Import UAPF package
feat(3.2.0): align with UAPF v2.5.0 — embed algorithm card tests, drop sidecar
Per UAPF v2.5.0, tests move from sidecar files (tests/algorithms/<card-id>.test.yaml — removed in v2.5.0) into a top-level tests array on each algorithm card. Minimum two entries per card; the Algorithm Card viewer (UAPF chapter 13.16, ProcessGit Preview tab) consumes these as its primary interaction surface. This package's three cards now carry embedded tests: - algo.semantic_document_analysis.pii_redactor (deterministic redactor) — 3 cases: Latvian personas kods inline (positive — three entity types detected), plain administrative text (negative — no PII signals), financial figures with IBAN (mixed — financial yes, personas_kods no). - algo.semantic_document_analysis.vdvc_semantic_extractor (stochastic LLM extractor, EU AI Act high-risk + mandatory oversight) — 2 cases: regulatory construction-permit appeal (in-domain, expected topic + applicable_regulations), non-regulatory thank-you note (out-of-domain, low confidence). Both carry ai_confidence_score tolerance bands appropriate for a stochastic output. - algo.semantic_document_analysis.completion_event_emitter (deterministic CloudEvents emitter) — 2 cases: successful completion event, failure completion event. The emitter does not gate on payload contents, so both succeed. Other changes: - uapf.yaml + manifest.json: version 3.1.0 -> 3.2.0 - README.md: v3.2.0 section added describing embedded tests and the removed sidecar location BPMN file unchanged from v3.1.0 — uapf:algorithmCardRef on each service task per UAPF v2.4.0 + ioSpecification synthesis. Mappings unchanged. DMN tables unchanged. uapf-cli validate against v2.5.0 schemas passes cleanly.
This commit is contained in:
@@ -1,64 +1,70 @@
|
||||
kind: uapf.algorithm.card
|
||||
|
||||
id: algo.semantic_document_analysis.completion_event_emitter
|
||||
version: "1.0.0"
|
||||
name: "Process completion event emitter"
|
||||
intent: >
|
||||
Publishes a CloudEvents 1.0-conformant event marking the completion
|
||||
of one semantic analysis cycle, with the DMN-decided fields
|
||||
(personal data risk, processing route, redaction level, human
|
||||
validation status) attached. Personal data is NEVER included in
|
||||
the emitted payload — only the deterministic classification fields.
|
||||
|
||||
version: 1.0.0
|
||||
name: Process completion event emitter
|
||||
intent: |
|
||||
Publishes a CloudEvents 1.0-conformant event marking the completion of one semantic analysis cycle, with the DMN-decided fields (personal data risk, processing route, redaction level, human validation status) attached. Personal data is NEVER included in the emitted payload — only the deterministic classification fields.
|
||||
algorithm_kind: emitter
|
||||
|
||||
io:
|
||||
inputs:
|
||||
- id: event_type
|
||||
type: string
|
||||
cardinality: single
|
||||
- id: payload
|
||||
type: object
|
||||
cardinality: single
|
||||
- id: event_type
|
||||
type: string
|
||||
cardinality: single
|
||||
- id: payload
|
||||
type: object
|
||||
cardinality: single
|
||||
outputs:
|
||||
- id: published
|
||||
type: boolean
|
||||
|
||||
- id: published
|
||||
type: boolean
|
||||
implementation:
|
||||
type: external
|
||||
medium: mcp_tool
|
||||
uri: "uapf-ip://capability/event.emit@1"
|
||||
hash: "sha256:0000000000000000000000000000000000000000000000000000000000000000"
|
||||
uri: uapf-ip://capability/event.emit@1
|
||||
hash: sha256:0000000000000000000000000000000000000000000000000000000000000000
|
||||
runtime:
|
||||
capability: "event.emit@1"
|
||||
cloud_events_spec: "1.0"
|
||||
|
||||
capability: event.emit@1
|
||||
cloud_events_spec: '1.0'
|
||||
determinism: deterministic
|
||||
side_effects: writes_state
|
||||
|
||||
confidence:
|
||||
type: none
|
||||
|
||||
complexity:
|
||||
typical_latency_ms: 25
|
||||
max_latency_ms: 1000
|
||||
|
||||
failure_mode: "throw — process must complete reliably or fail loudly."
|
||||
|
||||
failure_mode: throw — process must complete reliably or fail loudly.
|
||||
reference:
|
||||
standard: "CloudEvents 1.0"
|
||||
url: "https://github.com/cloudevents/spec/blob/v1.0/spec.md"
|
||||
|
||||
standard: CloudEvents 1.0
|
||||
url: https://github.com/cloudevents/spec/blob/v1.0/spec.md
|
||||
owners:
|
||||
- type: team
|
||||
id: uapf-stewards
|
||||
contact: stewards@uapf.dev
|
||||
|
||||
- type: team
|
||||
id: uapf-stewards
|
||||
contact: stewards@uapf.dev
|
||||
lifecycle:
|
||||
status: draft
|
||||
since: "2026-05-20"
|
||||
|
||||
since: '2026-05-20'
|
||||
audit:
|
||||
log_inputs: full
|
||||
log_outputs: full
|
||||
retention: "1y"
|
||||
retention: 1y
|
||||
tests:
|
||||
- name: Successful analysis completion
|
||||
description: Standard happy-path completion event with full payload.
|
||||
inputs:
|
||||
event_type: dev.dokumenta.semantic_analysis.completed
|
||||
payload:
|
||||
document_id: doc-2026-05-21-001
|
||||
outcome: ok
|
||||
confidence: 0.87
|
||||
expected_outputs:
|
||||
published: true
|
||||
- name: Analysis failure completion
|
||||
description: Failure-path completion event still emits successfully (the emitter
|
||||
does not gate on payload contents).
|
||||
inputs:
|
||||
event_type: dev.dokumenta.semantic_analysis.failed
|
||||
payload:
|
||||
document_id: doc-2026-05-21-002
|
||||
outcome: extraction_failed
|
||||
reason: low_confidence
|
||||
expected_outputs:
|
||||
published: true
|
||||
|
||||
Reference in New Issue
Block a user