Skip to content

feat(workshop): use selected judgment provider for semantic reviews - #152243

Draft
jalehman wants to merge 5 commits into
mainfrom
openclaw/jev-pr-workshop
Draft

jalehman wants to merge 5 commits into
mainfrom
openclaw/jev-pr-workshop

Conversation

@jalehman

Copy link
Copy Markdown
Contributor

Related: #152234

What Problem This Solves

Skill Workshop needs to use the selected typed judgment provider for semantic experience and collection review, rather than always running an open-ended generative reviewer.

User Impact

Otherwise-enabled Workshop reviews use judgments.provider (for example, a separately installed TypeSafe/Jev adapter). Accepted no-change decisions finish without a generative reviewer; accepted changes go to a focused author with the selected action, targets, and evidence. Unavailable, ambiguous, incomplete, or stale decisions explicitly fall back to the existing reviewer. Cancellation does not launch fallback work.

Workshop activation and publication permissions remain unchanged: off stays off, propose stages changes, and auto retains its existing maintenance authority. Selecting a provider does not schedule reviews. No vendor adapter, memory integration, new consumer switch, or persisted-state migration is included.

Why This Change Was Made

  • Experience review asks for one concrete plan first, then requests grounding only for writes. Both provider phases and intervening catalog checks share a two-second budget.
  • Evidence projection preserves semantic content and exact tool-call/result linkage. Bounded or incomplete evidence cannot establish complete no-change coverage.
  • Collection review evaluates a bounded complete catalog and routes accepted changes directly to focused authorship, including transient cron payload replacement without changing persisted job prompts.
  • Catalog revision, cancellation, and current-authority checks remain in force. Judgment output does not grant publication authority.

Stack and Scope

Draft stacked on #152237, using openclaw/jev-pr-judgments-foundation as its GitHub base. That foundation itself depends on #152236.

The branch also contains the independent scheduler prerequisite #152235. Its two scheduler files therefore appear in this PR's current comparison with foundation; they are not new consumer behavior. Reconcile the stack after prerequisites land so each fix is reviewed/merged once. This feature is not stacked on memory.

Evidence

  • Prior composed-tree verification: 235 focused tests passed: 66 guidance/experience, 155 Gateway cron, and 14 cron payload tests.
  • Tests cover registered-provider entrypoints, no-change without a reviewer, focused authorship, fallback, exact target identity, evidence linkage, whole-batch validation, catalog changes, cancellation, and deadline sharing.
  • Fresh pre-publication source review found no production blocker. Fixed its documentation anchor finding and corrected the result-before-call fixture so that case actually exercises out-of-order evidence.
  • Fresh corrected guidance suite: 29 tests pass, including the repaired out-of-order linkage case; compiled-source verification passes.
  • Fresh formatter and diff checks pass. Regular docs link audit: 13,886 links checked, zero broken links. Full anchor audit does not pass: it reports fragments in untouched documentation, with no failures in either changed documentation page. This is not claimed as a green full docs audit.

Remaining Before Ready for Review

Composed Workshop type/lint/full-build checks, current-main integration, CI, and live tuned end-to-end quality validation remain outstanding. Existing focused tests use synthetic provider responses and prove routing, not Jev model quality. Historical frozen-benchmark results do not measure this tuned branch; no accuracy, latency, or cost improvement is claimed.

@clawsweeper

clawsweeper Bot commented Sep 18, 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.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime size: XL maintainer Maintainer-authored PR labels Sep 18, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: blocked before merge.

What this changes

Skill Workshop uses typed provider decisions to skip unnecessary reviews or give a generative author a focused change plan, while adding provider configuration, plugin registration, lifecycle handling, documentation, and tests.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful routing work and substantial synthetic coverage remain, but two correctness blockers and absent real consumer proof prevent readiness.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) 2 actionable review findings remain.

Merge readiness

⛔ Blocked before merge - 6 items remain

Keep open: Workshop integration remains useful and is not implemented on current main. Both previously reported correctness blockers remain unchanged, and the protected maintainer label requires human handling.

Priority: P2
Reviewed head: 2f84c43d717f55d278401fd4092ae9ef47752edd
Owner decision: Required. See Decision needed.

Decision needed

  • Question: Should Workshop's experience and collection reviews join the existing default-off Decision assistance gate in this PR, or remain deferred from the rollout?
  • Recommendation: Include Workshop behind the existing gate: Approve both review consumers using the shared Labs eligibility helper while retaining Workshop off/propose/auto and publication authority.
  • Why: The recorded direction supports existing Workshop ownership, but the proposed initial preset excludes Workshop and does not settle its rollout scope.

