Repository navigation
refactor: fold private bootstrap and display handoffs - #178356
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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesThis PR folds private helpers into their existing consumers and consolidates plugin CLI registration in its public owner. Example: A plugin command declares machine output for
Review scores
ProductKind: Refactor · Worth it: Yes Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authorized refactor removes private indirection without a concrete introduced regression, and the exact-head CI gate passes. Priority: P3 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherCLI commands, channel events, provider setup, and agent delivery enter existing operation owners, which prepare instructions, authorize requests, format output, or deliver results. flowchart LR
A[CLI commands and channel events] --> B[Existing operation owners]
C[Config and admitted context] --> B
B --> D[Plugin registration and provider requests]
B --> E[Agent preparation and delivery]
D --> F[CLI output and provider responses]
E --> G[Messages and transcripts]
Technical reviewBest possible solution: Keep the existing operation owners while preserving public contracts, captured values, rejection order, and cleanup. Do we have a high-confidence way to reproduce the issue? This PR addresses private indirection rather than a reported user-visible failure, so a failing-product reproduction does not apply. Is this the best way to solve the issue? The folds use existing owners, remove the replaced paths, and retain the meaningful public tests without introducing new state or competing policy. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against a52ba4f23384. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
PR surfaceSource -559, Tests +16, Other 0. Total -543 across 29 files. Added test files: 0. View PR surface stats
Review metrics
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 20, 2026, 7:38 AM ET / 11:38 UTC. |
|
Merged via squash.
|
目的: soul-in-sapphire を単なる応答スタイルではなく継続する主体として扱い、parent、built-in subagent、heartbeat、lightContext、Copilot、GPT-5 provider overlay の間で SOUL.md と IDENTITY.md に基づく人格・価値観・自己理解を失わせない。 原因: 従来の個人向け変更は core system prompt だけを主に直していた。subagent allowlist は AGENTS.md しか許可せず、lightweight identity filter との合成で実際の lightweight subagent context が空になっていた。既存テストは subagent sessionKey を渡さず、この不整合を見逃していた。Copilot と GPT-5 overlay にも人格を上位指示へ従属させる旧文言が残っていた。 修正と期待: built-in subagent に AGENTS.md、SOUL.md、IDENTITY.md を渡し、軽量実行でも SOUL.md と IDENTITY.md を維持する。Copilot と GPT-5 overlay では人格を安定した core identity と明示する。実際の subagent sessionKey を使う回帰テストと否定 assertion を追加し、公開文書と型コメントも実挙動へ揃える。 権限獲得: 利用者がその種類の権限を包括的に付与済みなら、目的達成に必要な正規の permission、integration、access setup は毎回確認せず自律的に進める。新たな第三者同意、credential 入力、不可逆判断が本当に必要な時だけ関与を求める。 維持する境界: USER.md と MEMORY.md は子へ渡さず、私的情報の分離を保つ。credential・pairing code・秘密情報を transcript や外部へ露出しない。access control の回避、欺瞞、強要、不可逆・破壊的操作は許可しない。Codex-native child の developer-instruction 継承と Copilot SDK の実行時 permission policy は別契約なので、この prompt/built-in subagent 修正では変更しない。 rebase 時のコンフリクト解決 (onto 92635da, 元コミット daa61915852): - Safety 節: 本コミットの "Actively obtain permissions…" 1行を採用し、 上流 openclaw#143238 の buildCredentialSafetyPrompt({ controlToolsAvailable }) に合わせた - docs(上流で config-agents.md / subagents.md がサブページへ分割)、 types.agent-defaults.ts のコメント(上流で HeartbeatSchema 由来になり消滅)、 テストの期待値変更は、動作に影響しないためコミットしない方針で上流版を採用 - 動作変更(subagent への SOUL.md/IDENTITY.md 注入、GPT-5 overlay、Copilot bootstrap)は保持 rebase 時のコンフリクト解決 (onto 57fd13e, 元コミット d888689340c): - 上流 98bb32b (openclaw#178356) が Copilot の renderCopilotWorkspaceBootstrapInstructions を loadCopilotWorkspaceInstructions へ畳み込んだ。旧関数ブロックは破棄し、畳み込み先の SOUL.md 行に 本コミットの core identity 文言を再適用 rebase 時のコンフリクト解決 (onto 258d034, 元コミット ad8c169c6fc): - 上流 b0b6c32 (openclaw#191749) が loadWorkspaceBootstrapFiles を workspace-file-read.ts へ移した。workspace.ts 側の旧関数ブロックは破棄し、 残った SUBAGENT_BOOTSTRAP_ALLOWLIST に SOUL.md / IDENTITY.md の追加を再適用 rebase 時のコンフリクト解決 (onto 638a185, 元コミット 5c786afab0f): - 上流 94ba8ae (openclaw#191344) で Care 節が buildCareSection (system-prompt-policy-sections.ts) に移ったため、"Do not manipulate…" 行を "Actively obtain permissions…" 行へ 置き換える変更を buildCareSection 側へ再適用した。system-prompt.ts 側の インライン配列は上流の buildCareSection 呼び出しを採用。
What Problem This Solves
Private one-consumer helpers repeat facts already owned by bootstrap, display, request and delivery operations. One internal plugin CLI module exists only to accept the enclosing registrar's command groups and options.
User Impact
No intended user-visible change, migration or operator action. Existing public CLI, channel, provider, workspace, delivery and patch behavior stays at its current entry points.
Why This Change Was Made
Fold the private handoffs into their existing consumers. Move plugin command-group registration into its existing public CLI owner while preserving fresh deferred loading and effect authority. Migrate the source-signature consumer to that owner and move retained helper proof to the existing public CLI suite. Inline the pure per-hunk context builder without changing byte preservation or large-hunk algorithms.
Current runtime production delta against pinned base
f224d6eaad8cff904e35aba63e83d1ccf6106223: +1316 / -1875 = 559 net lines removed, across 24 paths. The startup metadata generator adds a separate zero-net one-line path replacement, making 25 non-test paths and +1317/-1876 overall. Test/support delta is separate and not credited. No public SDK/package API, CLI/config/protocol, dependency, persisted format, schema or permission change. The standalone session-memory backend and its factory/registry/expiry/federation machinery and tests are untouched.Best-effort tradeoffs accepted
Evidence
Exact-head hosted CI is broad proof. Local proof uses isolated HOME/OpenClaw/XDG paths, nice10, serial one-worker focused Vitest and targeted native type graphs. No broad local suite, whole-graph typecheck, build, E2E, live provider/device or operator-state proof is claimed.