Skip to content

test(gateway): extract chat metadata auth fixtures - #158050

Merged
steipete merged 5 commits into
mainfrom
fix/swarm-lint-size-followup-20260925
Sep 25, 2026
Merged

steipete merged 5 commits into
mainfrom
fix/swarm-lint-size-followup-20260925

Conversation

@steipete

@steipete steipete commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

The Gateway chat metadata lifecycle integration test exceeded the existing file-size limit as auth cases accumulated.

Why This Change Was Made

Move its model and auth fixture builders into colocated test support. Preserve the prepared-runtime harness singleton, setup and cleanup ownership, and all 20 test cases. This PR has no production changes; the companion prompt extraction is already on main in #158074.

Evidence

All 20 metadata tests, Gateway test types, lint, formatting, and diff checks pass after main integration. The retained extraction matches the independently reviewed patch. The original test bodies remain unchanged from main, including its event-loop settlement fixes.

The focused integration command took 51.20 seconds overall (48.34 seconds inside the isolation wrapper; Vitest reported 43.22 seconds). This is observed validation cost, not a before/after speedup.

Previous-head CI recorded a 180-second hook timeout in the separate server.config-patch.test.ts group. The log does not identify which setup or teardown hook hung. One unchanged replay of the original CI group on the exact tested merge passed all 81 tests, including the include-only case in 4.035 seconds. It used the same Linux Node24.19/pnpm12.4.2 and original limits; the replay had four available CPUs/16.56 GB versus CI’s two CPUs/8 GiB. The group took 169.951 seconds. This did not reproduce or fix the original hook timeout. Replacement-head CI passed on a49d6703c9482d7cec2c5515657aa35091e8fe3c; the native watcher reconciled 11 superseded historical contexts.

@clawsweeper

clawsweeper Bot commented Sep 25, 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 gateway Gateway runtime size: M labels Sep 25, 2026
@steipete
steipete marked this pull request as ready for review September 25, 2026 09:55
@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 25, 2026
@clawsweeper

clawsweeper Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 25, 2026, 10:42 AM ET / 14:42 UTC (Revision 4).

ClawSweeper review

What this changes

Moves model and authentication fixtures from the Gateway chat metadata integration test into a colocated test support file while retaining the existing test cases.

Merge readiness

✅ Ready for maintainer review

Keep open. Current main still contains the inline authentication fixtures and has little room under the test file’s line cap. The merged companion PR addressed related but distinct work; this branch retains a useful, focused extraction.

Priority: P3
Reviewed head: a49d6703c9482d7cec2c5515657aa35091e8fe3c

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, mechanically consistent test extraction retains the existing cases and supplies measured validation context.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored, test-only extraction changes fixture placement rather than production behavior. The PR body reports a focused run of all 20 Gateway metadata cases; no stored-data contract changes.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored, test-only extraction changes fixture placement rather than production behavior. The PR body reports a focused run of all 20 Gateway metadata cases; no stored-data contract changes.
Evidence reviewed 7 items Introduced patch: The pinned PR diff adds a colocated fixture module and replaces inline fixture definitions with imports; it leaves the integration test bodies and production files untouched.
Current-main comparison: Current main retains the inline fixture functions. The PR therefore has a distinct remaining change after the companion merge.
Test file budget: The test-file rule caps counted lines at 1000. Read-only counts excluding blank and full-line comment lines were 999 on current main and 944 on the PR head.
Findings None None.
Security None None.

How this fits together

Gateway chat metadata combines prepared model and authentication facts for chat clients and model lists. The integration suite supplies synthetic auth states and checks the availability reported by those Gateway paths.

flowchart LR
  A[Test auth fixtures] --> B[Prepared runtime harness]
  B --> C[Gateway metadata lifecycle]
  C --> D[Chat metadata]
  C --> E[Models list]
  D --> F[Availability assertions]
  E --> F
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +8. Total +8 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 2 70 62 +8
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 70 62 +8

Review metrics

Metric Value Why it matters
Test file headroom 999 → 944 counted lines; cap 1000 The extraction gives the existing integration suite room for additional cases without removing coverage.

Technical review

Best possible solution:

Keep the auth fixtures beside the integration suite so one prepared-runtime harness owns setup and cleanup and the suite has room for future cases under the lint cap.

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

Not applicable to a runtime bug: this is test-file maintenance. Current main is already just under the 1000-line cap, and the proposed extraction creates additional headroom.

Is this the best way to solve the issue?

Yes. The colocated fixture module preserves the shared mock object, suite setup, cleanup, and existing assertions without adding a production abstraction.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

No label changes.

Label justifications:

  • P3: This is a bounded test-maintenance change 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: This member-authored, test-only extraction changes fixture placement rather than production behavior. The PR body reports a focused run of all 20 Gateway metadata cases; no stored-data contract changes.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Ayaan Zaidi: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Peter Steinberger: 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 (3 earlier review cycles)
  • reviewed 2026-09-25T10:02:19.658Z sha 763ae6b :: needs maintainer review before merge. :: none
  • reviewed 2026-09-25T11:38:08.439Z sha bb81186 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-25T14:00:41.147Z sha 2c44bc0 :: needs maintainer review before merge. :: none

@steipete steipete changed the title refactor(gateway): keep companion and metadata files within size limits test(gateway): extract chat metadata auth fixtures Sep 25, 2026
@steipete
steipete merged commit 63a9f58 into main Sep 25, 2026
118 of 120 checks passed
@steipete
steipete deleted the fix/swarm-lint-size-followup-20260925 branch September 25, 2026 14:54
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...
vincentkoc added a commit that referenced this pull request Sep 25, 2026
* fix(qa-lab): retain tab focus and scroll during polling

* chore(qa-lab): merge main for tab navigation validation

