Skip to content

test(tooling): remove delayed activity fixture responses - #134273

Merged
steipete merged 1 commit into
mainfrom
codex/test-github-activity-immediate-response
Aug 31, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/test-github-activity-immediate-response

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

The GitHub activity helper's output-order regression waits through three artificial 500 ms sleeps after its fake CLI has already captured the output it asserts.

Why This Change Was Made

Return the existing timeout response immediately. The fake CLI still uses real jq to snapshot stdout before processing each request, so the first activity request independently proves canonical identity was already printed. Rename the fixture and case to describe the timeout response rather than elapsed blocking time.

All 22 cases, exit codes, real Bash/jq execution, output capture, request logging, and the five-second child-process bound remain unchanged.

User Impact

Remove 1.5 seconds of intentional sleeps from this suite without weakening its ordering proof. Production tooling is unchanged.

Evidence

  • node scripts/run-vitest.mjs test/scripts/github-activity-helper.test.ts passed all 22 tests before and after.
  • The output-order case measured 2,052.17 ms before and 351.66 ms after locally. This is a local case measurement, not a CI-wide benchmark.
  • Full changed-file checks, formatting, diff checks, and structured Codex autoreview passed.
  • The request-side stdout snapshot still fails if identity is printed after activity begins. Offline fixture proof makes no claim about live GitHub network timeout behavior.
  • Production +0/-0; tests +4/-6.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Aug 31, 2026
@steipete
steipete marked this pull request as ready for review August 31, 2026 16:31
@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 Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 31, 2026, 12:36 PM ET / 16:36 UTC.

ClawSweeper review

What this changes

The branch removes an artificial half-second delay from the GitHub activity helper’s offline test fixture and renames the fixture state to describe its immediate timeout response.

Merge readiness

✅ Ready for maintainer review

Keep open. This is a narrow, behavior-preserving test-fixture cleanup: it removes an artificial delay while retaining the request-side ordering assertion. The PR is maintainer-authored and carries the protected maintainer label, so it is not an auto-close candidate.

Priority: P3
Reviewed head: 905dafb00d2683881cd2324e2d4eed7547541c19

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A small, coherent test cleanup that preserves the existing observable ordering assertion.
Proof confidence 🌊 off-meta tidepool Not applicable: The changed owner is an offline fake GitHub CLI embedded in a test; the real activity helper remains unchanged, and this maintainer-authored test-only cleanup does not require external behavior proof.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: The changed owner is an offline fake GitHub CLI embedded in a test; the real activity helper remains unchanged, and this maintainer-authored test-only cleanup does not require external behavior proof.
Evidence reviewed 5 items Introduced test-only change: The introduced hunk renames the fixture state and removes only the artificial sleep after the fake CLI returns exit code 124; it does not modify the real activity helper.
Ordering invariant remains direct: The fake CLI records its stdout before selecting a fixture response, and the retained assertion checks that the second request observed canonical identity already printed.
Current-main comparison: The fetched current-main version still uses blockActivity and sleeps for 0.5 seconds after the fake exit, so the cleanup is not already present there.
Findings None None.
Security None None.

How this fits together

The activity helper gathers a GitHub profile before querying activity totals. Its offline test replaces the GitHub CLI, captures stdout at each request boundary, and verifies that identity is emitted before an activity request can fail.

flowchart LR
  A[Activity helper invocation] --> B[Profile lookup]
  B --> C[Fake GitHub CLI]
  C --> D[Request log and stdout snapshot]
  D --> E[Activity request failure]
  E --> F[Ordering assertion]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests -2. Total -2 across 1 file.

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

Review metrics

Metric Value Why it matters
Production versus test LOC production +0/-0; test support +4/-6 (net -2) The patch removes fixture-only waiting and does not alter the activity helper or a shipped runtime path.

Technical review

Best possible solution:

Land the focused fixture cleanup after the exact-head checks complete; keep the request-side stdout snapshot as the canonical ordering proof.

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

Not applicable: this PR changes only an offline test fixture, and current-main source directly shows the artificial delay it removes.

Is this the best way to solve the issue?

Yes. Removing the delay at the fixture response boundary preserves the existing stdout-snapshot ordering proof without adding another timing mechanism.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a low-risk test-suite latency cleanup with no production behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The changed owner is an offline fake GitHub CLI embedded in a test; the real activity helper remains unchanged, and this maintainer-authored test-only cleanup does not require external behavior proof.

Label justifications:

  • P3: This is a low-risk test-suite latency 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 changed owner is an offline fake GitHub CLI embedded in a test; the real activity helper remains unchanged, and this maintainer-authored test-only cleanup does not require external behavior proof.

Evidence

What I checked:

Likely related people:

  • steipete: 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.

@steipete

Copy link
Copy Markdown
Contributor Author

Maintainer review is complete under the standing instruction to land this test-cleanup batch. The latest ClawSweeper review has no actionable findings or rank-up moves; exact-head CI run 33414547236 passed.

The retained request-side stdout snapshot establishes that identity is printed before activity lookup. Removing three artificial half-second waits does not change that observation or the fixture's exit code 124. All 22 tests passed before and after, and the full changed-file gate and structured Codex autoreview passed. Production +0/-0; tests +4/-6. Proceeding through the native merge workflow.

@steipete
steipete merged commit 194f069 into main Aug 31, 2026
193 checks passed
@steipete
steipete deleted the codex/test-github-activity-immediate-response branch August 31, 2026 16:53
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 1, 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: 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