Skip to content

feat: prepare restricted Session Share steering connections - #201173

Closed
vincentkoc wants to merge 1 commit into
feat/session-steer-reconciled-20261118from
feat/session-share-writer-transport-20261118
Closed

vincentkoc wants to merge 1 commit into
feat/session-steer-reconciled-20261118from
feat/session-share-writer-transport-20261118

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Session Share needs a separately restricted connection for future remote steering, without upgrading read credentials or granting devices a person's authority. Active steering also needs discovery of the actual running backend target rather than a catalog guess.

Depends on #201152; stacked on feat/session-steer-reconciled-20261118.

User Impact

No remote steering is enabled yet. Operators get a separate, singleton writer transport and genuine-person-only exact-target discovery; source writer methods default-deny until a later grant/handler slice exists. Reader credentials cannot write. No enrollment, config migration, UI, deployment or credentials are included.

Why This Change Was Made

Reuse the reader's signed-device authentication, minimal hello, dispatch and revocation lifecycle with fixed writer methods (session-share.steer.target and .send) restricted to the Session Share owner. Device authentication never supplies human identity. Discovery resolves the physical backend session/run with current person and session-write authority; sending still revalidates exact IDs. The existing steering lookup remains unchanged.

Evidence

Exact reviewed head 9e9ee48fe654a0c156f423d86603848f6c94a952, tree f9886a89ba880f2f2148098a29004e888a36a9ca.

  • 183 focused tests passed (2 intentional variant skips): signed WSS, singleton scopes, role/negative scope checks, revocation, minimal hello, person/idle/replaced-target discovery, redaction, keyless identity conflicts, duplicate reconciliation and ordinary chat.
  • Independent exact-tree review: 16 targeted checks and 12 discovery checks passed; evidence hashes verified. Independent dependency inspection retained.
  • Scoped types, lint, formatting and generated config-docs checks passed. Exact-head cache-aware full build passed; existing nonfatal UI size-budget diagnostics remain.
  • Local formal AutoReview used Claude fallback because Codex was unavailable: P0–P2 scoped-clean in two diff-only chunks, not two complete review passes. These are bounded reviews, not a claim of complete runtime/dependency coverage.

Limits: isolated signed-WSS fixtures are not live authenticated remote-writer, Cloudflare, UI or native-Codex end-to-end proof. Source human grant, outbound adapter and UI are explicitly deferred. No merge or deployment is authorized by this PR.

@clawsweeper

clawsweeper Bot commented Nov 18, 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 docs Improvements or additions to documentation app: web-ui App: web-ui gateway Gateway runtime size: XL labels Nov 18, 2026
@clawsweeper clawsweeper Bot added the clawsweeper:intake:feature Preliminary submission classification; full source review pending. label Nov 18, 2026
@blacksmith-sh

blacksmith-sh Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Found 1 test failure on Blacksmith runners:

Failure

Test View Logs
ai.openclaw.app.ui.SidebarGatewayPickerTest/
queuedGatewayHandoffProtectsTheActualComposer
View Logs

Fix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@clawsweeper

clawsweeper Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Adds a separately restricted Session Share writer transport and person-authorized discovery of an exact active steering target.

Example: A paired device requests only operator.session-share.steer.

  • Before: There is no dedicated restricted writer connection.
  • After: The device receives a minimal connection with no writer methods available until the Session Share plugin registers the approved handlers.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The implementation is coherent with no established introduced defect, but supplied proof does not meet the runtime gate and complete validation remains unresolved.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is not required for maintainer- or bot-authored pull requests.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Feature · Worth it: Yes · Fix scope: Complete
User problem: Future Session Share steering needs device transport access that cannot impersonate a person or upgrade reader credentials, plus discovery of the actual running target.
Reason: The maintainer-authored direction defines a coherent foundation stage and explicitly defers source grants, remote sending, and UI.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR adds a distinct Session Share foundation absent from main; no definite introduced correctness or security defect was established.

Priority: P2
Reviewed head: 9e9ee48fe654a0c156f423d86603848f6c94a952

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: Provide redacted running-Gateway evidence of restricted writer admission and default denial, authorized active/idle target discovery, and a latest-stable protocol upgrade retaining existing settings and paired credentials.
Agent review details

How this fits together

Gateway authentication admits a signed device into a restricted transport, while a separate person-authorized RPC resolves session and backend run IDs through existing session-access and controller owners.

flowchart TD
  A[Signed paired device] --> B[Restricted transport admission]
  B --> C[Session Share method authorization]
  C --> D[Future source handlers]
  E[Authenticated person] --> F[Session write authority]
  F --> G[Exact backend discovery]
Loading

Technical review

Best possible solution:

Keep this foundation on the existing transport and session-authority owners, with source grants and remote sending delivered in their stated follow-up.

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

This is a new capability rather than a reported bug; source inspection establishes its admission and discovery paths, and no target code was executed.

Is this the best way to solve the issue?

Generalizing the existing restricted reader transport preserves one authentication owner, and discovery appropriately reuses session-write authority and physical backend capture.

AGENTS.md: found and applied where relevant.

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

Provenance checked

  • Restricted publication admission and lifecycle keeps the original intent (5795128: Admit singleton publication-reader devices without human identity, private RPC access, or ordinary operator powers.)
  • Private admission predicate keeps the original intent (e86c044: Remove an unused export while retaining the private WeakSet admission check.)
  • Person-only active steering keeps the original intent (63aee93: Require an authenticated person with current session-write access and bind sending to an exact active backend.)

Testing

Proof path: in-process harness.

Security

None.

Evidence

What I checked:

Likely related people:

  • Vincent Koc: Raw commit 5795128 adds src/plugin-sdk/gateway-runtime.ts:92 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 5795128db2d0; files: src/plugin-sdk/gateway-runtime.ts)

PR surface

Source +174, Tests +243, Docs +30, Generated 0. Total +447 across 33 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 28 2314 2140 +174
Tests 3 518 275 +243
Docs 1 30 0 +30
Config 0 0 0 0
Generated 1 2 2 0
Other 0 0 0 0
Total 33 2864 2417 +447

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Review metrics

Metric Value Why it matters
Gateway contract additions 1 operator scope and 1 core RPC Adds operator.session-share.steer and sessions.steerTarget; the two reserved plugin writer methods remain unavailable without registered source handlers.

Labels

Label changes:

  • add P2: This is a bounded optional integration feature without evidence of an urgent production regression.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: This is a bounded optional integration feature without evidence of an urgent production regression.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • 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 November 18, 2026, 7:24 AM ET / 12:24 UTC.

@vincentkoc

Copy link
Copy Markdown
Member Author

Superseded by #202627, rebuilt on main after #202397 with admission-only writer gating and current proof. Review continues on #202627.

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

Labels

app: web-ui App: web-ui clawsweeper:intake:feature Preliminary submission classification; full source review pending. docs Improvements or additions to documentation gateway Gateway runtime size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant