Repository navigation
perf(tests): consolidate lifecycle coverage at faster integration boundaries - #13373
Merged
Merged
Conversation
Exercise completed destroy and preview through the public SDK with scripted OpenTofu. Assert retained storage, unchanged state, and no new plan or apply. Remove the dedicated Helm E2E and its unused event recorder; keep native recovery and retention scenarios. Mutation checks detected regressions in both completed-state guard paths. On ed72ab9, 15 focused SDK tests and formatting passed. Before that update, 1531 ordinary tests, 11 remaining native Helm cases, and workspace Clippy passed. Full CI was not rerun after the update.
Replace the bundled receipt scenario with an OpenTofu/provider contract that checks refusal, unchanged bindings and objects, and cleanup after restoration. Keep malformed-receipt variants in the SDK suite. Remove the release-record E2E already protected by SDK and provider integration tests, along with unused fixture support. Mutation probes detected unsafe cached-state fallback and premature issuer cleanup. Serialized receipt-case execution fell from 12.1-12.4s to 1.6-1.7s; parallel measurements did not establish a CI wall-time gain. Validation: 1541 ordinary tests, 9 remaining Helm E2Es, and 3 Kubernetes provider contracts passed, plus workspace Clippy with warnings denied, formatting, and whitespace checks. Full cargo ci --full remains pending before push.
Combine apply/reapply, export and credential-free teardown checks in one native deployment. Preserve probe, state, credential-reference, initialization-count and cleanup assertions while removing two repeated setup/teardown fixtures. Observed serialized execution fell from 42.2s across three cases to 22.9-28.3s for the combined case; this is not a full-CI wall-time measurement. Validation: all four native export tests and 1530 ordinary workspace tests passed, plus workspace Clippy with warnings denied, formatting and whitespace checks. Full cargo ci --full remains pending before push.
Add explicit missing-backend coverage to the read-only image matrix for both model types. Keep one native private-value rejection per backend through plan and apply, reducing pre-allocation CLI invocations from twelve to four. Preserve after-pull and bound-image teardown checks. A mutation accepting missing backend labels was detected. Frozen full-scenario ABBA measurements (two samples per variant and scenario) showed Pi mean 108.0s to 89.9s and Ollama 142.1s to 124.1s, with the reduction accounted for inside pre-allocation. This does not establish a full-CI parallel speedup. Validation: all measured native runs and 1530 ordinary tests passed, plus the image contract, after-pull cases, workspace Clippy with warnings denied, formatting and whitespace checks. Temporary timing instrumentation was removed and the pending patch restored exactly. Full cargo ci --full remains pending before push.
Keep one native JSON failure and cleanup scenario. Check safe diagnostic context and mutation facts in both output formats at the CLI rendering boundary, retaining native privacy and resource-state assertions. A controlled omission of the text diagnostic was detected by the fast test and restored. Isolated ABBA measurements showed the native case falling from a 12.239s mean to 6.000s, plus a roughly 15ms rendering check; no full-CI speedup is claimed. Validation: 28 CLI formatting/output-mode checks, 1531 ordinary workspace tests, and isolated neighboring native failure scenarios passed, plus workspace Clippy with warnings denied, formatting and whitespace checks. Full cargo ci --full remains pending before push.
Cover named lifecycle diagnostics in the Fabric producer and preserve them through SDK JSON capture with an unrelated credential. Remove the repeated inert-credential apply from the native CLI scenario while retaining short-secret withholding, code collisions, privacy, state preservation, and recovery. Matched full-scenario runs averaged 22.434s before and 19.035s after. The process check takes about 15ms. A blanket-withholding mutation was detected and restored. Validation: 1,532 ordinary tests, 27 focused checks, native scenarios, Clippy with warnings denied, formatting, and whitespace checks passed. The ordinary rerun disabled a broken compiler wrapper for that job only. Windows execution and cargo ci --full remain pending before push.
Cover removal, image changes, and policy changes through the public SDK over scripted OpenTofu. Preserve typed refusal, saved intent/state, and no-mutation assertions; keep the native combined sandbox/runtime refusal, export, and observation-failure checks. A save-rejected-intent mutation was detected. Matched full Pi lifecycle means fell from 72.946s to 62.461s; the SDK matrix takes 0.34-0.84s. No runtime code changed. Validation: 1,533 ordinary tests, focused SDK tests, native A/B scenarios, Clippy with warnings denied, formatting and whitespace checks passed. Full cargo ci --full remains required before push.
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
Preserve consolidated lifecycle cases while adopting Fabric control diagnostics, sandbox replacement on agent changes, the additional configuration teardown target, and unlabeled policy grants. Keep short-secret and diagnostic-code collision coverage using start_failed.
Fabric no longer supplies the agent readiness data source. Stop fabricating that observation in the scripted initial apply; keep the successful public apply, generation-bound state, refusal matrix, preservation checks and permitted-edit control. The stale fixture failed plan validation after merging v1. The updated public SDK admission test passes.
kaofelix
marked this pull request as ready for review
October 18, 2026 13:28
Preserve the consolidated credentialed lifecycle instead of restoring its retired E2E fixtures. Carry upstream workspace deletion into its destroy preview and cleanup assertions, while retaining the newer configuration, Kubernetes and authentication coverage from v1.
Collaborator
|
Merged current Sorry for the noise: this was briefly closed by mistake while I tried to recreate it on another branch, before I noticed this branch is in the main repository and could be updated directly. |
cv
enabled auto-merge (squash)
October 18, 2026 14:39
gaveezy
added a commit
that referenced
this pull request
Oct 19, 2026
Bring the branch up to date with 108 v1 commits, including the provider reorganization (#13131), the key-authenticated HTTP API integration (#13403), and the web search sandbox variable (#13401). Resolutions: - config/integrations.rs: keep v1's API integration and web search sandboxEnv. The API key, the web search key, and the resolved web search key are SecretRef, because each holds the credential itself. - config/validation.rs: validate the API integration key as a SecretRef; the credential() helper it called no longer exists. - config/schema/validation.rs: keep v1's sandboxEnv rule for webSearch variants beside the SecretRef and FileRef env rules. - kubernetes/mod.rs: keep v1's boxed ManagedKubernetes; its kubeconfig is a FileRef. - nemoclaw-e2e deployment.rs: take v1's removal of the two inference credential tests. #13373 folded them into the export_observations.rs test, which now builds its reference as a SecretRef. - config_kubernetes.rs: keep the new tests from both sides, and add the API integration key to the reference-kind test as a secret. - Regenerate the JSON Schema and the configuration reference. No other v1 field used Credential; the Fabric model provider and driver configuration changes add none. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Why
Several bundle/system scenarios repeated SDK rules, diagnostic variants, or
setup already covered by smaller integration tests. Those repetitions launched
the CLI, OpenTofu and providers even when the additional inputs did not exercise
a different integration mechanism.
This PR changes test placement and fixture reuse, not runtime behavior. It does
not replace the suite with mocks or remove the native recovery cases.
Approach
Workflow:
subprocess JSON capture, CLI rendering, or OpenTofu/provider contracts.
restore production code.
Where timings varied, use one compiled test set and alternating A/B runs.
Coverage helped select candidates; overlapping execution was not treated as
proof that assertions were redundant.
Cases
Distinct sandbox-startup reasons, native deposed-resource cleanup, Helm binding
restoration and after-pull ordering checks remain.
Sensitivity probes detected skipped completed-state guards, cached-state
success after receipt loss, accepting missing backend labels, omitted text
diagnostics, excessive diagnostic withholding and saving rejected intent.
All temporary production mutations and benchmark instrumentation were removed.
Local measurements
These are local scenario measurements, excluding compilation. They are not
additive estimates of total PR or parallel CI savings.
For the image-label change, an earlier uncontrolled full run was slower despite
a faster isolated benchmark. We did not dismiss that as noise: we froze the
revision/bundle, timed phases inside the full runs, discarded warm-ups and
ran ABBA comparisons. The measured full-scenario reduction then reconciled with
the precheck reduction; the remaining work was essentially unchanged. The
exact cause of the earlier uncontrolled result is unknown.
Replacement SDK/process/render checks run in milliseconds to under a second in
isolation. Measurements used a busy two-CPU Linux host and small samples;
The CI comparison below measures the updated branch against its matching base.
Validation
cargo ci --fullpassed on1be97a44e9: formatting, Clippy,workspace build, 1,544 ordinary tests, doctests, generated schema checks,
a fresh bundle build, and 145 contract/system lifecycle tests.
passed on Linux AMD64/ARM64, macOS ARM64, and Windows AMD64. The Linux
Docker and kind live suites also passed.
checks passed during the individual optimizations. Temporary production
mutations and benchmark instrumentation were removed.
coordinated-change coverage remain.
a stale user-level sccache shim broke nested Cargo metadata commands.
No global compiler configuration was changed.
CI results and scope
Compared v1 at
7499ec2e40with this PR at1be97a44e9. The PR run records that exact base revision. All platform checks and the Linux live suites passed.Wall time is the slowest lifecycle partition from JUnit, excluding compilation and job setup. Summed time adds testcase durations across partitions; it is not CPU time or elapsed CI time.
These are observations from one matched pair, not an isolated estimate of the PR's speedup. An earlier comparison against an older base had mixed platform results. Timings also moved outside the changed scenarios. Linux AMD64 is particularly inconclusive: its summed lifecycle time was flat and ordinary-test wall time rose from 31.2s to 38.8s.
The Rust workflow finished in 11m18s versus 12m20s. Bundle-build duration also changed substantially, so we do not attribute the full 62-second reduction to these test changes.
How much of the suite did this target?
On Linux and macOS, the work touches 10 original bundle E2E scenarios out of 55, representing approximately 19–20% of that binary's baseline summed test time, or 17–18% of all lifecycle test time. On Windows, it touches 7 of 43 E2E scenarios, representing 19% of E2E time and 16% of lifecycle time; the three Helm cases were Unix-only.
This measures the containing scenarios, including work we retained. It is not a code-coverage percentage, nor does it mean all that time was removable. Separate live Docker/kind jobs and build time are outside this footprint.
Moving coverage down versus consolidating E2E setup
Total E2E entries become 55 → 50 on Unix and 43 → 41 on Windows. Thus, five fewer Unix E2E entries does not mean five scenarios moved to lower-level tests: three were retired that way, and two disappeared through fixture consolidation.
Entry counts also understate the variant reductions: image-label CLI checks fall from 12 to 4 across the two backends, sandbox-refusal CLI checks from 8 to 2, inert-credential failed applies from 3 to 2, and the Pi output-format test uses one deployment instead of two.
The narrower tests do not establish all provider/host behavior. Native coordinated-change refusal, mutation ordering, diagnostic production, privacy, state preservation, recovery, and cleanup checks remain where those boundaries matter. About 80% of baseline E2E testcase time lies outside the selected scenarios, but that is remaining work to examine—not an estimate of recoverable savings.
What limits overall PR latency?
E2E count and total PR latency are different measures. In this run,
Docs Validate
was the last required check: its job took 12m07s and finished about
51 seconds after the Rust workflow. The later PR preview was not required.
Docs validation spent 4m11s in tool setup, then 7m25s compiling the Rust
documentation tool before about 24s running the checks. Its dedicated
Rust dependency cache reported a miss. The matched base had a similar 12m10s
validation job, so this was not introduced by the E2E changes.
Within Rust CI, the observed critical path ran through the
Windows bundle job
(7m31s) and its slowest lifecycle job (2m38s, including setup and artifact
handling). The bundle job included 4m58s of release compilation and about
49s of additional dev-profile compilation, despite a release dependency-cache
hit. Build/test and bundle jobs run in parallel; their durations cannot be added.
With Docs unchanged, making only the bundle E2Es faster would not have advanced
the last required check in this run. Docs tool/cache reuse and Windows release
code generation are therefore stronger next investigations for merge-ready
latency. Linux live-suite preparation is another nearby parallel path.
Lifecycle jobs still account for about 25% of summed Rust runner-job time.
Reducing their work can improve runner usage and test maintenance even when
another job limits latency. No cache, build-profile, or workflow changes are
included in this PR.