• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lsm / neokai / 27997751097

23 Jun 2026 02:21AM UTC coverage: 81.89% (+0.001%) from 81.889%
27997751097

push

github

web-flow
feat(space): auto-subscribe worker nodes to PR events on pr_url (#2148)

* feat(space): auto-subscribe worker nodes to PR events on pr_url

When a workflow worker node includes a pr_url in a save_artifact or
send_message payload, automatically subscribe it to that PR's events —
no manual subscribe_pr_events call needed.

- SpaceRuntime.ensurePrSubscriptionForNode: parse pr_url →
  buildPrEventTopicPattern → dedup (any existing sub for the same PR
  topic) → registerSubscription(kind: 'auto', bypasses per-slot cap)
- onEnsurePrSubscription callback wired through SpaceRuntimeService and
  TaskAgentManager into node-agent config
- maybeEnsurePrSubscription helper fires best-effort on save_artifact
  success and send_message ok/partial; never fails the save/send

Complements the manual subscribe_pr_events tool: this covers the PR
creator/announcer automatically; the manual tool remains for observer
nodes that want to watch a PR they did not open.

* fix(space): distinct auto_pr kind for worker PR subscriptions

Addresses codex review on #2148 (P2):

#1 — Worker PR subscriptions now use a distinct 'auto_pr' kind instead
of 'auto'. clearPrEventSubscriptionsForRun (blocked-gate wake-up cleanup)
only removes 'auto', so worker PR subs survive a run blocking/unblocking
instead of being silently unsubscribed. auto_pr also survives
registerRunInterestsFromWorkflow rebuilds and bypasses the per-slot
interest cap.

#2 — ensurePrSubscriptionForNode drops the node's prior auto_pr sub
before registering a new one, so a PR change stops delivering the old
PR's events (single auto_pr entry per slot). Same-PR re-saves still
no-op via the any-kind dedup.

#3 (rebuild worker PR subs after daemon restart) tracked as a separate
follow-up — not addressed here.

Adds tests: PR-change drops stale sub; auto_pr survives gate cleanup.

* fix(space): purge stale auto_pr subs + in-flight deliveries on PR change

Addresses codex re-review on #2148 (2x P2), both edge cases in the prior... (continued)

11114 of 16130 branches covered (68.9%)

Branch coverage included in aggregate %.

148 of 175 new or added lines in 5 files covered. (84.57%)

2 existing lines in 2 files now uncovered.

94314 of 112613 relevant lines covered (83.75%)

297.33 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

76.1
/packages/web/src/components/MessageInput.tsx


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc