Skip to content

improve: shorten dashboard token test runtime - #2196

Merged
obviyus merged 1 commit into
openclaw:mainfrom
saari-co:codex/ci-dashboard-token-timer-20261109
Nov 11, 2026
Merged

obviyus merged 1 commit into
openclaw:mainfrom
saari-co:codex/ci-dashboard-token-timer-20261109

Conversation

@saariuslystoned

Copy link
Copy Markdown
Contributor

What Problem This Solves

The dashboard token-scoping test process waits for an already-unneeded timeout after a successful read.

User Impact

There is no user-visible change. Developers can run the test file without waiting for its completed race's unused watchdog.

Why This Change Was Made

The test now clears its timer when the read race settles, including on rejection. The real 10-second failure guard, mocked GitHub requests, mint assertions and production dashboard behavior remain unchanged.

Documentation Impact

Existing dashboard documentation remains accurate because runtime behavior is unchanged. The historical proof record records the source, commands, observations and limits.

Evidence

The full local pnpm run check did not pass: 7,133 passed, three failed, 22 skipped and none cancelled. Static, build, formatting and lint stages and the changed test passed. Under offline isolation, the packed local reviewer install and compiled live-admission Corepack fetch failed with registry DNS EAI_AGAIN; the signed-webhook loopback test expected 202 but received 503, with cause unknown. Hosted candidate CI has not yet been established.

A prepublication whole-branch Codex P3 review reported no actionable findings for head a5bf4575cb4046c577a3a004ac05f6cded7c5607 against base eae7a713e211392f2a57ab91880a761efa1ae359; the reviewer assessed evidence without executing project code.

Real Behavior Proof

  • Claim and surface: The dashboard token-scoping test preserves its real read race and 10-second guard while clearing the unused timer after settlement. It exercises the dashboard request path with mocked fetch responses, including the stranded first mint and the second read.
  • Command and environment: node --test test/dashboard-app-token-scoping.test.ts, bounded by a 40-second outer watchdog, on Linux arm64 with Node 24.22.1 and lockfile-pinned dependencies; source and dependencies were read-only, with loopback-only networking and isolated processes. All seven named cases passed in each run, without skips, cancellations or remaining namespace processes.
  • Measured result: Matched local A/B/B/A file-process times were 10.483206 / 0.398018 / 0.391566 / 10.450083 seconds, where A is the base and B the candidate. Their two-sample medians were 10.466645 and 0.394792 seconds. This small local comparison does not establish hosted shard critical-path, tail-latency or billing changes.
  • Failure controls: Task-only variants asserted two mints after the first stranded mint started. A stalled second read produced the original later read stalled error; the affected case reported 10011.523 ms. A synthetic HTTP 418 produced the same existing read error on base and candidate, rather than the timer error. Both candidate controls failed as intended, with six other cases passing and no namespace processes remaining. The proof record above includes the method and limitations.

@clawsweeper

clawsweeper Bot commented Nov 9, 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.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR clears the dashboard token test’s watchdog when its read race settles.

Example: The second mocked GitHub read succeeds before the 10-second watchdog.

  • Before: The unused watchdog keeps the test process alive until its deadline.
  • After: The watchdog is cleared and the process can exit after the tests finish.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, correct test cleanup with scenario-specific recorded runtime evidence and successful exact-head hosted checks.
Proof confidence 🐚 platinum hermit (4/6) ✨ media proof bonus Sufficient (linked_artifact): The supplied record exercises the changed test-process lifecycle through node --test on Linux arm64 with Node 24.22.1, reports matched base/candidate runs and preserved timeout/rejection controls, and limits its claim to local process completion rather than hosted CI performance.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Developers running the token-scoping test file wait for an unused watchdog after its read has completed.
Reason: The focused cleanup removes a demonstrated test-process delay while preserving the regression coverage and production behavior.

Merge readiness

✅ Ready for maintainer review

Keep this PR open for landing: it makes a focused test-lifecycle improvement, preserves the regression guard, and introduces no actionable defect.

Priority: P3
Reviewed head: a5bf4575cb4046c577a3a004ac05f6cded7c5607

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Node test suite exercises dashboard GitHub token acquisition with mocked responses; the changed watchdog bounds a regression test without changing production token handling.

flowchart LR
  A[Node test process] --> B[Dashboard token regression test]
  B --> C[Dashboard GitHub read]
  C --> D[Mocked GitHub responses]
  B --> E[Ten second watchdog]
  D --> F[Race settles]
  E --> F
  F --> G[Clear watchdog and assert result]
Loading

Technical review

Best possible solution:

Land the focused timer cleanup while retaining the existing regression deadline and assertions.

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

Main's source shows the uncleared referenced timeout, and the supplied base/candidate measurements corroborate the process-exit delay; this review executed no target code.

Is this the best way to solve the issue?

Clearing the existing timer in finally is a small, complete fix that handles success and rejection without weakening the timeout or introducing another owner.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Ayaan Zaidi: Raw commit 014aa26 adds test/dashboard-app-token-scoping.test.ts:247 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 014aa26f194b; files: test/dashboard-app-token-scoping.test.ts)
  • Peter Steinberger: Raw commit 5af7741 adds test/dashboard-app-token-scoping.test.ts:245 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5af774151f17; files: test/dashboard-app-token-scoping.test.ts)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P3: This is a low-risk developer test-runtime improvement with no production behavior change.
  • add proof: sufficient: Contributor real behavior proof is sufficient.
  • 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.

Label justifications:

  • P3: This is a low-risk developer test-runtime improvement with no production behavior change.
  • 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.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 9, 2026, 9:39 AM ET / 14:39 UTC.

@obviyus
obviyus merged commit 326ea02 into openclaw:main Nov 11, 2026
40 checks passed
obviyus added a commit that referenced this pull request Nov 14, 2026
* fix(review): qualify exact push relay rejection fixture

* fix: report the real checkout inspection failure reason

- Lead the read-only checkout inspection failure message with the runner error when present.
- Keep a redacted 2000-character stdout/stderr tail as context; keep stderr || stdout when no error.
- OpenClaw prints a plugin trust warning to stderr on every run, which hid every inspection reason.
- Add runner tests for OpenClaw and Codex inspection failures.

* fix: qualify the historical OCE harness origin fixture (#2197)

* test: clear dashboard token watchdog after completion (#2196)

Co-authored-by: Ryan Saari <[email protected]>

* fix: qualify exact OCE 5398 JDBC fixture revisions (#2198)

* fix(dashboard): normalize dashboard strict paths to POSIX slashes (#2177)

* fix: use server-issued census observation windows (#2174)

* fix: bound census observations with server-issued query windows

Replace cross-host completion-clock comparisons for negotiated census producers with stored metadata and per-assignment observation windows. Preserve strict legacy fallback, lease/checkpoint/identity fences, stable witnesses, and capacity bounds. Include signed native temporal red/green and rolling-compatibility proof.

Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* fix: use server-issued census observation windows

Worked on by:
- @brokemac79

Co-authored-by: brokemac79 <[email protected]>
OpenClaw-Publication: 9c3c62ec-951b-43b0-98f9-511dba1829cf

* fix: preserve negotiated census authority across legacy upgrades

Add real workerd cold-restart proof that persisted deployed legacy-v2 checkpoints, cursors, identities and receipts load unchanged and safely continue through negotiated windows. Require the atomic lease mode before accepting any page, including legacy-shaped in-flight data before next issues a witness. Resolves the accepted data-model compatibility proof blocker without state reset or weakened legacy guards.

Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* Publish openclaw/coverage-observation-window-fix

Worked on by:
- @brokemac79

Co-authored-by: brokemac79 <[email protected]>
OpenClaw-Publication: 281f1b7a-6346-42af-b919-9fd25dd6b736

---------

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>

* fix(test): normalize test runner paths to POSIX slashes (#2176)

* fix: terminal acknowledgement test passes on a timeout instead of the real retry failure (#2199)

* test: exercise terminal acknowledgement retries without delay

* test: use the real retry helper with Retry-After: 0

The retry helper honors Retry-After, so the fixture no longer needs a
patched copy of the helper and request builder. The unchanged workflow
step and helper now run all six attempts without waiting.

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

* improve: shorten reservation workflow test runtime (#2200)

* test: avoid reservation fixture retry waits

* test: record reservation retry waits with a PATH sleep shim

Replace the BASH_ENV sleep function and the hand-maintained per-scenario
attempt table with a sleep shim on the step's PATH. Every recorded delay
is still checked against the workflow's 2n + 0..3 backoff, and the
service-unavailable scenario must record all four waits.

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: obviyus <[email protected]>

* fix(review): stop demanding proof for speculative races and in-flight revocation (#2202)

* fix(review): stop demanding proof for speculative races and in-flight revocation

Authority-chain review now triggers only on changed authorization
decisions; revocation applies to the next request; unproven authority is
no longer a merge gate. P3 findings are advisory, speculative race
machinery without recorded buy-in and preemptive single-use helpers become
findings, and AGENTS.md adopts the matching design rules.

Co-authored-by: obviyus <[email protected]>

* fix(review): keep advisory P3 findings out of the merge readiness gate

Co-authored-by: obviyus <[email protected]>

* fix(review): keep P3-only incorrect verdicts and queued repairs advisory

Co-authored-by: obviyus <[email protected]>

---------

Co-authored-by: obviyus <[email protected]>

* fix: reuse reviewed test credentials after surrounding edits (#2201)

Approve exact previously reviewed synthetic Raw/RawV2 value pairs while retaining detector, decoder, native metadata, verification, and completion checks. Remove hostname-based exemptions and keep normalized Postgres findings blocking.

Validation: full pnpm check, 32 focused tests, 28 native proof cases in an isolated UTM guest, and a clean final committed whole-branch Codex review. The maintainer explicitly waived the hosted ClawSweeper review and approved this merge in the task conversation.

* feat(review): read durable Gitcrawl cluster service context

* fix(review): validate service tokens without control regex

* fix: allow service-backed review-start reservations

* style: format service review-start reservation proof

* fix: allow service-backed review artifact publication

* feat: prepare service context before applying decisions

* fix: preserve parent identity during apply preparation

* fix: wire apply preparation to the shared relation policy

* test: cover service-backed apply and authority drift

* test: hold paired closes without prepared service context

* test: align service apply fixtures with live revision guards

* docs: explain apply preparation failure ownership

* fix: enforce apply retry guards without mutation receipts

* style: format service freshness assertion

* test: exercise service retries with a current review lease

* fix: refresh apply authority after ambiguous writes

* style: format service lease regression fixture

* test: reject exact-event retries after lease revocation

* style: format exact-event retry assertion

---------

Co-authored-by: Mitchell Etzel <[email protected]>
Co-authored-by: Free Wortley <[email protected]>
Co-authored-by: Ryan S <[email protected]>
Co-authored-by: Ryan Saari <[email protected]>
Co-authored-by: Saiyam Jain <[email protected]>
Co-authored-by: RoboClaw <[email protected]>
Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: brokemac79 <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
Co-authored-by: obviyus <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-risk cleanup, docs, polish, ergonomics, or speculative feature. proof: sufficient Contributor real behavior proof is sufficient. 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants