Skip to content

Investigate automatic config export checks across E2E configurations #11485

Description

@cv

Requested outcome, confirmed scope, and current owner

E2E tests already create many supported configurations, but only selected scenarios explicitly exercise config export. Investigate how shared fixtures can check export automatically, so new configurations inherit coverage without each test author remembering to add it.

  • Parent: [Epic] Replace onboarding inputs with one declarative configuration #10904. Its accepted decision establishes read-only export and representative runtime validation.
  • Scope: investigate E2E architecture and propose a bounded implementation. This issue does not record acceptance of a particular mechanism or expand supported configurations.
  • Current behavior owners: E2E fixtures, typed scenario metadata, the workflow planner, and the existing export checks.
  • Assigned implementation owner: none.

Related work and delivery constraints

Existing export work includes #10938, #11286, #11433, #11434, and #11435. The installed-CLI failure reported in #11421 illustrates why live command coverage matters.

Reuse configurations that existing GitHub E2E jobs already provision. Preserve targeted negative tests and their ownership. Account for direct and transitive assertions; moving checks into a helper must not conceal budget growth.

Current state and decisions

Preliminary source inspection at 209a02cab4f0223be867619f6fafa58adb722012 found:

  • The host client already performs an automatic managed-image receipt check after eligible successful onboarding commands.
  • Onboarding, state validation, and lifecycle fixtures offer semantic boundaries for checking a usable configuration.
  • Registry targets pass through these fixtures. Other live tests use custom onboarding helpers or shell commands, so a single existing hook does not cover every setup path.
  • Export checks currently live in the network-policy and Brave scenarios and the Hermes export helper. They combine reusable success checks with scenario-specific negative coverage.

Proposed direction:

flowchart LR
    A[Onboard or recover configuration] --> B[Shared readiness boundary]
    B --> C[Automatic export contract]
    C --> D[Scenario-specific checks]
    D --> E[Cleanup]
Loading

Investigate the following decisions:

  1. Identify setup and recovery owners that can invoke one fixture-owned export contract automatically. Inventory paths that bypass them, including custom launchers, remote execution, historical fixtures, and multiple sandboxes.
  2. Derive export expectations from existing scenario intent and independent observations. Do not ask the exporter itself whether a configuration should be supported.
  3. Distinguish required successful export, a known expected refusal, and a scenario without a usable sandbox. Unknown coverage must be visible rather than silently skipped.
  4. Compare exported semantics with independently expected agent, image, inference, policy, and configured features. Schema validity alone cannot detect silently omitted settings.
  5. Decide where repeated export proves stability, which differences require normalization, and when recovery deserves another check. Measure added time and avoid duplicate checks for unchanged state.
  6. Reuse existing scenario metadata and workflow selection. Determine how export-source changes select representative configurations without creating another configuration matrix or forcing unrelated jobs.

The failure class is missing configuration coverage at a shared lifecycle boundary. A blanket teardown check is unsuitable: scenarios may intentionally corrupt credentials, stop services, or destroy the sandbox before returning.

Security and failure handling must preserve the existing boundaries. Use the candidate CLI and its intended host or remote context. Keep exports in private temporary files, check known fixture secrets before retaining artifacts, and register cleanup before execution. Preserve existing credential custody and lifetime. Export must not repair the runtime. Command failures, transport ambiguity, verification failures, and cleanup failures must remain distinguishable and must not become successful coverage.

Observable acceptance examples

State Expected result Shortest evidence
Supported configuration reaches readiness Export runs without a call in the test body; document matches independent expectations Fixture/support tests plus an existing live scenario
Export omits an enabled feature, emits invalid configuration, or exposes a fixture secret Shared contract fails with redacted evidence Focused support tests
Known unsupported configuration Expected refusal and no published document Support test plus the existing live owner when needed
New configuration lacks an export expectation Coverage gap is reported explicitly Metadata/support test
Onboarding fails before a usable sandbox exists Preserve the original failure; no successful-export claim Support test
Scenario later damages or destroys the sandbox Initial ready-state check already ran; retain targeted negative checks Existing lifecycle or negative scenario
Export command, observation, or cleanup fails Classify failure, retain safe diagnostics, and attempt owned cleanup Support tests; live evidence only for the real boundary

Capability slices

Slice 1: Complete the investigation and select the shared boundary

  • Outcome: a source-backed map of configuration setup paths, current export coverage, and gaps; one recommended owner and migration plan.
  • Acceptance evidence: an architecture diagram, independent expectation design, failure/cleanup rules, workflow-selection impact, and measured or explicitly unmeasured runtime/assertion costs.
  • Dependencies and decisions: qualify only accepted export capabilities; identify any additional decision needed before implementation.
  • Test plan: identify the smallest support tests and existing GitHub live jobs needed to prove automatic invocation and detect omitted settings.
  • Deferred scope: source implementation, new export capabilities, new provisioning matrices, and apply/export round trips.

Delivery order

Finish the boundary and coverage inventory first. Then propose a small implementation that extracts common success checks and adopts them in existing setup owners. Keep identity-drift and other targeted negative tests with their scenario owners. Extend to further lifecycle boundaries only where they add distinct coverage.

Close this investigation when the recommendation, first implementation slice, dependencies, and remaining gaps are recorded. Do not claim universal E2E coverage while bypass paths remain.

GitHub writes

Create this investigation issue and attach it as a sub-issue of #10904. No source changes, assignments, or labels are included.

YAML requirements — v1 scan (2026-09-21)

Target: v1 at 88c6600c06b0. The document version is nemoclaw.nvidia.com/v1alpha1, with kind: NemoClawConfig.

Format: N/A (no feature-specific field). YAML availability does not establish exporter completion or live compatibility.

This is the current target reference. Earlier examples describe their original revision; this update does not change issue status.

This issue concerns export checks, not a new deployment feature. Use the existing v1alpha1 document, singular sandbox.agent, current harness fields and named spec.services references.

Checks must consume raw current-export bytes. A fixture rewritten from agents to agent is migration-authored intent, not proof that the installed exporter emits current YAML. Historical evidence can remain immutable and separately identified.

Acceptance for this mapping: Retain producer/consumer revisions and raw export identity. Use parser/schema checks for syntax and the owning migration scenarios for runtime behavior; do not claim either proves the other.

Sources: configuration.md, types.rs, validation.rs.

Exporter acceptance scope

Apply these requirements to the feature or regression covered by this issue and its accepted scope.

  1. Define v1-compatible YAML. Document the required fields and an example using apiVersion: nemoclaw.nvidia.com/v1alpha1 and kind: NemoClawConfig. Record the target v1 revision and verify compatibility with its parser. If a required format does not exist, mark it N/A and link the schema dependency. N/A does not satisfy this requirement.
  2. Export the target feature. The real configuration exporter must export the feature from a representative, admitted v0 deployment. Preserve the issue's required settings in the generated YAML. The raw output must pass the target v1 parser without manual field rewriting or a compatibility translator.
  3. Provide manual or E2E proof with the real exporter. Attach a manual reproduction or an E2E run using the installed or built exporter CLI against a real source deployment. Record the source feature setup, exporter version/commit, target v1 commit, command, output artifact or run link, and result. Show that export succeeds, the required feature settings are preserved, and the raw YAML passes target validation. A handwritten example or mocked builder test alone does not satisfy this requirement.

For E2E proof, identify the owning feature or migration scenario and reuse it where possible. Deterministic mapping tests remain responsible for field and refusal cases; the live proof covers the real source-to-exporter boundary.

This section defines acceptance requirements; it does not assert that the evidence is already complete.

Activity

  1. kaofelix commented on Sep 15, 2026

    @kaofelix
    Collaborator

    Coordination question from #11810:

    This investigation currently calls for private temporary exports used by shared E2E checks, but it does not specify whether a successful export becomes a reusable artifact.

    I see two possible boundaries:

    1. Investigate automatic config export checks across E2E configurations #11485 provides shared fixture machinery that automatically exports and validates configurations. [Epic] Validate v1 against representative v0 deployments #11810 invokes that machinery in dedicated runs and owns packaging any selected exports as migration-test inputs.
    2. Investigate automatic config export checks across E2E configurations #11485 additionally defines a stable, versioned, redacted artifact contract that v0 E2E workflows can publish and [Epic] Validate v1 against representative v0 deployments #11810 can consume directly.

    Which boundary is intended?

    A staged hybrid may keep the first implementation bounded: #11485 could expose a typed export result and private file path containing the exact validated bytes, scenario identity, source revision, export hash, outcome classification, and independent expectation results. #11810 could initially own the allowlisted evidence envelope and artifact retention. If additional consumers emerge, that envelope could later become a stable v0 E2E artifact.

    For #11810, reusable artifacts would enable two layers:

    • Broad replay of v0 exports for translation, representability, planning, and gap classification.
    • Selected full live v1 lifecycle runs for agent behavior, unchanged apply, export/reapply, resource identity, and destroy evidence.

    If stable publication belongs in #11485, could its acceptance criteria include a redacted, allowlisted envelope with exact v0 identity, export bytes/hash, scenario metadata, independent readiness/behavior assertions, and cleanup status? If publication remains outside its scope, could the shared fixture expose enough structured output for #11810 to package that evidence without reimplementing the export boundary?

  2. self-assigned this
    on Sep 16, 2026
  3. kaofelix commented on Sep 16, 2026

    @kaofelix
    Collaborator

    Artifact boundary update from #11810 / #11813

    The direction from discussions so far is option 2, with producer/consumer decoupling: #11485 should define a stable, versioned, redacted export-evidence artifact that eligible v0 E2E scenarios can publish. This is a reusable producer contract, not a synchronous dependency between the v0 and v1 workflows.

    The minimum envelope should include:

    • contract version and scenario identity;
    • exact v0 CLI or release identity and source revision or artifact hash;
    • exact exported bytes plus SHA-256;
    • independently expected configuration semantics and verification results;
    • success, expected-refusal, or coverage-gap classification;
    • redaction and known-secret checks plus cleanup status;
    • bounded diagnostics for export, observation, verification, or cleanup failure.

    #11810 remains responsible for selecting and reviewing representative artifacts, retaining the exact consumed bytes, supplying explicit v1-only bindings, translating them, and producing v1 lifecycle/parity evidence. Its runner should not discover or consume a mutable “latest” artifact, and v1 qualification should not depend on a v0 workflow being available at execution time.

    A checked-in synthetic fixture may support deterministic development, but it is not qualification evidence. A qualification candidate should retain the artifact's exact producer identity and hash as required by #11810.

    This gives #11485 ownership of automatic export invocation and the reusable evidence envelope while keeping selection, translation, retention, and parity qualification with #11810.

    There is one written-record mismatch to reconcile in #11813: its latest description and validation guide make producer identity optional and say that no stable cross-pipeline artifact contract is required. That is reasonable for a synthetic development fixture, but a selected qualification artifact should retain the versioned envelope and exact producer identity above. The pipelines can remain operationally independent while sharing that artifact contract.

  4. cjagwani commented on Sep 16, 2026

    @cjagwani
    Collaborator

    Implementation plan: selected boundary and first delivery slice

    I completed the source audit at c9aa391164414878b390601d4306c3bfe7a0a90b.

    Decision

    Add a fixture-owned config-export validation phase and invoke it immediately after a scenario proves its expected state. Do not put this behavior in the generic host command wrapper and do not run it during teardown.

    That boundary is the smallest one with enough meaning:

    • Registry targets already follow environment → onboarding → optional lifecycle → state validation.
    • State validation is the point where the fixture has proved whether a usable sandbox exists; it is not merely checking that an onboarding command exited zero.
    • The generic host command wrapper can recognize a narrow managed-image receipt, but it does not own scenario intent, recovery state, or independent export expectations.
    • Teardown is too late because negative and lifecycle scenarios intentionally damage, stop, or destroy resources.

    The phase should own the candidate CLI invocation, private temporary directory, parsing, semantic comparison, known-secret scan, structured result, and cleanup. Scenario owners continue to own targeted negative checks such as identity drift and stopped-provider refusal.

    Explicit expectation model

    Extend existing scenario metadata with one required classification:

    • required: a usable supported sandbox must export successfully.
    • expected-refusal: the source is intentionally not representable yet; export must fail without publishing a file.
    • no-usable-sandbox: the scenario is expected to fail before a usable sandbox exists, so no successful-export claim is made.

    Missing metadata is a coverage-gap, not a silent skip. Registry/support validation should reject an eligible new target whose expectation is absent.

    The first registry mapping is intentionally small:

    Existing target Expectation Reason
    ubuntu-repo-cloud-openclaw required Supported managed OpenClaw baseline
    ubuntu-repo-docker-post-reboot-recovery required after recovery validation Distinct lifecycle state worth rechecking
    ubuntu-repo-cloud-langchain-deepagents-code expected-refusal Canonical Deep Agents export is separately scoped in #11860
    ubuntu-policy-custom-missing-presets-negative no-usable-sandbox Onboarding is expected to fail closed

    What “correct export” means

    Schema validity is necessary but insufficient. The shared phase compares the exported document with independent scenario/runtime facts for:

    • sandbox and agent identity;
    • immutable workload image;
    • inference provider, endpoint/API, model, and route;
    • effective network policy;
    • enabled scenario features and credential references;
    • absence of known fixture secret values and internal-only transports.

    Expected values must come from typed scenario metadata, the existing manifest, registry state, and independently observed SDK/CLI state—not from the exporter's own success report. Compare normalized semantics, not YAML formatting or key order.

    Repeat export only when it proves a distinct contract: stability without a state change, or correctness after an explicit recovery/rebuild transition. Do not add repeated exports to every scenario.

    Reusable evidence contract

    The producer should emit a versioned, redacted envelope, for example nemoclaw.config-export-evidence/v1, containing:

    • scenario/target ID and classification;
    • exact producer source revision plus CLI version and executable/artifact SHA-256;
    • exact validated export bytes and their SHA-256 for successful export;
    • independently expected semantics and per-field verification results;
    • export, observation, verification, redaction, and cleanup outcomes;
    • elapsed time and bounded redacted diagnostics.

    No passing envelope is published until secret scanning and owned cleanup succeed. Failed secret scanning must withhold export bytes. Consumers must pin an exact artifact/hash; there is no mutable latest contract and no synchronous dependency on a producer workflow.

    This settles the #11810 boundary: #11485 defines the reusable producer envelope. #11810 selects, reviews, retains, and translates exact candidates and owns all v1 parity/lifecycle evidence. A manually curated or synthetic fixture remains useful for development, but it is not real v0 qualification evidence without exact producer identity.

    First implementation slice

    1. Add the expectation and evidence-envelope types to E2E scenario metadata.
    2. Add one ConfigExportValidationPhaseFixture with private-file cleanup registered before command execution.
    3. Invoke it after stateValidation.from(...) in the registry target runner.
    4. Populate the four baseline expectations above.
    5. Reuse the existing OpenClaw semantic checks; keep the Brave, network-policy, Hermes, and Ollama scenario-specific refusal/stability checks with their current owners until migrated deliberately.
    6. Add support tests for required success, omitted enabled semantics, known-secret leakage, expected refusal with no file, no-usable-sandbox, absent expectation, cleanup failure, and redacted envelope publication.
    7. Use existing workflow ownership so export-source changes select the current network-policy and security-posture-hermes live owners; add no provisioning matrix or new GitHub job.

    Coverage map and remaining gaps

    Cost and validation

    No live runtime measurement was performed in this investigation. The first implementation must record elapsedMs in the envelope and surface it in the run plan before broader adoption. It adds one candidate export to the two supported registry states above and no new provisioning. Existing workflow-selection and Hermes export support tests identify the current owners; the focused Hermes export support file passed locally (63 tests). The broader workflow-plan file could not be evaluated from the detached worktree because its subprocess requires a worktree-local node_modules/vitest/vitest.mjs; that is an environment/setup limitation, not product evidence.

    This records the owner, boundary, producer/consumer contract, first implementation slice, dependencies, and known bypass paths. Keep this issue open until the source implementation and its focused validation are complete.

  5. added
    area: ci
    area: e2e
    on Oct 3, 2026
  6. added theissue type on Oct 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: ciarea: e2e

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions