Skip to content

Jackhammer agent - #1092

Open
tristpinsm wants to merge 15 commits into
mainfrom
tpm/hammer-ocs
Open

Jackhammer agent#1092
tristpinsm wants to merge 15 commits into
mainfrom
tpm/hammer-ocs

Conversation

@tristpinsm

Copy link
Copy Markdown
Contributor

Here is a first draft for a jackhammer agent. It should allow individual slots to fail and track the results.

Currently, I think you could set up an OCS-web panel that would display the result for each slot. This would only update to display the last jackhammer run however (and I guess only show the slots that were requested in that run).

If we wanted to have a continuously updating panel, we could add a monitor process to the agent that queries the SmurfApplication.SystemConfigured register, modeled on the ACU agent. I'm not super familiar with OCS, so let me know if that is a good idea.

Requires simonsobs/sodetlib#514

tristpinsm and others added 7 commits July 21, 2026 13:54
New agent wrapping sodetlib's jackhammer hammer() function, exposing it
as an OCS task with the same options (slots, no_reboot, no_dump,
skip_setup, dump_rogue).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Store the traceback in session.data['error'] on failure so clients can
inspect what went wrong.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use the new hammer() return value to populate session.data with
succeeded_slots and failed_slots. Distinguish full success, partial
success, and total failure in the task return message.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tristpinsm

Copy link
Copy Markdown
Contributor Author

actually, if it's possible for an OCS panel to display data from an ocs feed, we wouldn't need another monitor process and could get this info from the det-controller agents (with a config change for the streamers).

tristpinsm and others added 2 commits July 22, 2026 14:24
…tatus

Poll SystemConfigured and ConfiguringInProgress EPICS registers per
slot every 10s via epics.caget. Publishes to a system_configured OCS
feed and populates session.data for ocs-web display.

Auto-starts on agent launch; suppress with --no-processes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@tristpinsm

Copy link
Copy Markdown
Contributor Author

@BrianJKoopman How do you usually proceed for testing new agents? Can I run this on a LAT smurf server in parallel to the production OCS and try hammering slots?

@mhasself mhasself left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Non-exhaustive review -- looks good for the most part but:

  • You'll need to add a page to the docs, especially including configuration information.
  • Consider starting agent name with Smurf or Pysmurf so that it sorts better in agent lists (e.g. in ocs sidebar; hostmanager lists). E.g. SmurfHammerAgent
  • It's nice to require privs=2, but functionally that will make this inert right now because we don't run access control at the site! Can be changed later.

@msilvafe

msilvafe commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Non-exhaustive review -- looks good for the most part but:

  • You'll need to add a page to the docs, especially including configuration information.
  • Consider starting agent name with Smurf or Pysmurf so that it sorts better in agent lists (e.g. in ocs sidebar; hostmanager lists). E.g. SmurfHammerAgent
  • It's nice to require privs=2, but functionally that will make this inert right now because we don't run access control at the site! Can be changed later.

I don't think we want to release this to the world without access control. What's the timescale for that?

tristpinsm and others added 2 commits August 7, 2026 11:46
@tristpinsm

Copy link
Copy Markdown
Contributor Author

Thanks for taking a look! I renamed the agent and added to the docs, but holding off on changing the permissions until we decide on the path forward.

If escalating permissions is not supported right now, I don't feel like it's very risky to deploy this without locking it down. I seems to me like anyone with access to ocs-web can already do a lot of damage (potentially a lot worse than hammering SMuRF).

btw I'll be out on vacation next week, so if this converges on that timescale and someone wants to push it through, don't wait on me!

@msilvafe

msilvafe commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Thanks for taking a look! I renamed the agent and added to the docs, but holding off on changing the permissions until we decide on the path forward.

If escalating permissions is not supported right now, I don't feel like it's very risky to deploy this without locking it down. I seems to me like anyone with access to ocs-web can already do a lot of damage (potentially a lot worse than hammering SMuRF).

btw I'll be out on vacation next week, so if this converges on that timescale and someone wants to push it through, don't wait on me!

Fair point @tristpinsm!

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.

3 participants