Skip to content

fix(skills): stop disabling the sag skill on env-only readiness - #147381

Closed
LiuwqGit wants to merge 1 commit into
openclaw:mainfrom
LiuwqGit:feat/issue-147346-sag-skill-readiness
Closed

LiuwqGit wants to merge 1 commit into
openclaw:mainfrom
LiuwqGit:feat/issue-147346-sag-skill-readiness

Conversation

@LiuwqGit

@LiuwqGit LiuwqGit commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

AI-assisted: yes

Closes #147346

What Problem This Solves

Fixes an issue where the bundled sag skill was reported unavailable — and openclaw doctor --fix offered to persist skills.entries.sag.enabled=false — whenever ELEVENLABS_API_KEY was absent from the gateway environment, even though the sag CLI resolves credentials from several sources it supports itself (SAG_API_KEY, --api-key-file, ELEVENLABS_API_KEY_FILE, SAG_API_KEY_FILE). Operators with a working sag setup saw a false "needs setup" status and a destructive repair suggestion that ping-ponged with manual re-enablement.

Why This Change Was Made

The sag skill metadata declared ELEVENLABS_API_KEY as a mandatory env requirement while the skill's own body documents SAG_API_KEY as supported, so readiness flagged a false negative. The requirement is removed from requires; the skill now gates on the sag binary alone (matching the bundled himalaya pattern for CLIs that own their credentials), while primaryEnv: ELEVENLABS_API_KEY is kept so a configured skill apiKey override or env var still injects. The body documents sag's alternate credential sources and how to re-enable an entry previously disabled by the false positive. Broader Doctor policy changes (new readiness states, dry-run flags, generic file discovery) are intentionally out of scope per the issue review.

  • Intended outcome: sag installed + no ELEVENLABS_API_KEY in env → skill stays eligible/ready; doctor --fix no longer proposes disabling it.
  • Out of scope: generic alternate-credential discovery in the readiness engine, new readiness states, doctor consent/dry-run policy, updater behavior (already fixed in fix(doctor): preserve enabled skills during automatic updates #138730).
  • Highest-risk area: readiness could theoretically become too lax; mitigated by keeping the mandatory bins: ["sag"] gate — with the binary absent the skill still reports ineligible.

User Impact

Operators using the sag skill with credentials sag itself resolves (e.g. SAG_API_KEY or a key file) no longer see a misleading "needs setup" status, and doctor --fix no longer offers to disable a working skill. Anyone previously hit by the false disable can re-enable with openclaw config set skills.entries.sag.enabled true (documented in the skill body).

  • Success criteria: with a sag binary on PATH and all ElevenLabs/sag env vars unset, buildWorkspaceSkillStatus reports the bundled sag skill eligible: true with missing.env empty; with the binary missing it reports eligible: false.
  • What should reviewers focus on? skills/sag/SKILL.md frontmatter change; regression test "keeps the bundled sag skill ready when only the sag binary is installed" in src/skills/discovery/status-workspace.test.ts.

Evidence

  • Real environment tested: local checkout of branch feat/issue-147346-sag-skill-readiness (PR head 870577c0, built with pnpm build; CLI reports OpenClaw 2026.9.4 (870577c)), with the real sag v0.4.1 release binary from github.com/steipete/sag (sha256 655e5c6a…57bc81) installed on PATH, ELEVENLABS_API_KEY / SAG_API_KEY / ELEVENLABS_API_KEY_FILE / SAG_API_KEY_FILE all unset, and an isolated OPENCLAW_HOME. All commands below run the real built CLI (node openclaw.mjs …), not a test harness.
  • Exact steps or commands run after this patch:
    node openclaw.mjs skills check --json                      # sag in eligible+modelVisible (after), absent (before)
    node openclaw.mjs skills info sag                          # "✓ Ready" (after) vs "△ Needs setup" (before)
    SAG_API_KEY=<redacted> node openclaw.mjs skills info sag   # same outcomes with sag's supported alternate credential
    node openclaw.mjs doctor --non-interactive                 # Skills note: sag not listed as unusable (after), listed (before)
    node openclaw.mjs doctor --fix                             # after: sag NOT disabled; before: "- Disabled sag" persisted to config
    Before-fix runs used the same built CLI with skills/sag/SKILL.md restored from origin/main, same sag binary, same environment.
  • Evidence after fix: real installed setup (no ElevenLabs env anywhere)
    $ node openclaw.mjs skills info sag
    🔊 sag ✓ Ready
      Visible to model: yes
      Available as command: yes
      Requirements:
        Binaries: ✓ sag
    
    $ SAG_API_KEY=<redacted> node openclaw.mjs skills info sag
    🔊 sag ✓ Ready                     # same result with sag's alternate credential
    
    $ node openclaw.mjs skills check --json
    { "summary": { "eligible": 24, "missingRequirements": 33 } }
    sag in eligible: True
    sag in modelVisible: True
    
    $ node openclaw.mjs doctor --fix
    Doctor changes: - Disabled 1password … - Disabled xurl   # 28 skills; "sag" NOT among them
    $ openclaw.json (skills.entries) after --fix
    exact key sag: ABSENT (sag left enabled)
    
  • Evidence before fix: same CLI binary, origin/main metadata, same real sag binary, same env
    $ SAG_API_KEY=<redacted> node openclaw.mjs skills info sag
    🔊 sag △ Needs setup
      Visible to model: no
      Requirements:
        Binaries: ✓ sag
        Environment: ✗ ELEVENLABS_API_KEY    # the false negative, even with sag's own credential set
    
    $ node openclaw.mjs skills check --json
    { "summary": { "eligible": 23, "missingRequirements": 34 } }
    sag in eligible: False
    
    $ node openclaw.mjs doctor --fix
    Doctor changes: … - Disabled sag …
    $ openclaw.json (skills.entries) after --fix
    exact key sag: {"enabled": false}        # the destructive repair this PR removes
    
  • Observed result after fix: with the real sag v0.4.1 binary installed and no ElevenLabs credentials in the environment, the real CLI reports the bundled sag skill ✓ Ready and model-visible, doctor no longer counts sag among unusable skills, and doctor --fix no longer disables it. Under origin/main metadata the identical environment yields △ Needs setup (missing ELEVENLABS_API_KEY even with SAG_API_KEY set) and doctor --fix persists skills.entries.sag.enabled=false — the exact reported symptom. Regression test keeps the bundled sag skill ready when only the sag binary is installed covers this at the unit level.
  • What was not tested: producing real audio through a live ElevenLabs-backed sag install (no account/key in this environment; the sag binary also requires glibc ≥ 2.34, newer than this EL8 host, so the CLI itself was not executed — note readiness only probes PATH presence + executability, which the genuine release binary satisfies); updater-driven repair flow (covered by existing doctor-skills.test.ts update-preservation tests, unchanged here).
  • Proof tier: L2 — real installed-setup CLI behavior (real release sag binary + built openclaw CLI, before/after on the same environment).
  • Proof limitations: none for the readiness/Doctor path — it is exercised end-to-end through the real CLI. Live speech synthesis was not attempted; it is out of scope for readiness metadata and unaffected by this change.
  • Review state: awaiting CI + maintainer review; CI lanes pending.

@clawsweeper

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

@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@clawsweeper

clawsweeper Bot commented Sep 13, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 13, 2026, 6:37 PM ET / 22:37 UTC (Revision 5).

ClawSweeper review

What this changes

The PR makes the bundled sag speech skill require only its executable, preserves optional API-key injection, documents credential alternatives and recovery, and adds readiness regression coverage.

Merge readiness

✅ Ready for maintainer review

Keep open: this is a focused, supported fix for a defect still present on main and in v2026.9.4. The reporter confirms the approach, and the supplied before/after CLI evidence resolves the earlier proof request. No blocking defect was found.

Priority: P2
Reviewed head: 870577c0dccadc4c82f823be6876366406ccac03

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A narrow, maintainable repair with relevant regression coverage, convincing CLI proof, and reporter confirmation.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The supplied before/after terminal output exercises the reviewed metadata through the real built skills and Doctor CLI in an isolated installed setup, showing ready/model-visible status and no persisted sag disable after the fix. The disclosed inability to execute sag does not undermine this executable-probe contract.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The supplied before/after terminal output exercises the reviewed metadata through the real built skills and Doctor CLI in an isolated installed setup, showing ready/model-visible status and no persisted sag disable after the fix. The disclosed inability to execute sag does not undermine this executable-probe contract.
Evidence reviewed 10 items Defect remains on current main: Fetched main still requires ELEVENLABS_API_KEY despite documenting SAG_API_KEY as supported. The readiness, credential-injection, and Doctor modules inspected are unchanged between the reviewed head and fetched main.
Latest release retains the requirement: The v2026.9.4 skill metadata also requires ELEVENLABS_API_KEY; the requested metadata repair is not present in that release.
Readiness and Doctor causal path: Skill status combines declared requirements with explicit disablement and allowlists. Doctor selects ineligible skills and retains its existing runtime-repair approval. Removing the incorrect requirement fixes the candidate producer without changing Doctor policy.
Findings None None.
Security None None.

How this fits together

OpenClaw reads skill metadata to determine availability and model visibility. Doctor consumes that availability report when offering to disable unusable skills; sag itself resolves credentials when invoked.

flowchart TD
  A[Bundled sag metadata] --> C[Skill readiness]
  B[Executable and user settings] --> C
  C --> D[Skill status and model visibility]
  C --> E[Doctor repair candidates]
  D --> F[sag resolves credentials when invoked]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Tests +50, Docs +6. Total +56 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 0 0 0 0
Tests 1 50 0 +50
Docs 1 8 2 +6
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 58 2 +56

Review metrics

None.

Root-cause cluster

Relationship: fixed_by_candidate
Canonical: #147346
Summary: This PR addresses the canonical report’s sag metadata defect; related changes cover narrower credential alternatives or separate lifecycle policy.

Members:

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

Technical review

Best possible solution:

Keep readiness tied to sag’s executable, leave credential validation with sag, and preserve explicit user disablement and optional API-key injection.

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

Yes: current main rejects sag when its executable exists but ELEVENLABS_API_KEY is absent, regardless of credentials supplied through sag’s other supported paths. Source tracing and contributor CLI output support this; the reviewer did not execute it.

Is this the best way to solve the issue?

Yes: correcting the bundled metadata follows the existing binary-only pattern for credential-owning CLIs and handles file-based credentials without extending the generic readiness API.

AGENTS.md: found and applied where relevant.

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

Labels

Label justifications:

  • P2: Repairs a confirmed false readiness result and unwanted standalone Doctor disablement affecting the bundled sag skill.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The supplied before/after terminal output exercises the reviewed metadata through the real built skills and Doctor CLI in an isolated installed setup, showing ready/model-visible status and no persisted sag disable after the fix. The disclosed inability to execute sag does not undermine this executable-probe contract.
  • proof: sufficient: Contributor real behavior proof is sufficient. The supplied before/after terminal output exercises the reviewed metadata through the real built skills and Doctor CLI in an isolated installed setup, showing ready/model-visible status and no persisted sag disable after the fix. The disclosed inability to execute sag does not undermine this executable-probe contract.

Evidence

What I checked:

  • Defect remains on current main: Fetched main still requires ELEVENLABS_API_KEY despite documenting SAG_API_KEY as supported. The readiness, credential-injection, and Doctor modules inspected are unchanged between the reviewed head and fetched main. (skills/sag/SKILL.md:10, c92ce0278f4a)
  • Latest release retains the requirement: The v2026.9.4 skill metadata also requires ELEVENLABS_API_KEY; the requested metadata repair is not present in that release. (skills/sag/SKILL.md:10, 3a9d69db306c)
  • Readiness and Doctor causal path: Skill status combines declared requirements with explicit disablement and allowlists. Doctor selects ineligible skills and retains its existing runtime-repair approval. Removing the incorrect requirement fixes the candidate producer without changing Doctor policy. (src/skills/discovery/status.ts:219, 870577c0dcca)
  • Credential injection remains supported: The unchanged environment owner independently adds primaryEnv to permitted sensitive keys and injects a configured apiKey through it. Retaining primaryEnv therefore preserves this existing configuration path without requires.env. (src/skills/runtime/env-overrides.ts:152, 870577c0dcca)
  • Verified dependency credential contract: The changed skill documentation expressly delegates credential resolution to sag. Repository ownership was verified through the GitHub repository endpoint; v0.4.1 resolves --api-key, key files, ELEVENLABS_API_KEY, and SAG_API_KEY, and reports a missing-key error. This supports the documented alternatives. (cmd/api_key.go:12, 4797496bca19)
  • Real CLI before/after proof: The complete supplied body and fix(skills): stop disabling the sag skill on env-only readiness #147381 (comment) report the built reviewed head with an installed sag release executable and isolated OpenClaw home. Switching only the metadata changes skills info/check from unavailable to ready and prevents Doctor from persisting sag.enabled=false. sag could not execute on that host's glibc, but the changed readiness path only probes executable availability; speech synthesis is not claimed. (870577c0dcca)

Likely related people:

  • unknown: The claimed source-line change could not be verified from bounded local history. (role: source history unknown; confidence: low)
  • fuller-stack-dev: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

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 (4 earlier review cycles)
  • reviewed 2026-09-13T20:34:04.150Z sha 5c3054197ef1bed73c44bdf90b74985bbd3b79b4 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-13T21:00:43.518Z sha 51b6ecdc5946a928332ccaf81eeaad2f6662ebc1 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-13T21:22:27.228Z sha 8dc189d1f129726362b1b9b8a70eb8c701118074 :: needs real behavior proof before merge. :: none
  • reviewed 2026-09-13T21:46:17.220Z sha 870577c :: needs maintainer review before merge. :: none

@LiuwqGit

Copy link
Copy Markdown
Contributor Author

Note: checks-node-compact-large-1 failed on test/scripts/run-vitest-profile.test.ts > prints main help for ['--help', '--help'] with a 120s timeout. That test file is untouched by this PR (diff vs main is empty) and passes locally in full (35/35 in ~30s), so this looks like a runner infra flake rather than a regression from this change.

@LiuwqGit
LiuwqGit force-pushed the feat/issue-147346-sag-skill-readiness branch 2 times, most recently from 51b6ecd to 8dc189d Compare September 13, 2026 21:16
@LiuwqGit

Copy link
Copy Markdown
Contributor Author

Update on CI: the remaining failures are timing-sensitive tests in files this PR does not touch (this PR changes only the bundled skills/sag/SKILL.md metadata and adds one test file — zero production-source changes):

  • checks-node-compact-large-26: src/gateway/server-methods/models-auth-login.catalog.integration.test.ts ("endpoint delay 7000 ms" timing test) — passes locally on this branch (2/2). An earlier run of the sibling models-auth-refresh.catalog.integration.test.ts failed the same way and also passes locally (1/1).
  • checks-node-compact-large-19: src/agents/code-mode-headless.test.ts wall-clock deadline test (expected 'timeout', got 'internal_error') — passes locally on this branch (61/61).
  • The first head's checks-node-compact-large-1 failure (test/scripts/run-vitest-profile.test.ts --help 120s timeout) already went green after the rebase; that file also passes locally in full (35/35).

Happy to rebase again if a maintainer wants a re-run.

The bundled sag metadata declared ELEVENLABS_API_KEY as a mandatory env
requirement, so the skill was reported unavailable — and doctor --fix
offered to disable it — whenever the key came from another source sag
itself supports (SAG_API_KEY, key files, --api-key-file). Readiness now
gates on the sag binary only and delegates credential validation to the
CLI, matching the bundled himalaya pattern.

Fixes openclaw#147346
@LiuwqGit
LiuwqGit force-pushed the feat/issue-147346-sag-skill-readiness branch from 8dc189d to 870577c Compare September 13, 2026 21:40
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. 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. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Sep 13, 2026
@LiuwqGit

Copy link
Copy Markdown
Contributor Author

Supplementing the real-setup proof requested in the review ("after-fix skill status and Doctor behavior in a real installed setup"). All commands below were run against the real built CLI (pnpm build at head 870577c0, reports OpenClaw 2026.9.4 (870577c)), not a test harness, with the genuine sag v0.4.1 release binary from github.com/steipete/sag installed on PATH (sha256 655e5c6a…57bc81), an isolated OPENCLAW_HOME, and ELEVENLABS_API_KEY/SAG_API_KEY/*_API_KEY_FILE all unset.

After fix (this patch):

$ node openclaw.mjs skills info sag          # also with SAG_API_KEY=<redacted>
🔊 sag ✓ Ready
  Visible to model: yes / Available as command: yes
  Requirements: Binaries: ✓ sag

$ node openclaw.mjs skills check --json
sag in eligible: True / sag in modelVisible: True

$ node openclaw.mjs doctor --non-interactive
Skills: 28 allowed skills are not usable … — "sag" NOT listed

$ node openclaw.mjs doctor --fix
Doctor changes: - Disabled 1password … - Disabled xurl   # 28 skills; "sag" NOT among them
$ openclaw.json (skills.entries) after --fix
exact key sag: ABSENT (sag left enabled)

Before fix (same CLI binary, skills/sag/SKILL.md restored from origin/main, same sag binary, same env):

$ SAG_API_KEY=<redacted> node openclaw.mjs skills info sag
🔊 sag △ Needs setup
  Requirements: Binaries: ✓ sag / Environment: ✗ ELEVENLABS_API_KEY

$ node openclaw.mjs doctor --non-interactive
Skills: 29 allowed skills are not usable … - …, sag, …        # sag listed

$ node openclaw.mjs doctor --fix
Doctor changes: … - Disabled sag …
$ openclaw.json (skills.entries) after --fix
exact key sag: {"enabled": false}                              # the destructive repair this PR removes

Honesty notes: no live ElevenLabs audio was produced (no account/key here), and the sag binary itself requires glibc ≥ 2.34 (newer than this EL8 host) so the CLI was not executed — readiness only probes PATH presence + executability (hasBinary), which the genuine release binary satisfies; this is stated in the PR body's "What was not tested".

Also noting for the record: on the previous head (8dc189d1), checks-node-compact-large-19 and -26 failed on src/agents/code-mode-headless.test.ts and src/gateway/server-methods/models-auth-login.catalog.integration.test.ts — both untouched by this PR (diff is skills/sag/SKILL.md + one skills-discovery test) and both shards are green on the current head, so those look like runner flakes. Current CI: 113 pass / 0 fail.

The PR body's Evidence section has been updated with this real installed-setup proof (L2).

obviyus added a commit that referenced this pull request Sep 14, 2026
AI-assisted.

Supersedes #147381 by @LiuwqGit.
Closes #147346.

## What Problem This Solves

A working `sag` skill appears unavailable, and `doctor --fix` disables it, when its installed CLI obtains credentials outside the Gateway environment.

## User Impact

Installed `sag` stays available with alternate credentials. The executable checks credentials when it runs. Optional configured-key injection remains available.

Doctor does not automatically re-enable entries disabled by an earlier run. The saved flag does not distinguish Doctor repair from an intentional user choice. If the earlier disablement was incorrect, run `openclaw config set skills.entries.sag.enabled true`. Refresh the Skills list; the next agent turn uses the refreshed skill settings.

## Why This Change Was Made

The bundled skill declaration keeps its executable requirement and removes the incorrect environment prerequisite. The original metadata fix and authorship are preserved. The regression now runs registered `skills info sag --json` and stopped-Gateway `doctor --fix`, including the saved enable flag, instead of calling the status helper directly.

## Evidence

| Check | Main | This change |
| --- | --- | --- |
| Real CLI and Gateway `skills.status` | Needs setup; not visible | Ready; visible |
| Control UI Skills list | Under Needs Setup | Under Ready |
| Skill details | Missing-variable warning | Warning gone; key editor retained |
| Stopped-Gateway Doctor | Saves `enabled=false` | Preserves absent or explicitly true enablement |
| Registered CLI regression | Four expected failures | Four passes |

Correlated request/response frames confirm that both the browser and CLI received `skills.status` from the Gateway. The installed executable's alternate key-file check uses a local test endpoint; live-account validity and audio production are not claimed.

Fresh merge `489365ccffab2e043d676ed3b01cb2e0b5a203d4` has candidate parent `40632360f3ff8162fa27503e08c636223c8cc852` and main parent `4750ff8d2b389280bdeaeec44d78b88cb7fb81d1`. It passes 4 registered CLI regressions, 44 skill tests, 10 Doctor tests, and 153 test-registration checks. Changed-file lint, formatting, and whitespace checks pass. Main's regression run used `d0cf628ff20d234657813074774739bcf321447d` with the same test and unchanged main metadata.

The process test uses the existing isolated CLI project. Fixed test owners and CI job counts remain unchanged; generated compact group placement can change as the test inventory grows. Readiness does not establish live-account validity or successful audio output.

### Skills list

| Before | After |
| --- | --- |
| ![sag under Needs Setup](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/base-skills-list.png) | ![sag under Ready](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/candidate-skills-list.png) |

### Missing requirement and key editor

| Before | After |
| --- | --- |
| ![Missing requirement with key editor](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/base-skill-detail.png) | ![Eligible with key editor retained](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/candidate-skill-detail.png) |

## Consumers

- Discovery, Gateway and CLI status, both Doctor skill checks, onboarding, summaries, and recommendations read the same prerequisite declaration.
- The Control UI list and agent controls consume the corrected status; the optional key editor remains available.
- Runtime selection reads the same metadata. New snapshots preserve optional key injection; existing snapshot refresh rules remain unchanged.
- Native clients consume the existing response. The macOS binary-trust reader uses the unchanged binary requirement.
- Explicit disablement, allowlists, agent filters, configured-secret isolation, and automatic-update Doctor protection remain unchanged.

## Compatibility

No new configuration key, schema, protocol, dependency, or runtime credential reader. Existing disabled entries are not automatically re-enabled. The skill prose assigns credential checking to the executable; readiness does not promise valid account credentials or successful speech generation.

Co-authored-by: LiuwqGit <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
@obviyus

obviyus commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Thanks @LiuwqGit!

Proof: Merged #147685 supersedes this PR, keeps your commit under your authorship, and verifies that installed sag stays ready with alternate credentials.

  • Bug: A working skill appeared unavailable and Doctor disabled it.
  • Fix: Readiness keeps the executable requirement and lets sag check credentials when it runs.
Before After
Needs setup; Doctor saves disabled Ready; Doctor preserves enablement

@obviyus obviyus closed this Sep 14, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 14, 2026
…147685)

AI-assisted.

Supersedes openclaw#147381 by @LiuwqGit.
Closes openclaw#147346.

## What Problem This Solves

A working `sag` skill appears unavailable, and `doctor --fix` disables it, when its installed CLI obtains credentials outside the Gateway environment.

## User Impact

Installed `sag` stays available with alternate credentials. The executable checks credentials when it runs. Optional configured-key injection remains available.

Doctor does not automatically re-enable entries disabled by an earlier run. The saved flag does not distinguish Doctor repair from an intentional user choice. If the earlier disablement was incorrect, run `openclaw config set skills.entries.sag.enabled true`. Refresh the Skills list; the next agent turn uses the refreshed skill settings.

## Why This Change Was Made

The bundled skill declaration keeps its executable requirement and removes the incorrect environment prerequisite. The original metadata fix and authorship are preserved. The regression now runs registered `skills info sag --json` and stopped-Gateway `doctor --fix`, including the saved enable flag, instead of calling the status helper directly.

## Evidence

| Check | Main | This change |
| --- | --- | --- |
| Real CLI and Gateway `skills.status` | Needs setup; not visible | Ready; visible |
| Control UI Skills list | Under Needs Setup | Under Ready |
| Skill details | Missing-variable warning | Warning gone; key editor retained |
| Stopped-Gateway Doctor | Saves `enabled=false` | Preserves absent or explicitly true enablement |
| Registered CLI regression | Four expected failures | Four passes |

Correlated request/response frames confirm that both the browser and CLI received `skills.status` from the Gateway. The installed executable's alternate key-file check uses a local test endpoint; live-account validity and audio production are not claimed.

Fresh merge `489365ccffab2e043d676ed3b01cb2e0b5a203d4` has candidate parent `40632360f3ff8162fa27503e08c636223c8cc852` and main parent `c0c96881fafde0c7233634efb2ec656d11c9d5fe`. It passes 4 registered CLI regressions, 44 skill tests, 10 Doctor tests, and 153 test-registration checks. Changed-file lint, formatting, and whitespace checks pass. Main's regression run used `b02160ba495e16a79daefed319200ef062027a4b` with the same test and unchanged main metadata.

The process test uses the existing isolated CLI project. Fixed test owners and CI job counts remain unchanged; generated compact group placement can change as the test inventory grows. Readiness does not establish live-account validity or successful audio output.

### Skills list

| Before | After |
| --- | --- |
| ![sag under Needs Setup](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/base-skills-list.png) | ![sag under Ready](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/candidate-skills-list.png) |

### Missing requirement and key editor

| Before | After |
| --- | --- |
| ![Missing requirement with key editor](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/base-skill-detail.png) | ![Eligible with key editor retained](https://gist.githubusercontent.com/obviyus/847a6af1eb35eb2c2d2fa4347bb6843d/raw/dcfea44f39bef00958bd6ef53f80029358f3ec32/candidate-skill-detail.png) |

## Consumers

- Discovery, Gateway and CLI status, both Doctor skill checks, onboarding, summaries, and recommendations read the same prerequisite declaration.
- The Control UI list and agent controls consume the corrected status; the optional key editor remains available.
- Runtime selection reads the same metadata. New snapshots preserve optional key injection; existing snapshot refresh rules remain unchanged.
- Native clients consume the existing response. The macOS binary-trust reader uses the unchanged binary requirement.
- Explicit disablement, allowlists, agent filters, configured-secret isolation, and automatic-update Doctor protection remain unchanged.

## Compatibility

No new configuration key, schema, protocol, dependency, or runtime credential reader. Existing disabled entries are not automatically re-enabled. The skill prose assigns credential checking to the executable; readiness does not promise valid account credentials or successful speech generation.

Co-authored-by: LiuwqGit <[email protected]>
Co-authored-by: Ayaan Zaidi <[email protected]>
@LiuwqGit
LiuwqGit deleted the feat/issue-147346-sag-skill-readiness branch September 22, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. 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.

[Bug]: doctor --fix disables healthy skills on env-only readiness (false negative, e.g. sag with file-based key)

2 participants