Skip to content

Harden Hermes Agency security, lifecycle, packaging, and Fabric#94

Merged
DeployFaith merged 21 commits into
mainfrom
audit/hermes-agency-hardening-20260714
Jul 17, 2026
Merged

Harden Hermes Agency security, lifecycle, packaging, and Fabric#94
DeployFaith merged 21 commits into
mainfrom
audit/hermes-agency-hardening-20260714

Conversation

@DeployFaith

Copy link
Copy Markdown
Owner

Thinking Path

  • Hermes Agency is the execution and coordination substrate, with Hermes Fabric providing its operator-facing control plane.
  • The repository had a large mixed worktree spanning transport lifecycle, remote-task trust, model routing, skill governance, packaging, CI, Fabric reliability, policy, and documentation.
  • Security-sensitive mutations and recovered queued tasks needed fail-closed authorization and current-trust revalidation.
  • Keryx lifecycle ownership, Fabric filesystem/process handling, deterministic test partitioning, and package resource validation needed explicit regression coverage.
  • The worktree also needed preservation, ownership classification, generated-artifact quarantine, focused commits, and reproducible evidence before publication.
  • This pull request keeps the integrated baseline reviewable through nine focused commits while validating the final combined tree.
  • The benefit is a safer, reproducible Agency/Fabric release candidate with deterministic CI, isolated package smoke tests, documented policy, and rollback evidence.

Linked Issues or Issue Description

No public issue exists. This PR addresses a repository-wide hardening and release-readiness gap:

  • Observed behavior: remote task/pool trust checks, Keryx channel cleanup, profile filesystem writes, local process supervision, global Fabric routes, packaging gates, and test orchestration had incomplete failure and regression coverage.
  • Expected behavior: security-sensitive operations fail closed; recovered work is revalidated; owned resources are cleaned up precisely; profile writes are contained and atomic; global routes require instance-admin authority; builds and tests run through deterministic bounded gates; release artifacts prove packaged resources work from an isolated wheel.
  • Reproduction/evidence: the retained validation logs and ownership manifests are documented in docs/hermes-agency-remaining-work-plan.md.
  • Scope: code, tests, CI/release workflows, model-set consolidation, governed shared-skill lifecycle, Fabric reliability/policy, and operator documentation. No deployment is included.

What Changed

  • Consolidated Agency model routing into the canonical OpenAI Codex model set and aligned status tests/docs.
  • Added governed shared-skill proposal, validation, promotion, storage, migration, CLI, and profile-scope lifecycle with focused tests.
  • Made pool mutation authentication fail closed, propagated CLI tokens, and revalidated recovered queued tasks against current trust.
  • Corrected Keryx channel ownership and failed-connection cleanup with lifecycle tests.
  • Hardened Fabric profile path containment/atomic writes, local process supervision fallback, global route authorization, OpenAPI coverage, UI behavior, and environment-isolated tests.
  • Repaired deterministic Fabric test partitioning and moved CI to explicit serialized/server/workspace lanes.
  • Added frozen package installation, package/release validation, isolated wheel resource smoke tests, and workflow/Compose checks.
  • Added tested UI JavaScript/CSS artifact budgets and excluded generated Storybook output from source-branding scans.
  • Updated security, compatibility, operations, policy, QA, typing-baseline, and rollback documentation.
  • Preserved the unrelated local desktop attachment and quarantined generated dependency/runtime backups rather than committing or deleting them.

Verification

Local validation completed on 2026-07-14:

  • ruff check . and ruff format --check .
  • mypy src/ --exclude '_generated'
  • SDK: 406 passed, 33 deselected
  • Agency canonical suite: 242 passed
  • Full non-integration Python suite: 631 passed, 33 deselected
  • Governance/default-staff focused suite: 64 passed
  • Bridge contract suite: 11 passed
  • Fabric frozen install, workspace/catalog preflights, full workspace typecheck, stable-runner partition tests, policy tests, and source scans
  • Production build and artifact budgets: JavaScript 4,914,705 / 5,250,000 bytes; CSS 374,279 / 400,000 bytes
  • Branding scan: 20,989 matches across 1,945 files; zero violations
  • Isolated wheel build/install/import/CLI/resource smoke and pip check
  • GitHub Actions YAML parsing, Docker Compose validation, committed-path hygiene, credential scan review, and git diff --check

Detailed execution evidence and rollback notes: docs/hermes-agency-remaining-work-plan.md.

Risks

  • The PR is broad because the retained mixed baseline contained coupled Agency/Fabric/model/governance work. Focused commits preserve subsystem review boundaries.
  • Canonical model-set consolidation removes legacy preset files; consumers using those filenames must migrate to openai-codex-only.
  • Skill governance adds a new lifecycle and storage surface; it is covered by 33 focused tests plus the complete Python suite.
  • Global Fabric operational routes now require instance-admin authorization and may reject callers that previously relied on permissive behavior.
  • The UI bundle remains large; an explicit failing budget now prevents further unreviewed growth.
  • The plugin directory is not claimed to pass strict Mypy. Its current 824-error diagnostic backlog is documented rather than suppressed.
  • No deployment was performed. Runtime rollout and rollback remain separately approval-gated.

For core feature work, check ROADMAP.md first and discuss it in #dev before opening the PR. Feature PRs that overlap with planned core work may need to be redirected — check the roadmap first. See CONTRIBUTING.md.

Model Used

  • OpenAI Codex gpt-5.6-sol, high-reasoning engineering mode, with repository/file tools, shell execution, test/build execution, Git, and GitHub CLI. Work was performed directly without Hermes Agency delegation.

Checklist

  • I have included a thinking path that traces from project context to this change
  • I have specified the model used (with version and capability details)
  • I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work
  • I have searched GitHub for duplicate or related PRs and linked them above
  • I have either (a) linked existing issues with Fixes: # / Closes # / Refs # OR (b) described the issue in-PR following the relevant issue template
  • I have not referenced internal/instance-local Paperclip issues or links (only public GitHub #NNN / github.com/paperclipai/paperclip URLs)
  • My branch name describes the change and contains no internal ticket id or instance-derived details
  • I have run tests locally and they pass
  • I have added or updated tests where applicable
  • I have updated relevant documentation to reflect my changes
  • I have considered and documented risks above
  • All Paperclip CI gates are green
  • Greptile is 5/5 with no open P2s, recommendations, or follow-ups
  • I will address all Greptile and reviewer comments before requesting merge

@DeployFaith
DeployFaith merged commit 52eb9b7 into main Jul 17, 2026
17 checks passed
@DeployFaith
DeployFaith deleted the audit/hermes-agency-hardening-20260714 branch July 17, 2026 07:05
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