Skip to content

refactor(channels): simplify configured-channel presence - #134362

Merged
steipete merged 1 commit into
mainfrom
codex/cleanup20k-channel-presence28-20260831
Sep 1, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/cleanup20k-channel-presence28-20260831

Conversation

@steipete

@steipete steipete commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Configured-channel discovery carried a private test override and forwarding helpers around the canonical persisted-auth probes. A second local collection then rechecked signals that the same function had just added, obscuring the ownership of channel-presence decisions.

Why This Change Was Made

Call the canonical probes directly and return the already-deduplicated signals. Keep state-directory gating, discovery and environment forwarding, signal order, and the distinction between persisted-auth discovery and plugin activation unchanged. Tests spy on the canonical module instead of exposing a production-only test seam.

User Impact

No intended user-visible behavior change or public SDK/configuration/storage/schema change. Production: +10/-38 (net -28); tests: +14/-14 (net 0); whole: +24/-52 (net -28). All seven owner cases and assertions remain, including the empty-options persisted-auth case.

Evidence

  • Baseline and candidate each passed the same 50 cases across channel presence, persisted-auth probes, package probes, configured state, and effective plugin selection. Case multiplicity and within-suite order matched.
  • All 29 selected changed checks and the normal 14-stage build passed.
  • Precommit and separate exact-commit Codex reviews were P0-scoped clean; the latter reviewed signed commit bd20b1267f4ff78021cba65fbf7e3c2243edf7fd. Each used two complete evidence batches. The oversized unchanged lockfile was omitted under the normal evidence cap; second-batch live process identities were not independently captured, with cleanup owned by the canonical helper.

This is green/green refactor characterization, not live channel/provider, credential-serialization or SQLite-recovery proof. Historical raw-index and disposed compiler-manifest custody gaps remain documented; no independent historical compiled-byte equivalence is claimed. All 54 captured Channel contexts are unchanged through fetched main 57a7e86f8d06fde46f2a080f4bf02acb39f9f959. Exact-head CI run 33423746236 and required openclaw/ci-gate check 99597136929 for bd20b1267f4ff78021cba65fbf7e3c2243edf7fd are successful and less than 24 hours old at this verification. The latest completed ClawSweeper review, completed at 09:26 UTC, has no source findings; its CI rank-up is addressed by those results. Mandatory native hosted prepare and merge remain pending.

@clawsweeper

clawsweeper Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@steipete
steipete marked this pull request as ready for review August 31, 2026 18:12
@openclaw-barnacle openclaw-barnacle Bot added size: S maintainer Maintainer-authored PR labels Aug 31, 2026
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 31, 2026
@clawsweeper

clawsweeper Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 6:29 AM ET / 10:29 UTC.

ClawSweeper review

What this changes

This PR removes a private persisted-auth test seam from configured-channel detection and tests the canonical probes through module spies.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

No blocking defect was found in the introduced refactor. This member-owned, maintainer-labeled PR remains open for explicit maintainer handling; the available exact-head check rollup is incomplete.

Priority: P3
Reviewed head: bd20b1267f4ff78021cba65fbf7e3c2243edf7fd
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A compact, source-consistent refactor with focused coverage and no identified correctness defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored internal refactor does not change visible channel behavior, so the external-contributor real-behavior-proof gate does not apply; the PR body reports focused comparisons and exact-head CI, which are supplemental evidence.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This member-authored internal refactor does not change visible channel behavior, so the external-contributor real-behavior-proof gate does not apply; the PR body reports focused comparisons and exact-head CI, which are supplemental evidence.
Evidence reviewed 7 items Introduced production change: The verified PR-introduced hunk removes only the private probe override, two forwarding helpers, and a redundant set filter; direct calls still pass configuration, environment, and discovery to the canonical persisted-auth probes.
Owner and consumer boundary: The owner emits deduplicated signals, while plugin policy preserves source distinctions and explicitly prevents persisted credentials from becoming activation consent.
Persisted-auth contract: The canonical wrapper delegates to package-state metadata; the manifest documentation defines this as a lightweight pre-runtime auth probe and prohibits using it to auto-enable or load a channel runtime.
Findings None None.
Security None None.

How this fits together

Configured-channel detection combines channel configuration, environment values, and persisted authentication state into presence signals. Status, Doctor, plugin activation policy, and startup selection consume those signals without loading full channel runtimes.

flowchart LR
  Config[Channel configuration] --> Detect[Configured-channel detection]
  Environment[Environment triggers] --> Detect
  Auth[Persisted authentication metadata] --> Detect
  Discovery[Plugin discovery] --> Auth
  Detect --> Signals[Presence signals]
  Signals --> Consumers[Status, Doctor, and plugin policy]
Loading

Decision needed

Question Recommendation
Should this member-owned configured-channel refactor be accepted once the exact-head required-check rollup completes? Accept after hosted checks: Merge after the required checks for the reviewed head complete successfully, retaining the canonical-probe test boundary.

Why: The source change appears behavior-preserving and has no mechanical repair, but the protected maintainer label and incomplete hosted rollup require an explicit maintainer decision.

Before merge

  • Resolve merge risk (P1) - The supplied exact-head check rollup is incomplete and truncated, so it does not establish that every required hosted check has completed.
  • Resolve merge risk (P1) - Raw-parent history inspection is unavailable in this checkout because required promisor objects could not be fetched; no historical introduction claim is made from that gap.
  • Complete next step (P2) - No mechanical repair is indicated; this member-owned, protected PR needs maintainer acceptance after the exact-head hosted checks complete.
Agent review details

Security

None.

PR surface

Source -28, Tests 0. Total -28 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 10 38 -28
Tests 1 14 14 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 24 52 -28

Review metrics

Metric Value Why it matters
Production versus test delta production -28 net, tests 0 net The PR removes private forwarding and duplicate bookkeeping while retaining focused canonical-probe coverage.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Keep the direct canonical persisted-auth calls and merge only after the exact-head hosted required checks are complete and a maintainer accepts the behavior-neutral refactor.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Keep the direct canonical persisted-auth calls and merge only after the exact-head hosted required checks are complete and a maintainer accepts the behavior-neutral refactor.

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

Not applicable: this is a behavior-neutral refactor, and the reviewed source preserves the config, environment, discovery, and persisted-auth decision path.

Is this the best way to solve the issue?

Yes. Removing the production-only test injection and calling the documented canonical probes directly leaves one ownership path and preserves the source-specific policy consumers need.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 90dba1a51877.

Labels

Label justifications:

  • P3: This is a small internal cleanup with no intended user-visible behavior change.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This member-authored internal refactor does not change visible channel behavior, so the external-contributor real-behavior-proof gate does not apply; the PR body reports focused comparisons and exact-head CI, which are supplemental evidence.

Evidence

What I checked:

  • Introduced production change: The verified PR-introduced hunk removes only the private probe override, two forwarding helpers, and a redundant set filter; direct calls still pass configuration, environment, and discovery to the canonical persisted-auth probes. (src/channels/config-presence.ts:157, bd20b1267f4f)
  • Owner and consumer boundary: The owner emits deduplicated signals, while plugin policy preserves source distinctions and explicitly prevents persisted credentials from becoming activation consent. (src/plugins/channel-presence-policy.ts:400, bd20b1267f4f)
  • Persisted-auth contract: The canonical wrapper delegates to package-state metadata; the manifest documentation defines this as a lightweight pre-runtime auth probe and prohibits using it to auto-enable or load a channel runtime. (src/channels/plugins/persisted-auth-state.ts:16, bd20b1267f4f)
  • Focused coverage: The changed test stubs the canonical probes, creates a state directory, and verifies persisted Matrix credentials are detected with empty public options; dedicated package-state tests separately cover metadata enumeration and probe loading. (src/channels/config-presence.test.ts:20, bd20b1267f4f)
  • Current-main comparison: Fetched main still contains the former private probe seam, so the requested simplification is not already implemented there. (src/channels/config-presence.ts:88, 90dba1a51877)
  • Area history: Recent history shows Peter Steinberger repeatedly maintaining this configured-channel surface, including the preceding plugin-cache refactor. (src/channels/config-presence.ts:94, c6c226803443)

Likely related people:

  • steipete: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Let the exact-head required-check rollup complete before merging.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (3 earlier review cycles)
  • reviewed 2026-08-31T18:19:52.285Z sha bd20b12 :: needs maintainer review before merge. :: none
  • reviewed 2026-08-31T18:26:54.740Z sha bd20b12 :: needs maintainer review before merge. :: none
  • reviewed 2026-09-01T09:26:48.231Z sha bd20b12 :: needs maintainer review before merge. :: none

@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

The latest completed review (comment) records 2026-08-31T18:26:54.740Z. At 2026-09-01T09:03:55.490Z, it was 14 hours, 37 minutes, 0.750 seconds old, exceeding the 12-hour review freshness window. Please refresh the review for current head bd20b1267f4ff78021cba65fbf7e3c2243edf7fd.

@clawsweeper

clawsweeper Bot commented Sep 1, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@steipete steipete self-assigned this Sep 1, 2026
@steipete
steipete merged commit dc355fa into main Sep 1, 2026
302 of 311 checks passed
@steipete
steipete deleted the codex/cleanup20k-channel-presence28-20260831 branch September 1, 2026 10:30
@steipete

steipete commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintainer Maintainer-authored PR P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: S 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