Skip to content

improve(tests): remove redundant catalog login wait - #188752

Merged
roboclaw-bot merged 1 commit into
mainfrom
test-health/catalog-login-delay-tests
Oct 30, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
test-health/catalog-login-delay-tests

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

The catalog-login integration test pays a redundant seven-second response floor in each configured case after it already controls response readiness with explicit gates.

User Impact

No user-visible behavior changes. The same two real-Gateway cases finish faster while retaining their assertions.

Why This Change Was Made

Use the existing request-start/deferred-release protocol as the response hold. Remove the timer import, delay variable, and reset; keep OAuth, passive reads under 1,000 ms without extra discovery, publication/work counts, selected-account reads during refresh, logout invalidation, failed-listing fallback, and cleanup unchanged.

The only removed behavior is an arbitrary elapsed fixture delay. The request-start gate and pending/known-row checks still prove the blocked phase, and explicit release plus publication/account-row checks prove completion. No production code, helper, case, assertion, timeout, or repetition changed. The budget scalar decreases by the exact three test LF removed; all allocation records remain unchanged.

Evidence

  • Three successful before and three successful after runs, serial on the same host, private frozen dependencies, pinned Bun runtime, temp root, and cache paths: timeout 900 /usr/bin/time -v pnpm test src/gateway/server-methods/models-auth-login.catalog.integration.test.ts --maxWorkers=1 --reporter=verbose. Import timing was enabled identically throughout.
  • Median wall: 35.71 → 21.01 s (-41.2%); median summed case bodies: 26.488 → 12.733 s (-51.9%). Two 7,000 ms floor timers and four later zero-delay timers per full file become zero timer calls. Both original cases and one automatic catalog request/one created worker per case remain.
  • Restored target plus models-auth-refresh.integration.test.ts and models-auth-api-key.integration.test.ts: 3 files / 4 cases passed.
  • Mutation controls all failed at the intended original assertions: passive reads requesting real background refresh left pendingTasks: 1 (expected 0); omitted pending state failed the provider check; prematurely releasing the actual HTTP response and waiting for real publication failed the original known-row and pending assertions. Controls used the configured-false row, retained all assertions, and were restored byte-for-byte.
  • Passed canonical gateway-methods test typecheck, targeted type-aware lint, format, git diff --check, line-cap/max-lines/test-lines/timeout-race/mock-export/assertion-safety ratchets, and pr-simplify.
  • Independent isolated Codex autoreview: P0–P2, complete local candidate against 4d2a9f8bb4c47da0daae7fd820cab33fa450ef7b, intact target/owners/helpers supplied; machine status scoped-clean, exit 0, no findings. The reviewed source bytes are the committed candidate; review did not rerun tests.
All six benchmark runs and exact budget accounting
Run Wall s Vitest s Body sum s Target import total s CPU user/sys s Peak RSS KiB
before 1 85.46 82.50 40.866 40.09 198.81/37.59 6611572
before 2 35.63 32.93 26.488 5.75 36.87/8.08 2201052
before 3 35.71 32.94 26.373 5.87 35.89/7.44 2240816
after 1 20.47 18.33 12.109 5.57 33.06/5.95 2207252
after 2 21.01 18.72 12.733 5.40 34.11/6.78 2268716
after 3 23.57 20.89 13.887 6.30 35.72/9.33 2209400

The first baseline includes cold worker compilation and is retained. No failed benchmark or discarded timing trial; no observed benchmark flake. Imports are the target module's inclusive total, not a sum of overlapping nested imports. Cold preparation prevents attributing the first run's CPU/RSS difference to this patch.

Discovery CI case-duration sums were 33.838 and 35.082 seconds for the two cases; those are not wall times. Exact-head CI41135650260 passed. Candidate CI seconds were not retimed; the six local samples remain original-base observations.

Native tracked test LF: 6,313,400 → 6,313,397; this file 304 → 301. Scalar 6,287,493 → 6,287,490; 176 unchanged grants total 24,865. Effective ceiling 6,312,358 → 6,312,355, exactly -3, preserving inherited debt 1,042 → 1,042. Production LF delta: 0.

One sibling setup trial selecting models-list.freshness.integration.test.ts triggered broader runtime preparation. It was interrupted before tests (exit 143); native cleanup reported the process group dead. Its log and the expected mutation failures are retained separately, not counted as passing benchmarks. That sibling remains unproven here; the source-only sibling run above passed. Broad proof is left to exact-head PR CI.

Native landing

Parent approved exact head 768969793bcb1224477d1ee2f2651365c51fb95a. The normal enforced-gate route merged it as 77b37aca1f3aee1331e08a9eb796d5c95e1a12f0 on 2026-10-30T22:14:49Z; native COMPLETE receipt 750863704fb20558e617f8b7f1456e31198fb708, original auto squash attempt 0ebd4e44-87b1-40c1-bd94-87dc4331c164. Live exact-head CI/security/required-review admission succeeded without bypass. The full landed tree, approved test blob, human coauthor trailer and authoritative main ancestry were verified. No source change, rebase, code push, CI rerun or new benchmark was needed. Native PR-owned checkout and branches were removed.

The check-only native counting owner compared captured current main d107cb81b327fc4654dbbaa9f21beba0cf2fc57a with its merged candidate: test LF 6313400 → 6313397, effective cap 6312358 → 6312355. LF/effective-cap delta is exactly -3/-3; every current grant and inherited 1042-line debt is preserved. The existing nonpositive-delta rule passed; this is not a current-global headroom claim. Actual landing-parent deltas and grants were verified again. Original benchmark, mutation-control and interrupted sibling-setup limitations above are retained.

Co-authored-by: steipete [email protected]

Work sessions

Use the existing request-start and deferred-response release gates while
retaining both real-Gateway cases and their assertions. Reduce the test
line budget by the exact three LF removed.

Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review October 30, 2026 22:04
@openclaw-barnacle openclaw-barnacle Bot added gateway Gateway runtime size: XS labels Oct 30, 2026
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) October 30, 2026 22:11
@roboclaw-bot
roboclaw-bot merged commit 77b37ac into main Oct 30, 2026
187 checks passed
@roboclaw-bot
roboclaw-bot deleted the test-health/catalog-login-delay-tests branch October 30, 2026 22:14
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 31, 2026
Use the existing request-start and deferred-response release gates while
retaining both real-Gateway cases and their assertions. Reduce the test
line budget by the exact three LF removed.

Co-authored-by: steipete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant