Skip to content

fix(qa): keep target-none heartbeat scenario deterministic - #124380

Merged
steipete merged 1 commit into
mainfrom
fix/autoqa-automation-heartbeat-fixture-v2
Aug 16, 2026
Merged

steipete merged 1 commit into
mainfrom
fix/autoqa-automation-heartbeat-fixture-v2

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where the gateway-rpc-automation QA scenario deterministically failed on current main because its success contract requires an internal-only heartbeat outcome, but the E2E fixture omitted heartbeat.target and therefore inherited the current owner default.

Related history: #118966 introduced the real-Gateway E2E while the implicit target was still none; #119027 made agent-runtime.session-heartbeat-target-none a primary QA contract. The deliberate default changes in #121892 and #121988 preserved explicit none but made the fixture's omission observable as no-route.

Why This Change Was Made

The fixture now sets heartbeat.target: "none" explicitly at the owner boundary. Production heartbeat defaults and behavior remain unchanged, and the existing structured assertion continues to require skipped, target-none, the operator-facing message, and the provider reply preview.

User Impact

No runtime or user-visible product behavior changes. Maintainers regain deterministic current-main QA evidence for cron RPCs, wake-to-heartbeat execution, task control, and the explicit target-none heartbeat contract.

Evidence

  • Pre-fix private-QA Testbox run: gateway-rpc-automation executed 1 scenario, passed 0, failed 1 on tbx_01m048rpnbpqf6et9t2fa6y9ez (Actions run 31923602773).
  • Post-fix private-QA Testbox run: 1 scenario passed, 0 failed, 0 skipped; underlying E2E 1/1 passed on tbx_01m0492h8y1regmq7k9zzdamx7 (Actions run 31923819097).
  • Catalog: qa coverage --match gateway-rpc-automation --json resolved exactly gateway-rpc-automation; 58 scenario-catalog tests and 1 native-E2E-routing test passed.
  • Siblings: 61 heartbeat tests, 9 Gateway health tests, and 1 Gateway identity/presence E2E passed.
  • Gates: private QA build, changed format/type/lint/guards, git diff --check, runtime import cycles, and Madge cycles passed.
  • Test audit: existing boundary assertion already protects the credible regression; no duplicate test or test-only production seam added.
  • Structured autoreview: clean, no accepted/actionable findings.
  • Production LOC: +0/-0. Tests: +1/-1. No changelog.

AI-assisted: yes. The root cause, history, fixture ownership, test value, and exact candidate proof were reviewed before publication.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 16, 2026 03:29
@openclaw-barnacle openclaw-barnacle Bot added the maintainer Maintainer-authored PR label Aug 16, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. 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. labels Aug 16, 2026
@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 15, 2026, 11:35 PM ET / August 16, 2026, 03:35 UTC.

ClawSweeper review

What this changes

The PR changes the real-Gateway QA fixture to set heartbeat.target: "none", preserving its internal-only heartbeat assertion after the product default changed to owner.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open: this is a focused, maintainer-authored QA repair with no correctness or security finding. Current main’s omitted fixture target resolves to owner, while the scenario asserts the explicit target-none contract; the branch restores that contract at the fixture boundary.

Priority: P2
Reviewed head: 2e06443efbdcb13ea1114f93292fb02f9f90cf79

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, source-aligned test repair with recorded after-fix QA evidence and no actionable defect found.
Proof confidence 🌊 off-meta tidepool Not applicable: Not applicable to this maintainer-authored QA-only PR; its body nevertheless records an after-fix Testbox run of the real-Gateway scenario.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: Not applicable to this maintainer-authored QA-only PR; its body nevertheless records an after-fix Testbox run of the real-Gateway scenario.
Evidence reviewed 6 items Current-main fixture and asserted contract: Current main omits the target in the fixture, but the same scenario requires skipped, target-none, the disabled-delivery message, and the provider reply preview after its wake RPC.
Owner-boundary behavior: The heartbeat resolver maps an omitted target to owner, while explicit none returns the target-none no-delivery outcome; this makes the fixture omission incompatible with its assertion.
Patch is confined to the correct fixture boundary: The branch adds only the explicit target to the scenario configuration; git diff --check is clean and numstat is one test line added and one removed.
Findings None None.
Security None None.

How this fits together

QA Lab starts a real Gateway with isolated configuration and invokes cron, task, and heartbeat RPCs. The heartbeat target controls whether the completed turn records an internal-only result or tries to resolve a delivery route before the scenario reads last-heartbeat.

flowchart LR
  A[QA scenario fixture] --> B[Gateway configuration]
  B --> C[Heartbeat wake RPC]
  C --> D{Heartbeat target}
  D -->|none| E[Internal-only outcome]
  D -->|owner| F[Owner route lookup]
  E --> G[Last-heartbeat assertion]
  F --> G
Loading

Before merge

  • Complete next step (P2) - The PR is a focused maintainer-owned QA fix with no mechanical repair remaining; retain it for normal maintainer merge handling.
Agent review details

Security

None.

PR surface

Tests 0. Total 0 across 1 file.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; test fixture +1/-1 The change alters only isolated QA configuration and does not add a runtime or public configuration surface.

Technical review

Best possible solution:

Merge the explicit fixture setting after normal exact-head maintainer checks; retain the product default of owner and the existing structured assertion for explicit none.

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

Yes—source-reproducible: current main omits the target, the resolver defaults that omission to owner, and the scenario asserts target-none; this read-only review did not execute the E2E test locally.

Is this the best way to solve the issue?

Yes. Setting the existing explicit internal-only mode in the fixture is the narrow owner-boundary repair; changing the product default or weakening the assertion would test a different contract.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P2: This restores deterministic regression coverage for Gateway automation and heartbeat behavior without changing user-facing runtime behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to this maintainer-authored QA-only PR; its body nevertheless records an after-fix Testbox run of the real-Gateway scenario.

Label justifications:

  • P2: This restores deterministic regression coverage for Gateway automation and heartbeat behavior without changing user-facing runtime behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: Not applicable to this maintainer-authored QA-only PR; its body nevertheless records an after-fix Testbox run of the real-Gateway scenario.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Authored the merged commit that added the gateway task and automation E2E coverage. (role: introduced the real-Gateway QA scenario; confidence: high; commits: 99c5ea79ab18; files: test/e2e/qa-lab/runtime/gateway-rpc-automation.e2e.test.ts)
  • Ayaan Zaidi: Authored the merged commit whose owner-default behavior makes an omitted fixture target resolve differently. (role: implemented the owner-default heartbeat behavior; confidence: high; commits: 2c8ed54ddb60; files: src/infra/outbound/targets.ts, src/infra/heartbeat-summary.ts)
  • Vyctor H. Brzezowski: Most recently touched the current fixture line according to blame, although that commit’s primary scope was separate UI work. (role: recent current-main fixture contributor; confidence: medium; commits: 8a3fff21a890; files: test/e2e/qa-lab/runtime/gateway-rpc-automation.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

Copy link
Copy Markdown
Contributor Author

Land-ready maintainer proof for head 2e06443efbdcb13ea1114f93292fb02f9f90cf79:

  • Root cause: the fixture omitted heartbeat.target after the product default moved from internal-only to routed delivery; the scenario contract and structured assertion still explicitly require target-none.
  • Canonical fix: set target: "none" in the owning real-Gateway E2E fixture. No production path, public config default, assertion, docs, protocol, or persistence changed.
  • Before: private-QA Testbox tbx_01m048rpnbpqf6et9t2fa6y9ez, Actions run 31923602773 — 1 selected, 0 passed, 1 failed.
  • After: private-QA Testbox tbx_01m0492h8y1regmq7k9zzdamx7, Actions run 31923819097 — 1 passed, 0 failed, 0 skipped; underlying E2E 1/1 passed.
  • Focused proof: exact catalog match; 58 catalog tests; 1 native E2E-routing test; 61 heartbeat tests; 9 Gateway health tests; 1 Gateway identity/presence E2E.
  • Gates: private QA build, changed format/type/lint/guards, git diff --check, runtime and Madge cycle checks, and structured autoreview all passed.
  • Exact-head CI: run 31924358428 passed for this head.
  • Native review artifacts: validated READY FOR /prepare-pr, 0 findings.
  • Latest ClawSweeper: no findings; its only before-merge item is normal maintainer handling, satisfied by the native review above. No rank-up moves were listed.
  • LOC: production +0/-0; tests +1/-1. No changelog. No known proof gaps.

@steipete
steipete merged commit 5943cd0 into main Aug 16, 2026
209 checks passed
@steipete
steipete deleted the fix/autoqa-automation-heartbeat-fixture-v2 branch August 16, 2026 03:41
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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. 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