informed-decision/workplans/INFD-WP-0007-decision-lifecycle-service.md
tegwick 5fec7de4cb Implement lifecycle workspace publication and audit delivery
Assistant: codex
Assistant-Model: gpt-6-astra
Assistant-Session: 01a10780-6d41-7952-9718-dfbc1f41236f
2026-10-04 20:17:24 +02:00

10 KiB
Raw Blame History

id type title domain repo status owner topic_slug created updated origin origin_ref related state_hub_workstream_id
INFD-WP-0007 workplan Decision lifecycle service — headless foundation and human UI infotech informed-decision active codex netkingdom 2026-10-04 2026-10-04 demand Founder 2026-10-04: full decision lifecycle for agents and humans, no per-decision infrastructure rollout, headless foundation and UI at decisions.coulomb.social
INFD-WP-0005
INFD-WP-0006
2b3e04ed-2137-584f-a6c2-f1abb29636fa

Decision lifecycle service

Contract: docs/specs/DecisionLifecycleService.md. This extends the existing memo and intake implementation. INFD-WP-0005 continues to own intake runtime, attribute admission, forwarding and live acceptance. Implementation started on 2026-10-04 at the founder's request. Production identity/policy admission and the human binding handoff remain open. The shared service now has a bearer API adapter and optional browser workspace.

Record product direction and architecture

id: INFD-WP-0007-T01
status: done
priority: high
state_hub_task_id: "00829d0e-2daa-5c25-a4e9-e4fd595fb8d4"

Updated INTENT and GOAL; SCOPE explicitly distinguishes requested capabilities from implementation. Spec covers all nine operations, foundation/UI dependency boundary, revision/evidence semantics and acceptance without per-decision deploys.

Specify lifecycle contracts against existing owners

id: INFD-WP-0007-T02
status: progress
priority: high
state_hub_task_id: "cde0c932-afce-5bec-8cee-a2f377955b9f"

Define versioned API schemas, application service interfaces, caller/tenant context, source/evaluation/comment companion records, revision concurrency, publication audience, idempotency, errors, limits and result retrieval. Resolve the spec's open identity/publication/source/non-approval binding contracts. Review against existing schema and engine contracts. Preserve private intake and current review URLs. Produce a reviewed migration and compatibility plan.

Implement durable headless lifecycle foundation

id: INFD-WP-0007-T03
status: progress
priority: high
depends_on: [INFD-WP-0007-T02]
state_hub_task_id: "2a206bc2-cb92-539d-9014-9ba71f70277c"

Implement registration, immutable revisions, source provenance, evaluations, companion comments, publication and result/event retrieval using shared service operations. Reuse the current memo/presentation/disposition core and transactional store/outbox. Migrate existing records without losing evidence. Tests prove concurrency, replay, restart, stale-presentation refusal, human-only disposition and absence of UI imports. No mirrored approval state.

Expose authenticated lifecycle API for agents and humans

id: INFD-WP-0007-T04
status: progress
priority: high
depends_on: [INFD-WP-0007-T03]
state_hub_task_id: "65c760da-de7e-5e85-9817-6f3e2b46c8f9"

Add versioned adapters, bounded authorized search/retrieval and durable outcomes. Connect existing intake and policy/identity ports. Test audience, tenant and authorization isolation, conflicting idempotency payloads, result delivery and uncertain external outcomes. The complete agent scenario must run without a UI.

Build the lifecycle workspace at decisions.coulomb.social

id: INFD-WP-0007-T05
status: progress
priority: high
depends_on: [INFD-WP-0007-T04]
state_hub_task_id: "a6a7c9a8-760e-52dd-80d3-d36f43f0a86a"

Add discovery, authoring, research/evaluation views, publication audience controls, discussion, revision comparison and human review through the shared foundation. Keep agents clearly attributed, acceptance revision-specific and authentication step-up understandable. Verify existing URLs and old records remain usable.

Prove lifecycle without per-decision rollout and prepare live delivery

id: INFD-WP-0007-T06
status: progress
priority: high
depends_on: [INFD-WP-0007-T04, INFD-WP-0007-T05]
state_hub_task_id: "aa839bea-cc4c-5ee0-85e7-87c881e8e578"

Run all seven spec acceptance scenarios in an integration environment. Record unchanged image/deployment/policy/config pins across two new decisions and a revision, plus restart durability. Incorporate WP-0005 runtime/admission receipts. Prepare the concrete migration, immutable release, rollback and verification packet before requesting the separately required live rollout approval.

Approved live acceptance

id: INFD-WP-0007-T07
status: todo
priority: high
depends_on: [INFD-WP-0007-T06]
state_hub_task_id: "25fa4743-5c7e-5609-9872-7c5971ff62bc"

After explicit approval of the concrete rollout, deploy and obtain native agent-to-human-to-agent evidence at decisions.coulomb.social. Only the human performs acceptance. Update SCOPE from observations and hand any residuals into live work records before marking this plan finished.

