Skip to content

SWF v44 system release - #80

Merged
wenaus merged 8 commits into
mainfrom
infra/baseline-v44
Oct 19, 2026
Merged

wenaus merged 8 commits into
mainfrom
infra/baseline-v44

Conversation

@wenaus

@wenaus wenaus commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

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 main since v42 is folded in and credited below. These
notes cover the coordinated baseline repositories and the relevant main work in their peer
repositories.
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

wenaus and others added 5 commits October 19, 2026 10:28
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>
…76) and Zhaoyu Yang's prompt-processing decision box (#67)

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>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 15:08

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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
wenaus and others added 3 commits October 19, 2026 11:29
…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>
@wenaus
wenaus merged commit 26ca6f0 into main Oct 19, 2026
2 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