fix(skills): keep blank env requirements unsatisfied#108848
Conversation
fc56c20 to
bc66063
Compare
|
Codex review: needs maintainer review before merge. Reviewed July 16, 2026, 6:02 AM ET / 10:02 UTC. Summary PR surface: Source +17, Tests +80. Total +97 across 4 files. Reproducibility: yes. with high confidence from source and supplied live proof: the exact production loading and status paths accept a whitespace-only value on the baseline, and current main retains that same truthiness logic. Review metrics: none identified. Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land one shared non-blank credential-presence predicate used by both skill loading and status, retaining SecretRef eligibility and the existing always-on and platform semantics. Do we have a high-confidence way to reproduce the issue? Yes, with high confidence from source and supplied live proof: the exact production loading and status paths accept a whitespace-only value on the baseline, and current main retains that same truthiness logic. Is this the best way to solve the issue? Yes. Centralizing the non-blank presence rule at the shared loading-config boundary is narrower and safer than independently patching loading and status, and the tests cover the important sibling cases. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8f1760b667ff. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +17, Tests +80. Total +97 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
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. How this review workflow works
|
bc66063 to
a7b637b
Compare
|
Merged via squash.
|
* fix(skills): keep blank env requirements unsatisfied * refactor(skills): reuse secret input presence check --------- Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
Fixes an issue where users with whitespace-only skill credential environment values could have those skills loaded and reported as eligible even though no usable credential was available.
Why This Change Was Made
Skill loading and skill status now share one non-blank requirement check for host environment values, per-skill environment overrides, and primary API keys. The change preserves configured SecretRef eligibility and does not alter always-on, bundled allowlist, remote platform, or binary requirement behavior.
User Impact
Skills that require credentials are no longer exposed to agents or reported as ready when their configured value contains only whitespace. Valid credentials continue to work as before.
Evidence
AI-assisted.
Real production-path proof was run on a real Linux x86_64 host (
Linux 6.8.0-134-generic, Nodev24.18.0) by directly invoking the exported production loading and status functions. No mocks or network substitutes were used.Exact harness command (run once in a detached latest-main worktree and once on this branch):
Before, on latest
upstream/main57ae43a89:Premise: the shared normalization contract turns whitespace-only strings into no value while trimming valid padded strings:
node --import tsx --input-type=module -e 'import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce"; console.log(JSON.stringify({ blank: normalizeOptionalString(" "), padded: normalizeOptionalString(" token ") }));'(
blankis omitted byJSON.stringifybecause it isundefined.)After, on this branch at
bc66063d5:The missing and valid cases are negative controls: missing remains blocked, while a valid padded value remains eligible. Focused regression coverage also exercises blank and valid per-skill env values, blank and valid primary API keys, status reporting, always-on behavior, and the existing SecretRef path.
Final structured review:
Not tested: no external skill execution was attempted because this change is entirely in pre-execution eligibility and status projection; the proof drives both exported production decision paths directly.