test(e2e): preserve first-turn latency subdurations - #7597
Conversation
Signed-off-by: Ho Lim <subhoya@gmail.com>
📝 WalkthroughWalkthroughCold onboard performance evaluation now classifies an isolated first-turn latency overage as a structured non-blocking anomaly, while combined budget failures remain blocking. E2E evidence includes hosted model metadata and anomaly details, with nightly scorecard recurrence analysis and runtime-history integration. ChangesCold onboard latency classification
First-turn recurrence
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant fullE2ETest
participant evaluateColdOnboardPerformance
participant onboardProgressBudget
participant scorecardWorkflow
participant runtimeHistory
fullE2ETest->>evaluateColdOnboardPerformance: evaluate cold onboard trace
evaluateColdOnboardPerformance-->>fullE2ETest: return performance and anomalies
fullE2ETest->>onboardProgressBudget: write cohort and anomaly evidence
scorecardWorkflow->>onboardProgressBudget: read current latency sample
scorecardWorkflow->>runtimeHistory: provide current first-turn latency
runtimeHistory-->>scorecardWorkflow: append recurrence result and runtime history
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
PR Review Advisor — No blocking findings reportedAdvisor assessment: No blocking advisor findings reported Model lanes
Nemotron output stays in workflow artifacts and does not change the assessment above. E2E guidanceAdvisory only. E2E / PR Gate selects and runs jobs independently. Recommended E2E: 1 warning · 0 suggestionsWarningsWarnings do not block.
|
prekshivyas
left a comment
There was a problem hiding this comment.
The accepted #6660 contract is not complete on PR SHA 935debd28.
test/e2e/fixtures/onboard-performance.tsmakes every soleroot-end-to-first-turnoverage non-blocking. No checked-in consumer readsperformance.anomalies, so repeated same-model and same-mode anomalies can never become blocking. A maintainer must define the minimum sample size, bounded sample retention, and corroboration rule before implementation. I will not choose those policy values by assumption.test/e2e/live/full-e2e.test.tsrecords onlyfirstTurnCommandMs. Run 30207389748 proves the OpenClaw result containsresult.meta.durationMs: 8916, butonboard-progress-budget.jsonomits it. Record the internal-agent duration with an explicit unavailable state for malformed or absent metadata, and test the artifact shape.
The focused E2E-support suite passes 28 tests, npm run build:cli passes, and npm run check:diff passes. Those results do not satisfy the missing recurrence contract.
…t-turn-anomaly Signed-off-by: Ho Lim <subhoya@gmail.com>
Signed-off-by: Ho Lim <subhoya@gmail.com>
|
@prekshivyas Your
I do not have permission to use GitHub’s formal re-request-review action on this repository. Could you re-review the current head when available? |
|
Maintainer follow-up on exact head One PR-template gate is still incomplete: the Documentation Writer Review section says I will re-check the receipt and the currently running exact-head CI/E2E before approval. |
|
Correction to my earlier review comment at exact head |
|
Exact-head follow-up on The accepted collaborator scope on #6660 also requires statistical enforcement for a recurring same-model/same-mode cohort with a documented minimum sample size and corroboration rule. Completing that requires a maintainer decision about the canonical history source, cohort dimensions, minimum sample size, threshold, and retention/availability behavior; I will not invent those product/validation semantics in a salvage commit. Please record that decision or an explicit landing-order waiver/follow-up before approval. The nine newest fork workflow runs were approved after the head stayed unchanged for more than one hour, and CI is now running. This is a plain review comment, not a Changes Requested review; I will continue babysitting this exact head. |
|
Exact-head E2E follow-up on This exact head therefore also needs the credential-safe fork-skip controller path to land and a fresh PR revision/CI cycle, or another maintainer-approved safe gate resolution. The current coordination check is 90951620394, sourced from controller run 30571740481. This is a plain review comment, not a Changes Requested review; I will keep monitoring the PR. |
prekshivyas
left a comment
There was a problem hiding this comment.
I need one behavior decision before pushing. #6660 defines neither the recurrence threshold nor a trusted history source, and existing v2 artifacts lack cohort identity.
Should I narrow #7597 to preserve v3 evidence while keeping the 14-second overage blocking, or implement a broader trusted history gate where the second anomaly among 12 eligible same-cohort samples blocks?
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
There was a problem hiding this comment.
🧹 Nitpick comments (2)
scripts/scorecard/analyze-first-turn-latency.mts (1)
163-214: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick winNull-safety here depends on condition ordering, not an explicit guard.
artifactcan benull(fromasRecord(readCurrentArtifact(root))), and only the first||condition usesartifact?.schemaVersion; every subsequent condition (artifact.installExitCode, etc.) accessesartifactwithout optional chaining. This is safe today only because the first condition is guaranteed true whenartifactisnull, short-circuiting the||chain. A future reorder of these conditions would reintroduce a crash, and this function is called unguarded at the top level of the scorecard script, so an uncaught throw here would fail the entire nightly scorecard step beforebuildRuntimeHistory's own try/catch even runs.🛡️ Add an explicit early return
export function readCurrentFirstTurnLatencySample(root: string): FirstTurnLatencySample | null { const artifact = asRecord(readCurrentArtifact(root)); + if (!artifact) return null; const performance = asRecord(artifact?.performance); const phaseMeasurements = asRecord(artifact?.phaseMeasurements); const budget = asRecord(artifact?.budget); const cohort = normalizeCohort(artifact?.firstTurnCohort); if ( - artifact?.schemaVersion !== FIRST_TURN_ARTIFACT_SCHEMA || + artifact.schemaVersion !== FIRST_TURN_ARTIFACT_SCHEMA || artifact.installExitCode !== 0 ||🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/scorecard/analyze-first-turn-latency.mts` around lines 163 - 214, Update readCurrentFirstTurnLatencySample to explicitly return null immediately when artifact is not a record, before evaluating artifact.installExitCode and the remaining validation conditions. Keep the existing validation behavior unchanged for valid artifacts and avoid relying on condition ordering for null safety.scripts/scorecard/analyze-runtime-history.mts (1)
451-455: 📐 Maintainability & Code Quality | 🔵 TrivialHardcoded "10" duplicates the new
RUNTIME_TREND_LIMITconstant.The trend header text still says
"up to 10 prior completed scheduled runs"as a literal, while the actual slice now usesRUNTIME_TREND_LIMIT. They agree today, but will silently drift if the constant changes.♻️ Interpolate the constant
- "Current timing compared with up to 10 prior completed scheduled runs; manual runs are excluded from history.", + `Current timing compared with up to ${RUNTIME_TREND_LIMIT} prior completed scheduled runs; manual runs are excluded from history.`,🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/scorecard/analyze-runtime-history.mts` around lines 451 - 455, Update the trend header construction in the lines array to interpolate the existing RUNTIME_TREND_LIMIT constant instead of hardcoding “10,” keeping the displayed wording aligned with the limit used by the history slice.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@scripts/scorecard/analyze-first-turn-latency.mts`:
- Around line 163-214: Update readCurrentFirstTurnLatencySample to explicitly
return null immediately when artifact is not a record, before evaluating
artifact.installExitCode and the remaining validation conditions. Keep the
existing validation behavior unchanged for valid artifacts and avoid relying on
condition ordering for null safety.
In `@scripts/scorecard/analyze-runtime-history.mts`:
- Around line 451-455: Update the trend header construction in the lines array
to interpolate the existing RUNTIME_TREND_LIMIT constant instead of hardcoding
“10,” keeping the displayed wording aligned with the limit used by the history
slice.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 0b04cf7a-51ff-4d11-a891-52818f653d26
📒 Files selected for processing (3)
.github/workflows/e2e.yamlscripts/scorecard/analyze-first-turn-latency.mtsscripts/scorecard/analyze-runtime-history.mts
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
Signed-off-by: Prekshi Vyas <prekshiv@nvidia.com>
prekshivyas
left a comment
There was a problem hiding this comment.
Approved at exact PR SHA 156e8e86b7b101bf6773976f46a43edbea031cb1 against recorded base 73786425f6d5d6b3c3189e01dea9c1057fccac7f. The recurrence contract, retained cohort history, internal-agent duration evidence, and no-follow artifact reads address the prior requested changes. Exact-head CI, JavaScript/TypeScript CodeQL, both automated advisor lanes, documentation writer receipt, and the first-attempt trusted fork E2E plan (cloud-inference, cloud-onboard, security-posture, and full-e2e) all passed.
<!-- markdownlint-disable MD041 --> ## Summary Adds the canonical July 30 release entry for `v0.0.99` before the release tag is captured. The entry covers all 37 merged PRs since `v0.0.98` and bounds experimental or dormant work without presenting it as supported behavior. ## Changes - Adds `docs/changelog/2026-07-30.mdx` with the exact `## v0.0.99` heading, parser-safe MDX SPDX comment, summary, detailed release bullets, and published documentation routes. - Records user-visible recovery, snapshot, shared-route, Hermes, readiness, inference, image, documentation, and release E2E changes. - States that the managed-image selection and startup-profile contracts remain dormant and do not activate buildless onboarding. Source summary: - [#7972](#7972) -> `docs/changelog/2026-07-30.mdx`: Records restored managed OpenClaw configuration modes during recovery. - [#7834](#7834) -> `docs/changelog/2026-07-30.mdx`: Records clone-bound pairing verification after snapshot restore. - [#7975](#7975) -> `docs/changelog/2026-07-30.mdx`: Records managed startup recovery coverage. - [#7960](#7960) -> `docs/changelog/2026-07-30.mdx`: Records dormant startup-profile coordination without activating a supported surface. - [#7856](#7856) -> `docs/changelog/2026-07-30.mdx`: Records persistence of the credential-free OpenClaw startup command. - [#7959](#7959) -> `docs/changelog/2026-07-30.mdx`: Records dormant startup-profile construction without changing onboarding. - [#7946](#7946) -> `docs/changelog/2026-07-30.mdx`: Records the internal startup-profile schema and transport contract. - [#7951](#7951) -> `docs/changelog/2026-07-30.mdx`: Records platform-pull cleanup before managed-image validation. - [#7949](#7949) -> `docs/changelog/2026-07-30.mdx`: Records rejection of retained Hermes `uv` build cache metadata. - [#7597](#7597) -> `docs/changelog/2026-07-30.mdx`: Records separate command and agent first-turn latency evidence. - [#7931](#7931) -> `docs/changelog/2026-07-30.mdx`: Records focused E2E replacement evidence for retired selectors. - [#7950](#7950) -> `docs/changelog/2026-07-30.mdx`: Records exclusion of build-only BuildKit telemetry from the Deep Agents Code probe. - [#7665](#7665) -> `docs/changelog/2026-07-30.mdx`: Records consolidated priority 2 E2E coverage. - [#7911](#7911) -> `docs/changelog/2026-07-30.mdx`: Records the corrected NVIDIA DORI installation pin. - [#7934](#7934) -> `docs/changelog/2026-07-30.mdx`: Records the staging image-family wait before Brev Launchable deployment. - [#7772](#7772) -> `docs/changelog/2026-07-30.mdx`: Records dormant managed-image selection contracts without activating buildless onboarding. - [#7941](#7941) -> `docs/changelog/2026-07-30.mdx`: Records corrected agent-specific provider and policy guidance. - [#7819](#7819) -> `docs/changelog/2026-07-30.mdx`: Records removal of empty Deep Agents Code provider-switch sections. - [#7932](#7932) -> `docs/changelog/2026-07-30.mdx`: Records independent credential-generation E2E execution. - [#7840](#7840) -> `docs/changelog/2026-07-30.mdx`: Records shared-route preservation and pre-delete peer validation during upgrades. - [#7874](#7874) -> `docs/changelog/2026-07-30.mdx`: Records the split between pre-tag release entries and post-tag Announcements. - [#7876](#7876) -> `docs/changelog/2026-07-30.mdx`: Records the writable Hermes runtime root within lockdown. - [#7756](#7756) -> `docs/changelog/2026-07-30.mdx`: Records validated multi-platform managed-image publication. - [#7914](#7914) -> `docs/changelog/2026-07-30.mdx`: Records accepted `uv` version metadata in Hermes image validation. - [#7686](#7686) -> `docs/changelog/2026-07-30.mdx`: Records the explicitly experimental Microsoft Entra runtime identity reference. - [#7869](#7869) -> `docs/changelog/2026-07-30.mdx`: Records classified gateway relaunch quarantine and rebuild guidance. - [#7814](#7814) -> `docs/changelog/2026-07-30.mdx`: Records state restore into replacement sandboxes and SQLite write verification. - [#7839](#7839) -> `docs/changelog/2026-07-30.mdx`: Records quieter onboarding test execution without a user-facing behavior claim. - [#7854](#7854) -> `docs/changelog/2026-07-30.mdx`: Records generalized agent-selection guidance. - [#7845](#7845) -> `docs/changelog/2026-07-30.mdx`: Records isolated CDI test evidence without a user-facing behavior claim. - [#7843](#7843) -> `docs/changelog/2026-07-30.mdx`: Records the corrected Omni sub-agent model ID. - [#7908](#7908) -> `docs/changelog/2026-07-30.mdx`: Records reviewed Hermes and Deep Agents Code dependency pins. - [#7887](#7887) -> `docs/changelog/2026-07-30.mdx`: Records rejection of a symlinked DGX Station release marker. - [#7747](#7747) -> `docs/changelog/2026-07-30.mdx`: Records the internal compute-driver separation without a user-facing behavior claim. - [#7660](#7660) -> `docs/changelog/2026-07-30.mdx`: Records atomic publication of rebuild recovery manifests. - [#7661](#7661) -> `docs/changelog/2026-07-30.mdx`: Records bounded local inference health-response retention. - [#7654](#7654) -> `docs/changelog/2026-07-30.mdx`: Records state preservation across supervisor relaunch recovery. ## Type of Change - [ ] Code change (feature, bug fix, or refactor) - [ ] Code change with doc updates - [x] Doc only (prose changes, no code sample modifications) - [ ] Doc only (includes code sample changes) ## Quality Gates - [ ] Tests added or updated for changed behavior - [x] Existing tests cover changed behavior — justification: `test/changelog-docs.test.ts` validates the dated changelog contract, SPDX comment, version heading, and published routes. - [ ] Tests not applicable — justification: - [x] Docs updated for user-facing behavior changes - [ ] Docs not applicable — justification: - [ ] Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging) - [ ] Sensitive-path review completed or maintainer-approved waiver recorded — reviewer/approval link/justification: - [ ] Non-success, skipped, or missing CI check accepted by maintainer — check name, approval link, and follow-up issue: ## Documentation Writer Review - [x] Documentation writer subagent reviewed the completed changes - Result: `docs-updated` - Evidence: `docs/changelog/2026-07-30.mdx`; the documentation-only diff passed review against `WRITING.md`, the controlled word list, and `docs/CONTRIBUTING.md`. The review covered terminology, structure, active voice, release meaning, product-scope boundaries, and link and code presentation. Changelog tests passed 6/6, and the docs build reported 0 errors with 2 pre-existing warnings. - Agent: Codex CLI <!-- docs-review-head-sha: 200940f --> <!-- docs-review-agents-blob-sha: c052d60 --> ## DGX Station Hardware Evidence - [ ] Tested on DGX Station - Tested commit: - Station profile/scenario: - Result: - Supporting evidence: ## Verification - [x] PR description includes a `Signed-off-by:` line and every commit appears as `Verified` in GitHub - [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or `npm run validate:pr` passed after refreshing `origin/main` when hooks were skipped or unavailable - [x] Targeted behavior tests pass for the current change set, or tests are marked not applicable above — command/result or justification: `npx vitest run test/changelog-docs.test.ts` passed 6/6 tests. - [ ] Applicable broad gate passed — `npm test` for broad runtime/test-harness changes; `npm run check` for repo-wide validation/coverage changes — command/result: Not applicable to this documentation-only release entry. - [x] Quality Gates section completed with required justifications or waivers - [x] No secrets, API keys, or credentials committed - [ ] `npm run docs` builds without warnings (doc changes only) — result: Build passed with 0 errors and 2 pre-existing warnings. - [x] Doc pages follow the [style guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md) (doc changes only) - [ ] New doc pages include SPDX header and frontmatter (new pages only) --- Signed-off-by: San Dang <sdang@nvidia.com> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Added release notes for v0.0.99 covering snapshot restoration, sandbox recovery, gateway route upgrades, and Hermes security updates. * Documented experimental Microsoft Entra runtime identity support and enhanced readiness checks. * Added details on managed image validation, trusted CI image promotion, and end-to-end release evidence. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
Summary
Preserve command wall-clock latency and OpenClaw internal agent duration in cold-onboard evidence. Treat only a sole successful-turn root-end-to-first-turn overage as a non-blocking first observation. Enforce recurrence when the current anomaly is corroborated in a full 12-sample exact-cohort window from trusted scheduled
mainruns.Related Issue
Related to #6660.
Changes
firstTurnCommandMsand taggedfirstTurnAgentDurationevidence to the v3 cold-performance artifacte2e-runtime-summaryartifactmain, including the credential-safe fork E2E controller remediationType of Change
Quality Gates
Documentation Writer Review
docs-updatedtest/e2e/README.mddocuments the trusted scheduled history source, exact cohort, 12-sample window, corroboration rule, eligibility boundary, and 14-day artifact retention. Nodocs/page is needed because this changes internal E2E evidence and scorecard policy.Review Resolution
Current head
156e8e86b7b101bf6773976f46a43edbea031cb1resolves PR Review Advisor finding PRA-1, the earlier requested changes, final automated-review cleanup, and the CodeQL file-system race finding.mainruns.Verification
Signed-off-by:line and every commit appears asVerifiedin GitHubpre-commit,commit-msg, andpre-pushhooks passed, ornpm run validate:prpassed after refreshingorigin/mainwhen hooks were skipped or unavailableSigned-off-by: Ho Lim subhoya@gmail.com
Summary by CodeRabbit
Bug Fixes
Improvements