Repository navigation
refactor: keep Knowledge scribe run prompt private - #186347
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 maintainer review before merge. What this changesThis PR makes the Knowledge scribe run-prompt helper private and tests its output through the setup prompt. Example: Start an ongoing conversations scribe covering active and archived conversations from the last 90 days.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR makes a focused, behavior-preserving cleanup that remains applicable on current main; no actionable defect was found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Knowledge scribe catalog turns dialog choices into setup and repair prompts containing the message installed on a scheduled automation. flowchart LR
A[Dialog choices] --> B[Setup prompt]
C[Existing automation] --> D[Repair prompt]
E[Private run prompt helper] --> B
E --> D
B --> F[Scribe conversation]
D --> F
F --> G[Scheduled automation]
Technical reviewBest possible solution: Keep runPrompt module-private and retain independent assertions on the scheduled message emitted by setupPrompt. Do we have a high-confidence way to reproduce the issue? No user-facing bug is claimed; source inspection confirms the test-only external use of the helper, and the prior merged cleanup records the unused-export finding. Is this the best way to solve the issue? Yes: removing the unnecessary export and inspecting the existing setup output is the smallest complete change, without another owner, wrapper, or compatibility path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2229c93b0a4e. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +1. Total +1 across 2 files. Added test files: 0. View PR surface stats
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 27, 2026, 6:04 PM ET / 22:04 UTC. |
|
Simplified: The Knowledge scribe's scheduled run prompt constructor is now private while public prompt-output coverage remains intact. |
Keep the Knowledge scribe's scheduled run prompt constructor private while preserving public prompt-output coverage.
What Problem This Solves
Knowledge's
runPrompthelper is used by production only inside the scribe catalog, but it is exported so one test can call it directly. That unnecessary implementation export is reported by the repository's unused-export check, and the direct test import bypasses the public prompt output that actually carries the scheduled payload.User Impact
There is no user-visible behavior change. Generated setup, repair, and scheduled-run prompt bytes remain unchanged, including private-access checks, unattended-run guidance, schedules, failure handling, and status instructions. The Knowledge plugin, package, and Plugin SDK surfaces are unchanged.
Why This Change Was Made
This change makes
runPromptmodule-private while retaining its existing production callers. The catalog test now extracts the fenced run message fromsetupPrompt, the real public owner of the generated ongoing-scribe payload, and checks the run-specific settings and automation restrictions on that extracted message rather than importing the private constructor.Evidence
check-dependenciesevidence identifiedrunPromptas the remaining unnecessary production export.extensionsandextensions-testtype graphs passed.scribes-state.test.tsandscribes-view.test.tspassed all 31 tests.