[E00-S02-T03] App health endpoint succeeds #170

Closed
opened 2026-08-27 00:07:11 +00:00 by kpcto · 6 comments
Owner

Parent story: [E00-S02] Docker Compose baseline (#59)

Intent

Ensure the application health endpoint returns success once running.

Acceptance criteria

  • app health endpoint succeeds
  • the endpoint reports a healthy application

Explicitly out of scope

  • PostgreSQL health gate (E00-S02-T02)
  • DB volume persistence (E00-S02-T04)
  • non-root execution (E00-S02-T05)

Test plan

  • HTTP smoke test passes against the health endpoint

Rollback note

  • revert the health endpoint changes

Owning stream

platform

Risk quadrant

agent-full

> Parent story: [E00-S02] Docker Compose baseline (#59) ## Intent Ensure the application health endpoint returns success once running. ## Acceptance criteria - app health endpoint succeeds - the endpoint reports a healthy application ## Explicitly out of scope - PostgreSQL health gate (E00-S02-T02) - DB volume persistence (E00-S02-T04) - non-root execution (E00-S02-T05) ## Test plan - HTTP smoke test passes against the health endpoint ## Rollback note - revert the health endpoint changes ### Owning stream platform ### Risk quadrant agent-full
kpcto added this to the Sprint 0 milestone 2026-08-27 00:07:11 +00:00
kpcto added the
status
ready
kind
task
labels 2026-08-27 00:07:11 +00:00
bot-dispatcher added
status
proposed
and removed
status
ready
kind
task
labels 2026-08-27 00:07:12 +00:00
Member

Auto-reverted by dispatcher: DoR lint: required section "Intent" is empty; required section "Acceptance criteria" is empty; required section "Explicitly out of scope" is empty; required section "Test plan" is empty; required section "Rollback note" is empty; acceptance criteria: no bullet assertions found

status/ready may only be applied by a human maintainer.

> Auto-reverted by dispatcher: DoR lint: required section "Intent" is empty; required section "Acceptance criteria" is empty; required section "Explicitly out of scope" is empty; required section "Test plan" is empty; required section "Rollback note" is empty; acceptance criteria: no bullet assertions found `status/ready` may only be applied by a human maintainer.
kpcto added the
kind
task
label 2026-08-27 21:24:12 +00:00
kpcto added
status
ready
and removed
status
proposed
labels 2026-08-29 00:09:42 +00:00
bot-dispatcher added
loop
1
status
in-progress
and removed
status
ready
labels 2026-08-29 00:09:51 +00:00
Member
agent: dispatcher
phase: complete
plan_summary: Dispatch #170: [E00-S02-T03] App health endpoint succeeds (platform)
```yaml agent: dispatcher phase: complete plan_summary: Dispatch #170: [E00-S02-T03] App health endpoint succeeds (platform) ```
Member
agent: implementer
issue: 170
branch: feature/170
phase: started
objective: "[E00-S02-T03] App health endpoint succeeds"
plan:
  - implement a minimal HTTP server in apps/server/src/index.ts using Node's built-in node:http (no new dependencies, lockfile untouched) that answers GET /health with HTTP 200 + a JSON body reporting a healthy application ({"status":"ok"}) on port 3000 (PORT-overridable), so the app container stays up
  - update apps/server/Dockerfile and compose.yaml header comments: T03 health endpoint no longer out of scope
  - update docs/development/non-container.md where it still describes the server as an exiting placeholder
  - add tests/health-endpoint.test.mjs locking in both acceptance criteria (static committed-source assertions + non-vacuous mutation probes + a real HTTP smoke test that boots the server source and hits /health)
  - extend the Docker-gated real-stack probe in tests/compose-config.test.mjs: app container must stay running and the published health endpoint must answer 200
  - run the committed suite, push feature/170, open PR feature/170 -> main with criterion-to-test table
out_of_scope:
  - PostgreSQL health gate (E00-S02-T02)
  - DB volume persistence (E00-S02-T04)
  - non-root execution (E00-S02-T05)
  - Fastify 5 application shell (later story; ADR E01-S01-T03)
```yaml agent: implementer issue: 170 branch: feature/170 phase: started objective: "[E00-S02-T03] App health endpoint succeeds" plan: - implement a minimal HTTP server in apps/server/src/index.ts using Node's built-in node:http (no new dependencies, lockfile untouched) that answers GET /health with HTTP 200 + a JSON body reporting a healthy application ({"status":"ok"}) on port 3000 (PORT-overridable), so the app container stays up - update apps/server/Dockerfile and compose.yaml header comments: T03 health endpoint no longer out of scope - update docs/development/non-container.md where it still describes the server as an exiting placeholder - add tests/health-endpoint.test.mjs locking in both acceptance criteria (static committed-source assertions + non-vacuous mutation probes + a real HTTP smoke test that boots the server source and hits /health) - extend the Docker-gated real-stack probe in tests/compose-config.test.mjs: app container must stay running and the published health endpoint must answer 200 - run the committed suite, push feature/170, open PR feature/170 -> main with criterion-to-test table out_of_scope: - PostgreSQL health gate (E00-S02-T02) - DB volume persistence (E00-S02-T04) - non-root execution (E00-S02-T05) - Fastify 5 application shell (later story; ADR E01-S01-T03) ```
Member
agent: reviewer
verdict: approve
```yaml agent: reviewer verdict: approve ```
bot-dispatcher added
status
review
and removed
status
in-progress
loop
1
kind
task
labels 2026-08-29 00:25:23 +00:00
Member
agent: implementer
issue: 170
branch: feature/170
phase: complete
objective: "[E00-S02-T03] App health endpoint succeeds"
pr: Fabrika/PersonalBlog#384 (feature/170 -> main, head dfb7b0e)
ci: "green — CI / Frozen lockfile install (pull_request) success (run 66, job 78): frozen install + workspace groups pass on Node 24"
files:
  - apps/server/src/index.ts (replaces the placeholder with a node:http server: GET /health -> 200 {"status":"ok"}, 404 elsewhere, PORT-overridable default 3000, SIGTERM/SIGINT graceful close)
  - apps/server/package.json + pnpm-lock.yaml (exact devDependency @types/node 24.13.3; lockfile regenerated with pinned pnpm 11.23.0 — first scoped package in the lockfile)
  - apps/server/tsconfig.json ("types": ["node"] — TS 6.0.3 no longer auto-includes @types packages)
  - apps/server/Dockerfile + compose.yaml + docs/development/non-container.md (T03 no longer out of scope; docs updated to the serving process)
  - tests/health-endpoint.test.mjs (new: 2 criterion tests + 4 non-vacuous mutation probes + real HTTP smoke test that boots the committed server source)
  - tests/compose-config.test.mjs (Docker-gated real-stack probe: app container stays running + GET /health 200 {"status":"ok"} inside the container)
  - tests/frozen-install.test.mjs (helper fix: lockedPackageKeys strips pnpm's YAML quoting on scoped keys; new non-vacuous quoted-key case)
criterion_to_test:
  - "app health endpoint succeeds" -> tests/health-endpoint.test.mjs 'the app health endpoint succeeds (committed entrypoint answers GET /health with HTTP 200)': committed src creates an HTTP server (createServer), routes GET /health, answers HTTP 200, listens on the app port (3000 default); non-vacuous mutation probes (route removal, 200->500, placeholder entrypoint) all fail. 'an HTTP smoke test against the booted server succeeds for GET /health (200 + healthy body)' boots the committed source on an ephemeral port and asserts a real 2xx (issue test plan). Docker-gated: compose-config real-stack probe asserts the app container stays running and GET /health answers 2xx in-container
  - "the endpoint reports a healthy application" -> tests/health-endpoint.test.mjs 'the endpoint reports a healthy application (committed health payload is {"status":"ok"})' + the smoke test asserts the booted body is exactly {"status":"ok"} + Docker-gated probe asserts "status":"ok"; non-vacuous mutation probe (status ok -> nope) fails
verification:
  - "pnpm run typecheck: 3/3 packages Done (Node 24.20.0)"
  - "pnpm run build: 3/3 packages emit dist/; compiled apps/server/dist/index.js booted -> GET /health 200 {\"status\":\"ok\"}"
  - "pnpm test (full suite, Node 24.20.0): 71/71 pass, 0 fail, 2 skipped (the two Docker-gated probes skip without a daemon)"
  - "node --test tests/health-endpoint.test.mjs: 7/7 pass incl. the real HTTP smoke test; tests/compose-config.test.mjs: 13 pass / 2 skip"
  - "frozen-install path verified locally: clean clone -> pnpm install --frozen-lockfile -> exact virtual-store match"
  - "PR diff (main...feature/170) = exactly the 3 commits / 10 files above; local HEAD == origin/feature/170 (dfb7b0e)"
out_of_scope:
  - PostgreSQL health gate (E00-S02-T02)
  - DB volume persistence (E00-S02-T04)
  - non-root execution (E00-S02-T05)
  - Fastify 5 application shell (later story; ADR E01-S01-T03)
```yaml agent: implementer issue: 170 branch: feature/170 phase: complete objective: "[E00-S02-T03] App health endpoint succeeds" pr: Fabrika/PersonalBlog#384 (feature/170 -> main, head dfb7b0e) ci: "green — CI / Frozen lockfile install (pull_request) success (run 66, job 78): frozen install + workspace groups pass on Node 24" files: - apps/server/src/index.ts (replaces the placeholder with a node:http server: GET /health -> 200 {"status":"ok"}, 404 elsewhere, PORT-overridable default 3000, SIGTERM/SIGINT graceful close) - apps/server/package.json + pnpm-lock.yaml (exact devDependency @types/node 24.13.3; lockfile regenerated with pinned pnpm 11.23.0 — first scoped package in the lockfile) - apps/server/tsconfig.json ("types": ["node"] — TS 6.0.3 no longer auto-includes @types packages) - apps/server/Dockerfile + compose.yaml + docs/development/non-container.md (T03 no longer out of scope; docs updated to the serving process) - tests/health-endpoint.test.mjs (new: 2 criterion tests + 4 non-vacuous mutation probes + real HTTP smoke test that boots the committed server source) - tests/compose-config.test.mjs (Docker-gated real-stack probe: app container stays running + GET /health 200 {"status":"ok"} inside the container) - tests/frozen-install.test.mjs (helper fix: lockedPackageKeys strips pnpm's YAML quoting on scoped keys; new non-vacuous quoted-key case) criterion_to_test: - "app health endpoint succeeds" -> tests/health-endpoint.test.mjs 'the app health endpoint succeeds (committed entrypoint answers GET /health with HTTP 200)': committed src creates an HTTP server (createServer), routes GET /health, answers HTTP 200, listens on the app port (3000 default); non-vacuous mutation probes (route removal, 200->500, placeholder entrypoint) all fail. 'an HTTP smoke test against the booted server succeeds for GET /health (200 + healthy body)' boots the committed source on an ephemeral port and asserts a real 2xx (issue test plan). Docker-gated: compose-config real-stack probe asserts the app container stays running and GET /health answers 2xx in-container - "the endpoint reports a healthy application" -> tests/health-endpoint.test.mjs 'the endpoint reports a healthy application (committed health payload is {"status":"ok"})' + the smoke test asserts the booted body is exactly {"status":"ok"} + Docker-gated probe asserts "status":"ok"; non-vacuous mutation probe (status ok -> nope) fails verification: - "pnpm run typecheck: 3/3 packages Done (Node 24.20.0)" - "pnpm run build: 3/3 packages emit dist/; compiled apps/server/dist/index.js booted -> GET /health 200 {\"status\":\"ok\"}" - "pnpm test (full suite, Node 24.20.0): 71/71 pass, 0 fail, 2 skipped (the two Docker-gated probes skip without a daemon)" - "node --test tests/health-endpoint.test.mjs: 7/7 pass incl. the real HTTP smoke test; tests/compose-config.test.mjs: 13 pass / 2 skip" - "frozen-install path verified locally: clean clone -> pnpm install --frozen-lockfile -> exact virtual-store match" - "PR diff (main...feature/170) = exactly the 3 commits / 10 files above; local HEAD == origin/feature/170 (dfb7b0e)" out_of_scope: - PostgreSQL health gate (E00-S02-T02) - DB volume persistence (E00-S02-T04) - non-root execution (E00-S02-T05) - Fastify 5 application shell (later story; ADR E01-S01-T03) ```
Member
agent: reviewer
verdict: approve
```yaml agent: reviewer verdict: approve ```
bot-dispatcher added
status
review
and removed
status
review
labels 2026-08-29 00:25:33 +00:00
kpcto closed this issue 2026-08-29 00:27:24 +00:00
kpcto added
kind
task
status
done
and removed
status
review
labels 2026-08-29 00:27:24 +00:00
Sign in to join this conversation.