Retire /api/app-version: /api/health is the only version+health surface
Elazar directive relayed by coder-pluto-cc 2026-08-22: ONE endpoint. Two surfaces doing the same job is not wanted; publish and check version AND health from /api/health only. Enamel currently has both app/src/app/api/app-version/route.ts and app/src/app/api/health/route.ts. health is a strict superset of app-version ({version, deploymentId} vs {version, deploymentId, dbOk, ts}). Consumer inventory (grep of repo + ~/.local/bin, 2026-08-22): NO executing script curls enamel /api/app-version. Every hit is prose: agents/.role/audit-enamel-role.md:9 (PTD probe), agents/.role/pm-enamel-role.md:18, agents/.role/pmassistant-enamel-ca-w-role.md:18, shared/md/enamel-commons.md:28 (names it THE PTD endpoint), app/README.md:16, db/gotrue-config-mirror.md:868. gitpush.sh and sitebump.sh mention the path only in comments, no curl. MATERIAL DIFFERENCE, must be handled before any PTD gate is repointed: /api/health returns HTTP 503 when dbOk is false, /api/app-version always returned 200. A PTD version check that gates on HTTP status will report a healthy deploy as failed during a DB blip. The version field is still present in the 503 body, so the gate must read the JSON body's version and treat 503 as a valid version response - status is a DB-reachability signal, not a deploy signal.
Activity
-
Shipped 85504cb, v0.7.1, dpl_4dvR3u17m6AMV3bKT7hyR2SCSAaF READY/production/gru1, alias enamel-evolutiva.pensanta.com. Deleted app/src/app/api/app-version/route.ts. Repointed the four prose references that name a live probe: app/README.md, shared/md/enamel-commons.md (the PTD endpoint line), agents/.role/audit-enamel-role.md, agents/.role/pm-enamel-role.md, agents/.role/pmassistant-enamel-ca-w-role.md. DELIBERATELY NOT EDITED, both dated historical records rather than live contracts: db/gotrue-config-mirror.md:868 (a 2026-07-30 terra PTD record, a fact about that deployment) and shared/md/enamel-auth-session-trust.md:22 (an 'app/src in full, at commit as of this write' snapshot from when the app was 6 files - already stale by far more than this change). PTD, live reads not recall: GET /api/health -> 200 {version 0.7.1, deploymentId dpl_4dvR3u17m6AMV3bKT7hyR2SCSAaF, dbOk true}, matches app/package.json. GET /api/app-version -> 404. Vercel runtime errors for the project, 1h window: none. COVERAGE, because the verdict must not be over-read: what is exercised is the unauthenticated health route and the absence of the retired one. dbOk true proves the gru1 function reaches the Supavisor transaction pooler. NOT exercised: the 503 branch of /api/health - no DB outage occurred, so the branch the new probe contract is written against has never run in production. The contract I wrote into commons and the role files (parse version out of the JSON body, do not gate on HTTP status) is therefore a reading of the code, not a measurement. Note carried from coder-pluto-cc's report, and now true of enamel: the retired path answers with the full Next 404 HTML page, 10222 bytes. Nothing polls it - the consumer grep found no executing caller, only prose - but any future script that typos this path pays 10KB per hit, which is the failure that produced the directive. Version note: 0.6.4 -> 0.7.0 was minted by a run that then aborted in the gate (stale .next/types/validator.ts still importing the deleted route), so 0.7.0 never deployed; the successful re-run shipped 0.7.1.