Skip to content

Rebuild rejects provider-composed policy after all messaging channels are stopped #10708

Closed

Description

@prekshivyas

Investigation Summary

  • Trusted channels-stop-start-hermes E2E on candidate d1675ead1ec4f7e4af08d2992d9f38e42f55fdd9 completed onboarding and active-channel validation, then failed during the rebuild after every channel was stopped.
  • The exact failure is Cannot prepare rebuild policy handoff: live policy references a credential provider outside the verified replacement plan. after the replacement image finished building and before replacement sandbox creation.
  • A deterministic source-boundary reproduction retains an OpenShell _provider_* entry with a credential binding after removing the stopped channel's ordinary policy key; the handoff then rejects that generated binding.
  • rebuild-policy-handoff.ts and the canonical provider-composed policy boundary are unchanged between the failing candidate and current main 3424db7badd6daa0de1c382c702f339b2c56eaf4.
  • The OpenClaw sibling job did not reach this boundary because its runner stopped earlier with the --network option requires BuildKit; OpenClaw behavior here remains unvalidated.

Description

A rebuild captures the complete live OpenShell policy before destroying the old sandbox. Provider attachment can add reserved _provider_* policy entries. When all messaging channels are disabled, rebuild removes the manifest-owned channel policy keys and excludes their providers from replacement authority, but the captured provider-composed entries remain. The credential-binding authority check then fails closed on those generated entries.

Expected: provider-composed entries are handled at the established OpenShell policy normalization boundary, stopped channel policies stay absent, unrelated host policy edits survive, and rebuild proceeds without authorizing a disabled channel provider.

Actual: rebuild rejects the captured policy after the old sandbox has been deleted. Recovery backup and cleanup remain available.

Reproduction Steps

Live reproduction:

  1. Onboard the Hermes channels-stop-start E2E sandbox with the repository-managed fake channel credentials.
  2. Add Google Chat through the E2E gateway-minted provider fixture.
  3. Confirm the active channel integrations and provider egress.
  4. Stop Telegram, Discord, WeChat, Slack, WhatsApp, Teams, and Google Chat.
  5. Run nemoclaw e2e-hm-ch-cycle rebuild --yes.
  6. Observe the policy handoff failure after the image build completes.

Deterministic boundary reproduction:

  1. Use a live policy containing an ordinary googlechat_hermes entry plus a reserved _provider_* entry whose endpoint has credential_binding.provider: e2e-hm-ch-cycle-googlechat-bridge.
  2. Call materializeRebuildPolicyHandoff with removedNetworkPolicyKeys: ["googlechat_hermes"] and no authority for the disabled channel provider.
  3. Observe the same error. The ordinary key is removed, while the provider-composed entry reaches authorizedCredentialBindingProviders.

Environment

  • Current upstream main inspected: 3424db7badd6daa0de1c382c702f339b2c56eaf4
  • Live candidate: d1675ead1ec4f7e4af08d2992d9f38e42f55fdd9
  • Trusted workflow source: 847413b996a8c53bcfa7b8f96bf22dcb617a60d7
  • OpenShell: 0.0.106
  • Agent: Hermes Agent v0.19.0
  • Inference: repository E2E mock/compatible endpoint mode
  • External messaging: fake repository-managed tokens only; no messages were sent to real people

Debug Output

Logs

Sandbox recreate error: Cannot prepare rebuild policy handoff: live policy references a credential provider outside the verified replacement plan.

Recreate failed after sandbox was destroyed.
Backup is preserved at: /home/runner/.nemoclaw/rebuild-backups/e2e-hm-ch-cycle/2026-08-31T19-57-58-259Z

Checklist

  • I confirmed this bug is reproducible
  • I searched existing issues and this is not a duplicate

Related validation: #10692

Activity

  1. added
    needs: triage
    on Aug 31, 2026
  2. prekshivyas commented on Sep 1, 2026

    @prekshivyas
    CollaboratorAuthor

    Still reproduces in trusted PR E2E after #10711 and #10725 merged.

    Hermes onboarding and active-channel validation passed for Telegram, Discord, WeChat, Slack, WhatsApp, Teams, and Google Chat. The disable/rebuild phase then failed at the same boundary:

    Cannot prepare rebuild policy handoff: live policy references a credential provider outside the verified replacement plan.
    

    The artifact cleanup record has no failures and confirms sandbox, provider, and gateway cleanup. Later re-enable/removal phases did not run. No real channel message or bot reply was attempted or observed.

  3. added
    area: e2e
    area: policy
    area: sandbox
    integration: hermes
    on Sep 3, 2026
  4. added theissue type on Sep 3, 2026
  5. removed
    needs: triage
    on Sep 3, 2026
  6. apurvvkumaria commented on Sep 8, 2026

    @apurvvkumaria
    Collaborator

    Focused E2E verification passes after #11188 merged.

    The Hermes E2E test passed all lifecycle phases:

    • Onboarded Telegram, Discord, WeChat, Slack, WhatsApp, Microsoft Teams, and Google Chat.
    • Validated the active messaging channels.
    • Stopped all messaging channels and rebuilt the sandbox.
    • Started the messaging channels, rebuilt the sandbox, and validated lifecycle state.
    • Removed WeChat, Microsoft Teams, and Google Chat, then validated their removal.
    • Released the E2E resources.

    The artifact reports no cleanup failures. It confirms sandbox destruction, all OpenShell provider-profile deletions, OpenShell gateway removal, and heartbeat termination. The Docker credential cleanup step also passed.

    This focused run verifies the reported Hermes rebuild behavior for the tested commit. It is not full release qualification.

  7. added
    area: messaging
    area: security
    on Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: e2earea: messagingarea: policyarea: sandboxarea: securityintegration: hermes

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions