Repository navigation
refactor: rename Claws to Templates throughout OpenClaw - #186457
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. |
Inspected before / after UI proofCandidate screenshots lead each comparison. Real built Control UI in Chromium with synthetic Gateway fixtures; no live model/provider, production state, or public publication is represented.
The same inspected catalog before/after and candidate Labs/creator captures were delivered in the originating conversation before pushing. CLI proof is separate: all six new commands succeeded in isolated state, including a real ordinary-agent Add; the retired command rejected. The screenshots do not claim that their synthetic Gateway fixture was a live registry or provider. |
|
Codex review: needs maintainer review before merge. What this changesThis PR renames Claws to Templates across authoring, discovery, UI, CLI, protocol, and storage while preserving historical packages and existing database contents. Example: An operator browses reusable agents and an author validates a local project.
Review scores
ProductKind: Refactor · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open for coordinated landing: this maintainer-owned rename remains useful, and no actionable defect was found in the inspected cutover paths or latest repairs. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherControl UI and CLI requests pass through Gateway discovery and Add owners, consume verified registry packages, and create ordinary agents and resources backed by shared state. flowchart TD
A[Operator or author] --> B[Control UI and CLI]
B --> C[Gateway Template operations]
C --> D[Verified ClawHub packages]
C --> E[Shared state worker]
E --> F[Versioned schema migration]
C --> G[Ordinary agents and resources]
Technical reviewBest possible solution: Land the approved rename with its existing migration and artifact owners as a coordinated registry cutover once the applicable landing gates are satisfied. Do we have a high-confidence way to reproduce the issue? This is a planned rename; the latest browser-test repair has a reported original failure, passing committed patch, and failing permanent-layout negative control, without executing target code during this review. Is this the best way to solve the issue? The inspected changes use existing feature, schema, registry, and lease owners; the retained migration and narrowly scoped historical-artifact reader are necessary compatibility work rather than competing implementations. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 2b9dd45ec2b8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
LabelsLabel changes: No label 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 HistoryReview history (4 earlier review cycles)
Reviewed October 28, 2026, 6:18 AM ET / 10:18 UTC (Revision 5). |
Conflict-resolved revision
Remaining feature-only deletion/recovery/policy keys and CSS selectors are coherently renamed across callers and tests. Final affected checks passed:23infra+11protocol,17registry,8Chromium,types/scopedlint/style/protocol/i18n. A stale provenance seed caught by the renamed SQL constraint was corrected; no assertion or lease guard was weakened. Fresh candidate catalog capture is attached and was inspected/delivered in chat before this push. Detail, Labs and creator PNGs are byte-identical to the existing inspected comparisons: #186457 (comment). Consumer schema/profile/tool-catalog/host-environment policy source bytes are unchanged from the earlier exact71f proof. The inherited bootstrap failure and the limits of prior frozen native evidence remain explicitly disclosed in the PR body; these source-equivalence checks are not relabeled as a new live-model or full-suite run. |
|
|
|
Merged via explicitly authorized admin squash with attributed pre-existing CI failures.
|
) * refactor: rename Claws feature to Templates * docs: repair historical Templates guide links * fix(templates): preserve state upgrades and published artifacts * test(templates): preserve fresh identity in additive repair fixture * fix(templates): complete migration consumers and wrapper closure * test(templates): allocate explicit safety regression budget CI e447f0bf (73fa01a merged into f27b4d4) counts 6,301,355 test lines against a 6,299,646 ceiling: +1,709. Its actual main base already contains 6,300,241 lines (+595 debt); this PR contributes +1,114 net lines. Retain independent shared-state upgrade/data/rollback, real plural-lease revocation, immutable-archive authoring-boundary and cold extracted-wrapper regressions. They are already parameterized/shared where their contracts match. Removing 1,709 lines would exceed all PR net growth and force unrelated cleanup or weaker coverage. Allocate exactly the measured total, with no slack or counting/gating changes; account separately for the 2,715 upstream ceiling advance over source 73fa01a. * docs(templates): preserve frozen release history and mirror Restore the historical2026.9.5 Claw-package link to its baseline bytes and regenerate the owned mirror through changelog:from-docs. Normal PR release-artifact scope is now empty; no release-automation override or native prep metadata change. The unchanged global docs route audit separately reports the frozen /cli/claws historical link as missing. Preserve that concrete failure for the owner policy decision; do not add an alias, redirect or audit exception. * docs(templates): retain published Claws documentation URL Keep the verified published2026.9.5 documentation URL through one existing docs-host redirect from /cli/claws to canonical /cli/templates. Frozen release source and mirror remain baseline-exact. This is not a CLI, Gateway/API or Control UI alias, and does not add a runtime handler or audit exception. * test(templates): reserve bounded regression budget headroom CI40663216626 measured6,301,549 lines against6,301,539, over by ten upstream lines while PR net remained+1,114. Round to the next1,000 at the owner-approved fixed6,302,000 ceiling:451 reserve lines (0.0072%) for ordinary main advancement during exact-head CI and required regression maintenance. Actual CI base already contains789 debt lines against6,299,646. The total manual allocation is2,354=789 existing debt+1,114 required PR lines+451 bounded reserve. Latest inspected main5eeafd8d merges at6,301,531 after18 lines of upstream shrink, leaving469; no extra ceiling was added for it. Cases, assertions, counting/gating logic, all runtime/source/prep metadata and permission guards are unchanged. * test(ui): await responsive appearance grid geometry Viewport resize schedules shell invalidation and async rendering, followed by the existing grid-track transition. Poll actual geometry within the unchanged100ms/15000ms expect.poll budget, then reread and retain the original3/1 column and minimum150px assertions plus every heading, accent, focus and color-mode check. Parent-qualified normal secretless native Mac browser at exactCImerge c876: original3a30c3fd red outer1/26.873s expected3 got1; exact staged test blob9db27bab green outer0/19.779s, full case1143ms. Host performed static checks only. No runtime CSS/code, expected values, sleeps, timeouts, skips or guards changed.
Upstream d1c8d42 (openclaw#186457) takes shared state to schema 36 (the Template cutover); the fork's agent schema stays 39 over upstream 38. - doctor-schema-migrations.recipient-authority asserted the shared store at 35; it now asserts OPENCLAW_STATE_SCHEMA_VERSION, the invariant being that the agent migration leaves shared state at its current version. RED at 3d62ea6: 3/3 "expected 36 to be 35". GREEN 3/3. - New openclaw-state-db.template-cutover.continuation: a jump-9 shared store (upstream's exact schema-35 source plus the first-use continuation_records table, its indexes and a queued record) opens at 36 with the table, indexes and row unchanged, integrity ok, and a reopen changes nothing. GREEN 1/1. Real-binary cross-version receipts (lane j10/receipts/xver-*): a store written by J9 293c977 (agent 39 / state 35, custody record, authority row) opens under this tree at state 36 with both rows kept and a no-op reopen; a store written by U10 960debc (agent 38 / state 36) reaches agent 39 through Doctor's migration owner with an empty authority table, sessions kept, and a no-op reopen. Refs karmaterminal/openclaw-bootstrap#1727 Co-Authored-By: Claude Opus 5.5 <[email protected]>







What Problem This Solves
Use Templates consistently for reusable agent definitions across OpenClaw’s UI, CLI, settings, Gateway protocol and registry integration.
User Impact
The canonical UI is Templates, Create Template, Review your Template, Settings → Labs → Templates, and
/templates. Authors useopenclaw templates create|validate|dev|build|inspect|addandopenclaw.template: "CLAW.md".This is an intentional maintainer-approved breaking rename of the experimental public vocabulary. No old user-facing command or route aliases are added.
CLAW.md, consent, dependency ownership and ordinary-agent one-way Add remain unchanged; unrelated OpenClaw/ClawHub/ClawPack brands and theme names remain unchanged.Existing data is not assumed empty: the live pre-cutover Official feed contains150 published packages, and shared starter tables exist even without Labs activation. This revision preserves old shared stores through the established schema/Doctor owners and reads the historical manifest selector only at the verified immutable registry-artifact boundary. New authoring stays strict; ambiguous dual selectors reject. No archive is rewritten or republished, and no manual production operation is included.
Why This Change Was Made
Rename each feature owner and its bundled callers together. A review exposed that changing physical shared tables at an unchanged schema version would reject ordinary existing databases. Schema36 now owns the forward SQLite/PostgreSQL cutover, structured record/enum translation, predecessor catalogs and backup/port handoffs. Historical SQL fixtures are restored byte-for-byte rather than rewritten as candidate-shaped inputs.
The blocking installed-capability proof also exposed an existing BOOTSTRAP Add failure. The finite worker now checks both actual retained Add leases at transaction and commit. It does not bypass admission or relax stale, mismatched, duplicate, missing or revoked ownership checks.
Companions: ClawHub#4104, catalog#8, RFC#79. No new managed-template update/remove/export lifecycle is introduced.
Evidence
Current published candidate:
bbd9c1010ec5941a74357f8f9493fb140b1a32af, the explicit regression-budget allocation integrated with actual main4a5ec828b19c5207028faa9cdedb6528ae931c55. All32 earlier repair paths,122 Template files and16 historical fixtures remain byte-identical.v2026.10.8schema20 DDL upgrades to36 with ordinary agent/settings rows preserved, integrity check and read-only reopen. v35 regressions cover empty/populated starter state, optional provenance, rollback and reopen. Original historical fixtures and frozen measured CLI inputs match their pre-rename bytes.Inspected UI comparisons: catalog/detail before and after, Labs and creator; conflict-resolved catalog and affected verification. Images were delivered before push and decoded/displayed on GitHub. The safety patch changes no product visual source. Browser data is synthetic Gateway fixtures, separate from real isolated CLI/registry/data-owner proof.
Earlier naming proof and review boundaries
At the original naming candidate: all six real isolated CLI commands succeeded, minimal ordinary Add and
agents listwere verified, and the retired command rejected.256unit/40Gateway/4protocol/83infra tests passed with three platform skips; one warned-skill CLI failure was repaired and17CLI/7provenance tests passed afterward, not a whole-sweep replay.136UI+23navigation tests and browser catalog/detail/Labs/creator proofs passed, along with build/types/protocol/i18n/scoped lint and16,219links/zero broken.The main97a integration preserved upstream MCP rollback correctness and generated mentions fields; affected23infra/11protocol/17registry/8browser checks passed. Current safety candidate repairs the additional read-worker symbols, capture braces and historical measurement fingerprint uncovered by CI.
Earlier66 CI had exact matching main assertions for unrelated Auth/Talk/cron/UI failures. This is per-assertion attribution, not a blanket exemption for all jobs or future heads. PR-caused defects are repaired, remaining unknowns and exact new-head gates are still explicit. No failing/source-changed run is described as clean.
The selected automated reviewer is hosted read-only ClawSweeper; current service documentation retires autofix/repair commands. Local source ownership remains with this implementation, without a competing bot writer. Required CI, native review/preparation and security gates remain mandatory.
The actual main conflict is resolved in417. All122 Template-domain files and36/37 prior safety paths are byte-identical to e575; the remaining safety path changes only upstream schema-history prose. All16 historical SQLite fixtures are unchanged. The merge preserves upstream native-plugin UI graduation/explicit-false opt-out and monotonic reload timing. Affected integration checks pass:69core+66Labs/home tests, core/UI/state test types, scoped lint, generated config freshness and i18n. No schema-version collision or renumbering occurred. These are focused new-merge results, not a replay of every prior test. Final companion pins and blocking catalog capability proofs use the admitted exact consumer before coordinated landing.
The e8 correction separates credential setup from explicit predecessor restoration, preserves local SQL/data/rowids, composes exact witnesses and retains full raw-catalog equality. Those contracts pass current broad CI; no assertions or guards were weakened.
Required fresh-main integration at73 resolved only the generated config-doc digest through its canonical generator. All32 e8 repair paths,122 Template files,16 historical fixtures and migration registration remain byte-identical; schema36 has no allocation collision. Current source types/config/i18n/three wrapper closure cases pass. New exact-head CI is still mandatory; earlier evidence is not relabeled as a73 whole-suite run.
Explicit test-line budget allocation
The actual73 CI checkout
e447f0bf(basef38f7e73) counted 6,301,355 lines against 6,299,646, over by 1,709, with +1,114 net PR growth. The base itself already contained 595 lines of grandfathered debt. The unchanged guard reproduced those exact values.The necessary regressions are already parameterized/shared where contracts match: ordinary/no-Labs upgrades and optional provenance, preserved rows/opaque payloads/rowids, rollback and reopen, live plural-lease denial/revocation at commit, strict authoring versus immutable released archives, and actual cold extracted-wrapper execution. Removing1,709 lines would exceed the entire PR net increase and force unrelated cleanup or weaker coverage. No cases/assertions were removed or moved outside the counter.
Before publication, actual main advanced to
4a5ec828, with 6,300,425 lines against the same 6,299,646 ceiling: 779 existing debt, up184 since the earlier CI base. PR net remains +1,114. The admitted merged total and new ceiling are therefore exactly 6,301,539, zero slack. Relative to actual main, the explicit increase is 1,893 =779 existing debt +1,114 necessary PR lines. Relative to source73's old file value6,296,931, the numeric difference4,608 also includes the separately inherited2,715 upstream ceiling advance.This is the repository-documented manual ceiling allocation, with comments and commit rationale—not a counting/gating change or waiver of other failures. The actual-main guard, guard unit test, cold-source inventory, types, config freshness and i18n checks pass. All32 prior repair paths,122 Template files and16 historical SQLite fixtures remain byte-identical.
All three current bad082f PostgreSQL17 lanes and the explicit regression-budget guard pass. The remaining provider, Node-diagnostic and mock-QA failures have actual scoped baseline evidence, including exact-current-main execution, not unknown job-name matches. No test/assertion/counter rule was disabled.
Complete current-head inherited CI disposition enumerates all eight failed Node jobs and13 baseline assertions. The exact main0ff mock QA/restart case and Node-receipt case failed identically after normal isolated runtime preparation with clean unchanged inputs; the late Node candidate-admission assertion was qualified at its full canonical diagnostic boundary. Native exception admission still enforces live CI-only writer authority, all other required reviews/security and exact head. No merge is claimed before the protected receipt verifies it.
Released documentation history
Final232 correction restores the original frozen2026.9.5 release source and owner-generated mirror byte-for-byte. The normal native changelog-scope guard correctly rejected rewriting that historical mirror; no release-automation override is used. One existing docs-host redirect,
/cli/claws→/cli/templates, preserves the verified published documentation URL without changing release history. It is not a CLI, Gateway/API or Control UI alias. All330 earlier redirects/navigation remain unchanged;16,231 actual links pass with zero broken,135 releases/27records/13mirrors and native release-artifact scope checks pass.Only those three documentation artifacts differ from the fully qualified runtime revisionbad082fe. Companion Hub8c and catalog620 deliberately retain the immutable tested consumer pinbad082fe; every runtime/policy/host/tool/registry/CLI input is unchanged. Their actual all-green CI and eight installed-capability proofs are not relabeled as execution of232. No gratuitous companion pin/media/archive/runtime phase is restarted for this docs-only restoration. The final exact-head primary gate still applies.
Final CI repair batch
The current bbd9 batch changes only the explicit test-line allocation and one browser-test observation. CI232 gained10 upstream test lines after a zero-slack measurement; the fixed6,302,000 resource ceiling has a bounded451-line reserve against measured6,301,549 (789 existing base debt +1,114 PR lines +451 reserve). This is a documented resource allocation, not a counting/security rule change; no coverage was deleted or compressed to pass a counter. The latest inspected merge uses6,301,531, with no optional rebase.
The actual Appearance browser failure was not blanket-attributed as inherited. In an independent secretless native browser at exact CI mergec876, the original unchanged case failed3-versus1 at560px (outer1/26.873s). The exact committed wait-only test blob9db27 passed the full case (outer0/19.779s), retaining original3/1 column counts, minimum150px width and every focus/accent/heading/color-mode assertion. A guest-only permanently broken one-column fixture still failed the unchanged3-column requirement (outer1/33.933s). No product layout/CSS, expected values, skips or timeout budgets changed. The test now observes the existing asynchronous shell resize/render boundary rather than taking one immediate geometry sample. Full command/source/browser/lock/cleanup evidence is retained; the owned guest and temporary transfer server were deleted.
Fresh final-head CI still applies. Prior runtime/data/visual results and baseline failures keep their exact identities, and the green companion pins intentionally retain the unchanged tested runtime revisionbad082fe.