Repository navigation
SWF v44 system release - #80
Merged
Merged
Conversation
A user agent manager that lost ActiveMQ tried one reconnect and gave up, yet kept heartbeating "MQ: connected", so MCP start/stop commands went to a queue nobody read (zyang2, disconnected 2026-10-07). The main loop now reconnects every heartbeat cycle while disconnected, on a fresh STOMP connection (reconnecting the old one races its exiting receiver thread), and survives a broker that is down at startup. The heartbeat sends mq_connected and reports WARNING and "MQ: disconnected" when it is false. agent-management.md names the real control queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The agent manager's heartbeat metadata now carries agents_running, which swf_check_agent_manager reads and always found missing (false while agents ran). fast_processing_agent's _attempt_reconnect override uses BaseAgent._fresh_connection (swf-common-lib 398aeda) instead of reusing the old connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The REST logging console format now carries the time (swf-common-lib c00a642), so "[HH:MM:SS] Received command" would print it twice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v44 entry in RELEASE_NOTES.md: the system release since v43 (2026-08-27) across the coordinated repositories and their peer repositories, with contributor work folded in from main credited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 19, 2026
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Blocking connection attempts can interrupt heartbeats, and a connection-state race can permanently suppress recovery.
2 open issues
What changed in this PR
Prepares the SWF v44 release and improves broker recovery and connection-health reporting in the testbed.
Changes:
- Adds fresh-connection retries and MQ health reporting to the agent manager.
- Updates fast-processing reconnection to use a fresh connection.
- Documents v44 capabilities and agent-manager behavior.
| File | Description |
|---|---|
| src/swf_testbed_cli/user_agent_manager.py | Adds reconnection handling and broker-health reporting. |
| RELEASE_NOTES.md | Records coordinated v44 release changes. |
| example_agents/fast_processing_agent.py | Uses fresh connections during recovery. |
| docs/agent-management.md | Updates queue names and recovery documentation. |
Review effort: Balanced
Comment on lines
+649
to
+650
| if not self.mq_connected: | ||
| self._reconnect() |
|
|
||
| self.logger.info(f"Subscribing to {self.control_queue}...") | ||
| self.conn.subscribe(destination=self.control_queue, id='control', ack='auto') | ||
| self.mq_connected = True |
…ns transport up Copilot review of PR #80: - The reconnect ran on the heartbeat loop with connect(wait=True) and no bound, so a stalled broker or STOMP handshake stopped heartbeats and further retries (the initial connect preceded the first heartbeat). Each attempt, the first included, now runs on its own thread, one at a time, and the STOMP socket timeout (MQ_SOCKET_TIMEOUT, twice the 30 s heart-beat) bounds it. - A disconnect landing between SUBSCRIBE and mq_connected = True was overwritten, leaving a dead connection reported connected and recovery stopped. _mq_ok() reconciles the flag with the transport; the main loop and the heartbeat use it. The reconnect also tolerates an already-detached listener instead of failing every later attempt. Checked on stomp.py 8.2.0 and 9.0.0: against a listener that never answers, heartbeats continued and attempts ran sequentially, each ended by the timeout; a stale flag was cleared and recovered on the next cycle; a forced disconnect recovered and a command was received; a healthy connection stayed up through 100 s idle. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nager's bounded connect Wen Guan's per-queue pools and thread names (swf-common-lib #48), Dmitry Kalinkin's API reference (swf-monitor #33), the alarm AI delivery design (swf-monitor #50), the fixes from Copilot's review of the release, and the agent manager's and BaseAgent's bounded connect. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The release PR's CI and Copilot review fixes are part of v44: the entry opens on that, adds the BaseAgent reconnect guard and timeout, the removed stop test and the email-off pings seed, and lists the review fixes across the three repositories. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


SWF v44 system release.
This release covers seven weeks of work since v43 (2026-08-27): ePIC production now runs its own in-job
payload, places and regulates its own work, records and recovers its own data, and diagnoses its own
failures. The payload preserves every output before the catalog is asked anything, with a failover stash
at BNL; the node harness brings the Event Service to Perlmutter, the npps0 test queue and Google Cloud;
a pressure front, a job throttler and a node guard place work and keep it off broken resources; a
segfault program inventories, reproduces and reads payload crashes. Access to the system is governed by
recorded authority, and collaborators reach it through a reduced user view, an external MCP relay and
embedded TeamComms. Contributor work merged to
mainsince v42 is folded in and credited below. Thesenotes cover the coordinated baseline repositories and the relevant
mainwork in their peerrepositories.
Release notes: RELEASE_NOTES.md § v44
Companion PRs: BNLNPPS/swf-monitor#51, BNLNPPS/swf-common-lib#49. Main was merged into each baseline first, so contributor work merged since v42 (Wen Guan, Dmitry Kalinkin, Zhaoyu Yang) is included and credited.
🤖 Generated with Claude Code