Skip to content

test(gateway): unsuppress tracer plugin in queued-session rotation e2e - #118266

Merged
steipete merged 1 commit into
mainfrom
fix/red-e2e-adjudication
Aug 2, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/red-e2e-adjudication

Conversation

@steipete

@steipete steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Two gateway E2Es have been red on main, observed during the lint-cleanup work (#118098) and adjudicated there as not-caused-by-that-branch. This PR resolves their true state:

  • test/gateway-queued-session-rotation.e2e.test.ts failed deterministically because OPENCLAW_TEST_MINIMAL_GATEWAY leaked into its environment and suppressed the tracer plugin the test's assertion depends on — a test-setup bug, not flake.
  • test/huggingface-local-app-openclaw.e2e.test.ts fails because of a real product regression: the native llama-cpp plugin hijacks an explicitly configured HTTP provider route (MLX passes, llama.cpp returns LLM request failed). Filed as Custom provider id llama-cpp is routed through the native plugin instead of its HTTP endpoint #118212 with evidence; no product code is changed blind in this PR.

Why This Change Was Made

The rotation test now clears OPENCLAW_TEST_MINIMAL_GATEWAY for its gateway spawn so the tracer plugin loads. Both tests are ungated hermetic E2Es — neither needs external services, so no environment skip is warranted.

User Impact

None at runtime (test-only, +4/−1). The rotation E2E is green again; the HF E2E remains red pointing at the real routing regression tracked in #118212.

Evidence

🤖 Generated with Claude Code

@steipete
steipete marked this pull request as ready for review August 2, 2026 22:29
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 2, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Aug 2, 2026
@clawsweeper

clawsweeper Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 2, 2026, 6:34 PM ET / 22:34 UTC.

ClawSweeper review

What this changes

The branch clears the minimal-gateway environment flag for the queued-session rotation E2E so its configured tracer plugin is loaded and its turn-count assertions exercise the intended path.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this PR open for the maintainer-labeled landing path. The patch correctly repairs a deterministic test-harness mismatch: the shared isolated-gateway helper enables minimal mode by default, while this E2E explicitly configures and asserts a tracer plugin that minimal mode intentionally suppresses.

Priority: P2
Reviewed head: 69e49b166301a9c9ed8d39cf5996b47f7712016a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-consistent test repair with direct after-fix test evidence; remaining work is normal maintainer/CI landing review.
Proof confidence 🐚 platinum hermit (4/6) Sufficient (terminal): The PR body reports a post-fix isolated queued-rotation run passing in 20.7 seconds, and the GitHub Real behavior proof check completed successfully; this is direct terminal-style proof for the changed E2E path.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body reports a post-fix isolated queued-rotation run passing in 20.7 seconds, and the GitHub Real behavior proof check completed successfully; this is direct terminal-style proof for the changed E2E path.
Evidence reviewed 6 items Shared helper default: The isolated Gateway helper sets OPENCLAW_TEST_MINIMAL_GATEWAY to "1" by default, while an explicit undefined extra environment value deletes that default from the child environment.
Gateway plugin contract: Gateway startup derives minimal test mode from that environment flag, and plugin bootstrap deliberately leaves the plugin lookup table undefined when minimal mode is active.
Test requires normal plugin startup: The test writes and enables queued-rotation-tracer, then requires two recorded agent_turn_prepare events; its current helper invocation clears only provider skipping, leaving minimal mode enabled.
Findings None None.
Security None None.

How this fits together

The queued-session rotation E2E starts an isolated Gateway process through the shared test-instance helper, then drives a held agent turn and a replacement turn over Gateway chat. Its fixture plugin records each prepared turn, so the test needs normal plugin startup rather than the helper’s default minimal Gateway mode.

flowchart LR
  A[Queued rotation E2E] --> B[Shared test instance helper]
  B --> C[Gateway child process environment]
  C --> D{Minimal Gateway enabled?}
  D -->|Yes| E[Plugin lookup suppressed]
  D -->|No| F[Configured tracer plugin loads]
  F --> G[Turn preparation events]
  G --> H[Trace-count assertions]
Loading

Decision needed

Question Recommendation
Should this maintainer-labeled, test-only repair land once the current head’s required CI checks complete? Land after CI: Merge the focused test-environment correction once required checks pass on the current head.

Why: The implementation is mechanically narrow and matches the existing helper contract, but the maintainer label requires explicit human landing judgment rather than automated cleanup.

Before merge

  • Resolve merge risk (P1) - The patch is test-only and source-consistent, but required CI is still in progress; landing should wait for the current head’s required checks and the maintainer-labeled review path.
  • Complete next step (P2) - The patch has no mechanical review finding, but the maintainer label and in-progress required CI require human landing review rather than automated repair work.
Agent review details

Security

None.

PR surface

Tests +3. Total +3 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 4 1 +3
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 4 1 +3

Review metrics

None.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Merge the one-site environment override after current CI completes, preserving the helper’s minimal-mode default for E2Es that do not require plugin startup.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Merge the one-site environment override after current CI completes, preserving the helper’s minimal-mode default for E2Es that do not require plugin startup.

Do we have a high-confidence way to reproduce the issue?

Yes. Current source establishes the failure mechanism: the helper enables minimal Gateway mode, that mode suppresses plugin lookup, and this test requires its configured tracer plugin; the PR body also reports an isolated after-fix pass in 20.7 seconds, though this read-only review did not rerun it.

Is this the best way to solve the issue?

Yes. Clearing the per-instance environment default is the narrowest maintainable fix because it preserves the shared helper’s lightweight default and follows existing full-Gateway E2E patterns.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against a1c2009b91b9.

Labels

Label changes:

  • add P2: This repairs a deterministic Gateway E2E failure with limited runtime blast radius, improving CI and regression coverage rather than changing user-facing behavior.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports a post-fix isolated queued-rotation run passing in 20.7 seconds, and the GitHub Real behavior proof check completed successfully; this is direct terminal-style proof for the changed E2E path.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body reports a post-fix isolated queued-rotation run passing in 20.7 seconds, and the GitHub Real behavior proof check completed successfully; this is direct terminal-style proof for the changed E2E path.

Label justifications:

  • P2: This repairs a deterministic Gateway E2E failure with limited runtime blast radius, improving CI and regression coverage rather than changing user-facing behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body reports a post-fix isolated queued-rotation run passing in 20.7 seconds, and the GitHub Real behavior proof check completed successfully; this is direct terminal-style proof for the changed E2E path.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body reports a post-fix isolated queued-rotation run passing in 20.7 seconds, and the GitHub Real behavior proof check completed successfully; this is direct terminal-style proof for the changed E2E path.

Evidence

What I checked:

Likely related people:

  • Josh Avant: Introduced the queued-session rotation E2E that owns the tracer-plugin assertion and rotation invariant. (role: introduced test behavior; confidence: high; commits: 177ad6bb61cf; files: test/gateway-queued-session-rotation.e2e.test.ts)
  • Peter Steinberger: Has the most available history entries on the affected test file and recently maintained it on current main before proposing this focused repair. (role: recent area contributor; confidence: high; commits: 7c7057168389, 69e49b166301; files: test/gateway-queued-session-rotation.e2e.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit 07b8018 into main Aug 2, 2026
138 of 146 checks passed
@steipete
steipete deleted the fix/red-e2e-adjudication branch August 2, 2026 23:08
@steipete

steipete commented Aug 2, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XS status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant