Skip to content

Centralize Dockerfile RUN extraction and logged-shell test support #8352

Closed

Description

@jyaunches

Objective

Use one test-only contract for extracting Dockerfile RUN blocks and replaying them with logged shell functions.

Evidence

test/helpers/hermes-dockerfile-run.ts and test/helpers/base-apt-security-functions.ts already implement overlapping parsing and shell execution. Local equivalents remain in:

  • test/sandbox-provisioning.test.ts
  • test/sandbox-provisioning-tavily.test.ts
  • test/sandbox-provisioning-helper-permissions.test.ts
  • test/sandbox-rlimit-hooks.test.ts
  • test/hermes-mcp-runtime-capability.test.ts
  • test/openclaw-real-patched-dist-harness.test.ts
  • test/hermes-dashboard-provisioning.test.ts

Scope

  • Define one support API for marker-bounded RUN extraction, line continuations, path rewriting, shell execution, and call logging.
  • Migrate the named byte-equivalent implementations.
  • Keep image-specific rewrites, function stubs, assertions, and failure expectations at each call site.
  • Keep fetch-guard-specific parsing out of scope unless it is proven byte-equivalent.
  • Do not add a production API.

Relationships

This is not a good first issue: these tests exercise shell, filesystem permissions, image layout, and fail-closed resource-limit behavior.

Acceptance criteria

  • One implementation owns common line-continuation parsing and logged-shell mechanics.
  • Migrated tests preserve the exact extracted command text and diagnostic output.
  • File-specific security setup remains explicit.
  • The change has a negative net LOC delta.

Validation

Run every migrated integration suite, then:

npm run test:projects:check
npm run checks:repository

Activity

  1. added
    help wanted
    area: packaging
    on Aug 5, 2026
  2. added theissue type on Aug 5, 2026
  3. self-assigned this
    on Aug 6, 2026
  4. added a commit that references this issue on Aug 7, 2026
    39178b2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area: packaginghelp wanted

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions