Skip to content

fix(comfy): evaluate live test guards after config load - #116388

Merged
vincentkoc merged 1 commit into
mainfrom
fix/comfy-live-test-guard
Jul 30, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
fix/comfy-live-test-guard

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Fixes an issue where configured Comfy live workflows were always skipped because capability guards ran while Vitest collected the file, before beforeAll loaded the isolated live configuration.

Why This Change Was Made

Each image, video, and music case now evaluates its capability inside the test through Vitest's runtime skip context. This preserves lazy best-effort config loading and reports a skip only after the loaded configuration is known.

User Impact

No shipped runtime behavior changes. Maintainers running COMFY_LIVE_TEST=1 can now exercise configured Comfy workflows instead of receiving false skips.

Evidence

A configured Comfy endpoint was not available in the isolated proof environment, so no external workflow success is claimed.

@vincentkoc vincentkoc self-assigned this Jul 30, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Jul 30, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review July 30, 2026 11:43
@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. labels Jul 30, 2026
@clawsweeper

clawsweeper Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed July 30, 2026, 7:49 AM ET / 11:49 UTC.

ClawSweeper review

What this changes

The PR changes Comfy live tests so image, video, and music capability checks run inside each test after the isolated live configuration loads, rather than during test registration.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this PR open for explicit maintainer review. The one-file test change matches Vitest’s collection-before-beforeAll lifecycle and has no concrete correctness or security defect in the reviewed diff, but it is member-authored, carries the protected maintainer label, and still has relevant checks in progress.

Priority: P3
Reviewed head: 7a8a06c381d191d2666724850c05e8acf506fc9e
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, plausible test-lifecycle repair with relevant isolated-run evidence and no actionable defect in the reviewed patch.
Proof confidence 🐚 platinum hermit (4/6) Not applicable: This is a member-authored test-only PR, so the external-contributor proof gate does not apply; its submitted Testbox output nevertheless directly exercises the revised isolated-config skip path.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a member-authored test-only PR, so the external-contributor proof gate does not apply; its submitted Testbox output nevertheless directly exercises the revised isolated-config skip path.
Evidence reviewed 5 items Current-main failure mechanism: At the base revision, the Comfy live suite evaluates it.skipIf(!isComfyCapabilityConfigured(...)) during test collection, before the suite beforeAll can populate the isolated configuration. The changed guard begins at the first image case near line 71.
Proposed repair: The PR head replaces declaration-time skips with Vitest test-context skip() calls at the start of each image, video, and music callback, returning before any provider invocation when configuration is absent.
Vitest lifecycle contract: Vitest collects tests before running suite beforeAll hooks, so the original declaration-time predicate cannot observe configuration loaded by that hook; evaluating the predicate in the test callback is the narrow owner-local fix. (main.vitest.dev)
Findings None None.
Security None None.

How this fits together

The bundled Comfy plugin exposes workflow-backed image, video, and music generation. Its opt-in live test suite loads isolated configuration before exercising those provider paths, then either runs the configured workflow or records an intentional skip.

flowchart TD
  A[COMFY_LIVE_TEST enabled] --> B[Comfy live test suite]
  B --> C[beforeAll loads isolated config]
  C --> D[Capability check per workflow]
  D -->|configured| E[Comfy provider call]
  D -->|not configured| F[Recorded test skip]
  E --> G[Media output assertions]
Loading

Decision needed

Question Recommendation
Should an OpenClaw owner land this member-authored Comfy live-test repair once the remaining exact-head checks complete? Review and land after CI: Confirm the remaining checks on commit 7a8a06c381d191d2666724850c05e8acf506fc9e and land the focused test-lifecycle repair.

Why: The patch is bounded and appears correct, but the protected maintainer label and member authorship require explicit maintainer handling rather than automated cleanup or merge routing.

Before merge

  • Complete next step (P2) - No mechanical repair is indicated; this member-authored, maintainer-labeled PR needs normal owner review after the remaining exact-head checks complete.
Agent review details

Security

None.

PR surface

Tests +2. Total +2 across 1 file.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 53 51 +2
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 1 53 51 +2

Review metrics

None.

Merge-risk options

  • Relevant CI shards were still in progress at review time, so landing should wait for the exact head’s required checks and normal maintainer review rather than treating the current blocked merge state as a code defect.

Maintainer options:

  1. Decide the mitigation before merge
    Land the focused runtime-skip refactor after the exact-head CI completes green and an owner confirms the configured Comfy live path is adequately covered by the existing live-test contract.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the focused runtime-skip refactor after the exact-head CI completes green and an owner confirms the configured Comfy live path is adequately covered by the existing live-test contract.

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

Yes, from source: collection-time skipIf runs before the suite beforeAll hook that loads isolated configuration, so configured capabilities can be falsely skipped. The review did not execute a configured external Comfy endpoint.

Is this the best way to solve the issue?

Yes. Moving the existing capability decision to the test callback preserves the current config loader and provider assertions while evaluating the fact only after its owning setup phase has completed.

AGENTS.md: found and applied where relevant.

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

Labels

Label changes:

  • add P3: This is a small opt-in live-test reliability repair with no shipped runtime, configuration, or user-data behavior change.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a member-authored test-only PR, so the external-contributor proof gate does not apply; its submitted Testbox output nevertheless directly exercises the revised isolated-config skip path.

Label justifications:

  • P3: This is a small opt-in live-test reliability repair with no shipped runtime, configuration, or user-data behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🐚 platinum hermit and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This is a member-authored test-only PR, so the external-contributor proof gate does not apply; its submitted Testbox output nevertheless directly exercises the revised isolated-config skip path.

Evidence

What I checked:

  • Current-main failure mechanism: At the base revision, the Comfy live suite evaluates it.skipIf(!isComfyCapabilityConfigured(...)) during test collection, before the suite beforeAll can populate the isolated configuration. The changed guard begins at the first image case near line 71. (extensions/comfy/comfy.live.test.ts:71, fb6545738564)
  • Proposed repair: The PR head replaces declaration-time skips with Vitest test-context skip() calls at the start of each image, video, and music callback, returning before any provider invocation when configuration is absent. (extensions/comfy/comfy.live.test.ts:73, 7a8a06c381d1)
  • Vitest lifecycle contract: Vitest collects tests before running suite beforeAll hooks, so the original declaration-time predicate cannot observe configuration loaded by that hook; evaluating the predicate in the test callback is the narrow owner-local fix. (main.vitest.dev)
  • Submitted validation: The PR body reports a Blacksmith Testbox run with an isolated empty home (one pass and three intentional skips), plus the focused Comfy test command, formatting check, and diff check. Repository policy permits focused proof for a bounded behavior-neutral test refactor. (raw.githubusercontent.com) (extensions/comfy/comfy.live.test.ts:68, 7a8a06c381d1)
  • Scoped extension policy: The changed file remains entirely within the Comfy bundled-plugin test surface and adds no core import, SDK contract, runtime dependency, or plugin metadata change. (raw.githubusercontent.com) (extensions/comfy/comfy.live.test.ts:68, 7a8a06c381d1)

Likely related people:

  • vincentkoc: Authored the reviewed test-only repair, is assigned to this PR, and is a repository member; no distinct earlier Comfy feature-history owner could be established from the available read-only evidence. (role: current Comfy live-test contributor; confidence: low; commits: 7a8a06c381d1; files: extensions/comfy/comfy.live.test.ts)

Rank-up moves

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

  • Wait for the remaining exact-head CI shards to finish before landing.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
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.

Workflow

  • 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.

@vincentkoc

Copy link
Copy Markdown
Member Author

Owner decision: land this focused test-lifecycle repair. Exact-head CI completed green on 7a8a06c381d191d2666724850c05e8acf506fc9e with openclaw/ci-gate passing; the ClawSweeper rank-up move is satisfied. Configured external Comfy generation remains outside the available proof surface, as documented in the PR body.

@vincentkoc
vincentkoc merged commit 3e7ecb3 into main Jul 30, 2026
176 of 180 checks passed
@vincentkoc
vincentkoc deleted the fix/comfy-live-test-guard branch July 30, 2026 11:58
@vincentkoc

Copy link
Copy Markdown
Member Author

Merged via squash.

vincentkoc added a commit that referenced this pull request Jul 30, 2026
* origin/main: (99 commits)
  docs(automation): rename scheduled-tasks feature wording to Automations (#114855)
  feat(ui): finish cron -> Automations rename in visible strings (#114853)
  feat(cli): add openclaw automations alias and reword cron display prose (#114854)
  feat(agents): rename scheduler agent tool cron -> automations (#114841)
  fix(tui): preserve session state across switches and reconnects (#116399)
  feat(agents): report CLI command outcomes in channel progress
  fix(cli): preserve explicit option intent (#116389)
  fix(release): trust update restart harness (#116301)
  test(reef): remove false-green live guard smoke (#116393)
  test(comfy): evaluate live guards after setup (#116388)
  fix(heartbeat): serialize wake lifecycle state (#116351)
  test: remove redundant extension boundary wrapper (#116385)
  fix(test): bound Testbox agentic and extension suites (#115696)
  fix(ui): show the correct Threads page size (#116349)
  test(discord): align progress timing expectations (#116377)
  feat(ui): add composable skill references (#116330)
  fix(qa): prevent Slack cleanup from stalling profile runs (#116361)
  fix(ci): validate frozen release candidates faithfully (#116357)
  improve(ci): fail_fast option for release validation, off by default (#116352)
  fix(agents): compare shell tool names case-insensitively and stop re-parsing tool labels
  ...
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jul 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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