server: Hono scaffold with GET /api/health (plan Task 6) #10

Closed
opened 2026-08-28 15:06:43 +00:00 by ben · 3 comments
Owner

Plan

docs/superpowers/plans/2026-08-27-coa-phase-0-1.md Task 6.

Deliverable

Workspace package server (@coa/server): src/app.ts (buildApp(deps), defaultDeps(), AppDeps = {fetch, tcpConnect(host, port, timeoutMs) → Promise<boolean>}), src/index.ts (listens on COA_PORT, default 8787), src/routes/health.ts; test/health.test.ts.

Acceptance

  • GET /api/health → 200 {ok:true, phase:1} via buildApp(deps).request(...) in the test.
  • pnpm --filter @coa/server dev starts on :8787.
  • pnpm -r typecheck && pnpm -r test exit 0; lockfile committed.

depends_on

  • schema: backend, ClientConfig and submission schemas (Task 4)

out_of_scope

prober, validate-backend, submit routes.

depends_on (issue refs)

## Plan `docs/superpowers/plans/2026-08-27-coa-phase-0-1.md` **Task 6**. ## Deliverable Workspace package `server` (`@coa/server`): `src/app.ts` (`buildApp(deps)`, `defaultDeps()`, `AppDeps = {fetch, tcpConnect(host, port, timeoutMs) → Promise<boolean>}`), `src/index.ts` (listens on `COA_PORT`, default 8787), `src/routes/health.ts`; `test/health.test.ts`. ## Acceptance - `GET /api/health` → 200 `{ok:true, phase:1}` via `buildApp(deps).request(...)` in the test. - `pnpm --filter @coa/server dev` starts on :8787. - `pnpm -r typecheck && pnpm -r test` exit 0; lockfile committed. ## depends_on - schema: backend, ClientConfig and submission schemas (Task 4) ## out_of_scope prober, validate-backend, submit routes. ## depends_on (issue refs) - #8

This was generated by AI during triage.

Ruled by agent under ADR 0174 — veto anytime.

Ruling: enhancement + ready-for-agent (was needs-triage).

  • Category — enhancement. New phase-1 code (plan Task 6); nothing is broken, so not a bug.
  • Not already implemented. No packages/ / server/ / site/ / tools/ / e2e/ in the tree yet (#7 is the first code ticket); no matching .out-of-scope/ rejection. Redundancy and prior-rejection checks both clear.
  • Fully specified — no grilling needed. The body (Deliverable · Interfaces · Acceptance · out_of_scope) together with plan Task 6, cited verbatim as the contract, is the agent brief; I'm not duplicating it.
  • Dependencies: #8 — registered on the tracker and enforced by the claim gate, so labelling the whole chain ready-for-agent now cannot let a worker start out of order.

Why a two-way door. The outcome is a label, reverted by a later label change, and every acceptance criterion is provable by the plan's own tests (pnpm -r typecheck && pnpm -r test). It touches no credential, emails no community contact, dispatches no build or release, provisions no shared-infra tenant, writes no real communities/ data, widens no security posture, and changes no form contract the spec does not already state — none of this repo's one-way doors.

> *This was generated by AI during triage.* **Ruled by agent under ADR 0174 — veto anytime.** **Ruling:** `enhancement` + `ready-for-agent` (was `needs-triage`). - **Category — enhancement.** New phase-1 code (plan Task 6); nothing is broken, so not a bug. - **Not already implemented.** No `packages/` / `server/` / `site/` / `tools/` / `e2e/` in the tree yet (#7 is the first code ticket); no matching `.out-of-scope/` rejection. Redundancy and prior-rejection checks both clear. - **Fully specified — no grilling needed.** The body (Deliverable · Interfaces · Acceptance · out_of_scope) together with plan **Task 6**, cited verbatim as the contract, *is* the agent brief; I'm not duplicating it. - **Dependencies:** #8 — registered on the tracker and enforced by the claim gate, so labelling the whole chain `ready-for-agent` now cannot let a worker start out of order. **Why a two-way door.** The outcome is a label, reverted by a later label change, and every acceptance criterion is provable by the plan's own tests (`pnpm -r typecheck && pnpm -r test`). It touches no credential, emails no community contact, dispatches no build or release, provisions no shared-infra tenant, writes no real `communities/` data, widens no security posture, and changes no form contract the spec does not already state — none of this repo's one-way doors.

swarm-claim host=matou-dev-server-01 run=66
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=66 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #10 — status success

✅ close-report gates passed — every claim verified against the PR head; PR #24 (#24) is green and was merged (agent-after-green); the issue closed via closes #10.

envelope
{
  "issue": 10,
  "status": "success",
  "commits": [
    "471115168d9b4c4f7d86dfd6c522f3e92f4b4734"
  ],
  "changed_files": [
    "server/package.json",
    "server/tsconfig.json",
    "server/vitest.config.ts",
    "server/src/app.ts",
    "server/src/index.ts",
    "server/src/routes/health.ts",
    "server/test/health.test.ts",
    "pnpm-lock.yaml",
    "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": {
    "GET /api/health → 200 {ok:true, phase:1} via buildApp(deps).request(...) in the test": "server/test/health.test.ts asserts status 200 and body {ok:true,phase:1} via buildApp(deps).request('/api/health'); passes in `pnpm -r test` (commit 4711151). Route in server/src/routes/health.ts mounted at /api/health in server/src/app.ts.",
    "pnpm --filter @coa/server dev starts on :8787": "server/src/index.ts listens on Number(process.env.COA_PORT ?? 8787) via @hono/node-server; verified locally — `pnpm --filter @coa/server dev` logged 'coa server on http://localhost:8787' and GET /api/health returned {\"ok\":true,\"phase\":1}.",
    "pnpm -r typecheck && pnpm -r test exit 0; lockfile committed": "Both commands exit 0 (schema 32 tests, server 1 test; both typecheck Done). pnpm-lock.yaml updated for hono/@hono/node-server/@types/node and committed in 4711151."
  },
  "summary": "Added the @coa/server Hono scaffold (buildApp/defaultDeps/AppDeps) with GET /api/health returning {ok:true,phase:1} on COA_PORT (default 8787), per plan Task 6.",
  "reason": "Delivers plan Task 6: the server package seam every phase-1 route builds on.",
  "blockers": []
}
**close-report** for #10 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against the PR head; PR #24 (https://git.matou.nz/Matou/coa/pulls/24) is green and was merged (agent-after-green); the issue closed via `closes #10`. <details><summary>envelope</summary> ```json { "issue": 10, "status": "success", "commits": [ "471115168d9b4c4f7d86dfd6c522f3e92f4b4734" ], "changed_files": [ "server/package.json", "server/tsconfig.json", "server/vitest.config.ts", "server/src/app.ts", "server/src/index.ts", "server/src/routes/health.ts", "server/test/health.test.ts", "pnpm-lock.yaml", "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": { "GET /api/health → 200 {ok:true, phase:1} via buildApp(deps).request(...) in the test": "server/test/health.test.ts asserts status 200 and body {ok:true,phase:1} via buildApp(deps).request('/api/health'); passes in `pnpm -r test` (commit 4711151). Route in server/src/routes/health.ts mounted at /api/health in server/src/app.ts.", "pnpm --filter @coa/server dev starts on :8787": "server/src/index.ts listens on Number(process.env.COA_PORT ?? 8787) via @hono/node-server; verified locally — `pnpm --filter @coa/server dev` logged 'coa server on http://localhost:8787' and GET /api/health returned {\"ok\":true,\"phase\":1}.", "pnpm -r typecheck && pnpm -r test exit 0; lockfile committed": "Both commands exit 0 (schema 32 tests, server 1 test; both typecheck Done). pnpm-lock.yaml updated for hono/@hono/node-server/@types/node and committed in 4711151." }, "summary": "Added the @coa/server Hono scaffold (buildApp/defaultDeps/AppDeps) with GET /api/health returning {ok:true,phase:1} on COA_PORT (default 8787), per plan Task 6.", "reason": "Delivers plan Task 6: the server package seam every phase-1 route builds on.", "blockers": [] } ``` </details>
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#10
No description provided.