Skip to content

refactor: consolidate ranked private clone owners - #181386

Merged
steipete merged 7 commits into
mainfrom
deslop/z33-106-ranked-private-owners-20261015
Oct 23, 2026
Merged

steipete merged 7 commits into
mainfrom
deslop/z33-106-ranked-private-owners-20261015

Conversation

@steipete

@steipete steipete commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Measured clone groups still repeated private projections and identical stylesheet declarations after the earlier cleanup passes. The copies had established owners but were maintained separately.

What changed

  • Reuse Feishu's diagnostic finding envelope, the session-change taxonomy, raw transcript-navigation projection, elevated-policy snapshot whitelist, and committed identity-result publication.
  • Consolidate identical focus/typography rules within Sessions and Secrets, and eleven CSS families into existing loaded owners. Keep full selectors, feature-specific overrides and lazy route imports.
  • Remove the old implementations; keep public shapes, authority checks, commit settlement, user-visible text and Phase E memory untouched. No new dependency or Plugin SDK export.

Net production LOC: 158 removed, measured against branch base 5b4ee4d in src, ui/src, extensions and packages, excluding tests/support/fixtures/generated/declarations/locales. Signed head: 73778cd.

Best-effort tradeoffs accepted

No guard or recovery mechanism is removed. The cross-sheet CSS consolidation adds 1555 raw eager bytes while removing 2917 lazy bytes (1362 fewer overall); this trades some stylesheet locality for one maintained declaration owner. No load-time or runtime-performance improvement is claimed.

Evidence

160 focused owner/consumer cases passed serially with one worker, including diagnostic repair, session generation/sharing, raw navigation and usage, elevated grant/handoff, purge, rewind/fork/native binding and commit publication. Targeted native typechecks, formatting and typed lint passed for each code cut. Independent isolated reviews found no actionable P0-P2 defects.

Sessions/Secrets: 168 complete computed-property comparisons passed across themes, widths, forced colors and interaction states. Cross-sheet Chromium parity passed 36,256 complete computed non-custom-property comparisons across 512 documents, eight load-order scenarios, two themes, four widths, forced colors, reduced motion and interaction states. Inspected synthetic before/after captures match.

Final assertion-safety ratchet, lint-suppression tests (14 cases), PR-wrapper source closure (3 cases), runtime cycles (0), static cycles (0), and diff whitespace checks passed. The first cross-sheet fixture invocation hit the wrapper's no-output watchdog while making progress; adding progress output to the ignored fixture allowed the full proof to finish. No timeout, assertion, skip or production code was changed to obtain that result.

The browser fixtures use production stylesheet orders and actual producer class combinations, including late sidebar insertion, reduced motion, responsive overrides, desktop/mobile diffstats and keyboard focus. They are static synthetic stylesheet/cascade proof, not full-app E2E or live Gateway proof. No broad local suite/build or whole-graph typecheck ran; exact-head PR CI owns broad/platform proof.

Inspected synthetic cross-sheet fixtures, before/after pairs:

Chat before

Chat after

New session before

New session after

Palette before

Palette after

Sessions/Secrets before and after.

@clawsweeper

clawsweeper Bot commented Oct 23, 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.

@steipete
steipete marked this pull request as ready for review October 23, 2026 05:51
@steipete

Copy link
Copy Markdown
Contributor Author

Inspected synthetic Sessions/Secrets CSS fixture, before then after. This is static stylesheet/cascade parity evidence, not full-app E2E. The focused proof passed 168 computed-property comparisons; these captures contain synthetic data only.

dark-before

dark-after

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 23, 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-23T05:54:23.807899Z 73778cd 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.

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Security sensitive changes

This maintainer PR changes sensitive security components.

No secops approval is required. This comment is informational because the PR author has Maintain or Admin access.

  • Current SHA: 73778cd4f8cfb96d30a04d246889b6ed192e9a7f
  • Maintainer: @steipete
  • Repository role: admin

These security sensitive changes were made:

  • src/agents/bash-tools.exec-approval-followup-state.ts: Controls sandbox containment or tool execution authority. Check filesystem and network isolation, approval scope, and command allowlists.

Carefully review these changes before merging.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime agents Agent runtime and tooling channel: feishu Channel integration: feishu size: L labels Oct 23, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. 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 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR consolidates private diagnostic, session, elevated-policy, transcript-navigation, and stylesheet implementations into shared owners.

Example: An operator opens New Session and then Chat.

  • Before: Both routes obtain identical icon and text styling from separately maintained declarations.
  • After: The routes retain their appearance while sharing the existing loaded stylesheet owners.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, mechanically sound consolidation with focused and synthetic proof; the available evidence does not establish full product execution.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored, behavior-preserving refactor is outside the ordinary external-contributor proof gate; inspected synthetic Chat/New Session screenshots support stylesheet parity, and no shipped-entry-point or live Gateway execution is claimed.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Refactor · Worth it: Yes · Fix scope: Complete
User problem: Separately maintained copies can drift in session handling, policy snapshots, diagnostics, and presentation.
Reason: The maintainer-authored direction removes demonstrated duplication without new configuration, dependencies, public SDK surface, or intended behavior changes.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-owned refactor removes real duplication without a concrete introduced correctness or security defect. The inspected UI failures also occur on main; CI disposition remains pending.

Priority: P3
Reviewed head: 73778cd4f8cfb96d30a04d246889b6ed192e9a7f

Before merge

None.

Findings

None.

Tests

  • Low-value test src/config/sessions/transcript-navigation-fields.test.ts: Remove the helper allocation and return-identity assertions; they pin implementation mechanics rather than transcript or usage behavior.
  • Missing end-to-end proof: The supplied evidence covers synthetic stylesheet parity and focused owner tests, without a shipped Control UI navigation or live Gateway run.
Agent review details

How this fits together

Gateway and agent helpers project session records and execution policy into retained runtime facts, while Control UI styles turn route-specific class names into presentation.

flowchart TD
  A[Session records and policy] --> B[Shared private projections]
  B --> C[Gateway and agent consumers]
  C --> D[Committed identity notifications]
  E[Control UI routes] --> F[Shared stylesheet owners]
  F --> G[Rendered controls]
Loading

Technical review

Best possible solution:

Retain the shared private owners and existing behavior, then complete the repository’s normal CI disposition.

Do we have a high-confidence way to reproduce the issue?

This is a refactor rather than a bug report; source inspection verifies the duplicated implementations without executing target code.

Is this the best way to solve the issue?

The change uses existing owners, removes the replaced copies, and preserves the distinct authority and settlement boundaries.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against eb87bb1fd7ba.

Provenance checked

  • Elevated-policy snapshots keeps the original intent (6ee5539: fix: elevated exec defaults across approval followups #76845 preserves trusted elevated defaults across same-session approval follow-ups while subsequent commands retain approval policy.)
  • Session metadata invalidation keeps the original intent (945ec9f: Retain session facts across unrelated configuration publications; the refactor preserves the existing exclusions and explicit runtime/automation invalidation.)
  • Committed identity publication keeps the original intent (24d5996: perf(agents): reduce main-thread SQLite during retirement #167547 retains cleanup authority through worker commit and publication; the extracted callback remains at the same settlement boundary.)
  • Raw transcript navigation keeps the original intent (e29a7aa: Earlier consolidation established a raw navigation projection that preserves malformed own fields without message payloads; the usage consumer now shares that projection.)
  • Feishu diagnostic findings keeps the original intent (b7c461a: Repair stale channel state and report invalid transcripts; all finding kinds, paths, reasons, and inspection branches remain.)
  • Control UI styling keeps the original intent (8e0c82b: fix(ui): stroke new-session target icons instead of black fills #106193 requires explicit SVG stroke styling; the declarations move to the loaded session-menu owner while feature overrides remain.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

  • Verified introduced changes: The pinned introduction diff replaces duplicated implementations and preserves their arguments, returned fields, and commit-publication placement; current main still contains the replaced copies. (73778cd4f8cf)
  • Authority semantics preserved: The shared classifier excludes the same metadata scopes; both consumers explicitly retain broad runtime and automation invalidation. The elevated-defaults helper preserves the existing whitelist, including false optional values, without changing handoff matching, expiry, claims, or consumption. (src/config/sessions/session-delivery-generation.ts:178, eb87bb1fd7ba)
  • Committed publication remains owned: The new result-publisher callback still runs after acknowledged worker settlement and forwards the same physical identity, previous/current maps, and prepared publication before returning the candidate result. (src/config/sessions/session-accessor.sqlite-identity.ts:173, 73778cd4f8cf)
  • Accepted stylesheet tradeoff: The maintainer-authored body explicitly accepts additional eager stylesheet bytes in exchange for one declaration owner and claims no performance improvement. The entry stylesheet imports layout, which imports session-menu; route-specific overrides and lazy imports remain. (ui/src/styles.css:3, 73778cd4f8cf)
  • UI CI failures independently observed on main: Main run https://github.com/openclaw/openclaw/actions/runs/39906351041 contains the same mobile-menu width and rename failures in job 120259400921, cloud-alert strict-locator failure in job 120259400791, sidebar geometry failures in job 120259400886, and dictation failures in job 120259400808. These match the inspected PR annotations. (6e4f76bc9f92)
  • Current gate disposition: The reviewed head is mergeable, with a pending aggregate CI gate and successful dependency/security-sensitive statuses. The PR-context failure requests sections already present in the current body and establishes no code defect. (73778cd4f8cf)

Likely related people:

  • Peter Steinberger: Raw commit fd578cb adds src/config/sessions/session-accessor.sqlite-identity.ts:119 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: fd578cb8a62c; files: src/config/sessions/session-accessor.sqlite-identity.ts)
  • bitloi: Raw commit 6ee5539 adds src/agents/bash-tools.exec-approval-followup-state.ts:10 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 6ee55398e5d9; files: src/agents/bash-tools.exec-approval-followup-state.ts)
  • Vyctor H. Brzezowski: Raw commit 608a467 adds ui/src/styles/chat/sidebar.css:2264 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 608a46761d48; files: ui/src/styles/chat/sidebar.css)

PR surface

Source -158, Tests +97. Total -61 across 36 files. Added test files: 1.

View PR surface stats
Area Files Added Removed Net
Source 32 153 311 -158
Tests 4 97 0 +97
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 36 250 311 -61

Review metrics

Metric Value Why it matters
Production versus test LOC Production +153/−311; tests +97/−0 The production reduction is consistent with consolidation; added boundary tests preserve scope invalidation and elevated-policy projection contracts.

Labels

Label changes:

  • add P3: This is behavior-preserving maintenance with no established user-facing regression.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.
  • 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 maintenance with no established user-facing regression.
  • 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.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

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 23, 2026, 2:12 AM ET / 06:12 UTC.

@steipete

Copy link
Copy Markdown
Contributor Author

Exact-head CI attribution for 73778cd4f8cfb96d30a04d246889b6ed192e9a7f, completed run39908046253/attempt1. All82 CI jobs and229 check runs were enumerated. Four failed leaves and the downstream aggregate remain:

Job Actual cases and inherited evidence
120264887162 Seven sidebar loading→child LEFT assertions:120 vs118 desktop,118 vs116 mobile. Exact completed-main39906351041/job120259400886 signatures. The classifier marks this shard “new” only because it compares main's differently populated shard120259401024; the actual failure is in main's other shard.
120264887469 Cloud diagnostic alert locator finds both sidebar and Chat alerts. Exact main39906351041/job120259400921 signature.
120264887525 Rename sidebar error count1vs0; two mobile titles176px below180px. Exact main39906351041/job120259400921 signatures.
120264887550 Three dictation cases read draft before final-drain settlement: empty instead of requested text, ship it instead of ship please it/ship please. Exact main39906351041/job120259400808 signatures.
120271044525 Downstream aggregate of those four leaves.

The actual CI checkout is merge b071fc06c8ecc973c1894b352e190f53c2434d7d, with ordered parents main c99f01a9d7e833badc3158c7e7092fb4cb75295d, then this PR head. Last six completed scheduled runs and coordinator flake signatures were checked; attribution uses case signatures, not shard names.

This PR DOES change layout.css. It does not change the determining row/loading/title declarations or markup, but whole-file byte equality is not claimed. A new isolated Chromium comparison used committed real CSS and source-derived static DOM at precisely c99/b071: all computed non-custom properties, rectangles, and before/after pseudo-elements for every copied descendant matched during loading and resolved states, across six dark/light desktop/mobile fine/coarse scenarios. Both pins reproduce the+2px child offset and176px mobile title; the original assertions still fail on both. This is bounded static equivalence, not Solid/full-app/Gateway E2E, dynamic stylesheet arrival, or text-scale140 proof. The earlier independent512-document/36,256-property cascade matrix remains the focused proof of the moved CSS families.

Cloud/rename state owners and tests are unchanged at the actual parent/merge. All217 bounded local dictation owner/test dependency inputs are unchanged between c99/b071. Earlier real-owner final-drain/timeout cases passed at main685 and tested merge9511; their source/provenance and unrelated imported-source/tooling drift were qualified before reuse. Those are not current browser E2E passes. Main #180923 intentionally delays transcript commit until final/close settlement; observing an outbound close request is not that settlement.

No CI job in the completed82-job attempt is cancelled or timed out. Older PR-context failure120264422851 and cancelled120264336788 are superseded by success120265514929 after correcting the PR-body headings, without a source push. Cancelled advisory auto-response jobs120264578712/120264574160/120264573764 are superseded by later successful/skipped advisory runs, not missing product-suite proof. Exact-head security-fast120264886899 and all six Security High categories passed. Current protected security/dependency statuses remain native landing gates.

Focused owner/consumer tests, targeted native types, lint/format, suppression/ratchet/wrapper-closure checks, zero runtime/static cycles, and independent P0–P2 reviews remain valid for this unchanged head. No retry, raised timeout, weakened assertion, source push or CI rerun was used to chase green. Failed CI is retained as failed under the standing inherited-failure landing authority.

@steipete
steipete merged commit 1ce8824 into main Oct 23, 2026
221 of 232 checks passed
@steipete
steipete deleted the deslop/z33-106-ranked-private-owners-20261015 branch October 23, 2026 06:23
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 24, 2026
* refactor(feishu): share invalid transcript findings

* refactor(sessions): reuse stored-row change classification

* refactor(ui): share same-sheet focus and typography rules

* refactor(usage): reuse raw navigation projection

* refactor(agents): share elevated policy snapshots

* refactor(sessions): share committed identity result publication

* refactor(ui): consolidate shared stylesheet declarations
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: web-ui App: web-ui channel: feishu Channel integration: feishu gateway Gateway runtime P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. security-sensitive-changed size: L 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