GKB contracts#
Use bounded GKB search only to discover stable artifact IDs. Exact-read every artifact used for validation or reporting and retain its exact artifact ID. Do not substitute search ranks, snippets, database rows, object-store content, or conversational copies.
The scripts construct drafts and commit plans only. Before publication, require explicit
gkb.write authority for the target project. Send each draft through the host gkb_publish
capability with the exact idempotency key produced or supplied by the workflow. Identical retries
reuse the key; a conflicting key fails closed. Do not choose another key to hide changed content.
Report durable IDs, content hashes, idempotency disposition, warnings, and relations only from a successful publication receipt. A script success means the draft or plan is valid, not persisted.
Use validate for a pre-publication draft. For an authoritative host read, use
validate-exact-read with exactly {"artifact_id":"...","artifact":{...}}; the command requires
the stable ID and rejects a conflicting ID embedded in the artifact.
Pass the raw draft directly to validate:
{"kind":"observation","extensions":{"geonemo.ship-observation/v4":{},"geonemo.ship-detection/v4":{}}}
The abbreviated extension objects above illustrate the envelope only; validation still requires every field in the Ship schema.
The report builder accepts exactly this shape:
{"observations":[{"artifact_id":"ship-observation-001","artifact":{"kind":"observation","extensions":{}}}],"query":{"campaign_id":"harbor-2026","region_id":"harbor-a"},"limitations":["Two provided observations only."],"idempotency_key":"harbor-2026-report-v1","supersedes":[]}
Each artifact must be a complete exact-read Ship observation. query is required bounded JSON
that records the host discovery scope; it does not supply series, counts, coverage, or provenance.
supersedes is optional. The script derives coverage qualification, candidate summary,
provenance strata, processing-time ordering and watermark, and exact lineage. Small source sets are
embedded in the report lineage; lineage chunk and root commit-plan items appear only after the
inline count or byte bound is exceeded.
Before publication, pass the entire generated plan to validate-commit-plan:
{"commit_plan":[{"role":"report","artifact_id":"gkb_...","idempotency_key":"harbor-2026-report-v1","draft":{"artifact_id":"gkb_...","extensions":{}}}]}
The abbreviated draft above illustrates the envelope only. Validation requires the complete plan and recomputes report aggregates, content-addressed IDs, the inline source-set digest, or every chunk hash and root relationship.