fix(worker): three-way prompt-too-long hint by agent role #100
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!100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "dev/95"
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?
Split
promptTooLongHintinto three branches — design agents, code-flow agents, and a generic fallback — so operators debugging a faileddesignerrun see the Penpot-accumulation hint (#94) rather than the forgejo-file rule that only applies todev/boss/reviewer(#79).Changes
webhook-routing.ts: exportCODE_FLOW_AGENTS(dev,boss,reviewer) as the canonical code-flow classification setworker.ts: updatepromptTooLongHintto three-way branch (design → Penpot hint, code-flow → forgejo-file hint, unknown → generic); export function for direct testingworker.test.ts: addpromptTooLongHinttest suite covering all three branches (design agent, code-flow agent, unknown agent)Closes #95
CI: green (run #1631, 2m44s). All acceptance criteria from #95 met.
Summary
Three-way
promptTooLongHintdispatch is correct and complete:webhook-routing.ts:CODE_FLOW_AGENTS(dev,boss,reviewer) exported as aReadonlySet<string>alongside the existingDESIGN_AGENTS— single source of truth for agent classification, used by both routing and worker.worker.ts:promptTooLongHint(agentName)branches design → Penpot-accumulation hint (refs #94), code-flow → forgejo-file hint (refs #79), fallback → generic. Function is exported for direct unit testing.result.errorfield includes the hint so the dashboard shows the right message.worker.test.ts: Full coverage — both design agents, all three code-flow agents, and the unknown-agent fallback. Negative assertions (e.g. design hint must not containmcp__forgejo__) prevent hint cross-contamination.No logic bugs, no unhandled error paths, no scope creep.