Skip to content

Add secret-safe phase progress diagnostics to every E2E test #7101

Description

@cjagwani

Problem Statement

The E2E workflow can spend tens of minutes inside a test without showing which operation is still running. During the v0.0.85 release qualification, agent-turn-latency remained active for roughly 50 minutes with no phase-level evidence, so maintainers could not tell whether onboarding, sandbox creation, route validation, an agent turn, or cleanup was slow or hung.

Command output is correctly kept in redacted artifacts, but the absence of safe progress signals forces maintainers to wait for the outer timeout before diagnosis can begin. The same blind spot can occur in any E2E target, especially large matrix targets and historically flaky scenarios.

Desired Behavior

Every E2E test represented by .github/workflows/e2e.yaml should emit consistent, secret-safe progress diagnostics from start through cleanup.

At minimum, logs should show:

  • the E2E target/scenario and active semantic phase;
  • total and phase elapsed time;
  • how long it has been since the child process produced output, without forwarding that output;
  • runner resource context such as free memory, test-process RSS, workspace capacity, and load when available;
  • immediate phase-start/phase-finish events plus a bounded heartbeat while a phase remains active; and
  • explicit completion or cleanup progress so teardown hangs are distinguishable from test-body hangs.

For example, instead of an otherwise silent 50-minute job, maintainers should see that agent-turn-latency has spent 12 minutes in Hermes install attempt 1, last observed child output 40 seconds ago, and has adequate runner memory and disk.

Completion means every test selected by the authoritative E2E workflow is accounted for. The rollout may prioritize the slowest and flakiest targets first, but it is not complete after instrumenting only those targets.

Constraints and Non-goals

  • Do not print raw child stdout/stderr, request bodies, credentials, tokens, or other potentially sensitive values.
  • Do not raise timeouts, add retries, or otherwise mask a real hang; this work makes stalls diagnosable rather than changing acceptance behavior.
  • Do not assume shared harness instrumentation is sufficient. A common fixture or command boundary may reduce duplication only when it provides phase names that are meaningful for that specific test.
  • Keep independent per-test instrumentation in scope, including instrumenting every test explicitly if the coverage audit shows that is necessary to expose each scenario's semantic phases.
  • Keep heartbeat volume bounded; phase changes should log immediately and stable phases should report at a consistent interval.
  • Preserve redacted failure artifacts as the detailed post-failure evidence source.

Implementation Idea

  1. Build an inventory from .github/workflows/e2e.yaml and the generated workflow plan, mapping every selected target to its live test or script entrypoint. This is the coverage ledger and prevents silent omissions.
  2. Audit recent run data for duration, timeouts, failures, and retries. Rank targets by p95/max runtime and failure frequency to choose rollout order, while retaining all targets in the ledger.
  3. Establish one shared diagnostic contract: scenario, phase, total/phase elapsed time, timestamp-only output liveness, resource snapshot, heartbeat interval, and idempotent stop behavior.
  4. Evaluate common host-command, sandbox-command, fixture lifecycle, and cleanup boundaries as optional reuse points; verify their phase labels remain meaningful for each consuming test rather than assuming shared instrumentation solves coverage.
  5. Add explicit phase transitions independently to every test that needs them. This may mean instrumenting every E2E test directly. Instrument large/flaky targets first, then complete the remaining workflow inventory in batches without narrowing the final scope.
  6. Add E2E-support contract tests that prove diagnostics never include child payloads and that every workflow-selected test has progress coverage. The coverage check should fail when a new E2E target is added without diagnostics.
  7. Validate representative targets with selective live runs and record before/after evidence showing that a slow or hung phase can be identified before the outer timeout.
  8. Document the progress contract in the E2E contributor guide once the shared integration boundary is stable.

Draft PR #7100 is the first implementation slice: it adds the shared secret-safe heartbeat and applies it to agent-turn-latency, while reusing it for the existing rebuild-Hermes reporter.

Category

Testing

Checklist

  • I searched existing issues and this is not a duplicate
  • I described the problem and desired behavior

Activity

  1. added
    needs: triage
    on Jul 17, 2026
  2. self-assigned this
    on Jul 17, 2026
  3. added
    area: e2e
    area: observability
    on Jul 17, 2026
  4. removed
    needs: triage
    on Jul 17, 2026
  5. cjagwani commented on Jul 20, 2026

    @cjagwani
    CollaboratorAuthor

    PR #7100 is now ready for review and expands the first slice beyond agent-turn-latency: the shared E2E fixture starts secret-safe progress reporting automatically, writes a machine-readable phase timeline, preserves rebuild-Hermes runner-pressure evidence, and adds a historical runtime audit for prioritizing deeper semantic phase coverage. A read-only audit of 30 recent completed e2e.yaml runs identified rebuild-hermes-stale-base (6/6 non-passing, about 72.9-minute p95) and rebuild-hermes (5/6 non-passing, about 16.8-minute p95) as the clearest initial hotspots. The issue remains open because representative live validation and a complete workflow coverage ledger are still follow-up work.

  6. apurvvkumaria commented on Jul 22, 2026

    @apurvvkumaria
    Collaborator

    Fresh recurrence on current main makes the phase-observability gap measurable.

    • Run: https://github.com/NVIDIA/NemoClaw/actions/runs/29897237525
    • Commit: 6d0bc582ab85b11ab688c35aeb4d615151d6ebde
    • Observation time: 2026-07-22 07:10 UTC
    • All eight jobs validating the merged gateway, DCode, and Hermes rebuild fixes had passed. Every unrelated job except the two below was already terminal.

    Silent jobs

    1. agent-turn-latency

      • The live Vitest step had been running for about 34 minutes since 06:36:40 UTC.
      • The six most recent scheduled runs completed this job in approximately 5.3-12.5 minutes (median about 10.5 minutes), so this attempt was already more than 3 times its recent median.
      • The test can legitimately spend substantial time in two sequential agent installs, but the job exposed no indication of whether it was in OpenClaw install, hosted inference, cleanup, Hermes install, health checking, or the Hermes turn.
      • Bounds: 90-minute Vitest timeout and 110-minute job timeout; each install attempt can consume 30 minutes.
    2. bedrock-runtime-compatible-anthropic (hermes)

      • The live Vitest step had been running for about 34 minutes since 06:36:35 UTC.
      • Recent scheduled Hermes variants normally completed in approximately 5.5-6.3 minutes.
      • The OpenClaw sibling in this same run passed in about 4.4 minutes.
      • The Hermes variant was therefore more than 5 times its normal duration, but the only visible state was the encompassing Vitest step. Its 30-minute onboarding operation was the leading suspect, but there was no live phase evidence to prove that.
      • Bounds: 60-minute Vitest and workflow timeouts.

    For both active jobs, the Actions job metadata exposed only the long-running step and no annotations. Fetching the partial job log through the Actions API returned BlobNotFound / HTTP 404, so detailed artifacts and command output would not become available until after the step terminated.

    Acceptance evidence to retain

    This recurrence reinforces that progress must reach the Actions console while the child operation is still active—not only an artifact uploaded after Vitest exits. For these two targets, the heartbeat should identify:

    • the semantic phase and attempt number;
    • total and phase elapsed time;
    • timestamp/age of the last child output without printing the payload;
    • when an operation-specific timeout fires;
    • the transition into retry or cleanup; and
    • a final machine-readable phase timeline in the redacted artifacts.

    A contract test should cover both agent-turn-latency and the Hermes Bedrock path so a future refactor cannot return them to a single opaque, long-running Vitest step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area: e2earea: observability

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions