Skip to content

fix: show OS-incompatible always-on skills as unavailable - #123731

Merged
shakkernerd merged 1 commit into
mainfrom
fix/always-os-status
Aug 14, 2026
Merged

shakkernerd merged 1 commit into
mainfrom
fix/always-os-status

Conversation

@shakkernerd

Copy link
Copy Markdown
Contributor

Related: #122271
Follow-up to the rejected approach in #122331

What Problem This Solves

Skill and hook status evaluation disagreed with actual runtime loading when metadata combined always: true with an incompatible os restriction.

The runtime loader correctly treats os as a hard compatibility boundary and excludes the entry. However, status evaluation cleared the missing OS requirement and reported the same entry as eligible. The documentation also incorrectly described always as bypassing every gate.

This could make openclaw skills output, onboarding, doctor checks, and hook status claim that an entry was available when the runtime would not load it.

Why This Change Was Made

Keep the established runtime behavior unchanged:

  • os determines whether the local host or a connected remote runtime can support the entry.
  • always bypasses requires.bins, requires.anyBins, requires.env, and requires.config.
  • always does not bypass an incompatible os restriction.
  • Entries without an os restriction continue working exactly as before.

The shared status evaluator now preserves OS incompatibility while clearing only the runtime requirements that always is intended to bypass. The skills and hooks documentation now states the same contract.

User Impact

This does not change skill discovery, loading, prompt injection, or execution behavior.

Status and diagnostic surfaces now accurately report OS-incompatible always-on skills and hooks as unavailable instead of claiming they are eligible.

Evidence

Focused regression coverage verifies:

  • an always-on entry remains eligible on a compatible OS despite missing runtime requirements
  • an always-on entry remains ineligible on an incompatible OS
  • skill status preserves the missing OS requirement
  • hook status preserves the missing OS requirement

Validation:

  • 7 focused test files passed across 3 Vitest shards
  • 76 tests passed
  • formatting and documentation checks passed
  • AutoReview reported no findings

@clawsweeper

clawsweeper Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation size: S maintainer Maintainer-authored PR labels Aug 14, 2026
@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. 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 Aug 14, 2026
@clawsweeper

clawsweeper Bot commented Aug 14, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: found issues before merge. Reviewed August 14, 2026, 12:38 PM ET / 16:38 UTC.

ClawSweeper review

What this changes

The PR changes skills and hooks status reporting so always bypasses ordinary requirements but not an incompatible operating-system restriction, and updates the related docs and tests.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep open: the prior P2 OS-alias parity finding remains. The branch preserves OS incompatibility in status, but a skill or hook declaring os: ["macos"] is considered compatible by status on Darwin while the runtime loader still rejects it.

Priority: P2
Reviewed head: 3a8a2d715aabb94f08d3e340cb80b7ec3f431fe7

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The intended policy and regression coverage are focused, but the remaining shared-matcher defect blocks merge readiness.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR is exempt from the external-contributor real-behavior-proof gate; its reported focused tests remain supplemental to the unresolved correctness finding.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored PR is exempt from the external-contributor real-behavior-proof gate; its reported focused tests remain supplemental to the unresolved correctness finding.
Evidence reviewed 6 items Changed status behavior: The branch now preserves the OS-missing result when always is enabled, making status depend on the shared status-side platform matcher.
Existing alias contract: The branch’s existing test explicitly treats macos as equivalent to darwin for both local and remote status eligibility.
Runtime mismatch: The shared runtime matcher uses raw string inclusion, and both the skills and hooks loading paths call it; neither path accepts the status-side macos alias.
Findings 1 actionable finding [P2] Normalize OS aliases in the runtime eligibility check
Security None None.

How this fits together

Skill and hook metadata is evaluated both when OpenClaw loads entries and when it reports availability in commands and diagnostics. Status results should describe the same platform eligibility that the skills and hooks loaders enforce.

flowchart LR
  A[Skill or hook metadata] --> B[Platform compatibility]
  A --> C[Runtime requirements]
  B --> D[Eligibility decision]
  C --> D
  D --> E[Status and diagnostics]
  D --> F[Skill and hook loading]
Loading

Before merge

  • Normalize OS aliases in the runtime eligibility check (P2) - requirements treats macos as darwin, but the runtime check still compares raw strings. Thus this change can report an always-on os: ["macos"] skill or hook eligible on Darwin even though both loaders reject it. Reuse one matcher and cover that alias through the runtime boundary.
  • Resolve merge risk (P1) - Merging as-is leaves existing os: ["macos"] skills and hooks able to appear eligible in status on Darwin even though their runtime loaders reject them.
  • Complete next step (P2) - A concrete P2 repair is known, but this maintainer-labelled PR should remain in its existing human review path rather than receive an automated replacement.

Findings

  • [P2] Normalize OS aliases in the runtime eligibility check — src/shared/requirements.ts:171
Agent review details

Security

None.

PR surface

Source -2, Tests +61, Docs +4. Total +63 across 8 files.

View PR surface stats
Area Files Added Removed Net
Source 2 15 17 -2
Tests 3 65 4 +61
Docs 3 8 4 +4
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 8 88 25 +63

Review metrics

Metric Value Why it matters
Production versus test LOC production -2, tests +61, docs +4 The bug fix reduces production code overall; the added tests are focused on status behavior, but they currently omit the runtime-alias parity case.

Stored data model

Persistent data-model change detected: vector/embedding metadata: src/hooks/hooks-status.test.ts, vector/embedding metadata: src/shared/requirements.test.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Unify OS matching before merge (recommended)
    Make the runtime eligibility evaluator use the same OS normalization as status evaluation and cover the macos alias through skills and hooks.

Technical review

Best possible solution:

Use one canonical OS compatibility matcher for status and runtime loading, then add skill and hook coverage for local and remote macos aliases before retaining the clarified documentation.

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

Yes, from source: evaluate an always-on os: ["macos"] entry on Darwin. Status normalizes it to darwin, while the runtime evaluator uses raw inclusion and rejects it.

Is this the best way to solve the issue?

No. Preserving OS as a hard boundary is the right direction, but the fix is incomplete until status and both runtime loader callers use the same platform matcher.

Full review comments:

  • [P2] Normalize OS aliases in the runtime eligibility check — src/shared/requirements.ts:171
    requirements treats macos as darwin, but the runtime check still compares raw strings. Thus this change can report an always-on os: ["macos"] skill or hook eligible on Darwin even though both loaders reject it. Reuse one matcher and cover that alias through the runtime boundary.
    Confidence: 0.98

Overall correctness: patch is incorrect
Overall confidence: 0.98

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: This creates incorrect skills and hooks availability diagnostics for a supported platform alias without changing execution into a crash or data-loss path.
  • merge-risk: 🚨 compatibility: Existing metadata using the accepted macos alias can receive a status result that disagrees with runtime loading after this change.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This member-authored PR is exempt from the external-contributor real-behavior-proof gate; its reported focused tests remain supplemental to the unresolved correctness finding.

Evidence

What I checked:

  • Changed status behavior: The branch now preserves the OS-missing result when always is enabled, making status depend on the shared status-side platform matcher. (src/shared/requirements.ts:171, 3a8a2d715aab)
  • Existing alias contract: The branch’s existing test explicitly treats macos as equivalent to darwin for both local and remote status eligibility. (src/shared/requirements.test.ts:47, 3a8a2d715aab)
  • Runtime mismatch: The shared runtime matcher uses raw string inclusion, and both the skills and hooks loading paths call it; neither path accepts the status-side macos alias. (src/shared/config-eval.ts:140, 3a8a2d715aab)
  • Prior review continuity: The supplied prior ClawSweeper review identified this same macos mismatch; the revised head changed the status tests but did not alter the runtime matcher. (7d4ca5c24cf9)
  • Feature history: Current-main history attributes the shared requirements, entry-status, runtime evaluator, and skills/hooks loader boundary to one central change, making its author the best routing candidate. (src/shared/config-eval.ts:128, 5c3fd2fbe97b)
  • Documentation-index limitation: pnpm docs:list could not run because Corepack attempted to create its cache in the read-only sandbox; the changed documentation was inspected directly.

Likely related people:

  • Peter Steinberger: Commit 5c3fd2f introduced the shared requirements, status, runtime evaluator, skills loader, and hook loader surfaces that own this invariant. (role: feature introducer and recent area contributor; confidence: high; commits: 5c3fd2fbe97b; files: src/shared/requirements.ts, src/shared/config-eval.ts, src/shared/entry-status.ts)

Rank-up moves

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

  • Unify the status and runtime OS matcher.
  • Add local and remote macos alias coverage through skills and hooks loading.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-14T16:23:54.636Z sha 7d4ca5c24cf939981c75115d0d03991423101a4a :: found issues before merge. :: [P2] Unify macos OS matching with the runtime loader

@shakkernerd
shakkernerd force-pushed the fix/always-os-status branch from 7d4ca5c to 3a8a2d7 Compare August 14, 2026 16:33
@shakkernerd shakkernerd self-assigned this Aug 14, 2026
@shakkernerd
shakkernerd merged commit 3bc61f2 into main Aug 14, 2026
175 checks passed
@shakkernerd
shakkernerd deleted the fix/always-os-status branch August 14, 2026 16:54
@shakkernerd

Copy link
Copy Markdown
Contributor Author

Fixed: Skill and hook status now preserve OS incompatibility when always bypasses runtime requirements.

With thanks to @shakkernerd.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 15, 2026
Skill and hook status now preserve OS incompatibility when `always` bypasses runtime requirements, matching existing loader behavior and clarified documentation.

Refs openclaw#122271 and openclaw#122331.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation 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. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S 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.

1 participant