Before merge

  • Route Workshop through the canonical per-agent Decision API (P1) - This prior blocker remains unchanged. With a supported global or per-agent decisionModel configured, this guard returns legacy because it checks only judgments.provider; collection guidance and its cron caller have the same mismatch. The merged foundation at feat(plugins): add decision models with per-agent selection #152237 explicitly replaced this draft contract. Pass the owning agent to the existing Decision runtime and remove the parallel draft config/SDK surface so inheritance and explicit agent disablement govern both consumers.
  • Fall back when an inventoried catalog target disappears (P2) - This prior blocker remains unchanged. Inventory is captured before awaited directory traversal. If an inventoried skill is removed before traversal captures its SKILL.md, contents.get is undefined and this ordinary Error escapes the catch, which recognizes only filesystem codes and FsSafeError. Both review consumers then fail instead of using the promised existing reviewer. Return an incomplete-catalog result for this case and add a deterministic removal-between-inventory-and-traversal regression.
  • Resolve merge risk - Workshop's inclusion in Decision assistance needs explicit scope confirmation: selecting a provider currently changes enabled reviews without checking the existing Labs consent gate.
  • Resolve merge risk - Fresh-install and existing-config integration evidence must verify both entry points preserve the original reviewer and prompt with absent selection or an empty agent override, and distinguish typed unavailability, unexpected errors, and terminal cancellation.
  • Complete next step - Confirm Workshop's Labs rollout scope, reconcile this branch with current main and canonical Decision selection, repair catalog-disappearance fallback, and validate both consumer entry points before merge.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Route Workshop through the canonical per-agent Decision API — src/skills/workshop/judgment-guidance.ts:435-436
  • [P2] Fall back when an inventoried catalog target disappears — src/skills/workshop/judgment-guidance.ts:354-356
Agent review details

How this fits together

Skill Workshop reviews completed conversations and existing skills to identify reusable procedures. This change inserts provider decisions before the existing reviewer or author, while Workshop mode and normal tool authority continue to control publication.

flowchart TD
  A[Completed conversation] --> C[Workshop review]
  B[Skills and proposals] --> C
  C --> D[Provider decision]
  D --> E[No change]
  D --> F[Focused author]
  D --> G[Existing reviewer fallback]
  F --> H[Workshop permission checks]
  G --> H
Loading

Technical review

Best possible solution:

Keep Workshop as the consumer owner, use canonical agent-scoped Decision selection and the approved Labs gate, and preserve existing review and publication behavior when assistance is ineligible.

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

Yes, from source: canonical decisionModel settings never satisfy the draft selector, and removal of an inventoried skill before traversal reaches it escapes fallback. No runtime tests were executed in this read-only review.

Is this the best way to solve the issue?

No: the useful Workshop routing should consume the existing Decision runtime instead of retaining a second provider framework; catalog disappearance should return baseline fallback while cancellation remains terminal.

Full review comments:

  • [P1] Route Workshop through the canonical per-agent Decision API — src/skills/workshop/judgment-guidance.ts:435-436
    This prior blocker remains unchanged. With a supported global or per-agent decisionModel configured, this guard returns legacy because it checks only judgments.provider; collection guidance and its cron caller have the same mismatch. The merged foundation at feat(plugins): add decision models with per-agent selection #152237 explicitly replaced this draft contract. Pass the owning agent to the existing Decision runtime and remove the parallel draft config/SDK surface so inheritance and explicit agent disablement govern both consumers.
    Confidence: 0.99
  • [P2] Fall back when an inventoried catalog target disappears — src/skills/workshop/judgment-guidance.ts:354-356
    This prior blocker remains unchanged. Inventory is captured before awaited directory traversal. If an inventoried skill is removed before traversal captures its SKILL.md, contents.get is undefined and this ordinary Error escapes the catch, which recognizes only filesystem codes and FsSafeError. Both review consumers then fail instead of using the promised existing reviewer. Return an incomplete-catalog result for this case and add a deterministic removal-between-inventory-and-traversal regression.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.97

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 6693bb9665ce.

Merge-risk options

Maintainer options:

  1. Reconcile selection and activation (recommended)
    Remove the retired draft API, use owning-agent Decision selection, and connect approved Workshop consumers to the existing Labs gate with baseline compatibility evidence.
  2. Pause consumer rollout
    Retain the useful Workshop branch while activation scope and integration with current main are resolved.

Security

None.

Evidence