* fix(qa-lab): keep focused tabs visible after layout changes

* fix(qa-lab): reconcile navigation retention with current app

* chore: refresh main for QA Lab navigation validation

* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
…nclaw#158050)

* refactor(gateway): split companion prompts and metadata fixtures

* refactor(gateway): preserve companion updates in helper extraction

* refactor(gateway): integrate upstream Doctor fixture repair

* refactor(gateway): integrate catalog lifecycle fixture fix

* test(gateway): retain metadata fixture extraction after upstream integration

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 26, 2026
)

* fix(qa-lab): retain tab focus and scroll during polling

* chore(qa-lab): merge main for tab navigation validation

* fix(qa-lab): keep focused tabs visible after layout changes

* fix(qa-lab): reconcile navigation retention with current app

* chore: refresh main for QA Lab navigation validation

* commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (194 commits)
  feat(ui): listen to managed desktop audio in the panel (openclaw#157724)
  fix(ci): resume partially published preparation receipts (openclaw#158174)
  feat(release): one approval per release via an attested parent approval receipt (openclaw#157911)
  feat(desktop): advertise current managed desktop audio (openclaw#157723)
  fix(ui): retain delayed progress scroll gestures (openclaw#158153)
  refactor(ui): share sidebar mutation error feedback (openclaw#158173)
  test: await database verifier process lifecycle events (openclaw#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (openclaw#157722)
  refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050)
  feat(desktop): isolate managed Linux application audio (openclaw#157720)
  fix(test): prepare catalog fixture modules before startup (openclaw#158157)
  fix: keep model pickers usable during provider sign-in (openclaw#158132)
  refactor(test): remove unused prompt scenario metadata (openclaw#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020)
  fix: bound stalled browser stream startup (openclaw#156323)
  fix(onnx): prevent worker fixture hangs after release (openclaw#158146)
  fix(models): preserve scoped provider discovery outcomes (openclaw#158139)
  fix(agents): report offline trash failures after agent delete (openclaw#158052)
  ...

Co-authored-by: Vincent Koc <[email protected]>
vincentkoc added a commit that referenced this pull request Oct 17, 2026
* fix(ui): release failed avatar response bodies

* test(ui): cover avatar response cancellation in Chromium

* test(ui): assert retained image after avatar failure

* test(ui): preserve window global type in avatar proof

* test(ui): avoid shadowed avatar proof bindings

* chore: refresh main for avatar lifecycle validation

* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (#157724)
  fix(ci): resume partially published preparation receipts (#158174)
  feat(release): one approval per release via an attested parent approval receipt (#157911)
  feat(desktop): advertise current managed desktop audio (#157723)
  fix(ui): retain delayed progress scroll gestures (#158153)
  refactor(ui): share sidebar mutation error feedback (#158173)
  test: await database verifier process lifecycle events (#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (#157722)
  refactor(gateway): split companion prompts and metadata fixtures (#158050)
  feat(desktop): isolate managed Linux application audio (#157720)
  fix(test): prepare catalog fixture modules before startup (#158157)
  fix: keep model pickers usable during provider sign-in (#158132)
  refactor(test): remove unused prompt scenario metadata (#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020)
  fix: bound stalled browser stream startup (#156323)
  fix(onnx): prevent worker fixture hangs after release (#158146)
  fix(models): preserve scoped provider discovery outcomes (#158139)
  fix(agents): report offline trash failures after agent delete (#158052)
  ...

* test(ui): wait for settled avatar fallback

* test(ui): wait for control UI before avatar handoff

* fix(ui): preserve avatar cleanup across retry lifecycle updates

Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state.

* fix(ui): integrate avatar response cleanup with current main

* test(ui): align avatar cleanup proof with current harness

* test(ui): qualify avatar cleanup harness types and formatting

Co-authored-by: Vincent Koc <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 17, 2026
* fix(ui): release failed avatar response bodies

* test(ui): cover avatar response cancellation in Chromium

* test(ui): assert retained image after avatar failure

* test(ui): preserve window global type in avatar proof

* test(ui): avoid shadowed avatar proof bindings

* chore: refresh main for avatar lifecycle validation

* commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (175 commits)
  feat(ui): listen to managed desktop audio in the panel (openclaw#157724)
  fix(ci): resume partially published preparation receipts (openclaw#158174)
  feat(release): one approval per release via an attested parent approval receipt (openclaw#157911)
  feat(desktop): advertise current managed desktop audio (openclaw#157723)
  fix(ui): retain delayed progress scroll gestures (openclaw#158153)
  refactor(ui): share sidebar mutation error feedback (openclaw#158173)
  test: await database verifier process lifecycle events (openclaw#158171)
  perf(update): avoid repeated retained-copy parent creation
  feat(desktop): bind audio streaming to screen authorization (openclaw#157722)
  refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050)
  feat(desktop): isolate managed Linux application audio (openclaw#157720)
  fix(test): prepare catalog fixture modules before startup (openclaw#158157)
  fix: keep model pickers usable during provider sign-in (openclaw#158132)
  refactor(test): remove unused prompt scenario metadata (openclaw#158151)
  fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149)
  refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020)
  fix: bound stalled browser stream startup (openclaw#156323)
  fix(onnx): prevent worker fixture hangs after release (openclaw#158146)
  fix(models): preserve scoped provider discovery outcomes (openclaw#158139)
  fix(agents): report offline trash failures after agent delete (openclaw#158052)
  ...

* test(ui): wait for settled avatar fallback

* test(ui): wait for control UI before avatar handoff

* fix(ui): preserve avatar cleanup across retry lifecycle updates

Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state.

* fix(ui): integrate avatar response cleanup with current main

* test(ui): align avatar cleanup proof with current harness

* test(ui): qualify avatar cleanup harness types and formatting

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

Labels

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