Skip to content

fix(lobster): keep ordinary run/resume on default flow fields#102036

Merged
vincentkoc merged 4 commits into
openclaw:mainfrom
LiLan0125:fix/102011-lobster-flow-defaults
Jul 8, 2026
Merged

fix(lobster): keep ordinary run/resume on default flow fields#102036
vincentkoc merged 4 commits into
openclaw:mainfrom
LiLan0125:fix/102011-lobster-flow-defaults

Conversation

@LiLan0125

@LiLan0125 LiLan0125 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Closes #102011

What Problem This Solves

Ordinary @openclaw/lobster run and resume calls could be routed into managed TaskFlow parsing when the tool payload contained schema-injected defaults such as flowStateJson: "{}" and flowExpectedRevision: 0.

Why This Change Was Made

The Lobster parser now distinguishes injected empty defaults from intentional managed fields:

  • blank flow state is treated as absent;
  • an empty object does not select managed mode by itself;
  • explicit managed runs still preserve stateJson: {};
  • revision 0 alone does not select managed mode;
  • explicit cross-mode fields are rejected before ordinary fallback.

This stays inside the Lobster plugin parser. It does not change core TaskFlow, protocol, configuration, migration, storage, or dependency contracts.

User Impact

Ordinary Lobster approval workflows can run and resume without being asked for TaskFlow-only fields the caller did not intend to provide. Managed TaskFlow callers retain existing validation and can explicitly start with an empty state object.

Evidence

Validated exact head c12bf2f48570da79968487e1dcc10fb4b9ac2f35.

  • Sanitized AWS Crabbox lease cbx_c92971815ef7, run run_f48d59554de8, exit 0; lease released after proof.
  • pnpm test extensions/lobster/src/lobster-tool.test.ts extensions/lobster/src/lobster-runner.test.ts: 2 files, 52 tests passed.
  • Real createLobsterTool(createEmbeddedLobsterRunner()) ordinary run -> approval -> resume with injected {} and revision 0: passed without a TaskFlow runtime.
  • Real embedded managed run retained an own stateJson property equal to {}.
  • Full remote pnpm check:changed: passed, including extension production/test typechecks, lint, database/storage guards, and import-cycle checks.
  • Hosted CI run 28920766065: 63 successful checks, no failures or pending checks.
  • Fresh autoreview after the maintainer strictness repair: clean, no actionable findings.
  • git diff --check: passed.

No documentation or changelog update is required; the public call shapes are unchanged and release generation owns CHANGELOG.md.

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge. Reviewed July 8, 2026, 1:49 AM ET / 05:49 UTC.

Summary
The branch updates the Lobster tool parser and tests so blank or empty flowStateJson and flowExpectedRevision: 0 do not force ordinary run/resume calls into managed TaskFlow mode while preserving explicit empty managed run state.

PR surface: Source +16, Tests +125. Total +141 across 2 files.

Reproducibility: yes. source-level. Current main and v2026.6.11 route default flow fields through the managed-parser decision path before ordinary runner fallback; I did not run a live Gateway reproduction in this read-only review.

Review metrics: 1 noteworthy metric.

  • Schema-default routing: 2 default flow values handled. The PR changes how empty flowStateJson and flowExpectedRevision: 0 select ordinary versus managed Lobster execution.

Stored data model
Persistent data-model change detected: serialized state: extensions/lobster/src/lobster-tool.ts. Confirm migration or upgrade compatibility proof before merge.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #102011
Summary: This PR is one candidate fix for the canonical Lobster schema-default flow-field misrouting issue; another open candidate has stronger proof and one weaker sibling was already closed unmerged.

Members:

Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

Merge readiness
Overall: 🦪 silver shellfish
Proof: 🦪 silver shellfish
Patch quality: 🐚 platinum hermit
Result: blocked until real behavior proof from a real setup is added.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

Proof guidance:

  • [P1] Needs real behavior proof before merge: The terminal proof exercises patched createLobsterTool with fake runner and TaskFlow dependencies; add redacted installed-plugin, Gateway, or real embedded-runtime output, then update the PR body to trigger a fresh ClawSweeper review or ask a maintainer to comment @clawsweeper re-review.

Risk before merge

  • [P1] The contributor proof still uses fake runner and TaskFlow dependencies, so it does not prove a real installed @openclaw/lobster plugin, embedded runtime, or Gateway approval workflow after the fix.
  • [P1] fix(lobster): don't route schema-default flowExpectedRevision into TaskFlow (#102011) #102022 remains open for the same canonical bug with stronger real-runtime proof, so landing both would duplicate the same parser fix.
  • [P1] The live PR is mergeable but behind its recorded base and some checks were still in progress during review, so exact-head CI should refresh before any landing decision.

Maintainer options:

  1. Decide the mitigation before merge
    Land one canonical Lobster parser fix with real installed-plugin or Gateway proof that ordinary default-field run/resume stays on the runner path while managed TaskFlow mode remains intact, then close the duplicate candidates and linked issue after merge.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • [P1] Manual review is needed because this fresh contributor PR competes with a proof-sufficient sibling and still needs contributor real-behavior proof; there is no narrow code repair for automation to apply here.

Maintainer decision needed

Security
Cleared: The diff is limited to Lobster parser logic and colocated tests, with no dependency, lockfile, CI, secret, permission, install, or supply-chain surface change.

Review details

Best possible solution:

Land one canonical Lobster parser fix with real installed-plugin or Gateway proof that ordinary default-field run/resume stays on the runner path while managed TaskFlow mode remains intact, then close the duplicate candidates and linked issue after merge.

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

