Skip to content

perf(test): parse the Mantis resolver workflow once - #189801

Merged
vincentkoc merged 1 commit into
mainfrom
perf/test-mantis-resolver-parse-once-next100-20261101
Nov 1, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
perf/test-mantis-resolver-parse-once-next100-20261101

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

The Mantis workflow test reparses the same immutable resolver workflow on every simulated request. Parse it once beside the existing chat workflow, while keeping a fresh VM context, output map and API result per request.

Owner: test/scripts/mantis-web-ui-chat-proof-workflow.test.ts. Workflow execution, candidate trust, capture allocation, and explicit candidate assignment behavior remain unchanged; only the test's immutable source preparation moves.

Validation: the complete owner passes 3 tests under Node and Bun; original owner controls pass on both. Instrumenting the actual workflow reader observes six total parses before and two after (resolver five to one), with five VM executions in both versions. Removing explicit candidate assignment support from the actual resolver script produces one expected test failure. Relevant test types, targeted lint, formatting and git diff --check pass.

LOC: tooling/production 0; tests/support 0. No workflow runtime, child-process, elapsed-time, billed-minute, or native Windows saving is claimed.

Independent source review: scoped clean, confidence 0.99. Required hosted and native landing gates remain authoritative.

@vincentkoc vincentkoc self-assigned this Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 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.

@vincentkoc
vincentkoc marked this pull request as ready for review October 31, 2026 22:00
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. 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. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. labels Oct 31, 2026
@clawsweeper

clawsweeper Bot commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR parses the immutable Mantis resolver workflow once while retaining separate execution state for every test request.

Example: The existing candidate-selection test exercises five request strings.

  • Before: The resolver workflow is read and parsed five times.
  • After: The resolver workflow is read and parsed once, with five separate VM executions.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A correct, minimal test-only optimization supported by source inspection, reported harness controls, and successful exact-head gates.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored test-only optimization changes no shipped entry point; supplied validation exercises the actual resolver script through its existing VM test harness.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Performance · Worth it: Yes · Fix scope: Complete
User problem: Contributors running the workflow tests incur repeated parsing of unchanged YAML.
Reason: The maintainer-authored direction removes demonstrated redundant preparation with a minimal change and preserves all existing test cases.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR makes a focused test optimization, preserves resolver coverage, and has no actionable findings.

Priority: P3
Reviewed head: 39269017ceb0cc41152b11d51619622d8da1439d

Before merge

None.

Findings

None.

Agent review details

How this fits together

The workflow test loads GitHub Actions YAML, executes its resolver script with synthetic request metadata, and checks emitted candidate references.

flowchart LR
  A[Workflow YAML files] --> B[Suite source preparation]
  B --> C[Immutable resolver script]
  D[Five request cases] --> E[Fresh VM and output map]
  C --> E
  E --> F[Candidate reference assertions]
Loading

Technical review

Best possible solution:

Keep resolver source preparation at suite scope and retain request-local execution state and existing assertions.

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

Source shows five helper invocations each parsing the same resolver workflow on main; no target code was executed during review.

Is this the best way to solve the issue?

The smallest complete change is to hoist the immutable script string while preserving fresh VM contexts and outputs, which this diff does.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Resolver execution and candidate-selection coverage keeps the original intent (3070cd1: Execute the workflow-owned resolver rather than repeat its candidate-selection policy in the test.)
  • Compact workflow test setup keeps the original intent (95ae409: Remove duplicate test layers and fixture boilerplate while retaining distinct permission, capture-overlay, and parser contracts.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • brokemac79: Raw commit 037412e adds test/scripts/mantis-web-ui-chat-proof-workflow.test.ts:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 037412ec7d3b; files: test/scripts/mantis-web-ui-chat-proof-workflow.test.ts)

PR surface

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

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 3 3 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 3 3 0

Labels

Label changes:

  • add P3: This is a small test-efficiency improvement with no shipped runtime behavior change.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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:

  • P3: This is a small test-efficiency improvement with no shipped runtime behavior change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp 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 October 31, 2026, 6:14 PM ET / 22:14 UTC.

@vincentkoc
vincentkoc merged commit eccfb79 into main Nov 1, 2026
138 of 139 checks passed
@vincentkoc
vincentkoc deleted the perf/test-mantis-resolver-parse-once-next100-20261101 branch November 1, 2026 00:40
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Nov 1, 2026
…ed-backup-search-exports-20261101

* commit 'cde4bfe4f10ce470ded7264c68d9a72ae03594cc':
  fix(ci): keep backup and chat search internals private (#189894)
  fix(codex): recover unused native threads without dropping history (#189900)
  fix(oc-path): use last duplicate JSON key to match runtime parsing (#189855)
  perf(test): parse the Mantis resolver workflow once (#189801)
  fix(agents): revert default hard context admission (#189891)
  refactor(test): use canonical tracked temp paths (#189800)
  chore(ui): refresh control ui locales (#189898)
  improve: show gateway commit and build time on About
  refactor(test): share SDK export fixture JSON writes (#189799)
  fix: restore Files navigation from unavailable previews (#189879)
  refactor(test): share raw ratchet fixture writes (#189798)
  fix(ai): honor Model Studio compatible-mode output limits (#189870)
  fix: hold queued messages through inline edits (#189869)
  perf(test): reuse the baseline fixture Node resolver (#189790)
  test(qa): correlate handoff replies by run identity (#189885)
  fix(ui): normalize canonical Unicode in local search comparisons (#189874)
  fix(ui): explain unsupported browsers without module scripts (#189883)

# Conflicts:
#	ui/src/pages/chat/components/chat-search-highlight.browser.test.ts
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. 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