fix: preserve base-defense guard fixes on current upstream - #37320
fix: preserve base-defense guard fixes on current upstream#37320faisfamilytravel wants to merge 3 commits into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for preserving several potentially useful fixes. This cannot be salvaged as one PR against current main.
Problems
tools/claude_brain_tools.py:31-39adds a 611-line built-in tool module with hard-coded/Users/rfais370/...paths. Built-in discovery imports self-registering tool files (tools/registry.py:58-75;model_tools.py:188), and the default tool-definition path resolves registered toolsets (model_tools.py:389-393;toolsets.py:814-836).- The claimed one-time override is non-functional:
_resolve_write_target()rejects out-of-lane writes attools/claude_brain_tools.py:260-263, never calls_consume_override()(:290-309), and returnsoverride_used=Falseat:271. - The Matrix changes target
gateway/platforms/matrix.py, but current main moved the adapter toplugins/platforms/matrix/adapter.py(migration commit560010547). This needs a fresh, focused review rather than a mechanical apply.
Suggested changes
- Drop the Claude-Brain module from this PR; if needed, ship it as a standalone plugin with portable configuration and tests.
- Split and re-verify each remaining fix against current main before salvage.
Automated hermes-sweeper review.
| from tools.registry import registry | ||
|
|
||
| COLLAB_ROOT = Path("/Users/rfais370/Documents/Obsidian/FFT Command HQ/90_Collaboration") | ||
| CLAUDE_BRAIN_ROOT = Path(os.getenv("HERMES_CLAUDE_BRAIN_ROOT", str(COLLAB_ROOT / "Claude-Brain"))) |
There was a problem hiding this comment.
Blocking: this adds contributor-specific macOS paths to a built-in auto-discovered tool module. Built-in tools must be portable and broadly justified; move this collaboration-lane integration to a standalone plugin instead of shipping /Users/rfais370/... defaults in core.
| if not parent.exists() or not parent.is_dir(): | ||
| return None, False, f"parent directory does not exist or is not a directory: {parent}" | ||
| matched_root = _matching_write_root(resolved, roots) | ||
| if not matched_root: |
There was a problem hiding this comment.
Blocking: override_id is never consumed. This return rejects the out-of-lane case before _consume_override() can run, and the successful path always returns override_used=False; the documented one-time override mechanism is therefore unreachable.
|
Superseding this omnibus PR with current-main, single-purpose repairs after the maintainer review:
The Claude-Brain capability has been removed from the Hermes-core proposal and retained as an FFT-owned standalone, profile-scoped plugin with portable configuration, fail-closed writes, atomic one-time overrides, preflight checks, and regression coverage. The Matrix patch is not being carried forward. Current The remaining provider/model/cron changes were audited individually and were already handled generically, obsolete, mock-only, or not production-reproducible on current main. Closing #37320 as superseded rather than rebasing the mixed change set. |
Summary
main..bakpreservation artifacts from upstream.tools/file_tools.py.Validation
660 passed in 17.31s.670 passed, 4 skipped, 1 warning in 28.31s.1 passed, 1 warning in 1.55s.python3 -m py_compile scripts/release.pypassed after the attribution-map follow-up.python -m pytest tests/tools/test_local_interrupt_cleanup.py -q -o 'addopts=' --timeout=60:2 passed in 0.70safter the CI timeout-headroom follow-up.Operational notes
origin/main.NousResearch/hermes-agentwas denied forfaisfamilytravel; PR was opened from forkfaisfamilytravel/hermes-agentinstead.Evidence
3a877a9998905ef01ff182bcbe01baa4fed5fd18.e86dd8b65620159725c0919aca447385b1a396d3./Users/rfais370/.hermes/profiles/xo/reports/base-defense/upstream-pr-prep-20260601T213812-0400/FINAL-SITREP.md.2a64ec6cc36f1c3b14d77616313540acf446f2694e8e7a97726ca186d11f4496.