fix(ai): don't write the scheduled posting time into recurring posts #79
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/recurring-posting-time"
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?
Problem
For recurring / announcement jobs the AI wrote the posting time (when the post is published) into the post body, as if it were the event time. The posting time should only be passed through for scheduling, never appear in the text — the event facts live in the template (
source_content).Root cause
recurringPublicationPlan(ininternal/ai/prompts.go) added a line to the prompt's## Publication plan:For the main recurring post this was the only time-shaped line in the prompt, so the model treated that posting timestamp as the event time and wrote it into the copy.
Fix
This post publishes: <time>line — the posting time is a scheduling-only field; the scheduler already usespost_scheduled_atto set the post'sScheduledAt, so it has no business in the text prompt.main_event_at) — that is legitimate, referenceable content; only the posting time is suppressed.Tests (added, TDD)
This post publishes) is absent; the "set automatically — never mention" guard is present.go test ./...,go vet ./internal/ai/pass.🤖 Generated with Claude Code