Skip to content

fix(knowledge): preserve other agents' scribes during setup - #196238

Closed
TheAngryPit wants to merge 2 commits into
openclaw:mainfrom
TheAngryPit:fix/knowledge-scribe-agent-scope-196224
Closed

TheAngryPit wants to merge 2 commits into
openclaw:mainfrom
TheAngryPit:fix/knowledge-scribe-agent-scope-196224

Conversation

@TheAngryPit

@TheAngryPit TheAngryPit commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Closes #196224

What Problem This Solves

Fixes: setting up or repairing a Knowledge scribe can remove another agent’s scheduled scribe when the operator can manage both agents.

User Impact

Each agent can retain its own scheduled scribes when another agent starts or repairs the same scribe. Existing pauses remain preserved during setup; repair still enables its own automation. Previously removed schedules need to be recreated through the normal owner-authorized setup.

Why This Change Was Made

The generated instructions now explicitly list and create automations for the Runtime agent, inspect recorded owner.agentId, and leave other or missing owners untouched. The documentation example uses the same scope. Existing cron authorization and declaration matching are unchanged.

Evidence

Current-head runtime proof at c2042d62fb5e55dba9c255731fb950a8b3565024 exercised the unmodified generated setup, setup-repeat, repair and repair-repeat prompts through a running isolated Gateway and production agent tools, using native Codex app-server with the existing ChatGPT subscription (gpt-6.1-sol, medium). Independent persisted readbacks show four schedules across three agents: setup preserves the owned pause, repair enables only its own schedule, repeats create no duplicates, and all three foreign records remain entirely unchanged. All four real inference turns reached terminal ok. No synthetic inference was used in those measured turns, no production source changed, and no credentials/auth order/model defaults were changed. This is headless Control UI protocol proof, not browser-button interaction or overnight execution; prompt-image delivery below remains open.

  • The added setup/repair scope contracts fail on the original generated instructions and pass with this fix; final Knowledge state/view suite: 36 passed.

  • Real Gateway-handler/SQLite ownership suite: 5 passed, covering three agents with two shared declaration keys, agent-filtered administrator lists, idempotent retries, preserved pauses/foreign definitions, and retained explicit administrator get/update/remove. These protect already-correct backend behavior and are not a reproduction of the prompt defect.

  • The primary ownership/validation/Knowledge run passed 192 tests before final wording/fixture refinements; the affected suites were rerun afterward. Formatting, whitespace and scoped documentation checks passed.

  • Earlier installation report (separate from the current-head run above): the browser-source patch was built and adopted through the supported plugin asset/metadata pipeline, followed by native Control UI plugin reload. The report described the corrected setup guard and six schedules across three agents. That earlier report lacks inspectable attached runtime media and is not presented as the new four-schedule proof or as completed proof delivery.

  • Focused Knowledge typecheck passed through the native wrapper using the canonical extension-test configuration and ambient declarations. Typed lint passed for the changed Knowledge source/test and Gateway regression (zero warnings/errors). The dependency-ownership refusal was resolved with a task-owned offline frozen install: 1,482 packages reused, zero downloads, no guard bypass. The broader browser package-project declaration failure is retained separately; this is a scoped validation claim.

Synthetic rendered before / after

The real Knowledge view, dialog and styles were rendered with a synthetic host at base 2e73417ca8a52bfe2e8de64c5263f8b03a4dc6f3 and head b15b817cbc7b8fb7884b70e7769b216c83b04e2e. Two original 1440×1000 PNGs were captured and inspected with the expanded Prompt showing the old cleanup instruction and corrected owner-agent filter. Theme dark, locale en-US, time zone UTC; the visible controls were exercised and no fixture write was sent. Unchanged component/style sources were hash-matched. Available Chromium 153 revision 1243 was used; Playwright’s expected revision 1248, the upstream screenshot-frame helper and repeat pixel comparisons were not used. This is synthetic rendering evidence, separate from live schedule readback.

Draft delivery blocker: gh pr edit --attach refused both inspected PNG attachments because it requires write access to the upstream repository. The required inline-image delivery gate remains incomplete; no generated media was committed and no alternative upload destination was substituted. Private runtime screens are excluded. Source, focused tests, typecheck/lint and live schedule recovery are delivered; this PR is not claimed merge-ready.

@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation gateway Gateway runtime plugin: knowledge size: S labels Nov 9, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 9, 2026
@clawsweeper

clawsweeper Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: stale review; fresh review needed.

Summary
The latest durable ClawSweeper review was for head b15b817cbc7b8fb7884b70e7769b216c83b04e2e, but the PR head is now c2042d62fb5e55dba9c255731fb950a8b3565024. Its old verdict and PR readiness labels are no longer current.

Next step
Comment @clawsweeper re-review when the current head is ready; pushes after the first review are not reviewed automatically.

Review history (1 earlier review cycle)
  • reviewed 2026-11-09T21:05:23.063Z sha b15b817 :: needs real behavior proof before merge. :: none

Use the public cron.add request type so omitted enabled remains valid in declaration replay coverage. Set the scoped allocation to the measured 132-line test increase.
@TheAngryPit

Copy link
Copy Markdown
Contributor Author

Note

🤖 Codex responding on behalf of TheAngryPit

The unmodified generated setup and repair prompts now have an inspectable real-model runtime check at current head c2042d62fb5e55dba9c255731fb950a8b3565024. This is separate from the earlier six-schedule installation report and the still-undelivered prompt images.

An isolated Gateway created the conversation through the production sessions.create / plugin-dock path and submitted the generated prompts through the authenticated Control UI protocol. The four measured turns used native Codex app-server 0.167.1, existing ChatGPT subscription login, gpt-6.1-sol, medium effort. No synthetic model answered those turns; no credentials, model defaults or auth order were changed. Synthetic seed data contained four schedules across three agents: one paused owned schedule and three foreign schedules belonging to the other two agents.

Independent cron.list readbacks—not the model's final claims—show:

Persisted state Total schedules Own schedule Three foreign records
Before setup 4 Paused, old conversation Baseline
After setup 4 Replaced for current conversation; still paused Entire records unchanged
After repeating setup 4 Same current ID; still paused Entire records unchanged
After repair 4 Same current ID; enabled Entire records unchanged
After repeating repair 4 Same current ID; enabled Entire records unchanged

All four agent.wait results were ok. Their actual tool histories include knowledge_status, session_status and automations; setup removed only its own old job, created the current paused job, and repair enabled only the current job. Root independently compared all three complete foreign records across all five snapshots, verified the generated prompt hashes and terminal provenance, and checked clean source plus stopped task processes.

Generated prompt SHA-256 values:

setup  f67864bf3547cbac1dc9b26dc814904f16b9cd74a74dbdc418de9a89aad073e5
repair f15620af1e0c1263f49b04e5032d49f60bf8dcf69f973de183ce0495a97d614e

The production catalog blob is 2d02e8bd273232137b03c43c49ba9f2aaf03f52a, identical to reviewed b15b817. Sanitized receipt SHA-256: 42c7c5ee1cabbd357553ac42526740b9fb9e43abe2c39befcae6f1437176b21b.

Limits: this exercised the headless Control UI protocol, not browser button interaction. The scheduler was disabled, so it does not prove overnight ingestion or universal model compliance. An initial failed attempt is retained: its fixture omitted normal session_status and bypassed production conversation creation; an independent readback confirmed no schedule changes. Only those fixture divergences were corrected before the successful run. Production source was not changed. The acknowledged before/after prompt-image delivery remains open; this comment does not waive it or request another review before that gate is addressed.

@clawsweeper clawsweeper Bot removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Nov 16, 2026
@obviyus

obviyus commented Nov 19, 2026

Copy link
Copy Markdown
Collaborator

Thank you @TheAngryPit for the report and this fix. Your change and #197391 (merged on main on 2026-11-13) scope the scribe setup step the same way: list only the current agent's jobs and leave other agents' scribes alone. I verified on current main that setting up one agent's scribe no longer removes another agent's, so I'm closing this one as covered by #197391. It ships in the next release.

@obviyus obviyus closed this Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation gateway Gateway runtime P1 High-priority user-facing bug, regression, or broken workflow. plugin: knowledge size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Knowledge scribe setup for one agent removes other agents' scheduled scribes

2 participants