Skip to content

improve(test): speed channel artifact parity suites - #123480

Merged
steipete merged 1 commit into
mainfrom
steipete/test-suite-performance-681827
Aug 14, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/test-suite-performance-681827

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Four lightweight channel artifact contract shards repeatedly loaded the full bundled plugin set for eight parity assertions, making contract feedback unnecessarily slow and memory-heavy.

Why This Change Was Made

This moves loaded-plugin parity into the existing plugin-shape registry suite, which already materializes every bundled plugin. The lightweight shards retain artifact inventory, export, and invocation contracts, while precise supplemental changed-test routing keeps every artifact export and loaded-plugin wiring path covered.

User Impact

There is no runtime behavior change. Maintainers and CI get faster, lower-memory contract feedback while preserving parity coverage and all tests.

Evidence

Linux benchmark Before After Change
contracts-channel-surface 28.7983s / 2895.5MB RSS 15.9734s / 2841.4MB RSS -12.8249s
contracts-channel-config 25.1678s / 2910.3MB RSS 14.7910s / 2696.7MB RSS -10.3768s
contracts-channel-registry 24.8364s / 2812.5MB RSS 17.4596s / 2517.5MB RSS -7.3768s
contracts-channel-session 25.0800s / 3198.2MB RSS 15.5725s / 2738.3MB RSS -9.5075s
Total 103.8825s 63.7965s -40.086s (38.6% faster)
  • Before: Testbox tbx_01kzz6s7m09h5w0r5qb7hek719, run 31768452382. The longer full-suite SSH session ended with exit 255 after 36m54s, but only after all four relevant configs above had completed successfully.
  • After: Testbox tbx_01kzz9ep4hkm4kex8fas8xn6kv, run 31770880739. All 50 files and 475 tests passed.
  • Rebased focused proof: node scripts/run-vitest.mjs test/scripts/test-projects.test.ts src/channels/plugins/contracts/gateway-auth-artifact.contract.test.ts src/channels/plugins/contracts/message-tool-artifact.contract.test.ts src/channels/plugins/contracts/plugin-shape.contract.test.ts src/channels/plugins/contracts/session-key-artifact.contract.test.ts src/channels/plugins/contracts/thread-binding-artifact.contract.test.ts --reporter=dot passed 264 routing tests and 152 contract tests (416 total).
  • Rebased changed gate: Testbox tbx_01kzz9p9tg9k624t5zjn7w6tqw, run 31771092545, check:changed exit 0 across types, lint, guards, cycles, and boundaries.
  • Final exact-head Codex autoreview was clean with no accepted or actionable findings.
  • LOC: runtime production +0/-0; tooling +28/-0; tests +172/-91 (net +81). The tooling growth is the precise supplemental changed-test routing required so artifact/export wiring changes still select the moved parity suite.

AI-assisted. I understand the change and verified the affected routing and contract behavior. Agent transcripts are intentionally omitted.

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@steipete
steipete marked this pull request as ready for review August 14, 2026 05:10
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts size: M maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 14, 2026, 1:13 AM ET / 05:13 UTC.

ClawSweeper review

What this changes

The PR moves bundled-channel artifact parity checks into the plugin-shape contract suite and routes relevant channel wiring changes to that suite.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

Keep open. The author is a repository member and the PR has the protected maintainer label; read-only checkout inspection failed before the branch, scoped policy, and complete diff could be verified.

Priority: P3
Reviewed head: 63caab0d76ee18d440282a1ee996e24c886ba7a8

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The PR has concrete claimed validation, but review confidence is limited because the checkout could not be inspected.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored internal test change provides reported focused validation; the external-contributor proof gate does not apply.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored internal test change provides reported focused validation; the external-contributor proof gate does not apply.
Evidence reviewed 3 items Checkout inspection unavailable: The required read-only shell inspection failed before producing repository output (bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted), so current source, scoped policy, history, and complete diff were not independently verified.
Protected maintainer handling: Provided GitHub context marks this PR with maintainer and identifies the author as a repository member, which requires explicit maintainer handling rather than automated closure.
Submitted validation evidence: The PR body reports focused routing/contract execution and a changed gate on the stated head, but that evidence could not be independently compared with the complete branch diff in this environment.
Findings None None.
Security None None.

How this fits together

Lightweight channel artifacts let core use selected channel capabilities before full plugin loading. Contract suites check artifact inventories and their correspondence with loaded channel plugins, while changed-test routing selects relevant checks in CI.

flowchart LR
  A[Channel plugin source] --> B[Lightweight artifacts]
  A --> C[Loaded plugin]
  B --> D[Artifact contract shards]
  C --> E[Plugin-shape parity suite]
  A --> F[Changed-test routing]
  F --> E
  D --> G[CI feedback]
  E --> G
Loading

Before merge

  • Resolve merge risk (P1) - The branch’s complete parity coverage and scoped-policy compliance remain unverified because repository command execution was unavailable.
Agent review details

Security

None.

PR surface

Tests +81, Other +28. Total +109 across 7 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 6 172 91 +81
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 28 0 +28
Total 7 200 91 +109

Review metrics

None.

Stored data model

Persistent data-model change detected: serialized state: src/channels/plugins/contracts/session-key-artifact.contract.test.ts, unknown-data-model-change: src/channels/plugins/contracts/session-key-artifact.contract.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Review the complete branch in a functioning checkout, confirming that every removed artifact-to-plugin parity assertion is preserved in the plugin-shape suite and that changed-test routing covers each affected artifact owner.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Review the complete branch in a functioning checkout, confirming that every removed artifact-to-plugin parity assertion is preserved in the plugin-shape suite and that changed-test routing covers each affected artifact owner.

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

Not applicable: this is an internal contract-test performance change, not a reported runtime failure; its submitted validation could not be independently inspected.

Is this the best way to solve the issue?

Unclear: consolidating parity into the existing loaded-plugin suite is plausible, but the inaccessible checkout prevents confirming full assertion preservation and routing coverage.

AGENTS.md: unclear because the file could not be read completely.

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

Labels

Label changes:

  • add P3: The stated scope is internal test and CI performance with no claimed runtime behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored internal test change provides reported focused validation; the external-contributor proof gate does not apply.

Label justifications:

  • P3: The stated scope is internal test and CI performance with no claimed runtime behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored internal test change provides reported focused validation; the external-contributor proof gate does not apply.

Evidence

What I checked:

  • Checkout inspection unavailable: The required read-only shell inspection failed before producing repository output (bwrap: loopback: Failed RTM_NEWADDR: Operation not permitted), so current source, scoped policy, history, and complete diff were not independently verified.
  • Protected maintainer handling: Provided GitHub context marks this PR with maintainer and identifies the author as a repository member, which requires explicit maintainer handling rather than automated closure. (63caab0d76ee)
  • Submitted validation evidence: The PR body reports focused routing/contract execution and a changed gate on the stated head, but that evidence could not be independently compared with the complete branch diff in this environment. (63caab0d76ee)

Likely related people:

  • steipete: The supplied PR metadata attributes the current test-suite consolidation commit to steipete; checkout history could not be inspected to identify additional owners. (role: proposed change author and recent area contributor; confidence: low; commits: 63caab0d76ee; files: scripts/test-projects.test-support.mts, src/channels/plugins/contracts/plugin-shape.contract.test.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Re-run review in a functioning read-only checkout and compare every moved parity assertion with the complete branch diff.

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

Land-ready proof for exact head 63caab0d76ee18d440282a1ee996e24c886ba7a8:

  • Exact-head CI: node scripts/watch-pr-ci.mjs 123480 63caab0d76ee18d440282a1ee996e24c886ba7a8 attached run 31772142919; failed-job rerun attempt 2 completed successfully. Attempt 1's only red shard was an unrelated 1-second callback timeout in src/agents/openai-thinking-contract.test.ts; it passed on the unchanged-head rerun.
  • Focused proof: node scripts/run-vitest.mjs test/scripts/test-projects.test.ts src/channels/plugins/contracts/gateway-auth-artifact.contract.test.ts src/channels/plugins/contracts/message-tool-artifact.contract.test.ts src/channels/plugins/contracts/plugin-shape.contract.test.ts src/channels/plugins/contracts/session-key-artifact.contract.test.ts src/channels/plugins/contracts/thread-binding-artifact.contract.test.ts --reporter=dot passed 264 routing tests + 152 contract tests = 416 total.
  • Rebased changed gate: Testbox tbx_01kzz9p9tg9k624t5zjn7w6tqw, run 31771092545, check:changed exit 0 across types, lint, guards, cycles, and boundaries.
  • Linux benchmark: before run 31768452382 103.8825s; after run 31770880739 63.7965s, 40.086s / 38.6% faster. The after run passed all 50 files / 475 tests. The longer baseline full-suite SSH session exited 255 after 36m54s, but only after all four measured configs had completed successfully.
  • ClawSweeper rank-up move handled: inspected the complete diff in a functioning checkout against root/scoped policy; all eight moved parity assertions remain in plugin-shape.contract.test.ts, and all 17 artifact-export/loaded-plugin wiring owners have supplemental changed-test routing. No runtime, config, migration, or persistent-data surface changed.
  • LOC: runtime production +0/-0; tooling +28/-0; tests +172/-91. Final exact-head autoreview was clean.

@steipete
steipete merged commit 1ea1499 into main Aug 14, 2026
315 of 324 checks passed
@steipete
steipete deleted the steipete/test-suite-performance-681827 branch August 14, 2026 05:25
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

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: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: M 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