Goal / finish line
GET /api/config includes a version field (release tag or build SHA) validated by AppConfigSchema, sync's readiness probe reports the same, and the six PostHog property names the error-autofix SQL depends on (environment, service, version, namespace, result, errorType) are exported from packages/core and used by every emit site.
Acceptance
curl /api/config on staging returns the deployed tag after the next release; deploy-health-check.yml asserts it matches the release input.
grep -rn '"environment"\|"service"\|"errorType"' packages/*/src outside the core constants file returns nothing for PostHog emit sites.
.github/prompts/error-autofix.md cites the constants file instead of restating the names, and error-autofix-routine.test.ts asserts the prompt and constants agree.
Context
No version endpoint exists; an agent triaging a prod error infers the revision from PostHog properties.version. The autofix prompt hands the agent a literal SQL query whose property names nothing ties to the emit sites, so a rename silently breaks the routine.
Package scope
core, backend, sync, docs
Verify commands
bun test:core
bun test:backend:fast
bun test:sync:fast
bun test:scripts
Approval boundary
allow
Untrusted input
Goal / finish line
GET /api/configincludes aversionfield (release tag or build SHA) validated byAppConfigSchema, sync's readiness probe reports the same, and the six PostHog property names the error-autofix SQL depends on (environment,service,version,namespace,result,errorType) are exported frompackages/coreand used by every emit site.Acceptance
curl /api/configon staging returns the deployed tag after the next release;deploy-health-check.ymlasserts it matches the release input.grep -rn '"environment"\|"service"\|"errorType"' packages/*/srcoutside the core constants file returns nothing for PostHog emit sites..github/prompts/error-autofix.mdcites the constants file instead of restating the names, anderror-autofix-routine.test.tsasserts the prompt and constants agree.Context
No version endpoint exists; an agent triaging a prod error infers the revision from PostHog
properties.version. The autofix prompt hands the agent a literal SQL query whose property names nothing ties to the emit sites, so a rename silently breaks the routine.Package scope
core, backend, sync, docs
Verify commands
Approval boundary
allow
Untrusted input