Skip to content

Merge dev to main#505

Merged
zbigniewsobiecki merged 17 commits intomainfrom
dev
Feb 23, 2026
Merged

Merge dev to main#505
zbigniewsobiecki merged 17 commits intomainfrom
dev

Conversation

@zbigniewsobiecki
Copy link
Copy Markdown
Member

Summary

zbigniewsobiecki and others added 17 commits February 22, 2026 18:43
… messages

GitHub agents had hardcoded initial messages in three places: headerMessage
in agent definitions, preExecute in Claude Code profiles, and
postAcknowledgmentComment in the webhook handler. Meanwhile, the router
already had a working LLM ack mechanism that generated contextual messages.
In router+worker mode this created duplicate comments — one LLM-generated
ack from the router, then a second hardcoded one from the agent.

This change makes the LLM-generated ack the single initial message for all
GitHub agents by plumbing ackMessage through the entire pipeline (queue,
worker, webhook handler, agent execution) and teaching agents to reuse
pre-existing ack comments instead of posting new ones.

Key changes:
- Add ackMessage field to AgentInput, GitHubJob, and webhook queue
- tryPostGitHubAck now returns { commentId, message } instead of just number
- postAcknowledgmentComment handles all GitHub agent types (not just
  respond-to-review/respond-to-pr-comment) using generateAckMessage()
- executeGitHubAgent resolves effective header: ackMessage > INITIAL_MESSAGES
  > definition.headerMessage, and reuses ack comment when ackCommentId exists
- Remove hardcoded headerMessage from review, respond-to-review,
  respond-to-pr-comment, respond-to-ci agent definitions
- Claude Code profile preExecute hooks skip when ackCommentId exists
- Remove acknowledgmentCommentId from PRResponseAgentInput (unified to
  ackCommentId on AgentInput)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(github): replace hardcoded agent messages with LLM-generated ack messages
- Remove dead-code `postTrelloComment`, `postGitHubComment`, `postJiraComment`
  exports from platformClients.ts (zero consumers outside tests)
- Remove unused `markdownToAdf` import from platformClients.ts
- Remove 15 corresponding tests for the removed helpers
- Fix stale comment in notifications.ts that incorrectly referenced
  pm/jira/adf dependency avoidance (now transitively imported)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lt (#495)

cloneRepo() always cloned the GitHub default branch, ignoring the
project's baseBranch setting from the database. This meant projects
configured with e.g. baseBranch=develop would still start work from
main. Pass --branch to git clone so the checkout always matches the
project config.

Also fixes a pre-existing lint warning (noExplicitAny) in the ack
message generator test.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ks (#498)

Co-authored-by: Cascade Bot <bot@cascade.dev>
…tegration form (#499)

Co-authored-by: Cascade Bot <bot@cascade.dev>
…te headers (#500)

Co-authored-by: Cascade Bot <bot@cascade.dev>
…502)

Integrate @sentry/node v10 across all three container types (router,
worker, dashboard) using Node's --import flag for early SDK initialization.

Core:
- Add src/instrument.ts (module preload) and src/sentry.ts (no-op wrappers)
- Wire Sentry captures into all Hono error handlers, webhook processing,
  worker lifecycle, watchdog timeouts, queue errors, and retry exhaustion
- Forward SENTRY_* env vars from router to spawned worker containers

Bug fixes found during review:
- Fix tracesSampleRate=0 silently becoming 0.1 (|| vs nullish check)
- Add Sentry flush before watchdog process.exit(1) to drain queued events
- Remove redundant try/catch in router webhook handlers that swallowed
  queue failures (Redis down → 200 instead of 500), restoring correct
  HTTP semantics for webhook provider retries
- Add Sentry capture to server mode's handleProcessingError (was log-only)

Code quality:
- Extract dispatchJob() from worker-entry main() to fix cognitive
  complexity lint warning (17 > 15)
- Fix all import ordering and formatting issues

Tests:
- Add tests/unit/sentry.test.ts — no-op behavior, context propagation
- Add tests/unit/instrument.test.ts — conditional init, tracesSampleRate=0
- Add Sentry flush assertion to lifecycle watchdog tests
- Add handleProcessingError Sentry capture test to webhookHandlers

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…post-login nav (#503)

Co-authored-by: Cascade Bot <bot@cascade.dev>
- Replace 35+ raw console.log/warn/error calls with structured logger
  across router handlers (github, trello, jira, index, queue)
- Create shared JiraWebhookPayload type and STATUS_TO_AGENT constant
  in src/triggers/jira/types.ts to eliminate duplication across 3 files
- Fix Trello card-moved and label-added triggers to return null instead
  of throwing on missing card ID (consistency with other handlers)
- Fix fragile isAgentLogFilename regex that couldn't handle multi-hyphen
  agent names like respond-to-review
- Extract shared withPMCredentials helper to src/pm/context.ts,
  eliminating duplication between router and worker
- Remove dead fallback job queueing for unresolvable GitHub projects
- Rename queueJiraJob → processJiraWebhookEvent for naming consistency
- Add Sentry captureException for persistent ack reaction failures
- Add ackCommentId type-clarifying comments to job interfaces
- Refactor processGitHubWebhook to fix cognitive complexity lint warning
  (extract tryEnqueueIfBusy and resolveTriggerResult helpers)
- Add test coverage for unknown agent types, empty trigger config
  objects, multi-hyphen filenames, and missing card ID edge cases

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
@zbigniewsobiecki zbigniewsobiecki merged commit b35ecc0 into main Feb 23, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants