Skip to content

refactor: fold private bootstrap and display handoffs - #178356

Merged
steipete merged 1 commit into
mainfrom
deslop/z25-57-private-bootstrap-display-owners-20261015
Oct 20, 2026
Merged

steipete merged 1 commit into
mainfrom
deslop/z25-57-private-bootstrap-display-owners-20261015

Conversation

@steipete

Copy link
Copy Markdown
Contributor

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

  • Complete changed owners, relevant callers, public proof, provenance and active overlaps inspected; author simplification and capture/return-boundary review completed.
  • Fresh complete-candidate independent P0-P2 review finished scoped-clean (0.97), with seven complete public owner/proof datasets and final source verification. It confirms the restored status record contract and direct Set membership; no accepted/actionable findings remain. Two subsequent boolean-negation lint corrections preserve actual boolean contracts and rejection order. Triage retains the lightweight shared agent list for CLI metadata, captured target and agent values, every command byte and its current consent/authority/settlement behavior. The overlapping fix(triage): verify startup repair before completing its task #145456 startup-repair and fix: preserve paragraph breaks in streamed replies #125340 accepted source-block foundations are not copied, reverted or removed. ACP's existing whitespace/separator predicates and hidden-boundary reset order remain expression-equivalent.
  • Targeted core, extension and tooling native type graphs and syntax lint pass after the owned record-contract and Set-membership repairs. Core/tooling typed lint, extension import boundaries, line-cap, assertion-SAFETY and mock-export ratchets pass. Suppression proof passes all 14 cases; wrapper/import closure passes four selected cases. Runtime cycles and Madge cycles are both zero. Scoped formatting and staged whitespace pass. The initial extension typed-lint findings were two actual-boolean comparisons; their mechanical corrections pass the focused two-file typed-lint replay.
  • Focused runtime proof completed with 808 passing tests, one existing startup-metadata platform skip and no failures. Selected core owner suites (including prompt-prefix stability) pass 522; Teams attachments 37; Foundry setup 56; Copilot bootstrap 5; ClickClack ingress 65; GoogleChat monitor/lifecycle 19; Venice discovery 9; xAI auth 30; Zalouser ingress/policy 40; selected MCP catalog projection cases 6; startup metadata 19. Fifty unrelated MCP cases were outside the explicit catalog filter, not modified or claimed as executed. The changed ClickClack suite preserves five distinct conversation/thread scopes. The metadata suite verifies invalidation when the retained CLI owner changes. Test bodies for the metadata suite took 1.946 seconds; its shard took 39.58 seconds (55.84 seconds including wrapper). Compilation/cache preparation accounts for most local wall time; no performance improvement is claimed.

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.

@clawsweeper

clawsweeper Bot commented Oct 20, 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 channel: googlechat Channel integration: googlechat channel: msteams Channel integration: msteams channel: zalouser Channel integration: zalouser scripts Repository scripts commands Command implementations agents Agent runtime and tooling extensions: venice extensions: xai extensions: copilot extensions: clickclack extensions: microsoft-foundry size: XL labels Oct 20, 2026
@steipete
steipete marked this pull request as ready for review October 20, 2026 11:18
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T11:21:26.283375Z a08b286 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Oct 20, 2026
@clawsweeper

clawsweeper Bot commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This 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 openclaw memory --machine.

  • Before: Registration applies the metadata through a separate private command-group module.
  • After: The existing CLI owner applies the same metadata directly, preserving machine-output behavior.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Source review and automated owner coverage support the refactor, with no actionable correctness or security finding.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored internal refactor is outside the ordinary contributor-proof gate; the body reports focused owner-suite validation and explicitly claims no live product run.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes
Reason: The maintainer-authored direction removes one-consumer plumbing while retaining existing product behavior and ownership.

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
Reviewed head: a08b286b3dc7f50af87eebcdd893939960c18824

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: No shipped CLI, Gateway, or live-channel run is supplied; the retained owner suites and exact-head CI provide automated validation.
Agent review details

How this fits together

CLI 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]
Loading

Technical review

Best 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

  • Plugin CLI registration keeps the original intent (150c401: Shared command-group registration helpers centralized registration behavior; this PR retains that behavior inside the existing CLI owner.)
  • Patch update construction keeps the original intent (fix(agents): preserve file bytes in apply_patch outside the hunk #124418: Preserve BOM, fuzzy context bytes, line endings, and EOF state; the later large-hunk repair also requires linear appends.)
  • Completion transcript recorder keeps the original intent (Hide internal media completion wakes from chat history [AI] #126329: Persist internal completion provenance in the authoritative requester transcript while hiding internal wakes from visible history.)
  • MCP catalog projection keeps the original intent (6046d4f: Project MCP app metadata and tools; the subsequent private-view refactor retained the outer assembly owner.)
  • Command authorization keeps the original intent (ad9481e: Deduplicate authorization helpers while preserving command allowlists, owner enforcement, and reset-only admission.)
  • Queued follow-up delivery keeps the original intent (refactor(reply): converge queued follow-up execution [AI-assisted] #114599: Converge queued execution on canonical runtime owners while retaining delivery privacy, recovery, and settlement semantics.)
  • Provider usage credential-source checks keeps the original intent (fix(cli): keep channel status checks off plugin runtimes #69479: Avoid loading provider runtimes when no direct or profile credential source exists; later async preparation and caller-store reuse remain.)
  • ClickClack routing and loop scopes keeps the original intent (3d80a2f: Isolate bot-loop budgets by conversation thread while preserving routing and mention policy.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

PR surface

Source -559, Tests +16, Other 0. Total -543 across 29 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 24 1311 1870 -559
Tests 4 107 91 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 29 1419 1962 -543

Review metrics

Metric Value Why it matters
Production versus test LOC Production/tooling +1317/-1876; tests +107/-91 The production reduction removes private handoffs; test growth extends existing scope and invalidation coverage while moving retained CLI contracts.

Labels

Label changes:

  • add P3: This is behavior-preserving internal cleanup with no demonstrated urgent user-facing defect.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P3: This is behavior-preserving internal cleanup with no demonstrated urgent user-facing defect.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 20, 2026, 7:38 AM ET / 11:38 UTC.

@steipete
steipete merged commit 98bb32b into main Oct 20, 2026
228 of 238 checks passed
@steipete
steipete deleted the deslop/z25-57-private-bootstrap-display-owners-20261015 branch October 20, 2026 11:42
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 21, 2026
NEXTAltair added a commit to NEXTAltair/openclaw that referenced this pull request Nov 10, 2026
目的:
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 呼び出しを採用。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling channel: googlechat Channel integration: googlechat channel: msteams Channel integration: msteams channel: zalouser Channel integration: zalouser commands Command implementations extensions: clickclack extensions: copilot extensions: microsoft-foundry extensions: venice extensions: xai P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. scripts Repository scripts size: XL status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant