Repository navigation
[2026.10.9] Preserve filesystem policy in Gateway-built tools - #187276
Conversation
Passive macOS Gateway stops now preserve an absent current-profile service definition without invoking uninstall, while explicit low-level ghost recovery remains available. Release adaptation: the 2026.10.8 backport of #180390 removed the absent-plist guard from GatewayLaunchAgentManager's disable path without main's follow-up, so every passive stop with no LaunchAgent plist ran `openclaw gateway uninstall` (mac validation: GatewayProcessManagerTests "pause preserves unretainable services" [absent]). Stable has no migration-pending custody or `.authority` wrapper, so the guard checks `custody.definition.plist` directly. Mac-only post-tag fix; npm, Docker and Linux bytes are unaffected. (cherry picked from commit cb10ec4)
…spaceOnly reaches the delegate and media tools (#185094) * fix(agents): derive fsPolicy for Gateway-built OpenClaw tools so workspaceOnly reaches the delegate and media tools * test(gateway): prove workspace policy at delegation and media sinks Backport adaptation (#185094): Resolve policy in the older createOpenClawToolsWithPreparation capture before asynchronous delegation, and before synchronous assembly. Keep branch-local policy unit fixtures; wire the historical inference test dependency fixture and add factory-level restriction/override regressions. (cherry picked from commit 3e0c610) Co-authored-by: RomneyDa <[email protected]>
OpenClaw-Publication: 1566eb5f-7298-42a5-95d8-47bc24fe6e4e
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
@clawsweeper review |
|
🦞👀 Re-review progress:
|
|
Codex review: needs maintainer review before merge. What this changesDerive omitted filesystem policy before Gateway tool preparation so delegation and media tools honor existing workspace restrictions. Example: A Gateway tool requests
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this maintainer-authored release backport open; it restores documented filesystem restrictions, and inspection found no introduced production defect. Priority: P1 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherGateway and skill-dispatch callers construct tools through the shared agent factory; captured configuration and session permissions become policy inputs to delegation approval and media-file access. flowchart TD
A[Gateway or skill dispatch] --> B[Shared tool factory]
C[Config and session permissions] --> B
B --> D[Captured filesystem policy]
D --> E[Delegate approval owner]
D --> F[Media access owner]
E --> G[Authorized config write]
F --> H[Allowed image bytes]
Technical reviewBest possible solution: Retain the shared-factory policy repair and include this backport after the release branch's qualification gates are satisfied. Do we have a high-confidence way to reproduce the issue? Source tracing confirms that omitted policy reaches consumers which interpret it as unrestricted; the upstream report records failing-base final-effect cases, but no target code was executed during this read-only review. Is this the best way to solve the issue? Deriving the missing input at shared construction boundaries fixes both callers while preserving the existing approval, persistence, permission-precedence, and media-access owners. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 54818f9e6756. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +63, Tests +398. Total +461 across 7 files. Added test files: 1. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel 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 Reviewed October 29, 2026, 12:39 AM ET / 04:39 UTC. |
Co-authored-by: RomneyDa <[email protected]>
Co-authored-by: RomneyDa <[email protected]>
Original attribution verified
The published tip directly descends from original authored candidate
5efa539bf99d7fbd2142ffd28c5ccac5dc0f69dc; original author identities, upstream references and RomneyDa coauthor trailers remain intact in PR history. Full ancestry verification supersedes the earlier tip-only attribution warning. Published tree is unchanged; no merge, history rewrite or force-push was necessary.Publication recovery — DRAFT ONLY
The managed publisher originally selected
main. The existing PR was retargeted torelease/2026.10.8on 2026-10-29 without changing its head. GitHub now reports exactly seven expected files. Published tree02e5c6a698d63bc42d833c97d7d6733a2b48a39aexactly matches tested local candidate5efa539bf99d7fbd2142ffd28c5ccac5dc0f69dc. Independent full-context review and hosted checks remain required.Scope
Backport Agustin Rivera's #185094 (3e0c610) to release/2026.10.8. Derive omitted filesystem policy before asynchronous delegate preparation and synchronous tool construction. Preserve explicit overrides, session permission roots, read-only attachments, approval, cancellation and revocation enforcement.
Adaptation
Use the older inline createOpenClawToolsWithPreparation boundary. Regression coverage intercepts asynchronous preparation and proves the derived policy reaches the delegate. Historical inference fixtures pass their dependency adapter; real approval and persistence remain exercised.
Validation
Gates
DRAFT ONLY. Independent full-context review, hosted checks and release qualification remain outstanding. No ready-for-review or merge/release claim. No version, dependency, lockfile or release-validation changes.