Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs real behavior proof before merge. What this changesAdds optional any-of environment requirements for skills and hooks, with eligibility checks, credential propagation, saved snapshots, and diagnostics. Example: A skill declares anyEnv: [PROOF_KEY_A, PROOF_KEY_B], with only PROOF_KEY_B configured.
Review scores
ProductKind: Feature · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⛔ Blocked before merge - 7 items remain Keep open: the generic capability is distinct from the merged sag fix, but this PR has credential-delivery and test defects and still needs a product decision. Priority: P2 Decision needed
Before merge
Findings
Tests
Agent review detailsHow this fits togetherSkill and hook metadata feeds shared eligibility checks; selected skills become session snapshots, while configured credentials pass through the environment-injection owner before agent execution. flowchart TD
A[Skill and hook metadata] --> B[Shared requirements evaluation]
B --> C[CLI Doctor and UI diagnostics]
B --> D[Selected skill snapshot]
D --> E[Credential injection owner]
F[Configured skill credentials] --> E
E --> G[Agent execution]
Technical reviewBest possible solution: If sponsored, complete alternate-key delivery through the existing injection owner while preserving sag’s binary-only readiness and existing credential safeguards. Do we have a high-confidence way to reproduce the issue? Source establishes that an anyEnv-only sensitive credential can satisfy readiness while being rejected during injection; no target code or tests were run during this read-only review. Is this the best way to solve the issue? The shared requirements owner is the appropriate location, but the implementation must complete credential propagation and avoid restoring unrelated, broken tests. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against f2478e569a15. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +36, Tests +375, Docs +5. Total +416 across 33 files. Added test files: 2. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (12 earlier review cycles; latest 8 shown)
Reviewed October 16, 2026, 2:06 PM ET / 18:06 UTC (Revision 13). |
d4c94d6 to
8913f07
Compare
|
P2 propagation fixed in
So Fix: On scope: kept the generic anyEnv propagation rather than a sag-only carve-out — the PR's direction is generic alternates, and a sag-only exception would leave the same trap for the next skill. Happy to narrow if you prefer. |
8913f07 to
9271cda
Compare
|
P1 conceded and fixed in
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Generic (non-sag) proof added to the body from this head (
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Shard-failure attribution from finished CI logs (no code change):
Touched-area gates stay green locally (335/335 + lint/format, see above). These two shards need a maintainer re-run, not a code fix. |
|
Body updated with the missing proof (head f942a4d): fresh + cold-resumed alternate-key delivery via the real snapshot entrypoint (separate processes, redacted), pre-change snapshot compatibility, always-blocked guard, before/after generic Skills UI screenshots (real headless-Chromium rendering), generic-consumer case for the deferral question, and CI attribution (preflight fails on the upstream shard-harness bug, run 34877456462). No code changed. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Re-requesting review — 7 days since the last re-review request (14 Sep) with no follow-up review posted. The PR body already carries the requested real-behavior proof plus CI shard-failure attribution (failing lanes are upstream harness breakage, reproduced on clean |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
f942a4d to
8d71423
Compare
|
This pull request has been automatically marked as stale due to inactivity. |
Rebase the alternate-credentials capability onto the refactored requirements architecture (shared formatCliRequirements helper, generic eligibility, worker-side snapshot projection): anyEnv flows through evaluation, metadata, frontmatter, env-overrides, snapshot and CLI/UI rendering, with fixtures carrying anyEnv: [].
8d71423 to
c04d1aa
Compare
|
Re-ported onto current main as a single commit (
Still open (flagged honestly, needs others not me):
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
This pull request has been automatically marked as stale after 7 days without qualifying human activity. |
|
Closing due to inactivity. |
What Problem This Solves
Skill/hook requirements have all-of
envwith no any-of equivalent: a skill accepting either of two credential env vars cannot declare it, so eligibility is either too strict (all-of) or credential-blind (bins-only). This PR adds a genericrequires.anyEnvcontract (eval, manifest, runtime eligibility + credential injection, doctor/CLI/UI rendering, snapshot carry) with optional injection for alternate keys.Note: #147346 (sag readiness) is already CLOSED completed by canonical #147685 (binary-only). This PR no longer claims it — sag stays binary-only here (P1 fix below). Generic sponsorship decision remains with the maintainer.
Changes
requires.anyEnvplumbing:src/shared/requirements.ts(any-of eval),frontmatter.ts,config-eval.ts,doctor-skills-core.ts, CLI/hook formatters, UIskills-shared,workspace-skill-prompt.tssnapshot +SkillSnapshot/OpenClawSkillMetadatatypes,env-overrides.tspropagation on both direct + snapshot paths.skills/sag/SKILL.md: readiness restored to binary-only{ bins: ["sag"] }(matchesupstream/main), preserving file-key setups (--api-key-file,*_API_KEY_FILEper SKILL.md:34).primaryEnv+SAG_API_KEYdocs kept for optional injection only — no env gate. P1 regression withdrawn.creating-skills.md+skills.mdgeneric contract.Evidence
P1 fix proof from this head (
02cfc06e1), branch source:isEnvSatisfied(requirements.ts:31) checks env only, never key files — so the removed gate was the failure path; binary-only restores canonical behavior. Verifiedupstream/mainsag is also bins-only (fetch43d413bd).Gates on this push:
requirements+frontmatter+env-overrides: 39/39 passoxlint: 0 errors;git diff --check: cleanNavras98 <[email protected]>(amended before push)Honest gaps (not claimed)
Related #147346 (closed by #147685); supersedes #147381 (closed unmerged).
Generic proof (non-sag) from this head (
02cfc06e1), real CLI entrypointsWorkspace skill
proof-anyenv(generic, not sag) withmetadata.openclaw.requires.anyEnv: [PROOF_KEY_A, PROOF_KEY_B], isolatedOPENCLAW_HOME, branch source, run from source:Neither key set —
skills checklists it under missing with the alternates group:(Eligible 44, Missing 22.)
Only the alternate
PROOF_KEY_Bset — it moves to "Ready and visible to model";skills info proof-anyenv --jsonreturns"eligible": truewith"anyEnv": ["PROOF_KEY_A","PROOF_KEY_B"]and"missing": {"anyEnv": [], ...}.(Eligible 44→45, Missing 22→21.)
Injection + snapshot-carry:
env-overrides.test.tscovers the direct path, thesnapshot path (
applySkillEnvOverridesFromSnapshot), and the always-blocked guard;335/335 touched-area tests pass locally (see comments).
UI:
computeSkillMissingrendersenv:any of (A, B); covered byskills-shared.test.ts+ pageview.test.ts. Before/after screenshots of the realSkills page were captured in headless Chromium (missing-requirements box absent
before,
env:any of (PROOF_KEY_A, PROOF_KEY_B)shown after) — held locally, can bedrag-dropped into the thread on request.
CI shard-failure attribution (finished run 34825094814, head
02cfc06e1)checks-node-compact-small-12—test/scripts/docker-build-helper.test.tsexpectsclawhub:@openclaw/kitchen-sinkin the Docker plugin sweep; area this PR never touches (no docker files in scope). Upstream-broken candidate.checks-node-compact-large-12—src/state/openclaw-agent-db-module-identity.test.tstimed out at 45s;src/stateownership/reclamation, outside this PR's scope. Flake candidate, passes locally on clean main per comment.oxlint0 errors +git diff --checkclean. These two shards need a maintainer re-run, not a code fix.Proof 2026-09-14 (head
02cfc06e1, fork-only, log redacted/tmp/proof-147455.log)Real proof from this head, worktree pinned detached
02cfc06e1(forkNavras98/openclaw), no push to upstream:sag accepts
SAG_API_KEYalternate (sag 0.3.0binary):strings /usr/local/bin/sag | grep -o:ELEVENLABS_API_KEY,ELEVENLABS_API_KEY_FILE,SAG_API_KEY,SAG_API_KEY_FILEall present.Error: missing ElevenLabs API key (set --api-key, --api-key-file, or ELEVENLABS_API_KEY).SAG_API_KEY=[REDACTED]dummy only =>Error: list voices failed: 401 Unauthorized(missing-key gate GONE => alternate accepted; dummy value never printed, log contains no secret).requires.anyEnvresolves (src/shared/requirements.ts, this head):sag readiness binary-only (
skills/sag/SKILL.md, this head):Local tests green (canonical
scripts/test-projects.mts):requirements+frontmatter: 20/20 pass (unit-fast)env-overridesanyEnv (direct + snapshot + always-blocked guard): 3/3 passskills-cli.formatting+hooks-cli.toggle: 143/143 passdoctor-skills: 10/10 passoxlint: 0 warnings, 0 errors ·git diff --check: cleanMerge-risk/compatibility: sag stays
{ bins: ["sag"] }(canonical, no env gate); genericanyEnvis opt-in per-skill, defaults to empty (no behavior change for existing skills). No upstream push — fork branch only.Runtime proof: fresh + cold-resumed delivery, old snapshots, guard (head
f942a4d, fork-only, redacted)Real entrypoint
applySkillEnvOverridesFromSnapshotin separate fresh OS processes (no shared memory), snapshots reloaded from disk JSON after the same JSON round-trip the session store performs (stripRuntimeOnlySessionSkillsFieldsdrops onlyresolvedSkills;skills[].anyEnvsurvives persistence —store-entry-shape.ts:190). Config values were synthetic dummies, never printed; output below is booleans only.skillKey/primaryEnv/requiredEnv/anyEnv, asbuildSkillSnapshotemits), only the alternatePROOF_KEY_Bconfigured:{"expectKey":"PROOF_KEY_B","hadBefore":false,"delivered":true,"alwaysBlockedHeld":true,"reverted":true}{"expectKey":"PROOF_KEY_B","hadBefore":false,"delivered":true,"alwaysBlockedHeld":true,"reverted":true}anyEnvfield) —requiredEnv: ["LEGACY_KEY"]still delivered, no crash:{"expectKey":"LEGACY_KEY","hadBefore":false,"delivered":true,"alwaysBlockedHeld":true,"reverted":true}anyEnvdeclared, always-blocked host key (OPENSSL_CONF) configured alongside the alternate: alternate delivered, host key refused (Blocked skill env overrides for proof-anyenv: OPENSSL_CONFin log):{"expectKey":"PROOF_KEY_B","hadBefore":false,"delivered":true,"alwaysBlockedHeld":true,"reverted":true}So: alternate-key delivery works fresh and after cold resume through the real snapshot path; pre-change snapshots load unchanged; the sanitizer allow-list still refuses host-dangerous keys.
Generic Skills UI screenshots (real rendering, headless Chromium 153)
Real Skills page (
renderSkillsfromui/src/pages/skills/view.ts+ appstyles.css, served by vite from this head) with a generic non-sag skillproof-anyenvmissinganyEnv: [PROOF_KEY_A, PROOF_KEY_B], detail dialog open. Same harness, onlycomputeSkillMissingdiffers:Before (base
61fe467c): the dialog shows no Missing-requirements box — the alternate-credential need is invisible.After (this PR):
Missing requirements — env:any of (PROOF_KEY_A, PROOF_KEY_B).Why generic (maintainer decision on deferral)
sagbinary itself acceptsSAG_API_KEYorELEVENLABS_API_KEY(plus*_FILEvariants — verified viastrings/runtime in this thread). All-ofenvcannot express that without marking single-key users ineligible; bins-only cannot name the credential at all. File-key setups stay bins-only (P1 lesson kept);anyEnvis opt-in metadata for key-based setups, never a gate.anyBins: the codebase already solved the identical any-of problem for binaries (anyBins, rendered asbin:any of (...)in CLI/hooks/UI).anyEnvis the missing half — same evaluator shape, same render pattern, same snapshot carry.CI attribution (run
34877456462, headf942a4d)preflightfails in Build CI manifest:Error: split timing generation repeats files for core-runtime-infra-storage-state(scripts/lib/vitest-shard-metadata.mts:79viaci-node-test-plan.mts:2740) — harness shard-planning bug on upstreammain, unrelated to this PR (touches no CI/shard files).openclaw/ci-gatefails in 3s as the aggregation gate consequence.oxlint+git diff --check, see thread). Needs a maintainer re-run after the harness fix, not a code change here.