First implementation slice — 2026-10-04

docs/specs/LifecycleFoundationContract.md records the implemented T02 storage contract and remaining service/API contracts. T03 begins against that bounded contract while the broader T02 work continues. informed_decision/lifecycle.py provides registration, immutable revisions, attributed sources/evaluations/ comments and event retrieval on the existing Memo and Store. Schema 4 retains mutation events and pending delivery atomically with memo writes and idempotency receipts. Tests cover concurrent revisions, restart/backup, tenant partitioning, rollback, replay, provenance references, schema upgrades and existing human/stale presentation guards. Neither task is complete: application authorization, publication, HTTP/UI and admitted evidence delivery remain in their live tasks. No production route or deployment was changed.

Validation: uv run --extra dev python -m pytest -q — 480 passed, 72 skipped. The system interpreter had dependency-related failures; the project-managed environment passes. git diff --check passes.

Protected application service — 2026-10-04

Added LifecycleService above the repository: verified human-session import, trusted workload-caller interface, fresh PolicyClient observations for every operation/retry, immutable command snapshots, transaction-time authorization guards and post-read expiry checks. Mutation events link the retained policy observation. Existing human disposition and policy action contracts are unchanged. docs/specs/LifecycleServiceContract.md records the proposed lifecycle action names/context and remaining production identity/policy/HTTP/audit admission work. T02/T03 remain in progress; no listener or policy grant was deployed.

Validation: uv run --extra dev python -m pytest -q — 501 passed, 72 skipped; git diff --check passed.

Infrastructure alignment — 2026-10-04

Reviewed current local owner sources and shipped v11 sitting pins; findings are in docs/evidence/2026-10-04-lifecycle-infrastructure-alignment.md. Fixed legacy overview exposure of unpublished lifecycle ids, import bypass of lifecycle revision history, and readiness/admin omission of pending lifecycle evidence. Cross-repo suite with Approval Engine, Audit Core and State Hub source fixtures: 571 passed, 5 skipped. This is source integration evidence, not live cluster verification or new lifecycle policy admission. External runtime/identity/policy/ receiver contracts remain on T02/T03 and WP-0005.

HTTP adapter continuation — 2026-10-04

Started T04 against the implemented application contract while broader T02/T03 work continues. LifecycleAPI provides bearer-authenticated adapter seams for retrieval, event pagination and comments/sources/evaluations, calling the same application service. Closed/bounded JSON, idempotency headers, sanitized errors and cookie refusal are tested. No default authenticator or listener is supplied; public ingress and browser app remain unchanged. Contract and remaining route/ identity/runtime work: docs/specs/LifecycleHTTPContract.md.

HTTP continuation validation: cross-repo suite 585 passed, 5 skipped; a subsequent focused lifecycle/HTTP run also covers content-free admin inspection. git diff --check passed. Runtime remains unmounted pending the named contracts.

Registration and revision API — 2026-10-04

Continued T04 with POST /v1/decisions and POST /v1/decisions/{id}/revisions, using closed typed decoding of the existing Memo dataclasses. Added bounded base64 packet uploads, verified digests and atomic packet/memo/event writes. New records must supply packet bytes; revisions can reuse only their current packet's digests. The shared service snapshots and authorizes the whole command. Receipts include stable relative API revision links. Tests cover end-to-end registration/replay/revision, malformed nested values, forged approval pins, packet corruption, cross-record digest reuse and rollback on queue failure. The adapter remains unmounted; T02/T03/T04 remain in progress.

Validation: cross-repository suite 598 passed, 5 skipped; subsequent HTTP tests include shared L0/L3 decoding and preservation of requires_new_bind. git diff --check passed. No live deployment or authentication admission.

Workspace, publication and independent evidence — 2026-10-04

Continued T02–T06 with revision-specific explicit publication audiences, policy record facts and race guards, bounded authorized search with opaque scoped cursors, and packet retrieval. Added a human workspace through the same service: create, research/evaluate, comment, publish, compare and refine. API receipts include workspace links. Existing session, CSRF and origin protections are reused.

Runtime optionally composes a separately pinned lifecycle policy; the deployment renderer produces corresponding exact network proposals. Opt-in lifecycle audit commitments use the existing outbox, real receiver receipts, retries, heartbeats and reconciliation. Tests cover lost replies, restart, audience races, denial, HTML escaping, form replay and unchanged configuration across two new decisions and a revision. The full cross-repository suite passes: 623 passed, 5 skipped.

T05/T06 are in progress, not complete. Live tasks retain: admitted lifecycle PDP policy and workload identity/listener (T02/T04), human review/binding handoff and broader authoring UI (T03/T05), full acceptance scenarios, immutable release and rollback packet (T06), separately approved live rollout (T07). Source metadata entry is implemented; automated fetching/retention is not. No deployment occurred. Delivery and activation contract: docs/specs/LifecycleWorkspaceDelivery.md.