# State 019 tasks

> For the complete documentation index, see [llms.txt](https://deploy-preview-522--lucky-concha-f3599f.netlify.app/llms.txt).

[Learning Guide — TraderX Security Lab (Planned)](https://deploy-preview-522--lucky-concha-f3599f.netlify.app/docs/learning/state-019-traderx-security-lab.md): purpose, walkthrough, and related learning states.

# State 019 tasks

Completed prototype evidence and granular implementation history are in the [C3 profile ledger](https://deploy-preview-522--lucky-concha-f3599f.netlify.app/specs/platform-convergence-c3/security-lab/tasks.md). This list tracks state promotion and acceptance, not duplicate claims of completion.

*   [x]  S019-01 Register a planned C3 child, root specification and learning contract.
*   [x]  S019-02 Publish and verify draft PR docs/spec preview with a real portal image and native Mermaid progression.
*   [x]  S019-03a Verify offline pinned-snapshot preparation and byte-identical reference/workload checkpoints from a shallow clone; add CI.
*   [x]  S019-03b Compose all nineteen workload restrictions, collector isolation and SQL Secret references; validate dependencies and migration prerequisites offline.
*   [x]  S019-03c1 Validate transactional fresh SQL bootstrap, private runtime credentials, exact grants, failure rollback and refusal to overwrite existing data in two bounded database instances.
*   [x]  S019-03c2 Implement create-once private SQL credential persistence, contract/integrity checks and explicit reuse without rotation.
*   [x]  S019-03c3 Add the owned database-only Kubernetes adapter with offline boundary tests; validate persistent SQL initialization and two restarts in a bounded Docker fixture.
*   [x]  S019-03c4 Validate the adapter on live Kubernetes, including Secret/PVC provisioning, failure recovery and database pod recreation.
*   [x]  S019-03c5 Roll out the bounded fifteen-deployment trading candidate; verify settlement, order cancellation, independent SQL outcomes and scoped workload admission on Kubernetes.
*   [x]  S019-03c6 Initialize four fresh telemetry PVCs with tokenless non-root Jobs; verify logs/metrics/traces/dashboard persistence and isolated collector RBAC/admission.
*   [x]  S019-03c7 Validate cumulative start/stop/test with all nineteen Deployments, isolated collector and twelve policy families; trading passes after telemetry recreation.
*   [x]  S019-03c Implement and validate fresh synthetic-data bootstrap plus guarded candidate start/stop/test lifecycle; no direct application of migration overlays.
*   [x]  S019-03d Verify the unified contributor entrypoint and transitive runtime-source integrity from a fresh shallow checkout; keep recovery stop available after artifact drift.
*   [x]  S019-03e Add read-only contributor platform readiness checks; verify stopped-cluster refusal without interrupting the browser lab.
*   [x]  S019-03f Pin Cilium chart/render/container inventory; verify repeatable secret-free infrastructure bundles and guarded create failure boundaries offline.
*   [x]  S019-03g1 Fresh separately named cluster boots; pinned Cilium/DNS and bounded allowed/denied network plus Restricted admission probes pass. Original cluster preserved.
*   [x]  S019-03g2 Recover pinned image loading after approved unused-build-cache cleanup; verify doctor and nineteen-deployment startup on the retained validation cluster.
*   [x]  S019-03g3a Diagnose missing logs as Loki WAL disk throttling at 90.48% usage; add percentage/absolute-capacity guards and verify live refusal before mutation.
*   [x]  S019-03g3 Archive/retire the approved old State 014 cluster, restore disk headroom without resizing, and pass cumulative telemetry persistence plus trading acceptance on the retained validation cluster; see `evidence/2026-11-24-consolidated-runtime.json`.
*   [ ]  S019-03g Complete unattended fresh creation, image loading and full runtime lifecycle. First live campaign blocked by Docker disk exhaustion; startup/error/disk guards corrected, clean-machine acceptance pending.
*   [ ]  S019-03 Add cumulative generator/start/stop/test entrypoints; verify repeat generation from a fresh clone.
*   [x]  S019-04a Inventory and implement direct trade/order API authorization, stored-order cancellation checks, operator route restrictions and effect-based HTTP tests.
*   [x]  S019-04b1 Persist accepted-order authority without reusable tokens; verify eligibility, revocation and fail-closed anonymous-handoff refusal in the component candidate.
*   [x]  S019-04b2a Verify candidate PostgreSQL reservation/settlement migrations, concurrent duplicate handling, rollback, restart and scoped SQL privileges in an isolated fixture.
*   [x]  S019-04b2b1 Validate service-only processor HTTP execution with a dedicated audience/subject, disabled legacy booking paths and live PostgreSQL restart/deduplication evidence.
*   [x]  S019-04b2b2 Implement and test bounded HTTPS service-token acquisition, in-memory refresh and fail-closed credential handling for the matcher candidate.
*   [x]  S019-04b2b3 Implement opt-in matcher reservation/retry/receipt reconciliation and cancellation reload; verify 11 added Java tests without runtime cutover.
*   [x]  S019-04b2b4 Validate transactional SQL event snapshots, fenced claims/acknowledgments and replay in 38 PostgreSQL checks; broker/consumer adapter remains pending.
*   [x]  S019-04b2b5 Independently verify 16 PostgreSQL race/replay/mutation checks and record the residual matcher write privilege.
*   [x]  S019-04b2b6 Validate authenticated durable broker delivery and a scoped reference consumer inbox/projection with actual restart, lost acknowledgments and replay beyond broker deduplication.
*   [x]  S019-04b2b7 Validate the bounded publisher/reference-consumer worker candidate: private configuration, verified transport, scoped consumption, retry exhaustion and signal shutdown. Actual worker subprocess recovery and deployed supervision remain a later gate.
*   [x]  S019-04b2b8 Independently rerun canonical/wire tampering, stale claims and pre/post-commit acknowledgment boundaries on hosted Linux with unchanged authoritative outcomes.
*   [x]  S019-04b2b9 Exercise actual supervised worker subprocesses with private scoped configuration, signal stop/restart, durable replay and independent database effects; 14 hosted checks pass (run 45617966137). No deployment acceptance is implied.
*   [x]  S019-04b2b10 Connect the opt-in generated Angular trade/position consumers to validated settlement invalidations and account-scoped HTTP snapshots; verify coalescing, scope-change cancellation, denial and reconnect in browser tests. Live session/broker issuance remains a deployment gate.
*   [ ]  S019-04b2b Wire matcher, authenticated trade handoff and processor to the durable ledger; implement reliable broker/event delivery and cancellation integration.
*   [ ]  S019-04b2 Add migrated authority storage, authenticated durable execution/outbox and downstream deduplication; verify restart, expiry, cancellation and retry outcomes.
*   [ ]  S019-04b Implement durable authorized background matching and authenticated execution; verify after initiating token expiry.
*   [x]  S019-04c1 Implement position/history direct API authorization; verify 11 Java tests and deterministic generation. People/UI integration remains pending.
*   [x]  S019-04c2 Validate live Keycloak/PKCE cookie sessions through an explicit API boundary against the generated position/history service and scoped PostgreSQL; include CSRF, cross-account, expiry and logout checks. See `system/browser-api-session.md`.
*   [x]  S019-04c3 Connect the generated Angular root and HTTP client to server-held cookie sessions; verify CSRF, expiry/view teardown, canceled stale requests and refusal of anonymous broker fallback in hosted Chrome.
*   [x]  S019-04c4 Protect inherited people-directory routes with explicit operator-only server grants; 30 hosted real-Keycloak/generated-.NET checks pass. Directory access remains outside the public browser proxy; this is a candidate API gate.
*   [x]  S019-04d Validate real browser-cookie order creation/cancellation, live matcher service credentials, TLS execution, actual outbox workers, mediated notifications and independent SQL/API outcomes together; 47 hosted checks pass. Actual Angular navigation is accepted separately in S019-04e.
*   [x]  S019-05a Validate mediated read-only browser notifications with account-scoped TLS broker identities, policy revocation and bounded reconnect/reset handling; 27 hosted checks pass. Deployed broker cutover remains S019-05.
*   [ ]  S019-06a Compile and validate an opt-in integrated deployment with verified build/image inputs, ordered migrations, private configuration materialization and explicit network/exposure/admission contracts.
*   [x]  S019-06a1 Implement deterministic OCI-byte verification, private configuration materialization and zero-replica core composition. Synthetic OCI test fixtures are not application images.
*   [x]  S019-06a2 Verify the generated policies against a real hosted Kubernetes API: 30 schema/admission/cleanup checks pass, with no application workload activation or CNI enforcement claim.
*   [ ]  S019-06a3 Build runnable core images, verify each private-config/TLS interface and provision issuer, broker and market-data dependencies before controlled activation.
*   [x]  S019-06a3a Build the browser-session and two supervised Python worker images from pinned bases and hash-verified wheels; verify actual OCI digests, restricted browser startup/static serving and worker configuration rejection. Sixteen hosted image/runtime checks pass; evidence: `evidence/2026-11-26-python-runtime-images.json`. Successful worker delivery is accepted separately in S019-06a3c.
*   [ ]  S019-06a3b Package the Java/.NET core with explicit private configuration adapters and live TLS/identity tests, then provision the support-service flows before activation.
*   [x]  S019-06a3b1 Establish the private Spring configuration adapter with the actual position-service image: verified PostgreSQL TLS (`verify-full` and trusted CA), HTTPS, scoped reads and invalid/absent/foreign/expired identity rejection under restricted execution. Forty-one actual hosted image checks pass at `071df5a2`; evidence: `evidence/2026-11-26-position-image.json`. [Private Java contract](https://deploy-preview-522--lucky-concha-f3599f.netlify.app/specs/traderx-security-lab/system/java-runtime.md); cumulative deployment remains open.
*   [ ]  S019-06a3b2 Apply the verified adapter to account, matcher and processor images; prove each role consumes its declared private configuration and completes only its required TLS/identity operations.
*   [ ]  S019-06a3b3 Package the people-service with an explicit .NET directory-trust/Kestrel private configuration adapter and operator authorization checks; do not assume the Spring interface applies. The reviewed [private .NET adapter](https://deploy-preview-522--lucky-concha-f3599f.netlify.app/specs/traderx-security-lab/system/people-runtime.md) and nine source tests are implemented via Copilot PR #521 plus independent fixes; actual image/HTTPS/operator lookup acceptance remains pending.
*   [ ]  S019-06a3b4 Provision issuer, broker and market-data dependencies with pinned artifacts, verified TLS and the complete permitted gateway/network flows before activation.
*   [x]  S019-06a3c Run the packaged publisher and consumer successfully against scoped PostgreSQL and NATS identities with verified TLS. Forty-three hosted checks pass: immutable-image and restricted-launch verification, both-role credential/CA/hostname rejection, publisher replay, consumer precommit rollback and postcommit acknowledgment refusal/recovery, independent effects and owned cleanup. Evidence: `evidence/2026-11-26-worker-image-delivery.json`; broader deployment acceptance remains open.
*   [x]  S019-04e Run the actual Angular login → limit order → settlement → mediated notification → scoped snapshot journey with supervised delivery and independent SQL effects in one environment. Hosted acceptance: 24 browser checks and 13 independent effects/delivery checks, including cancellation, logout and reader denials; see `evidence/2026-11-26-browser-journey.json`. Broader same-campaign operator/expiry/recovery requirements remain in `system/integrated-acceptance.md`.
*   [ ]  S019-04c Integrate remaining read APIs and Angular session/CSRF flow; validate direct-backend and full trading outcomes together.
*   [ ]  S019-04 Integrate account/order/cancel/operator authorization and deny bypass routes while normal trading passes.
*   [ ]  S019-05 Cut over live authenticated NATS, scoped subjects, browser issuance and reconnect/revocation checks.
*   [ ]  S019-06 Integrate gateway/WAF/TLS, network policies, workload/SQL restrictions and approved-image admission.
*   [ ]  S019-07 Implement same-process residual-authority canary, outside-grant counterpart, independent outcomes and two resets.
*   [ ]  S019-08 Pin one runtime engine; compare observation, containment and prevention with effect-based checks.
*   [ ]  S019-09 Complete guided phase selection, trustworthy control status, evidence, recovery and assessments.
*   [x]  S019-10a Map ten CCC controls to 31 release-pinned requirements and scoped evidence; validate sources and offline references without claiming compliance.
*   [ ]  S019-10 Verify versioned CCC requirements and per-control evidence/limitations; measure performance/resource budgets.
*   [x]  S019-11a Add dedicated Linux CI for sequential component builds and bounded PostgreSQL campaigns; local regression and hosted Linux run 45559194453 pass; full learner/deployment acceptance remains pending.
*   [ ]  S019-11 Run clean-machine reproduction, integrated CI and contributor walkthrough; review release artifacts.
*   [ ]  S019-12 Implement optional isolated CVE/upstream fix/OSERA backpatch and VEX comparison before advertising it as runnable.
*   [ ]  S019-13 Prepare generated snapshot release and community walkthrough after acceptance; CALM receives a separate successor state.
*   [ ]  S019-14 After baseline acceptance, compare ingress/gateway and service-mesh profiles against the same security tests; measure code/configuration removed, operational effort, residual business controls and resource cost. Keep separate from the CALM successor; see `system/platform-control-comparison.md`.
