Skip to content

fix: stop the Workshop learning end-to-end test from failing unrelated PRs - #201113

Merged
freeqaz merged 2 commits into
mainfrom
fix/workshop-learning-review-bound
Nov 18, 2026
Merged

freeqaz merged 2 commits into
mainfrom
fix/workshop-learning-review-bound

Conversation

@freeqaz

@freeqaz freeqaz commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Related: #200545

What Problem This Solves

Every pull request whose changes reach the Gateway session code fails its required checks, because src/gateway/gateway-workshop-learning.e2e.test.ts fails on main in both of its cases. The failures have nothing to do with those pull requests. Example: #201060, where checks-node-changed fails only on this file.

User Impact

No user-visible change. Contributors and maintainers no longer see an unrelated required-check failure on pull requests that touch the Gateway session code.

Why This Change Was Made

#200545 changed the Skill Workshop review on purpose. The review is now a fork of the chat: it sends the session's own request (full conversation, system prompt, the session's tool list and output limit) so that the provider's prompt cache serves it. The 32 KiB excerpt, the 2,048-token output cap and the skill_workshop-only tool list were removed, and docs/tools/self-learning.md was updated to match. That pull request updated gateway-plugin-forked-turn.e2e for the new contract, but this file kept asserting the old one:

  • Rate-limit case: it required a request under 64 KiB that left out older history and workspace instructions, with max_output_tokens: 2048 and only skill_workshop listed. The review now sends the whole conversation (about 723 KB with the test's 700 KB history), so expected 723137 to be less than 65536. The case now drops those removed-contract checks and their fixtures. It still checks what holds: a TPM rate limit ends the review after exactly one request (no retry), and that request carries the conversation's evidence.
  • Learning case: the mock model called skill_workshop by name. In the session's tool list (tools.profile: "coding"), plugin tools sit behind the tool catalog, so the review's calls never reached the Workshop and no 💾 Learned: notice was written. The mock now calls it through dispatch_action (as gateway-plugin-forked-turn.e2e does since refactor: let background chat forks reuse the chat's prompt cache #200545). Every other assertion is unchanged: the skill and its support file are patched, two review changes are recorded, the source history is untouched, and the notice and undo hint are announced.

Main's CI did not catch this. The base Vitest configs exclude *.e2e.test.ts, and main's Node test plan does not list this file. Only the per-PR changed-test plan picks it up, through the import graph of the files a pull request touches.

Test-only change. One file, +9/−22. No production code.

Evidence

Each run was the single file (node scripts/run-vitest.mjs run src/gateway/gateway-workshop-learning.e2e.test.ts, CI=true) on a Linux x86-64 test machine:

Tree Rate-limit case Learning case
main (febe2937243) fail: expected 723012 to be less than 65536 fail: transcript lacks 💾 Learned: (80 s poll)
#200545 merge (2a7ca163a57) fail: expected 726306 to be less than 65536 fail: transcript lacks 💾 Learned:
parent of #200545 (234be124953), case timeouts raised only for that slow machine's cold build pass pass
this branch on main (four runs) pass ×4 (45–52 s) pass ×4 (47–49 s)

On the same head, oxfmt --check and oxlint on the file and pnpm tsgo:core:test pass.

The rate-limit case keeps its 60 s budget. On that machine, the first Gateway start right after a cold rebuild can run past it, on main as well as on this branch. Warm runs take 45–52 s there; checks-node-changed took 33 s for the same case on main.

These reproduce the failures in checks-node-changed on #201060 (run 44260687609).

… session request

#200545 made the Workshop review send the session's own request: the full
conversation, the session's tool list (skill_workshop sits behind the tool
catalog) and the session's output limit. This e2e file still asserted the
removed 64 KiB / 2,048-token / skill_workshop-only review request and called
skill_workshop directly, so both cases failed on main. Main CI does not run
.e2e.test.ts files; only the per-PR changed-test plan selects it.
@clawsweeper

clawsweeper Bot commented Nov 18, 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: XS labels Nov 18, 2026
@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. P2 Normal backlog priority with limited blast radius. 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. labels Nov 18, 2026
@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR updates Workshop learning tests to use the session’s tool catalog and removes assertions for retired request limits.

Example: The coding-profile Workshop review patches the map-publication skill.

  • Before: The mock calls skill_workshop directly, so the patch never runs and the test times out waiting for the Learned notice.
  • After: The mock calls dispatch_action with id skill_workshop, allowing the existing patch, change-record, transcript, and notice assertions to complete.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-supported test repair with reported red/green results and successful exact-head CI.
Proof confidence 🐚 platinum hermit (4/6) This changes only test fixtures and assertions; reported regression runs and successful exact-head CI provide appropriate validation without a separate product demonstration.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Test only · Worth it: Yes · Fix scope: Complete
User problem: Gateway contributions receive unrelated required-check failures from tests that still expect the retired Workshop review contract.
Reason: The repair follows the explicitly approved and merged fork direction, restores useful validation, and introduces no production policy or configuration change.

Regression provenance

Possible regression — suspected (reviewed change). No predecessor PR is attributed.

Merge readiness

✅ Ready for maintainer review

Keep open: this focused test repair matches the intentional Workshop fork contract and preserves meaningful failure and learning coverage; no actionable defects were found.

Priority: P2
Reviewed head: 886dc8b6e9b3980dc3dff076a61a325ef560ba30

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Gateway tests drive Workshop reviews through the loaded plugin and a synthetic HTTP provider, then inspect requests, skill files, recorded changes, and the source transcript.

flowchart TD
  A[Gateway test fixture] --> B[Loaded Workshop plugin]
  B --> C[Session fork runner]
  C --> D[Synthetic HTTP provider]
  D --> E[Tool catalog dispatcher]
  E --> F[Workshop skill updates]
  F --> G[Change records and Learned notice]
Loading

Technical review

Best possible solution:

Merge the focused test repair while retaining the existing production fork owner and behavioral assertions.

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

The old assertions contradict the current fork implementation, and the PR supplies specific before-and-after failures; this read-only review executed no target code.

Is this the best way to solve the issue?

The patch is the smallest complete repair: update obsolete expectations and the mock tool route while preserving the distinct no-retry and successful-learning checks.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Bounded request assertions and fixtures changes intended behavior with a stated reason (9a6c6b1: Protect interactive capacity during provider TPM saturation with bounded context, output reservation, and a narrow tool list.)
  • Direct Workshop tool-call fixture changes intended behavior with a stated reason (9a6c6b1: The successful-learning fixture matched the former skill_workshop-only tool surface; the merged fork refactor now retains the session’s tool catalog.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Tests -13. Total -13 across 1 file. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 9 22 -13
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 9 22 -13

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 P2: Repairs an unrelated required-check failure affecting Gateway contributions without changing production behavior.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: Repairs an unrelated required-check failure affecting Gateway contributions without changing production behavior.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

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 18, 2026, 4:53 AM ET / 09:53 UTC.

@freeqaz
freeqaz merged commit 1c3fa43 into main Nov 18, 2026
114 of 115 checks passed
@freeqaz
freeqaz deleted the fix/workshop-learning-review-bound branch November 18, 2026 09:56
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 19, 2026
…d PRs (openclaw#201113)

* test(gateway): update Workshop learning e2e for reviews that fork the session request

openclaw#200545 made the Workshop review send the session's own request: the full
conversation, the session's tool list (skill_workshop sits behind the tool
catalog) and the session's output limit. This e2e file still asserted the
removed 64 KiB / 2,048-token / skill_workshop-only review request and called
skill_workshop directly, so both cases failed on main. Main CI does not run
.e2e.test.ts files; only the per-PR changed-test plan selects it.

* test(gateway): drop "bounded" from the Workshop rate-limit case title
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gateway Gateway runtime P2 Normal backlog priority with limited blast radius. 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