Skip to content

refactor(clickclack): reuse canonical session URL contract - #120810

Merged
steipete merged 1 commit into
mainfrom
steipete/clickclack-session-url-deduplication-50c9b1
Aug 9, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/clickclack-session-url-deduplication-50c9b1

Conversation

@steipete

@steipete steipete commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

What Problem This Solves

ClickClack's independently published plugin carried a manual copy of the Control UI session URL grammar. That duplicate could drift from the canonical host contract and generate different session links after future fixes.

Why This Change Was Made

Expose the canonical buildControlUiSessionPath helper through the existing public openclaw/plugin-sdk/session-discussion seam, then reduce ClickClack's local implementation to its URL-object wrapper. This keeps the private workspace package an implementation detail and avoids adding a plugin runtime dependency.

User Impact

No intended user-visible behavior change. ClickClack session links now stay aligned with the host's canonical Control UI URL rules instead of relying on a forked copy.

Evidence

AI-assisted: yes. The implementation and generated contract changes were manually reviewed and validated.

@steipete
steipete marked this pull request as ready for review August 9, 2026 01:44
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation scripts Repository scripts size: S maintainer Maintainer-authored PR labels Aug 9, 2026
@clawsweeper clawsweeper Bot added 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. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 9, 2026
@clawsweeper

clawsweeper Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 8, 2026, 9:50 PM ET / August 9, 2026, 01:50 UTC.

ClawSweeper review

What this changes

The PR replaces ClickClack’s copied Control UI session-path formatter with the host’s canonical formatter exposed through the existing session-discussion plugin SDK subpath.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep this maintainer-owned PR open for normal review: it is a clean, behavior-preserving removal of duplicate URL logic, with no correctness finding; the additive public SDK contract and exact-head CI remain the merge checks.

Priority: P3
Reviewed head: b09bfd7c4f58cf61e59b2c3d6fb8f24406d91528

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, production-negative refactor with aligned SDK contract coverage; remaining exact-head CI is the material merge check.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored, behavior-preserving refactor has focused contract-test and build evidence; no contributor real-behavior proof action is required.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored, behavior-preserving refactor has focused contract-test and build evidence; no contributor real-behavior proof action is required.
Evidence reviewed 6 items Public SDK boundary: At the PR head, ClickClack imports the builder only through the existing public session-discussion SDK subpath; the PR adds the corresponding one-line re-export.
Canonical behavior and caller preservation: The deleted plugin formatter matches the host-owned contract, while ClickClack retains its URL-object wrapper and existing service callers continue to receive the generated link.
Contract coverage: ClickClack’s table-driven vectors exercise the wrapper across canonical session forms, escaped dots, literal keys, UUID cases, and parent segments; matching UI vectors exercise the same grammar.
Findings None None.
Security None None.

How this fits together

ClickClack creates Control UI links for session discussions. The public plugin SDK lets independently published plugins use the host-owned session URL grammar without importing private workspace code.

flowchart LR
  A[Session discussion] --> B[ClickClack plugin]
  B --> C[Public plugin SDK]
  C --> D[Canonical session URL contract]
  D --> E[Control UI session link]
Loading

Before merge

  • Resolve merge risk (P1) - This adds a permanent public Plugin SDK function; it is additive and compatible, but should land only as the intentionally supported contract after exact-head CI completes.
  • Complete next step (P2) - The protected maintainer-owned PR needs normal owner review of its permanent public SDK addition, not a repair lane.
Agent review details

Security

None.

PR surface

Source -138, Tests -1, Docs +1, Generated 0, Other 0. Total -138 across 6 files.

View PR surface stats
Area Files Added Removed Net
Source 2 4 142 -138
Tests 1 1 2 -1
Docs 1 1 0 +1
Config 0 0 0 0
Generated 1 1 1 0
Other 1 4 4 0
Total 6 11 149 -138

Review metrics

Metric Value Why it matters
Production versus test LOC production +8/-146, tests +1/-2 The one-function public contract removes the plugin’s 142-line duplicate implementation; the remaining production growth is the justified SDK boundary.

Stored data model

Persistent data-model change detected: serialized state: src/plugin-sdk/session-discussion.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the focused SDK contract (recommended)
    Treat the canonical session-path builder as a supported session-discussion API once the remaining checks pass on the reviewed head.

Technical review

Best possible solution:

Land the single canonical URL grammar through the existing session-discussion SDK seam after accepting the narrow public contract and completing exact-head checks.

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

Not applicable: this is a behavior-preserving refactor, and source comparison plus shared URL-contract vectors establish the relevant equivalence.

Is this the best way to solve the issue?

Yes: exposing the existing generic formatter through the already-public session-discussion seam removes drift without creating another SDK subpath or exposing private package internals.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 62b418d551b0.

Labels

Label changes:

  • add P3: This is a small maintenance refactor with no intended user-visible behavior change.
  • add merge-risk: 🚨 compatibility: The PR adds one externally consumable Plugin SDK function that becomes a supported compatibility contract after release.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer-authored, behavior-preserving refactor has focused contract-test and build evidence; no contributor real-behavior proof action is required.

Label justifications:

  • P3: This is a small maintenance refactor with no intended user-visible behavior change.
  • merge-risk: 🚨 compatibility: The PR adds one externally consumable Plugin SDK function that becomes a supported compatibility contract after release.
  • 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 maintainer-authored, behavior-preserving refactor has focused contract-test and build evidence; no contributor real-behavior proof action is required.

Evidence

What I checked:

Likely related people:

  • steipete: History and blame connect the canonical formatter, ClickClack’s prior duplicate, and the session-discussion seam to this contributor. (role: introduced the shared URL-contract work and recent area contributor; confidence: high; commits: 08d2062c7f60, b09bfd7c4f58; files: packages/session-url-contract/src/index.ts, extensions/clickclack/src/discussions/control-session-url.ts, src/plugin-sdk/session-discussion.ts)

Rank-up moves

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

  • Complete exact-head CI, then accept the intentionally additive Plugin SDK contract.

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.

@steipete

steipete commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Maintainer review complete for db12373cad85762c9d30d882196704c73c280e7c.

I accept the intentionally additive buildControlUiSessionPath export on the existing openclaw/plugin-sdk/session-discussion contract. This is the narrowest supported boundary for the independently published ClickClack plugin: it keeps the private workspace package host-owned, adds no plugin runtime dependency or new SDK subpath, and replaces 142 duplicated production lines with one canonical public function.

The mechanical rebase conflict was resolved by retaining main's three new SDK exports plus this PR's one export, moving the public export budget from 4843 to 4844 and the callable export budget from 2919 to 2920.

Proof on the reviewed head:

  • Post-rebase ClickClack discussion tests: 36/36 passed.
  • Post-rebase Plugin SDK API baseline, package exports, and surface checks passed; targeted lint and git diff --check also passed.
  • Prior Blacksmith Testbox tbx_01kzj20q3mwc52wz0y7w79rdx6 remains patch-equivalent pre-rebase evidence: its full build and changed-surface checks passed.
  • Fresh branch Codex autoreview: no accepted/actionable findings.
  • Exact-head PR CI run 31293814359 concluded success on db12373cad85762c9d30d882196704c73c280e7c; all 54 active jobs passed and all 13 scoped jobs skipped as expected.

ClawSweeper's rank-up move is addressed: exact-head CI completed and the permanent SDK contract is explicitly accepted for landing. No re-review is needed because the post-review change was a mechanical rebase only.

@steipete
steipete force-pushed the steipete/clickclack-session-url-deduplication-50c9b1 branch from b09bfd7 to db12373 Compare August 9, 2026 04:05
@steipete
steipete merged commit 6246f67 into main Aug 9, 2026
118 checks passed
@steipete
steipete deleted the steipete/clickclack-session-url-deduplication-50c9b1 branch August 9, 2026 04:22
@steipete

steipete commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. scripts Repository scripts 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