Skip to content

Hermes GPU fallback leaves shared-state metadata unrestored and two managed containers #9486

Closed

Description

@ericksoa

Investigation summary

  • The complete unfiltered PR E2E run and its failed-job rerun used commit fd30d431e3f6fdce4ec52b70491a9f03b237ceef.
  • The Hermes GPU fallback path fails while restoring managed startup shared state.
  • The transaction reports that directory metadata was not restored exactly for /sandbox/.hermes.
  • Rollback leaves two managed containers with the same sandbox name and sandbox ID.
  • Cleanup refuses to select one container, cannot destroy the sandbox, and leaves the Hermes gateway port bound.
  • The same failure signature occurred in workflow attempts 1 and 2.

Description

The Hermes GPU fallback path replaces a managed container after native GPU validation cannot authorize the selected route.

Expected behavior: the fallback transaction restores the required shared-state metadata, reconciles one managed container, and releases the gateway port during cleanup.

Actual behavior: shared-state restoration fails. Rollback leaves two managed containers for one sandbox identity. Fail-closed cleanup cannot select a container and leaves the gateway port in use.

Reproduction steps

  1. Run the complete unfiltered PR E2E matrix at commit fd30d431e3f6fdce4ec52b70491a9f03b237ceef.
  2. Select the Hermes GPU fallback scenario.
  3. Let native GPU validation fail and start the compatibility fallback transaction.
  4. Observe the /sandbox/.hermes metadata-restoration failure.
  5. Observe two managed containers with the same sandbox name and sandbox ID.
  6. Observe sandbox cleanup refusal and the bound Hermes gateway port.

Environment

Failure evidence

Stable signatures:

Managed startup shared-state transaction failed:
managed directory metadata was not restored exactly: /sandbox/.hermes
Refusing to destroy sandbox 'e2e-hgpu-fallback':
2 managed containers carry the 'openshell.ai/sandbox-name=e2e-hgpu-fallback' label;
expected exactly one.

Both containers also carry the same openshell.ai/sandbox-id value. Cleanup then reports that the Hermes GPU gateway port remains in use.

Detection gap

Existing GPU fallback coverage validates transaction-owned replacement selection. It does not reproduce shared-state metadata restoration failure followed by duplicate-container cleanup.

The regression test must cover the failed transaction and its cleanup state.

Acceptance criteria

  • The Hermes GPU fallback transaction restores the required /sandbox/.hermes metadata exactly.
  • A failed shared-state transaction reconciles the transaction-owned replacement and rollback containers.
  • Cleanup never selects a container from an ambiguous sandbox-name label alone.
  • Cleanup never destroys a container that the transaction does not own.
  • Cleanup leaves exactly one valid managed container before sandbox destruction.
  • Sandbox destruction succeeds and releases the Hermes gateway port.
  • A regression test forces the metadata-restoration failure and verifies duplicate-container reconciliation.
  • The Hermes GPU fallback job passes in one complete unfiltered E2E run.
  • The same scenario passes once more at the repaired commit.

Scope boundary

  • Do not weaken the exact shared-state metadata check.
  • Do not destroy all containers that share a sandbox-name label.
  • Do not bypass transaction ownership.
  • Do not publish a new managed image for this change.

Relationship

Prerequisite for #9140.

Related epic: #7744.

Related but distinct: #9362 and PR #9450.

Activity

  1. added
    area: messaging
    area: sandbox
    integration: hermes
    on Aug 18, 2026
  2. added theissue type on Aug 18, 2026
  3. self-assigned this
    on Aug 18, 2026
  4. added a commit that references this issue on Aug 19, 2026
    440baaf
  5. rsliter commented on Aug 21, 2026

    @rsliter
    Collaborator

    #9512 is present in multiple later complete runs that do not reproduce this issue's metadata mismatch, duplicate-container, cleanup, or gateway-port-release failures.

    The earlier reported candidate a4f9b59aa64f88532a3e64e949dd1b4068aa1f1e did not contain #9512, so that run cannot show that the repair missed this boundary.

    The current #9323 candidate contains #9512 and still has no metadata mismatch or duplicate-container residue, but a later #9323-only change now stops the compatibility retry when managed lifecycle cleanup supplies an exact owner handoff. That is a distinct regression introduced after the #9486 repair. I am leaving this issue open for maintainer closure judgment because the accepted repair has descendant-run evidence, while the wording also asks for a repeat at the repaired commit.

  6. rsliter commented on Aug 21, 2026

    @rsliter
    Collaborator

    Closing as completed by #9512.

    The repair is present in two later complete unfiltered E2E runs, and neither reproduces the accepted metadata-restoration, duplicate-container, cleanup, or gateway-port-release failure:

    The previously cited a4f9b59aa64f88532a3e64e949dd1b4068aa1f1e candidate did not contain #9512, so it was not contrary evidence. The later compatibility-retry refusal on #9323 was introduced after this repair and is a distinct #9323 regression, not a recurrence of the shared-state transaction failure tracked here.

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

Metadata

Metadata

Assignees

Labels

area: messagingarea: sandboxarea: securityintegration: hermesplatform: container

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions