Skip to content

test(e2e): own image pin and gateway port changes in SDK compile tests - #14142

Merged
cv merged 2 commits into
v1from
test/14060-document-change-checks
Nov 4, 2026
Merged

cv merged 2 commits into
v1from
test/14060-document-change-checks

Conversation

@sandl99

@sandl99 sandl99 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Failure

Two checks in the live suites test what changing one document field reaches, which needs no real Docker or GPU: changing only a model service's image pin (spark.rs, run by hand on a GB10 host) and changing only the managed gateway's listen port (a section of managed_gateway.rs). They are the first two items of the follow-up list on #14060. tofu test can't change a scenario's document between runs, so they don't fit HCL integration scenarios.

Part of #14060 and #14061.

Decision

Add runtime_compile::an_image_pin_or_gateway_port_change_reaches_only_replaceable_processes to the SDK tests. It compiles fixtures/config/spark.yaml with one field changed and compares the managed resources that differ:

  • Image pin: only the service's docker_container and its old and new docker_image.
  • Gateway listen port: only docker_container.managed_gateway_runtime.

Retained storage compiles identically in both, so OpenTofu keeps it. Replacing the container is the Docker provider's behavior; the SDK still rejects retargeting an established deployment's public endpoint.

Removed:

  • tests/e2e/rust/spark.rs and its module, and its section in live-tests.md.
  • The port change in managed_gateway.rs, with its sentence in live-tests.md. The rest of that test stays: read-only planning, unchanged apply, process recovery, the encryption key, and re-apply after destroy.

Validation

  • cargo ci test on darwin_arm64: 1756 tests passed, including the new one.
  • Clippy for nemoclaw-sdk and nemoclaw-e2e passed.

Changing only a model's image pin, or only the managed gateway's listen port, reaches only the process that uses it and the image it acquires; retained storage compiles identically. A runtime_compile test now owns that, so the live Spark image-change test and the port change in the managed gateway test are removed.

Refs #14060, #14061

Signed-off-by: San Dang <[email protected]>
@sandl99

sandl99 commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator Author
Authoring session — opening
Field Status Value Evidence or limit
Harness partial Pi coding agent 1.2.0 The session record names the Pi session format; the version comes from the active install path, not the record
Skills recorded nemoclaw-contributor-create-pr, v1 copy (complete read) Skill reads to cutoff; other skills were listed only
Instruction files recorded AGENTS.md of main (injected); AGENTS.md of v1 (complete read); WRITING.md (complete read); .github/PULL_REQUEST_TEMPLATE.md (complete read); .github/SESSION_REPORT_TEMPLATE.md (complete read) Startup injection and reads to cutoff
Tool calls partial typescript: 528 Wrapper calls, including failed calls, to cutoff; nested shell, file, and HTTP calls inside the wrapper are not counted
Session window recorded 2026-11-02T05:58Z to 2026-11-03T11:10Z; 29 h 11 min First event to cutoff before publication, including idle time; the session also authored #14063 and #14121
Compactions recorded 0 Complete record to cutoff; context elisions are not compactions
Models recorded claude-opus-5-5 Model change event and assistant turns; no changes
Reasoning levels recorded medium; high Thinking-level changes, in order

@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

…nge-checks

Signed-off-by: San Dang <[email protected]>

# Conflicts:
#	crates/nemoclaw-e2e/tests/e2e/main.rs
@wscurran wscurran added area: docs Documentation, examples, guides, or docs build area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images labels Nov 3, 2026
@cv
cv merged commit 4b71f5c into v1 Nov 4, 2026
54 checks passed
@cv
cv deleted the test/14060-document-change-checks branch November 4, 2026 00:49
sandl99 added a commit that referenced this pull request Nov 4, 2026
…14172)

## Failure

No skill says which layer a new test belongs in.
`test-driven-development` covers writing a failing test first, and
`test-desiderata-review` audits existing tests, but neither tells an
agent to choose between unit, contract, integration, and live E2E tests,
to prefer `tofu test` scenarios over Rust tests, or to check for
coverage another layer already owns. The #14060 migration repeatedly
removed tests that a lower layer already covered, and live tests that
injected failures a fixture could simulate.

## Decision

Add a `write-tests` skill. It has the agent:

1. Name the behavior and the component that owns it; the owner picks the
layer.
2. Search every layer for existing coverage, cite it instead of adding a
test, and remove a higher-layer check that a change makes redundant.
3. Choose unit, contract, integration, or live E2E, and keep live E2E
tests to successful paths that need a real engine, cluster, image,
model, or host.
4. Prefer a `tofu test` scenario at each layer, and use Rust only for
what `tofu test` cannot express: expected provider errors, SDK and CLI
behavior, saved plans, interrupts, cancellation, state edits, a mid-test
destroy, or a changed document on the same deployment.
5. Assert a few semantic outcomes, check unchanged reconciliation
directly, and show that each new assertion can fail.

`references/tofu-test.md` records the harness and the OpenTofu 1.12
limits found during #14060: run references only in variables, per-module
run outputs, cleanup reusing the last applying run's variables,
plan-time data reads, tuples versus lists, and `expect_failures`.

`test-driven-development`, `AGENTS.md`, and the "Write Tests" section of
`docs/contributing/testing.md` point to the skill; `testing.md` gains a
short list of the layers. It also drops a reference to the Spark live
test that #14142 deleted.

Part of #14060.

## Validation

- Checked each path, directory, and variable the skill names against the
checkout: the contract `hcl/` and `failures/` directories of each
provider, `tests/integration/hcl` and `rust/`, `tests/e2e/hcl` and
`rust/`, the harness's `permit_destroy` and `baseline`, and the contract
modules' `destroying`.
- `cargo run -p nemoclaw-build -- fern check`: 0 errors.
- Commit hooks passed.

Signed-off-by: San Dang <[email protected]>
@cv cv added this to the Roadmap: GTC DC 2026 milestone Nov 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Documentation, examples, guides, or docs build area: e2e End-to-end tests, nightly failures, or validation infrastructure chore Build, CI, dependency, or tooling maintenance platform: container Affects Docker, containerd, Podman, or images v1 NemoClaw v1 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants