Repository navigation
test(e2e): own image pin and gateway port changes in SDK compile tests - #14142
Merged
Merged
Conversation
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]>
Collaborator
Author
Authoring session — opening
|
Contributor
This was referenced Nov 3, 2026
…nge-checks Signed-off-by: San Dang <[email protected]> # Conflicts: # crates/nemoclaw-e2e/tests/e2e/main.rs
This was referenced Nov 4, 2026
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]>
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ofmanaged_gateway.rs). They are the first two items of the follow-up list on #14060.tofu testcan'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_processesto the SDK tests. It compilesfixtures/config/spark.yamlwith one field changed and compares the managed resources that differ:docker_containerand its old and newdocker_image.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.rsand its module, and its section inlive-tests.md.managed_gateway.rs, with its sentence inlive-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 teston darwin_arm64: 1756 tests passed, including the new one.nemoclaw-sdkandnemoclaw-e2epassed.