Repository navigation
feat: read agent documents from a host-owned workspace - #150584
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: blocked before merge. Reviewed September 18, 2026, 6:17 PM ET / 22:17 UTC (Revision 6). ClawSweeper reviewWhat this changesAdds a plugin-provided workspace binding so document editing, identity updates, bootstrap instructions, and post-compaction reads can use files owned by another host. Merge readiness⛔ Blocked before merge - 3 items remain This remains useful work: current main and the latest release still read agent documents locally. No actionable patch defect remains supported by this review; the prior write-lifecycle concern has an explicit documented disposition. Priority: P2 Review scores
Verification
How this fits togetherGateway document requests and agent context preparation currently consume workspace files. The new binding selects a host-provided filesystem bridge while retaining local access for unconfigured workspaces and existing document restrictions. flowchart TD
A[Document requests] --> C[Workspace access owner]
B[Agent context preparation] --> C
C --> D{Remote workspace declared?}
D -->|No| E[Local filesystem]
D -->|Ready| F[Host filesystem bridge]
D -->|Stopped| G[Explicit failure]
E --> H[Documents and filtered context]
F --> H
Before merge
Agent review detailsSecurityNone. PR surfaceSource +543, Tests +934, Docs +50, Config +4, Other +7. Total +1538 across 36 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep remote ownership explicitly opt-in through the shared bridge, with consuming integrations proving their capability requirements before replacing production workspace synchronization. Do we have a high-confidence way to reproduce the issue? Not applicable as a defect reproduction: this adds remote document access, and source inspection confirms the existing main and release paths are local. Is this the best way to solve the issue? Yes. Reusing the filesystem bridge behind one lightweight workspace owner is a focused solution, and the documentation clearly separates this foundation from the remaining remote-host integrations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 085e19b4593f. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
Dependency graph guard clearedThis PR no longer has blocked dependency graph changes. A future dependency graph change requires a fresh
|
|
Following up on the ClawSweeper review:
The remote workspace still never falls back to a stale local copy. OCE #76 records this distinction and the remaining deployment evidence. This is a scope decision, not proof that the race has been eliminated. |
9ee468d to
b16c599
Compare
…pr-149099-main-20260918 * commit '795e460278d4f8f41545dc8b4a66da1d12defd90': (1902 commits) refactor(slack): share Markdown preparation (#149129) fix(tooling): release completed PR operations with exited loaders (#152209) fix(release): allow stable npm bootstrap under an operator soak waiver (#152206) fix(daemon): avoid false restart timeouts during slow startup (#151387) feat: read agent documents from a host-owned workspace (#150584) improve(startup): skip redundant single-agent directory checks (#152192) test(ui): await board widget readiness before size reports (#152198) perf(browser): move dashboard event discovery to SQLite worker (#151952) improve(auth): reduce pauses during concurrent credential reads (#152140) improve(ui): load older chat history in smaller pages (#152093) fix(release): reject incomplete legacy npm install trees (#152186) refactor: share current-conversation binding row serialization (#152134) test(tooling): preserve Node and terminal fixture ownership under Bun (#152187) fix(sqlite): service worker admission through retained path aliases (#152190) improve: reduce CPU work for long CLI reasoning streams (#152191) chore(ui): refresh control ui locales (#152196) test(subagents): align lifecycle retries with durable completion owners (#152184) perf(gateway): defer participant maps for owned sessions (#152097) refactor(stream): share auxiliary queue overflow handling (#149282) fix(test): execute CLI fixture preloads on Node and Bun (#152076) ...
Resolve the plugin-SDK surface budget conflict in scripts/plugin-sdk-surface-report.mts as a union of both sides. main (openclaw#150584, host-owned workspace access) raised publicExports 4485 -> 4489 and publicFunctionExports 2649 -> 2652. This branch had raised the same two counters by +1 each for the shared grapheme-safe chunk boundary helper. Both sides' justification comments are kept at their original insertion points; the totals are the values reported by the repo's own surface script, not hand-computed: public package SDK entrypoints: entrypoints: 155 unique entrypoint-qualified exports: 4490 callable exports: 2653 The third budget (entrypoints 154 -> 155) is main's alone and merged without conflict.
What Problem This Solves
Gateway reads Agent documents and bootstrap context from its local filesystem, even when a separate harness host owns the workspace.
User Impact
A host plugin can route the existing document editor, identity form, bootstrap loading, and post-compaction reads to that workspace. Unconfigured workspaces retain local behavior; stopped remote access does not select a stale local copy.
Why This Change Was Made
Bind an existing
SandboxFsBridgefor the host service lifetime, independently of harness turns. The narrowagent-workspace-runtimeSDK entrypoint avoids importing the agent execution runtime just to register file access. Keep the document allowlist and best-effort save-conflict checks. Reads report their actual source so Memory Core can apply its existing context filters.This is the document/bootstrap portion of storage separation. Memory file access, Skills, attachments, and provisioning have separate integration changes.
Evidence
130c584843baaac2342a9024564943f1c112647c; validated runtime candidateb16c599032b. Ten relevant test files passed: 285 tests, 20 platform skips. Core types, SDK surface check and the complete build passed on Node 24.19 with the checked-in frozen lockfile. This is local evidence, not deployed model E2E.014e0ccd3f2also passes 10 SDK tooling tests and 24 test-shard tooling tests. Its SDK budget matches its actual exports; later PRs add their own required exports. The two added agent test files use a shard with available capacity; the shard limit is unchanged. Remote shell bootstrap fixtures skip Windows; the 12 focused bootstrap checks pass on macOS.Scope and remaining integration work: OCE #76. No merge or deployment is part of this update.