Repository navigation
fix(skills): detect skill roots created after startup - #134136
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
Preserve the recovery coverage added in #134165 while using the actual WebSocket dependency and authored SecretRef fixture boundary. Co-authored-by: Shakker <[email protected]>
Keep provider descriptors synchronous without importing credential stores, external auth discovery, or live catalog transport during registration. Load those implementations only when the existing asynchronous setup, doctor, usage, and catalog hooks need them. Expose the existing lightweight API-key descriptor factory through provider-entry while preserving the shipped auth SDK helpers and their synchronous contracts. The unchanged fresh-process registry proof retains its original timeout and verifies scoped failover without global activation.
Wait for opening focus initialization and visible popup retirement before exercising selection and typing ownership. Preserve the existing focus, selected-agent, and composer assertions without changing product behavior or timeouts.
7d3f3d0 to
5262cd8
Compare
|
Codex review: found issues before merge. Reviewed August 31, 2026, 2:23 PM ET / 18:23 UTC. ClawSweeper reviewWhat this changesThe PR watches the nearest existing ancestor of each skills root so roots created after startup refresh the skill snapshot, and relocates an agent-file browser test to the real-Gateway CI job. Merge readinessKeep this maintainer-authored PR open. The watcher repair targets the snapshot owner and is covered by a real-filesystem regression, but the introduced real-Gateway UI test bypasses manual proof capture/upload and the branch edits release-owned changelog content. Priority: P2 Review scores
Verification
How this fits togetherThe skills runtime observes workspace skill directories and invalidates the versioned snapshot used by later agent turns. The PR changes how missing directories are observed and adds real-Gateway browser coverage for a separate Control UI file workflow. flowchart LR
A[Workspace skill roots] --> B[Skills watcher]
B --> C[Existing ancestor watch]
C --> D[Logical root filter]
D --> E[Snapshot invalidation]
E --> F[Later agent turn]
Before merge
Findings
Agent review detailsSecurityNone. PR surfaceSource +92, Tests +136, Docs +2, Config +7. Total +237 across 16 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Remove the release-owned changelog entry and make the agent-file real-Gateway test share the job’s capture directory and upload sequence, with a workflow guard for that contract. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main watches the absent logical root directly, while the new real-filesystem test creates the missing project-agent tree after watcher startup and observes the intended refresh. Is this the best way to solve the issue? No: ancestor watching with logical-root filtering is the right repair boundary, but this branch also needs the two focused CI/release-process corrections before it is the best mergeable solution. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 127ae428ece0. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Reviewed the latest ClawSweeper findings and rank-up moves against the current and pre-move source.
Exact head |
|
Merged via squash.
|
* fix: restore gateway recovery fixture lint and types Preserve the recovery coverage added in openclaw#134165 while using the actual WebSocket dependency and authored SecretRef fixture boundary. Co-authored-by: Shakker <[email protected]> * fix(skills): refresh roots created after startup * fix: authenticate CI checkout and lazy blob fetches * fix: prepare immutable reader history during CI checkout * fix(ci): declare historical reader selector entry point * docs: group the skills refresh release note * test(skills): await positive-control directory watch readiness * perf(anthropic): defer auth and catalog runtime imports Keep provider descriptors synchronous without importing credential stores, external auth discovery, or live catalog transport during registration. Load those implementations only when the existing asynchronous setup, doctor, usage, and catalog hooks need them. Expose the existing lightweight API-key descriptor factory through provider-entry while preserving the shipped auth SDK helpers and their synchronous contracts. The unchanged fresh-process registry proof retains its original timeout and verifies scoped failover without global activation. * test(ui): await agent menu lifecycle before keyboard navigation Wait for opening focus initialization and visible popup retirement before exercising selection and typing ownership. Preserve the existing focus, selected-agent, and composer assertions without changing product behavior or timeouts. * test: include historical prerequisite in routing expectations * fix(ci): prepare Testbox against the checked-out merge base * docs(plugins): use public provider auth import in tutorial * test(ui): route agent file proof through real Gateway CI --------- Co-authored-by: Shakker <[email protected]>
What Problem This Solves
Creating a skills directory after Gateway startup could leave the active skills snapshot unchanged, especially when both levels of
<workspace>/.agents/skillswere missing. Pending file-stability work could also notify after its watcher closed.Why This Change Was Made
Chokidar retains the final basename while falling back through missing parents. The refresh owner now watches the nearest existing ancestor and restricts traversal and events to the intended logical skills root. Shared subscriptions retain logical depth independently of their physical watch location, and closed watchers reject delayed notifications.
This composes with the Windows short-path fix landed in #134045: expand only the existing non-symlink prefix before choosing the ancestor. The canonical path normalizer preserves drive and UNC roots, so
C:/never becomes the drive-relativeC:. Symlink restrictions, ignored directories, depth limits, and polling behavior remain intact. Redundant target keys and one-use wrappers are removed. Production changes are +80/-78, net +2; the root-boundary repair accounts for three lines beyond the original net-negative watcher repair.Evidence
SKILL.mdpositive control passed in both versions; creating.agents/skillsafter parent-watch registration failed before and refreshed afterward. A separate regression reproduced notification after watcher closure.73e22afd024passed two full CI runs, including the real missing-root Windows proof and required real-Gateway browser proof. Those are retained historical results; the final composition requires fresh exact-head CI before landing.The PR also moves the real Gateway agent-file browser test out of ordinary mocked UI shards into the existing required real-Gateway job. Its read, agent-switch and durable-save assertions retain their 120-second deadline. Shared browser helpers are reused, and cleanup covers setup and close failures. The routing guard failed before the change and passes afterward; all three real/mocked browser cases passed. This portion changes no production code.
The actual main composition conflict was limited to the watcher path initialization and changelog placement. Already-landed release fixes are preserved. A combined test-file size lint failure was repaired by splitting the Windows tests, without suppressing or changing the limit. Final review is clean at the required blocking priority. No release is published by this PR.