fix(server): report plan-issue label failures to the user #279
No reviewers
Labels
No labels
Agent
Ignore
Agent
In Progress
Agent
Planned
Agent
Planning
Agent
Ready
Agent
Triage
Compat
Breaking
Kind
Bug
Kind
Documentation
Kind
Enhancement
Kind
Feature
Kind
Security
Kind
Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
lucas/omp-deck!279
Loading…
Reference in a new issue
No description provided.
Delete branch "agent/issue-271-plan-issue-label-reports"
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?
Starting a Plan issue session or publishing its plan applied
implementation.planning_label/planned_labelsilently: every failure mode (config file unreadable, the whole file rejected over an unrelated block, an unknown/ambiguous label, a failed label write) ended in alog.warnon the server's stdout and nothing else, so the label simply did not appear and no reason was recoverable from outside.What changed:
markIssuereturns the failure reason instead of swallowing it; it still never throws and never fails planning or publishing.reportProblemhelper raises anerror-level notification (source: forgejo-plan-issue) through the existingnotificationService, so it reaches the toast and the Settings notification log.errorkeeps the toast up until dismissed, which matters because the user is navigating into the new session at that moment.implementationLabels(non-404 read failure, parse failure, thrown error) and both label moments (planning label at session start, planned label at publish) now report. The legitimate quiet paths stay quiet: no config file at all, or no label configured.PublishOutcome's ok-variant gained an optionallabelProblem, whichplan-mode-bridgeappends to the published text, so the agent can say in its reply that the issue was published without its planned label. Without a problem the message is byte-identical to before.Verification:
bun test apps/server/src/forgejo/plan-issue.test.ts apps/server/src/bridge/plan-mode-bridge.test.ts— 51 pass, including new cases for: unknown planning label at start, invalid repo config at start, nothing configured (asserts no notification), publish with an unknown planned label (ok: true+labelProblem+ one notification), publish success (nolabelProblem, no notification), and the two bridge message shapes.bun test apps/server/src/forgejo/dispatcher.test.ts— 176 pass, unchanged.bun run typecheck— clean across all packages (this is what proves everyPublishOutcome/publishedTextcaller was migrated).Not verified here: the end-to-end toast in a running deck, which needs a browser.
Closes: #271