What I checked:

  • Pinned introduction and review continuity: Reviewed the merge-base-to-head introduced delta, not endpoint drift. The recorded previous reviews inspected this same head; both retained findings are still present. (src/skills/workshop/judgment-guidance.ts:435, 2f84c43d717f)
  • Retired selection contract: Experience guidance checks judgments.provider at line 435; collection guidance repeats that check at line 604, and the cron entry point checks it before calling guidance. Neither consumer passes its owning agent to the canonical Decision runtime. (src/skills/workshop/judgment-guidance.ts:435, 2f84c43d717f)
  • Merged canonical foundation: GitHub verifies feat(plugins): add decision models with per-agent selection #152237 merged on September 19. Its description explicitly replaces the unpublished judgments draft with per-agent decisionModel selection and api.runtime.decisions.evaluate; an empty agent override disables evaluation. (cde6bbdcfe84)
  • Current-main behavior and necessity: Current main resolves inherited and explicitly disabled per-agent Decision selections, but Workshop experience review still builds its existing generative prompt and collection cron still invokes the existing isolated review directly. The merged foundation therefore does not implement this PR's central consumer behavior. (src/skills/workshop/experience-review.ts:308, 6693bb9665ce)
  • Catalog disappearance escapes fallback: Inventory is captured before awaited filesystem traversal. If an inventoried SKILL.md disappears before traversal captures it, mapping throws an ordinary Error at line 356. The catch accepts filesystem error codes and FsSafeError only, so this error rejects the review instead of returning legacy fallback. (src/skills/workshop/judgment-guidance.ts:356, 2f84c43d717f)
  • Existing Labs owner: Current main supplies isDecisionAssistanceEligible, requiring explicit decisionAssistance true and an effective owning-agent Decision model. Public documentation defines checks before evidence preparation and again at dispatch, while permitting already-dispatched work to finish after opt-out. (src/agents/decision-assistance.ts:12, 6693bb9665ce)

PR surface

Source +2033, Tests +2275, Docs +173, Config +4, Generated 0, Other +1. Total +4486 across 64 files.

View PR surface stats
Area Files Added Removed Net
Source 39 2062 29 +2033
Tests 18 2283 8 +2275
Docs 3 173 0 +173
Config 1 4 0 +4
Generated 2 3 3 0
Other 1 1 0 +1
Total 64 4526 40 +4486

Review metrics

Metric Value Why it matters
Production versus test growth production net +2033; tests and test support net +2275 The introduced src/test delta includes a draft provider foundation that should be removed during reconciliation with the already-merged owner.
Parallel selection surface 1 root selector and 1 public SDK subpath added judgments.provider and plugin-sdk/judgments compete with the canonical per-agent Decision contract.

Labels

Label changes:

No label changes.

Label justifications:

  • P2: This is a bounded experimental Workshop improvement with integration blockers, rather than an observed production outage.
  • merge-risk: 🚨 compatibility: The branch adds a parallel config/SDK contract and bypasses canonical agent selection, while activation and existing-config behavior remain unresolved.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action.

Rank-up moves

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

  • Port both consumers to canonical agent-scoped Decision selection and remove the draft foundation surface.
  • Repair catalog disappearance with a deterministic failing-before/passing-after regression.
  • After activation scope is approved, validate both reconciled entry points for baseline, unavailable, unexpected-error, and cancellation behavior, and attach redacted real runtime evidence.

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.

History

Review history (3 earlier review cycles)
  • reviewed 2026-09-18T23:35:29.951Z sha 2f84c43 :: blocked before merge. :: [P2] Return legacy fallback when a catalog target disappears during reading
  • reviewed 2026-09-19T21:46:20.863Z sha 2f84c43 :: blocked before merge. :: [P1] Route Workshop through the merged per-agent decisions API | [P2] Return fallback when a catalog target disappears during reading
  • reviewed 2026-10-06T13:59:41.301Z sha 2f84c43 :: blocked before merge. :: [P1] Route Workshop through the canonical per-agent Decision API | [P2] Fall back when an inventoried catalog target disappears

Reviewed October 6, 2026, 10:09 AM ET / 14:09 UTC (Revision 4).

@steipete
steipete force-pushed the openclaw/jev-pr-judgments-foundation branch from d220d8c to 52a6341 Compare September 19, 2026 16:10
Base automatically changed from openclaw/jev-pr-judgments-foundation to main September 19, 2026 21:37
@openclaw-barnacle openclaw-barnacle Bot added scripts Repository scripts agents Agent runtime and tooling plugin: file-transfer labels Sep 19, 2026
@clawsweeper clawsweeper Bot added the merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. label Sep 19, 2026
@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Josh's requested Labs/core-owner direction is documented in #155314, with Workshop-specific acceptance in #155317. The existing Workshop workflow can retain ownership; no general decisions-plugin framework is required.

Please reconcile the old judgments.provider/evaluateJudgment stack with the canonical agent-scoped decisionModel/Decision runtime, rather than retaining a second selector. Prove both experience and collection entry points keep the existing generative reviewer/prompt with no model or an empty owning-agent override. Preserve Workshop off/propose/auto and publication authority; Labs is not permission to publish. Typed unavailable, unexpected provider errors, and cancellation/authority closure need distinct handling/evidence.

@clawsweeper clawsweeper Bot added rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. labels Oct 6, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling docs Improvements or additions to documentation gateway Gateway runtime maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. plugin: file-transfer rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. scripts Repository scripts size: XL status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants