Skip to content

feat(cli): persist-smoke verb + fail-loud duplicate plugin names - #3

Merged
ElystrumCore merged 2 commits into
mainfrom
agent/persist-smoke-hardening
Jul 21, 2026
Merged

feat(cli): persist-smoke verb + fail-loud duplicate plugin names#3
ElystrumCore merged 2 commits into
mainfrom
agent/persist-smoke-hardening

Conversation

@ElystrumCore

Copy link
Copy Markdown
Owner

Summary

Hardening items #1 + NousResearch#4 from the post-cutover assessment (companion to agent-lineage PR NousResearch#22):

  • hermes persist-smoke [--json] — white-box deployment gate: discovers plugins, asserts pre_persist_write in the required-hook registry with a stale-plugin-vs-no-plugin diagnosis, stages a real probe through governed_persist, and judges honestly — genuine staged (empty message) ⇒ green; decision-less local fallback ⇒ red (local_fallback); denied ⇒ red; passthrough ⇒ red with probe cleanup; discovery errors ⇒ valid-JSON discovery-failed diagnostic instead of a traceback. Per-run unique session ids prevent budget self-exhaustion under periodic use.
  • Fail-loud duplicate plugin names — a same-source name collision on a plugins.required plugin aborts startup naming both directories BEFORE any registration; optional collisions load neither copy with one loud warning; cross-source override behavior byte-identical. The exact v0.2.0-backup-shadowing incident from the persistence cutover is now a structural startup error.

Verification

  • Review (2 rounds, live repros not mocks): the local-fallback inversion, unguarded discovery crash, and 100-run session self-denial all confirmed then verified closed; duplicate-name deliverable solid against the real incident's shape. 191 targeted fork tests green.

🤖 Generated with Claude Code

CN-CLI added 2 commits July 20, 2026 19:20
Adds `hermes persist-smoke`, an operator-facing smoke test that discovers
plugins, asserts pre_persist_write is registered as a required hook
(distinguishing no-plugin-discovered from plugin-present-but-stale), then
routes a probe write through governed_persist and confirms it comes back
genuinely staged rather than silently falling through to a canonical
write (cleaning up the probe file on that ungoverned outcome).

Also hardens plugin discovery (hermes_cli/plugins.py) so two directories
declaring the same manifest name no longer let directory-iteration order
silently pick a winner: a collision on a plugins.required name aborts
startup naming both directories, an optional collision refuses to load
either copy and logs one loud warning naming both directories, and unique
names are unaffected.
@ElystrumCore
ElystrumCore merged commit 66221d0 into main Jul 21, 2026
@cursor

cursor Bot commented Jul 21, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

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.

1 participant