Yes, source-level. Current main and v2026.6.11 route default flow fields through the managed-parser decision path before ordinary runner fallback; I did not run a live Gateway reproduction in this read-only review.

Is this the best way to solve the issue?

Unclear as the final landing path. A plugin-local parser fix is the right owner boundary, but this branch is not clearly the best candidate while the sibling PR has stronger real-runtime proof.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5a5b4c5b105f.

Label changes

Label justifications:

  • P2: The PR targets a normal-priority shipped Lobster plugin approval workflow bug with limited plugin-local blast radius.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🐚 platinum hermit.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs real behavior proof before merge: The terminal proof exercises patched createLobsterTool with fake runner and TaskFlow dependencies; add redacted installed-plugin, Gateway, or real embedded-runtime output, then update the PR body to trigger a fresh ClawSweeper review or ask a maintainer to comment @clawsweeper re-review.
Evidence reviewed

PR surface:

Source +16, Tests +125. Total +141 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 22 6 +16
Tests 1 125 0 +125
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 147 6 +141

What I checked:

Likely related people:

  • mbelinky: Related merged PRs show this author added managed TaskFlow mode and the follow-up Lobster hardening that shaped the parser branch involved here. (role: introduced behavior and feature-history owner; confidence: high; commits: 30dc24fbd8be, b167df78aa17; files: extensions/lobster/src/lobster-tool.ts, extensions/lobster/src/lobster-tool.test.ts, extensions/lobster/src/lobster-taskflow.ts)
  • vincentkoc: Current parser blame points to e7365d41, recent history includes Lobster/check typing work, and the live PR is assigned to this account. (role: recent area contributor and assigned reviewer; confidence: high; commits: e7365d41d356, 87bcfe796fe4; files: extensions/lobster/src/lobster-tool.ts, extensions/lobster/src/lobster-tool.test.ts)
  • steipete: Recent history shows managed-flow formatting and tool-handling refactors near the same parser and TaskFlow result surface. (role: adjacent refactor contributor; confidence: medium; commits: 3700f3a22cd1, 95df6d933282; files: extensions/lobster/src/lobster-tool.ts, extensions/lobster/src/lobster-taskflow.ts)
  • kirkluokun: This contributor changed the approvalId/resume-token behavior in the same Lobster approval resume path. (role: adjacent resume contributor; confidence: medium; commits: 75fc8b704027; files: extensions/lobster/src/lobster-tool.ts, extensions/lobster/src/lobster-runner.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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.

How this review workflow works
  • 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.
Review history (4 earlier review cycles)
  • reviewed 2026-07-08T05:04:27.124Z sha fcc7cc9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-08T05:11:56.628Z sha fcc7cc9 :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-08T05:26:57.718Z sha cd9cb4d :: needs real behavior proof before merge. :: none
  • reviewed 2026-07-08T05:34:40.270Z sha cd9cb4d :: needs real behavior proof before merge. :: none

@clawsweeper clawsweeper Bot added rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P2 Normal backlog priority with limited blast radius. labels Jul 8, 2026
@LiLan0125

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

Updated the proof section with a real embedded runtime run: the patched Lobster tool loaded the installed @clawdbot/lobster package, ran a temporary .lobster approval workflow with flowStateJson: "{}" and flowExpectedRevision: 0, then resumed it with the returned real token and the same default flow fields.

Verified locally on PR head c12bf2f:

  • pnpm test extensions/lobster/src/lobster-tool.test.ts extensions/lobster/src/lobster-runner.test.ts: passed
  • node --import tsx --no-warnings embedded-runtime proof: runStatus needs_approval, resumeStatus ok

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Command router queued. I will update this comment with the next step.

@vincentkoc

Copy link
Copy Markdown
Member

Maintainer validation is complete on exact head c12bf2f48570da79968487e1dcc10fb4b9ac2f35.

The final parser distinguishes schema-injected defaults from intentional managed fields while preserving strict cross-mode validation. I added the missing negative coverage after fresh autoreview caught two cases where incompatible fields could otherwise be dropped before fallback.

Proof:

  • AWS Crabbox run_f48d59554de8 on lease cbx_c92971815ef7: exit 0; lease released.
  • 52 focused Lobster tool/runner tests passed.
  • Real embedded run -> approval -> resume with injected {} and revision 0 passed.
  • Real managed run preserved explicit stateJson: {}.
  • Full remote pnpm check:changed passed.
  • Hosted CI run 28920766065 completed with 63 successful checks and no failures.
  • Fresh autoreview is clean.

Ready to squash merge.

@vincentkoc
vincentkoc merged commit 8cb9263 into openclaw:main Jul 8, 2026
112 of 115 checks passed
@vincentkoc

Copy link
Copy Markdown
Member

Merged via squash.

@LiLan0125

Copy link
Copy Markdown
Contributor Author

@clawsweeper hatch

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 8, 2026
…aw#102036)

* fix(lobster): keep default flow fields on runner path

* fix(lobster): reject incomplete managed resume revisions

* fix(lobster): preserve explicit empty managed flow state

* fix(lobster): preserve cross-mode validation

---------

Co-authored-by: Vincent Koc <[email protected]>
giodl73-repo pushed a commit to giodl73-repo/openclaw that referenced this pull request Jul 8, 2026
…aw#102036)

* fix(lobster): keep default flow fields on runner path

* fix(lobster): reject incomplete managed resume revisions

* fix(lobster): preserve explicit empty managed flow state

* fix(lobster): preserve cross-mode validation

---------

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

extensions: lobster Extension: lobster P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. size: M status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@openclaw/lobster tool run/resume misroutes schema default flowExpectedRevision into TaskFlow mode

2 participants