Skip to content

fix(lobster): treat schema-default flowExpectedRevision=0 as absent for ordinary run/resume#102023

Closed
tzy-17 wants to merge 2 commits into
openclaw:mainfrom
tzy-17:fix/102011-lobster-schema-defaults
Closed

fix(lobster): treat schema-default flowExpectedRevision=0 as absent for ordinary run/resume#102023
tzy-17 wants to merge 2 commits into
openclaw:mainfrom
tzy-17:fix/102011-lobster-schema-defaults

Conversation

@tzy-17

@tzy-17 tzy-17 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes #102011: When the OpenClaw tool schema injects flowExpectedRevision=0 as a default value, the Lobster plugin's parseRunFlowParams and parseResumeFlowParams treated this as an intentional TaskFlow signal, causing ordinary run and resume calls to fail with:

  • run action does not accept flowId or flowExpectedRevision
  • flowExpectedRevision required when using managed TaskFlow resume mode

Why This Change Was Made

Only a positive flowExpectedRevision (> 0) signals intentional TaskFlow mode. Schema default 0 means the caller did not supply this field — it should be treated as absent. The fix applies to both parseRunFlowParams and parseResumeFlowParams:

  • run: Only reject when flowExpectedRevision > 0
  • resume: Only enter TaskFlow mode when flowExpectedRevision > 0; the validation error is also updated to require a positive value

Evidence

  • pnpm test extensions/lobster/src/lobster-tool.test.ts — 19 tests pass (incl. 2 new)

🤖 Generated with Claude Code

@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Thanks for the contribution. I reviewed the branch, and this PR is not a good landing base for OpenClaw.

Close: the underlying Lobster and cron bugs are real, but this branch is not a useful landing candidate because it bundles two unrelated fixes, has current-head validation failures, and its Lobster regression tests do not prove the reported runner path.

Root-cause cluster
Relationship: fixed_by_candidate
Canonical: #102011
Summary: This PR is a low-quality candidate fix for the canonical Lobster schema-default TaskFlow misrouting issue, but it also includes an adjacent-distinct cron fix for a separate message-delivery issue.

Members:

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

So I’m closing this PR rather than keeping an unmergeable branch open. A new narrow PR that carries only the useful part is welcome.

Review details

Best possible solution:

Close this dirty branch, keep the Lobster fix in one focused parser PR, and keep cron restart catch-up repair tied to the separate cron issue or a cron-only PR.

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

Yes, source-level: current main shows the Lobster parser can route injected flow defaults into managed mode, and the cron report has a clear stale due-slot path. I did not run a live Gateway or installed Lobster scenario during this read-only review.

Is this the best way to solve the issue?

No. The branch is not the best way to solve the issue because it bundles unrelated fixes and its tests/CI do not prove the Lobster behavior; the maintainable path is separate focused fixes with focused proof.

Security review:

Security review cleared: The diff only changes TypeScript parser/scheduler logic and colocated tests; no dependency, lockfile, CI, secret, permission, package, or supply-chain surface changed.

AGENTS.md: found and applied where relevant.

What I checked:

Likely related people:

  • mbelinky: Managed Lobster TaskFlow mode and follow-up hardening changed the parser branch involved in the Lobster part of this PR. (role: introduced behavior and recent area contributor; 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)
  • Takhoffman: Authored adjacent cron restart catch-up replay semantics in the same scheduler and restart catch-up test surface. (role: feature-history contributor; confidence: high; commits: 79d00ae39860, d659a8ebb028; files: src/cron/service/timer.ts, src/cron/service.restart-catchup.test.ts, src/cron/service/jobs.ts)
  • steipete: Recent history shows Lobster managed-flow formatting/handling refactors and adjacent approval resume work near the affected parser surface. (role: adjacent contributor and merger; confidence: medium; commits: 95df6d933282, 3700f3a22cd1, 75fc8b704027; files: extensions/lobster/src/lobster-tool.ts, extensions/lobster/src/lobster-taskflow.ts, extensions/lobster/src/lobster-runner.ts)
  • Omar Shahine: Current-line blame for the Lobster parser points to a recent file recreation/refactor commit, though the managed TaskFlow behavior predates it. (role: recent area contributor; confidence: low; commits: 91a0ebbce63f; files: extensions/lobster/src/lobster-tool.ts, extensions/lobster/src/lobster-tool.test.ts)

Codex review notes: model internal, reasoning high; reviewed against 63192752325b.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. labels Jul 8, 2026
tzy-17 and others added 2 commits July 8, 2026 13:04
…h status=ok

When the Gateway restarts, overdue cron jobs with lastRunStatus=ok
and lastRunAtMs >= nextRunAtMs were still considered runnable,
causing duplicate notifications to users.

Add a check in isRunnableJob: if the job already ran successfully
at or after its scheduled time, skip catchup.

Fixes openclaw#101988

Co-Authored-By: Claude <[email protected]>
…or ordinary run/resume

When the OpenClaw tool schema injects flowExpectedRevision=0 as a
default value, ordinary run/resume calls were misrouted into managed
TaskFlow mode, causing "does not accept flowId or flowExpectedRevision"
errors for valid non-TaskFlow calls.

Only treat flowExpectedRevision > 0 as intentional TaskFlow signal;
schema default 0 means the caller did not supply this field.

Fixes openclaw#102011

Co-Authored-By: Claude <[email protected]>
@clawsweeper

clawsweeper Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

ClawSweeper applied the proposed close for this PR.

@clawsweeper clawsweeper Bot closed this Jul 8, 2026
@tzy-17
tzy-17 deleted the fix/102011-lobster-schema-defaults branch July 8, 2026 05:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: lobster Extension: lobster merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 message-delivery 🚨 May drop, duplicate, misroute, suppress, or wrongly target messages. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: S 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

1 participant