Repository navigation
fix(lobster): validate workflows without runtime code generation in AOT - #182928
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
Codex review: needs maintainer review before merge. What this changesThis PR generates Lobster’s fixed validators ahead of time and selects the shared codegen-free validator for dynamic schemas on AOT hosts. Example: An AOT-hosted workflow requests an integer answer of at least 1.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a distinct Lobster AOT failure that remains on main; inspection found no actionable introduced defect, but CI is still failed. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe optional Lobster plugin passes workflow and resume requests into its embedded dependency, which validates input and LLM output before returning workflow envelopes. flowchart TD
A[Lobster tool request] --> B[Embedded runner]
B --> C[Host runtime profile]
C --> D[Native Ajv on JIT]
C --> E[Shared validator on AOT]
D --> F[Lobster workflow runtime]
E --> F
F --> G[Result or resumable checkpoint]
Technical reviewBest possible solution: Retain dependency-owned caching, generate fixed checks, and route AOT dynamic validation through the existing shared provider. Do we have a high-confidence way to reproduce the issue? The original dependency hunks show import-time Ajv compilation and dynamic compilation without AOT selection; the body reports a baseline EvalError and passing candidate probe, but this review executed no code. Is this the best way to solve the issue? The implementation addresses both fixed and dynamic compilation through existing owners, preserves JIT validation and dependency namespaces, and avoids reviving the retired process-global shim. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f544cdc93fc6. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +120, Tests +244, Docs +60, Config +12, Other +1468. Total +1904 across 22 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 24, 2026, 5:54 PM ET / 21:54 UTC. |
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
…OT (openclaw#182928) * fix(lobster): validate workflows in AOT runtimes * fix(plugin-sdk): publish lightweight runtime profile types
What Problem This Solves
Fixes Lobster workflow validation failing in standalone AOT builds.
User Impact
Lobster can request input, resume workflows, and validate LLM output on AOT hosts. Fixed schemas no longer compile during startup on any host; Node and JIT Bun retain native Ajv for dynamic schemas. No new configuration is required.
Why This Change Was Made
Lobster compiled two fixed schemas during import. The narrow dependency patch generates those checks with Ajv at build time, including its Unicode-length helper. The existing host profile selects dynamic validation once, when the runtime is first acquired: native Ajv for JIT, the shared codegen-free provider for AOT. Request-local compiler selection and dependency-owned reference namespaces preserve concurrent requests and schema references across recreated runners.
The profile and AOT compiler load lazily, so the plugin's native static import list is unchanged. Narrow typed SDK subpaths expose the shared validator and the existing profile getter without loading the broader runtime/logging surface on first use; that broader surface was measured and would regress first acquisition. CI's existing generated-validator check covers the patched output, Ajv version, and helper hash.
Evidence
pnpm buildpassed, including 160 public SDK subpaths (7m05.2s in build phases, following artifact-lock preparation). It reported the same inherited UI CSS warnings (296.5/296.3 KiB gzip; 1558.7/1558.1 KiB raw).json-schema-validatorandruntime-profile), four added exports, and no removals. Acknowledgement digest:6c875951(--require-acknowledgement --acknowledge 6c875951).EvalErrorand passes afterward, including real ask/workflow valid and invalid resumes plus compiler scope/cache checks. The final public-import probe compiled 437 modules in 3.982s. This is not a whole-application AOT build or an interpreter-free claim.Exact-head CI
Run 40135040447, attempt 1 completed on
0d32d99a9d400d389d5b1f3bc9552f6a74b58786: 147 jobs passed, 21 skipped, six primary jobs failed plus their aggregate. Security and all selected Android jobs passed. CI remains failed; it was not rerun.All six failures are attributed to baseline behavior. The Docker memory-store cases fail to resolve
@openclaw/fs-safe; both reproduce on clean exact CI base90d9772with the same generated chunk (2 failed, 60 skipped; 119.75s total). The hooks newline and sandbox agent assertions match retained clean-main reproductions. Codex fixtures omit the unchanged producer's reasoning flag; model-discovery and delayed-catalog assertions match retained main failures. Their causal input blobs match the current CI base and tested merge. The failure report labels five jobs unknown and the packaging job new; the independent exact-base proof supplies the attribution rather than relabeling CI green.CI tested merge
c13c7f9has the exact PR head and recorded main baseline as parents. Its 22-path authored change record is byte-identical to the reviewed branch patch. Native inherited-failure admission retains this evidence and does not waive security or review gates.Performance
Fifteen paired fresh processes importing native packaged plugin entries, on a shared host:
Medians are within noise; tail regressions remain visible. The earlier eager-profile version and all samples with increases of at least 20% are retained in the task evidence. No startup speedup is claimed.
At the package boundary, removing import-time compiler warmup moves cost to the first dynamic compilation: Node 9.509 → 16.846ms, Bun 22.141 → 33.082ms. Total import plus first validation CPU decreased from 179.281 → 170.835ms on Node and 159.675 → 109.179ms on Bun. The longer Node warm-validation run measured 2296.438 → 2256.982ns median and 2328.055 → 2419.240ns p95 (+3.92%). These are scoped validator measurements, not whole-application startup claims.
Dependency and follow-up
Ajv 8.20.0 was already Lobster's pinned runtime dependency; the new direct declaration is build-only. It is MIT-licensed, was released April 24, 2026, and its repository is active/not archived (last push September 6; latest commit
f177fe323420ccb23e1a79445fd470cbf80aee7c). npm reports 249,308,485 downloads for October 16–22.Port the generated fixed validators and scoped compiler hook to openclaw/lobster. Remove the patch when a published version passes the same runner and AOT/codegen-ban proof. No new runtime dependency is introduced.