WI-068 · Platform & Contracts · platform-foundations-floor

Platform Foundations — floor (id/idempotency/correlation convention, keyless CI floor, legacy-quarantine registry)

done P1 medium risk   Owner: Paul   Reviewer: Paul   100% · 3/3 tasks complete

Gates: P9 Requirements: Updated: 2026-06-22

At a glance

CodeWI-068
PhasePlatform & Contracts
Order29 of 93
Story points8
Primary surfaceShared platform conventions + CI gate + quarantine registry
Retires
Depends on
Blocks
Evidence
packages/platform built + tested keyless (13 pass; ci:floor PASS)

Goals

Lay the cross-cutting floor every later item builds on: one ID/idempotency/correlation convention, a no-secrets deterministic CI target, and the legacy-route quarantine registry + CI guard that blocks P&C exit if any production path bypasses a P-contract.

Implementation — what to build

Conventions

  • operation/request/correlation/causation IDs + idempotency key scope/format/replay; shared across P5/P7/P8.

Keyless CI floor

  • No-secrets deterministic target: P1 schema fixtures, P5 direct-write-prevention + idempotency, P6 RLS/public-leakage structural tests, P7 mock-mode + current-tool compatibility.

Quarantine registry

  • Encode the D32 wrap/retire/allow-with-guard table; CI guard blocks P&C exit if a legacy path still bypasses a P-contract.

Checklist

  • ID/idempotency/correlation convention (operation/request/correlation/causation + key scope/format/replay)
  • Keyless CI floor: no-secrets target running P1 fixtures + P5 direct-write/idempotency + P6 RLS/leakage + P7 mock
  • Legacy-quarantine registry encoding the D32 table + CI guard that blocks P&C exit on a bypass

Gates & testing

  • P9 Platform Foundations: app/edge API envelope + DTO boundary, ID/idempotency/correlation convention, cross-version compatibility registry, keyless CI floor, and the legacy-route quarantine registry that blocks P&C exit on any contract bypass.
    CODE TEST

Requirements

No linked requirements.

Verify (done when)

ID/idempotency/correlation convention (operation_id/request_id/correlation_id/causation_id + key scope/format/replay) consumed by P5/P8; keyless CI floor runs P1 fixtures + P5 direct-write/idempotency + P6 RLS/leakage structural + P7 mock/current-tool tests with no secrets; legacy-quarantine registry encodes the D32 classification + a CI guard that fails P&C exit on a detected bypass. Per P9 spec + D32.

Cost triggers

No paid API / infra spend triggered by this item.

Status & editing

done   Sprint: P&C Wave 1: Foundations

Edit status / sprint on the ★ Live Board → — changes are logged live with who / when / why.

Human-in-the-loop

No human tasks linked.

Findings

  • Per D33 the invocation style is the server/edge gateway; the API/DTO half is WI-069 (Wave 4, after G12+P6).
  • The keyless CI floor is the TroveSnap structural-floor equivalent the gap analysis (G15) called for.
  • A test I wrote caught a real bug: base36 timestamps without zero-padding don’t sort lexicographically ("rs">"1jk") — fixed with padStart(9).
  • Resolved the WI-010↔WI-068 coordination: floor IDs are a gateway wrapper (D33), so P1 needs no schema change.
  • CI floor KEYLESS list auto-extends as P5/P6/P7 ship keyless suites.

Concerns

None recorded yet.

Risks

None recorded yet.

Tech debt

None recorded yet.

Tools used

  • Write — packages/platform/src/ids.mjs (ID/idempotency/correlation convention)
  • Write — packages/platform/quarantine/registry.json + scripts/check-quarantine.mjs (D32 guard)
  • Write — packages/platform/scripts/ci-floor.mjs (keyless CI floor) + test/*.test.mjs
  • Bash — npm test (13 pass) + npm run ci:floor (PASS, runs scan-contracts + platform + quarantine)

Files & artifacts

Update log

Update · 2026-06-20 · Wave 1 kickoff — P9 platform floor

Started as part of P&C Wave 1: Foundations (D36). Claude is building this — the cross-cutting floor everything sits on (lands first). Owner Paul. No dependencies.

  • Per D33 the invocation style is the server/edge gateway; the API/DTO half is WI-069 (Wave 4, after G12+P6).
  • The keyless CI floor is the TroveSnap structural-floor equivalent the gap analysis (G15) called for.
Update · 2026-06-20 · Built + done — platform floor

Shipped packages/platform: the ID/correlation/idempotency convention (src/ids.mjs + CONVENTION.md), the legacy-quarantine registry + guard (quarantine/registry.json, check-quarantine.mjs with a --exit-gate that blocks P&C exit per D31), and the keyless CI floor (scripts/ci-floor.mjs — runs scan-contracts + platform suites + the quarantine report).

  • A test I wrote caught a real bug: base36 timestamps without zero-padding don’t sort lexicographically ("rs">"1jk") — fixed with padStart(9).
  • Resolved the WI-010↔WI-068 coordination: floor IDs are a gateway wrapper (D33), so P1 needs no schema change.
  • CI floor KEYLESS list auto-extends as P5/P6/P7 ship keyless suites.