Skip to content

refactor: share explicit heartbeat configuration fixtures - #146853

Merged
steipete merged 2 commits into
mainfrom
codex/test-heartbeat-config-fixtures
Sep 13, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/test-heartbeat-config-fixtures

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Heartbeat tests repeat the same nested configuration at sixteen setup sites across sibling suites.

User Impact

There is no user-visible behavior change. The tests retain their independent session, model, delivery and event-routing assertions with less repeated setup.

Why This Change Was Made

Thirteen sites share a narrow typed fixture, and three reuse the existing local event-routing fixture. Each call constructs fresh nested objects and its own allowlist, preserving property order, values, omitted options and the original configuration annotations. The five-minute interval and wildcard allowlist remain explicit test constants, not production defaults. Other configuration variants stay explicit.

The change removes 150 physical test/support lines; excluding 28 layout-only lines gives a conservative structural reduction of 122 lines. Production code and runtime behavior are unchanged.

Evidence

All 104 cases in the five full suites pass before and after with identical ordered names, ancestor titles and statuses. All 16 fixture variants match ordered keys, values, descriptors and omissions; separate calls keep all seven objects and the allowlist array independent. Exact inverse checks reconstruct all six original files. The actual compiler graph guard, full mapped changed gate, deslop and independent P2 review pass. No runtime speedup is claimed.

@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added size: M maintainer Maintainer-authored PR labels Sep 13, 2026
@steipete
steipete marked this pull request as ready for review September 13, 2026 07:35
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. 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 Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 6:04 AM ET / 10:04 UTC (Revision 2).

ClawSweeper review

What this changes

Shares repeated heartbeat test configurations through a typed fixture and an existing local helper without changing runtime behavior.

Merge readiness

✅ Ready for maintainer review

This maintainer-sponsored cleanup remains useful and is absent from inspected main. The fixture substitutions preserve configuration values, isolation, and assertions; no actionable defect was found.

Priority: P3
Reviewed head: 54e31003785c4a4614b09f30ae27882fb1e63dc7

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, behavior-preserving cleanup supported by reported parity checks and successful relevant CI, with no actionable findings.
Proof confidence 🌊 off-meta tidepool Not applicable: The maintainer-authored PR changes test fixtures only; reported full-suite before/after parity and fixture equivalence address the changed surface without requiring a live heartbeat demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The maintainer-authored PR changes test fixtures only; reported full-suite before/after parity and fixture equivalence address the changed surface without requiring a live heartbeat demonstration.
Evidence reviewed 8 items Fresh, equivalent configurations: The helper constructs fresh nested objects and an allowlist array on every call. Its explicit interval, target, channel, workspace, and store values match the replaced literals.
Existing event-routing fixture reused: The three substitutions use the existing local helper without supplying isolatedSession, preserving omission of that property. Test scenarios, transport expectations, and assertions remain unchanged.
Still distinct from main: The inspected main version of the shared utility lacks heartbeatTestConfig. Comparing all six touched paths between fetched main and the pinned base produced no differences, so the submitted cleanup remains distinct.
Findings None None.
Security None None.

How this fits together

Heartbeat checks turn scheduled work and queued events into agent runs and optional channel replies. These test fixtures supply isolated configuration and session locations to verify that behavior.

flowchart LR
  A[Test-specific settings] --> B[Fresh configuration fixtures]
  B --> C[Heartbeat runner]
  D[Seeded sessions and queued events] --> C
  C --> E[Injected reply and channel handlers]
  E --> F[Unchanged behavior assertions]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -150. Total -150 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 39 189 -150
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 6 39 189 -150

Review metrics

None.

Technical review

Best possible solution:

Keep the narrow shared fixture for identical configurations while preserving explicit variants and independent behavioral assertions.

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

Not applicable: this removes repeated test setup rather than repairing a reported runtime defect; source comparison confirms equivalent fixture values and retained assertions.

Is this the best way to solve the issue?

Yes: reusing existing test support removes duplication without introducing production seams, shared mutable fixtures, or broader configuration defaults.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against b938f093b1e4.

Labels

Label justifications:

  • P3: This is a bounded test-maintenance cleanup with no production behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The maintainer-authored PR changes test fixtures only; reported full-suite before/after parity and fixture equivalence address the changed surface without requiring a live heartbeat demonstration.

Evidence

What I checked:

  • Fresh, equivalent configurations: The helper constructs fresh nested objects and an allowlist array on every call. Its explicit interval, target, channel, workspace, and store values match the replaced literals. (src/infra/heartbeat-runner.test-utils.ts:238, 54e31003785c)
  • Existing event-routing fixture reused: The three substitutions use the existing local helper without supplying isolatedSession, preserving omission of that property. Test scenarios, transport expectations, and assertions remain unchanged. (src/infra/heartbeat-runner.event-routing.test.ts:43, 54e31003785c)
  • Still distinct from main: The inspected main version of the shared utility lacks heartbeatTestConfig. Comparing all six touched paths between fetched main and the pinned base produced no differences, so the submitted cleanup remains distinct. (src/infra/heartbeat-runner.test-utils.ts:235, b938f093b1e4)
  • Review continuity: All six touched files are unchanged between the earlier reviewed head and this head. The supplied completed review records no findings or published rank-up moves. (54e31003785c)
  • Maintainer campaign and reported validation: The supplied discussion for Test audit: reduce redundant test code and full-suite runtime #139428 explicitly includes this batch in the maintainer-requested test audit. The captured PR body reports 104 before/after cases with ordered identity and outcome parity, equivalent fixtures, independent allocations, and mapped checks; supplied current-head CI includes successful changed-test and typecheck jobs. These executions were not rerun during this read-only review. (54e31003785c)
  • Area-history routing: Current-main file history identifies prior fixture and heartbeat work by Peter Steinberger and Marvinthebored. Exact source-line introduction could not be verified because historical blob retrieval failed; these are routing candidates, not introduction attributions. (src/infra/heartbeat-runner.test-utils.ts, 830e105508ce)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Marvinthebored: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-09-13T07:41:38.143Z sha b5cfcae :: needs maintainer review before merge. :: none

@steipete
steipete merged commit c005734 into main Sep 13, 2026
97 checks passed
@steipete
steipete deleted the codex/test-heartbeat-config-fixtures branch September 13, 2026 10:09
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146883: (159 commits)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
* refs/heads/temp/pr-146833: (43 commits)
  fix(memory): preserve newer indexes and disclose automatic rebuild costs (#146908)
  fix: retain route ownership while discovering conversations (#146927)
  refactor: reuse plugin fixture shell runner (#146920)
  fix(worker): stop preparing disabled live previews (#146896)
  fix(runtime): support Bun across tooling suite (#146807)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  ...
vincentkoc added a commit that referenced this pull request Sep 13, 2026
…ssion-list-roster-batch-20260913

* commit 'f513c0f345f7f2514c49ccfbc00adc3f78b9a755': (46 commits)
  chore(i18n): refresh native locales (#146924)
  perf(secrets): limit expiry metadata to transient credentials (#146882)
  fix(ui): preserve queued refreshes during session discovery (#146535)
  test(ui): wait for quiet scrolling and close named file tabs (#146836)
  fix(ui): prevent Usage hour filters from freezing during DST (#146919)
  test(ui): share browser page cleanup across layout fixtures (#146805)
  ci: balance complete PR runtime test groups (#146916)
  improve(infra): reduce scheduling work for session notice bursts (#146818)
  improve: prepare Gateway skill commands asynchronously (#146812)
  improve(agents): skip unused assistant delivery parsing (#146858)
  improve(ui): reuse date formatters across timestamp lists (#146789)
  fix(tests): isolate installer and Docker shell snippets (#146897)
  test(heartbeat): share explicit channel configuration fixtures (#146853)
  fix: retain conversation reply claims through write admission (#146866)
  perf(sessions): bound history reads and stabilize cursor paging (#146770)
  fix(ui): let slow dashboard downloads finish before recovery (#146881)
  fix: share Doctor lifecycle coordination with SQLite workers (#146714)
  fix: retain native session model provenance (#146801)
  fix: settle embedded transcript repairs before session cleanup (#146842)
  feat(macos): improve agent navigation and chat layout (#146531)
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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