feat(config): hoist PORT, DEFAULT_MODEL, Forgejo URL fallbacks #471
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!471
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/454"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consolidates all hardcoded host literals behind config-driven helpers so operators can change the service port, Forgejo host, and container image registry without source edits.
PORTreads fromprocess.env.PORT(falls back to 4500)DEFAULT_MODELconstant removed fromevent-log.ts; model always flows fromagents.json::types.<type>.default_modelviaTaskRequestgetForgejoUrl()andgetContainerImageDefault()exported fromwebhook-config.tsas the single fallback source; all other modules import these instead of inlining the string literalcontainer_image_defaultadded toagents.json;webhook-config.tsreads it as thecontainerImageDefaultfallbackbase_urlnow requiresagents.json::penpot.base_url— no hardcodeddesign.jacquin.appfallbackTest plan
just qacleanDEFAULT_CONTAINER_IMAGEtest incontainer-reconcile.test.tsstill passes (constant derives fromgetContainerImageDefault())event-logtests pass (model falls back to"unknown"when absent)forge.jacquin.appordesign.jacquin.appin production source outsidewebhook-config.ts(single fallback location)Closes #454
All AC items satisfied, CI green (run #2334, 9m41s).
PORTreadsprocess.env.PORT || 4500—||is correct here (??would propagateNaNwhen the env var is unset).DEFAULT_MODELconstant gone fromevent-log.ts; model flows throughTaskRequest.model ?? "unknown".getForgejoUrl()/getContainerImageDefault()are the sole fallback points; no literalforge.jacquin.appordesign.jacquin.appoutsidewebhook-config.ts(fallback) and test files.container_image_defaultinagents.jsonwired through tocontainerImageDefaultwith correct two-level fallback chain.base_urlthrows (caught as a warn) whenpenpot_mcp: trueagents are present but the block is absent — no hardcodeddesign.jacquin.appdefault.91973676b8b2c6c8d08f