Repository navigation
perf(onboarding): resolve an unchanged journey once - #12901
Merged
Merged
Conversation
The onboarding wizard re-resolved its journey for the next question, each step, the review document, and every view redraw. A resolution validates the partial document against the SDK schema and parses it, so the slowest example journey resolved 196 times across 36 answers. JourneyWizard now keeps its last resolution until an answer, undo, delegation, or observation changes the state it resolves. The state and observations become private so every change goes through a method that clears the kept resolution; the view and terminal read them through accessors. Part of #12882.
cv
added a commit
that referenced
this pull request
Oct 9, 2026
Part of #12876. ## Failure Tests overlapped across layers, and nothing measured or limited how long they ran. On `v1` before this PR: - On `linux_amd64` the `test` step took 78 s wall for 620 s of tests. - The lifecycle step took 744 s wall for 2,948 s of tests. - Three end-to-end modules accounted for 82% of the lifecycle time. - Many end-to-end tests repeated full deployments to cover variants that the SDK already proves equivalent. ## Decision Make test time visible first. Then move each group of tests to the layer that owns its behavior, keeping one end-to-end check per behavior. - **Timing report (#12877):** after the test, lifecycle, and live steps, `cargo ci` prints where the time went: wall and summed time, time per binary and module, and the slowest tests. It also writes the report to the GitHub job summary. Each lifecycle partition reports its own tests. The report reads nextest's JUnit output with `quick-junit`, and the `test` step's JUnit report is now uploaded. - **`deployment`:** - Each configuration variant deploys once: `web_search`, `execution_settings`, `tool_disclosure`, and `provider_definitions` ran 15 lifecycles and now run 6. - `cli_redaction` checks each redaction rule once through the CLI. - The SDK tests that own each dropped variant are named in the commits. - **`remote_service`:** - The Hermes lifecycle without authentication repeated the OpenClaw one, so it is removed. - Pi stops after admission and refused sandbox changes. - Refused changes export once instead of eight times. - **`opentofu_openshell`:** the reference graph surfaces each gateway capability failure kind once through OpenTofu, in 14 runs instead of 23. `nemoclaw-openshell` observation tests own the reasons. - **`fabric_deployment`:** every harness applies, reapplies, exports, and destroys. Only OpenClaw and Pi also run the harness-independent model change and refusals. - **`inference_discovery`:** each catalog response is planned once. `nemoclaw-discovery` owns the classification. - **Optimized dependencies:** dependencies build at `opt-level` 2 in development and test builds, and workspace crates stay unoptimized. Unoptimized JSON Schema validation dominated the onboarding journeys. - **Onboarding wizard (#12901, merged into this branch):** the wizard resolves an unchanged journey once. ## Validation Measured in CI run [37916518035](https://github.com/NVIDIA/NemoClaw/actions/runs/37916518035), with cold dependency caches: | linux_amd64 | Before | After | |---|---|---| | `test` step | 78 s wall, 620 s summed | 24 s wall, 189 s summed | | Lifecycle, summed | 2,948 s | 1,898 s | | Lifecycle shards, wall | 744 s unsharded | 309 s and 262 s | | `deployment` | 1,331 s | 922 s | | `remote_service` | 697 s | 433 s | | `fabric_deployment` | 379 s | 164 s | | `opentofu_openshell` | 230 s | 155 s | `linux_arm64` follows the same pattern: the `test` step went from 44 s to 19 s wall, and lifecycle from 2,642 s to 1,845 s summed. - **Cost:** optimizing dependencies lengthens a cold build. "Build test executables" took 315 s instead of 118–155 s on the previous cold run. Only `v1` pushes save the dependency cache, and `.cargo/config.toml` is part of its key, so pull request runs build cold until this merges. - **Local checks for each commit:** each changed test passes against a rebuilt bundle. Workspace clippy at `-D warnings` and fmt are clean. A new `nemoclaw-build` test covers the timing report. ## Follow-ups - #12894 hashes an unchanged bundle once per deployment. - `deployment` is still 922 s summed across about 31 distinct failure and recovery scenarios. The remaining cost is each OpenTofu operation, which a follow-up will address. - Enforcing the per-layer budgets remains in #12877.
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.
Stacked on #12885. Part of #12882.
Failure
The onboarding wizard resolved its journey again for each of these: the next question, each step, the review document, and every view redraw. A resolution validates the partial document against the SDK schema and parses it. Instrumenting the slowest example journey,
spark_spark_inline, showed 196 resolutions across 36 answers, about 8 ms each in a debug build. This made the TUI journey tests the largest cost in the deterministic test step: 168 s summed onlinux_amd64. Every redraw of the running TUI paid the same cost.Decision
JourneyWizardkeeps its last resolution, including a failed one, and reuses it until the state or observations change.stateandobservationsare private. Every change goes throughsubmit,delegate,back, orremember, which clear the kept resolution. The view and terminal read them through accessors. Tests record observations through a test-onlyrecordmethod that also clears it.JourneyState::answerstill resolves internally. That code is innemoclaw-authoringand unchanged here.Validation
spark_spark_inlinetakes 0.74 s locally instead of 1.06 s. Thenemoclaw-onboardinglibrary tests take 0.92 s instead of 1.28 s.-D warningsand fmt are clean.