schema: StatusSchema + FIXTURE_SUBMISSION (phase-2 plan Task 1) #28

Closed
opened 2026-08-28 21:00:21 +00:00 by ben · 1 comment
Owner

Plan

docs/superpowers/plans/2026-08-28-coa-phase-2.md Task 1.

Deliverable

packages/schema/src/status.ts — STATUS_STATES, StatusSchema (strict: state, updatedAt ISO, optional emailError/publishError/buildRunUrl/error), Status. packages/schema/src/fixtures.ts — FIXTURE_SUBMISSION (Ngāti Example, shared backend) and FIXTURE_LOGO_SVG. Both re-exported from src/index.ts. Tests in packages/schema/test/status.test.ts (plan's four tests).

Acceptance

  • page-ready with an ISO timestamp parses; unknown state and extra keys are rejected; optional error fields round-trip.
  • SubmissionSchema.parse(FIXTURE_SUBMISSION).features.identity === true.
  • pnpm --filter @coa/schema test && typecheck green.

depends_on

none (ADR 0003 and the plan are on main).

out_of_scope

Any server code.

## Plan `docs/superpowers/plans/2026-08-28-coa-phase-2.md` **Task 1**. ## Deliverable `packages/schema/src/status.ts` — `STATUS_STATES`, `StatusSchema` (strict: `state`, `updatedAt` ISO, optional `emailError`/`publishError`/`buildRunUrl`/`error`), `Status`. `packages/schema/src/fixtures.ts` — `FIXTURE_SUBMISSION` (Ngāti Example, shared backend) and `FIXTURE_LOGO_SVG`. Both re-exported from `src/index.ts`. Tests in `packages/schema/test/status.test.ts` (plan's four tests). ## Acceptance - `page-ready` with an ISO timestamp parses; unknown state and extra keys are rejected; optional error fields round-trip. - `SubmissionSchema.parse(FIXTURE_SUBMISSION).features.identity === true`. - `pnpm --filter @coa/schema test && typecheck` green. ## depends_on none (ADR 0003 and the plan are on main). ## out_of_scope Any server code.

close-report for #28 — status success

⏳ close-report gates passed — every claim verified against the PR head; PR #40 (#40)'s required checks are not all green yet, so it was NOT merged (MERGE_AUTHORITY=agent-after-green). A later reconcile pass merges it once green.

envelope
{
  "issue": 28,
  "status": "success",
  "commits": [
    "3934a769caea1099ca0062142e53d4e235de6dc8"
  ],
  "changed_files": [
    "packages/schema/src/status.ts",
    "packages/schema/src/fixtures.ts",
    "packages/schema/src/index.ts",
    "packages/schema/test/status.test.ts",
    "STATUS.md"
  ],
  "tests": [
    {
      "command": "pnpm install --frozen-lockfile",
      "exit_code": 0
    },
    {
      "command": "pnpm -r typecheck",
      "exit_code": 0
    },
    {
      "command": "pnpm -r test",
      "exit_code": 0
    }
  ],
  "criteria": {
    "page-ready with an ISO timestamp parses; unknown state and extra keys are rejected; optional error fields round-trip": "packages/schema/src/status.ts defines StatusSchema (.strict(), state z.enum(STATUS_STATES), updatedAt z.string().datetime(), optional emailError/publishError/buildRunUrl/error); verified by packages/schema/test/status.test.ts 'accepts page-ready with a timestamp', 'rejects unknown states and extra keys', 'carries optional error fields' — all green in pnpm -r test",
    "SubmissionSchema.parse(FIXTURE_SUBMISSION).features.identity === true": "packages/schema/src/fixtures.ts exports FIXTURE_SUBMISSION (Ngāti Example, shared backend, features.identity true); packages/schema/test/status.test.ts 'FIXTURE_SUBMISSION is a valid submission' asserts .features.identity === true — green",
    "pnpm --filter @coa/schema test && typecheck green": "pnpm -r test (includes @coa/schema: 7 files/36 tests passed, status.test.ts 4/4) and pnpm -r typecheck both exit 0"
  },
  "summary": "Added StatusSchema/STATUS_STATES/Status and shared FIXTURE_SUBMISSION/FIXTURE_LOGO_SVG to @coa/schema, re-exported from src/index.ts, with status.test.ts.",
  "reason": "Phase-2 plan Task 1 implemented as specified; workspace typecheck and tests green.",
  "blockers": []
}
**close-report** for #28 — status `success` :hourglass_flowing_sand: **close-report gates passed** — every claim verified against the PR head; PR #40 (https://git.matou.nz/Matou/coa/pulls/40)'s required checks are not all green yet, so it was NOT merged (MERGE_AUTHORITY=agent-after-green). A later reconcile pass merges it once green. <details><summary>envelope</summary> ```json { "issue": 28, "status": "success", "commits": [ "3934a769caea1099ca0062142e53d4e235de6dc8" ], "changed_files": [ "packages/schema/src/status.ts", "packages/schema/src/fixtures.ts", "packages/schema/src/index.ts", "packages/schema/test/status.test.ts", "STATUS.md" ], "tests": [ { "command": "pnpm install --frozen-lockfile", "exit_code": 0 }, { "command": "pnpm -r typecheck", "exit_code": 0 }, { "command": "pnpm -r test", "exit_code": 0 } ], "criteria": { "page-ready with an ISO timestamp parses; unknown state and extra keys are rejected; optional error fields round-trip": "packages/schema/src/status.ts defines StatusSchema (.strict(), state z.enum(STATUS_STATES), updatedAt z.string().datetime(), optional emailError/publishError/buildRunUrl/error); verified by packages/schema/test/status.test.ts 'accepts page-ready with a timestamp', 'rejects unknown states and extra keys', 'carries optional error fields' — all green in pnpm -r test", "SubmissionSchema.parse(FIXTURE_SUBMISSION).features.identity === true": "packages/schema/src/fixtures.ts exports FIXTURE_SUBMISSION (Ngāti Example, shared backend, features.identity true); packages/schema/test/status.test.ts 'FIXTURE_SUBMISSION is a valid submission' asserts .features.identity === true — green", "pnpm --filter @coa/schema test && typecheck green": "pnpm -r test (includes @coa/schema: 7 files/36 tests passed, status.test.ts 4/4) and pnpm -r typecheck both exit 0" }, "summary": "Added StatusSchema/STATUS_STATES/Status and shared FIXTURE_SUBMISSION/FIXTURE_LOGO_SVG to @coa/schema, re-exported from src/index.ts, with status.test.ts.", "reason": "Phase-2 plan Task 1 implemented as specified; workspace typecheck and tests green.", "blockers": [] } ``` </details>
ben closed this issue 2026-08-29 15:26:50 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/coa#28
No description provided.