fix(coding-agent): use local date in system prompt#4643
Conversation
Signed-off-by: Christian Stewart <christian@aperture.us>
roboomp
left a comment
There was a problem hiding this comment.
review:p0 was applied during triage for the small, coherent production fix, but detailed review found a blocking test determinism issue: both new timezone tests mutate process.env.TZ after Bun startup, so they fail or exercise the wrong timezone on UTC CI.
Also missing packages/coding-agent/CHANGELOG.md ## [Unreleased] coverage for the user-visible prompt behavior change.
Verification: bun test packages/coding-agent/test/system-prompt-model.test.ts packages/coding-agent/test/agent-session-tool-rebuild-skip.test.ts currently aborts before test execution because packages/coding-agent/src/export/html/tool-views.generated.js is absent in this worktree; separately verified in Bun that changing process.env.TZ at runtime leaves Date#getMonth/getDate on the process-start timezone.
Thanks for the focused fix.
Signed-off-by: Christian Stewart <christian@aperture.us>
Builds system prompt date text from the local timezone instead of UTC so date-sensitive agent guidance matches the operator's local day.