Skip to content

refactor(infra): split device pairing lifecycle modules - #124734

Merged
steipete merged 1 commit into
mainfrom
steipete/device-pairing-module-split-92c14e
Aug 16, 2026
Merged

steipete merged 1 commit into
mainfrom
steipete/device-pairing-module-split-92c14e

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

src/infra/device-pairing.ts mixed request/record/node pairing, approval policy, and token lifecycle in one oversized owner. It required a grandfathered max-lines suppression and made the shared write-serialization boundary harder to see.

Why This Change Was Made

The refactor extracts a single state owner with the only pairing mutation lock, a dedicated approval engine, and a dedicated token lifecycle module. Every internal caller now imports the canonical owner directly; device-pairing.ts does not re-export moved APIs. The old suppression and max-lines baseline entry are removed.

User Impact

No user-visible behavior changes. Device pairing, approval, and token behavior remain equivalent, while the ownership and locking boundary is easier to maintain.

Evidence

  • node scripts/run-vitest.mjs src/infra/device-pairing.test.ts src/gateway/server/ws-connection src/gateway/server.auth.control-ui.test.ts — 22 files, 306 tests passed after rebase.
  • node --import tsx scripts/check-max-lines-ratchet.mts — passed with 909 remaining grandfathered entries.
  • Blacksmith Testbox tbx_01m05w1ga9z5qq0zjvr107pp3p: pnpm tsgo:core, pnpm tsgo:core:test, pnpm tsgo:extensions, pnpm tsgo:extensions:test, pnpm deadcode:dependencies, pnpm check:import-cycles, and pnpm build all passed: https://github.com/openclaw/openclaw/actions/runs/31963596474
  • Final post-rebase Codex autoreview: clean, with no accepted or actionable findings.
  • Production delta, discounting moved bodies: +98 lines; tests/test support: +10; config: -1.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui gateway Gateway runtime cli CLI command changes commands Command implementations size: XL maintainer Maintainer-authored PR labels Aug 16, 2026
@steipete
steipete marked this pull request as ready for review August 16, 2026 18:23
@steipete
steipete requested a review from a team as a code owner August 16, 2026 18:23
@steipete steipete self-assigned this Aug 16, 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 16, 2026
@steipete

steipete commented Aug 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Land-ready proof for 42541821dbe7ea8dc85f8a38c7d0d3c2ddc13259:

  • Focused local proof: node scripts/run-vitest.mjs src/infra/device-pairing.test.ts src/gateway/server/ws-connection src/gateway/server.auth.control-ui.test.ts — 22 files, 306 tests passed.
  • Max-lines ratchet passed with 909 entries; this change removes the grandfathered src/infra/device-pairing.ts suppression.
  • Blacksmith Testbox tbx_01m05w1ga9z5qq0zjvr107pp3p: https://github.com/openclaw/openclaw/actions/runs/31963596474 — tsgo core, core tests, extensions, extension tests, deadcode dependencies, import cycles, and full build all passed.
  • Exact-head pull-request CI: https://github.com/openclaw/openclaw/actions/runs/31964470626 — terminal green on the SHA above.
  • Final post-rebase autoreview on the exact head was clean with no accepted/actionable findings.
  • LOC classification: production +1195/-1101 (net +94), tests/test-support +112/-98 (net +14), max-lines config +0/-1. The raw production additions/deletions count module extraction as new/deleted lines; the change replaces the 1,080-line removed section of the monolith with focused lifecycle modules and caller import rewires.
  • Architecture: behavior-neutral refactor with one shared createAsyncLock owner in src/infra/device-pairing-state.ts, an acyclic dependency DAG, no compatibility re-exports, and callers migrated to the owning modules.
  • ClawSweeper completed its exact-head review with no correctness, security, or actionable findings. The needs-human verdict reflects the maintainer label; there is no Rank-up moves: list. Its sole before-merge item—normal maintainer review plus exact-head CI—is satisfied by validated scripts/pr review artifacts and the green run above; no move was skipped.
  • Known proof gap: no live channel proof; it is not needed for this source-only, behavior-neutral refactor.

@clawsweeper

clawsweeper Bot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 2:29 PM ET / 18:29 UTC.

ClawSweeper review

What this changes

The PR splits device-pairing state, approval, and token lifecycle code into dedicated modules and updates Gateway, CLI, SDK, and test callers to use those module boundaries.

Merge readiness

⚠️ Ready for maintainer review - 1 item remains

This PR remains necessary: current main still has the monolithic device-pairing owner, while the branch establishes a shared state/lock owner and separates approval and token lifecycle responsibilities. No blocking correctness or security finding was identified; the maintainer label requires normal maintainer handling.

Priority: P3
Reviewed head: 42541821dbe7ea8dc85f8a38c7d0d3c2ddc13259

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The module boundaries preserve the shared mutation and authorization invariants, with strong focused validation evidence and no actionable finding.
Proof confidence 🌊 off-meta tidepool Not applicable: This is a maintainer-authored internal refactor; the supplied focused test and Testbox evidence is appropriate supplemental validation.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This is a maintainer-authored internal refactor; the supplied focused test and Testbox evidence is appropriate supplemental validation.
Evidence reviewed 8 items Current-main gap: Current main retains the single device-pairing module and its local async lock; it has none of the three extracted lifecycle modules, so the refactor is not already implemented.
Canonical mutation boundary: The branch moves the process-wide pairing lock and shared snapshot normalization into one state module, which the remaining record owner, approval owner, and token owner all use.
Approval behavior retained: Approval still acquires the shared lock, derives node-generation changes, clears stale node bins, and persists the paired and pending state atomically.
Findings None None.
Security None None.

How this fits together

Device pairing records approved device roles and metadata, then supplies tokens used by Gateway and Control UI authentication. Requests enter through device connections or management commands, move through pairing approval and token handling, and produce authenticated device access.

flowchart LR
  A[Device or CLI request] --> B[Pairing state owner]
  B --> C[Approval policy]
  C --> D[Token lifecycle]
  D --> E[Gateway authentication]
  E --> F[Device and Control UI access]
Loading

Before merge

  • Complete next step (P2) - This maintainer-authored, maintainer-labeled refactor needs normal review and exact-head CI completion rather than automated repair routing.
Agent review details

Security

None.

PR surface

Source +92, Tests +16, Other -1. Total +107 across 53 files.

View PR surface stats
Area Files Added Removed Net
Source 26 1223 1131 +92
Tests 26 84 68 +16
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 0 1 -1
Total 53 1307 1200 +107

Review metrics

Metric Value Why it matters
Ownership-split LOC production +98, tests/test support +10, config -1 Moved implementation bodies are discounted; the remaining production growth establishes the explicit state ownership boundary while removing the old max-lines baseline entry.

Technical review

Best possible solution:

Keep the state module as the sole pairing mutation-lock owner, retain the stable Plugin SDK export, and land after the exact-head required checks complete.

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

Not applicable: this PR reorganizes existing lifecycle code and does not report a failing user behavior.

Is this the best way to solve the issue?

Yes: placing the shared lock and state helpers in a dedicated owner lets approval and token operations remain independently cohesive without retaining a compatibility re-export from the old monolith.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 9d0c1f8f8c59.

Labels

Label changes:

  • add P3: This is a behavior-preserving internal refactor with maintainability value rather than an urgent user-impact repair.
  • 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 is a maintainer-authored internal refactor; the supplied focused test and Testbox evidence is appropriate supplemental validation.

Label justifications:

  • P3: This is a behavior-preserving internal refactor with maintainability value rather than an urgent user-impact repair.
  • 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 is a maintainer-authored internal refactor; the supplied focused test and Testbox evidence is appropriate supplemental validation.

Evidence

What I checked:

  • Current-main gap: Current main retains the single device-pairing module and its local async lock; it has none of the three extracted lifecycle modules, so the refactor is not already implemented. (src/infra/device-pairing.ts:162, 9d0c1f8f8c59)
  • Canonical mutation boundary: The branch moves the process-wide pairing lock and shared snapshot normalization into one state module, which the remaining record owner, approval owner, and token owner all use. (src/infra/device-pairing-state.ts:27, 42541821dbe7)
  • Approval behavior retained: Approval still acquires the shared lock, derives node-generation changes, clears stale node bins, and persists the paired and pending state atomically. (src/infra/device-pairing-approval.ts:245, 42541821dbe7)
  • Token behavior retained: Verification, issuance, rotation, and revocation each acquire the same lock and preserve approved-scope and node-generation checks before persistence. (src/infra/device-pairing-tokens.ts:158, 42541821dbe7)
  • Runtime and SDK callers follow the split: Gateway connection code imports approval operations from the approval module while retaining record operations from the pairing owner; the public Plugin SDK entrypoint keeps exporting the same pairing approval symbol. (src/gateway/server/ws-connection/connect-device-pairing.ts:14, 42541821dbe7)
  • Existing behavioral coverage: The focused pairing suite covers approval scope caps, bootstrap pairing, token verification, rotation, revocation, and node-generation invalidation; this change updates its imports rather than replacing those assertions. (src/infra/device-pairing.test.ts:359, 42541821dbe7)

Likely related people:

  • steipete: The current-main history identifies Peter Steinberger on the immediately preceding device-pairing refactor, and this maintainer PR continues that ownership boundary. (role: recent area contributor; confidence: high; commits: bdcc6836e09b, 42541821dbe7; files: src/infra/device-pairing.ts, src/infra/device-pairing-approval.ts, src/infra/device-pairing-tokens.ts)

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 merged commit eb77ce5 into main Aug 16, 2026
285 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the steipete/device-pairing-module-split-92c14e branch August 16, 2026 18:40
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 17, 2026
Yigtwxx added a commit to Yigtwxx/openclaw that referenced this pull request Aug 18, 2026
main split the device pairing lifecycle modules in openclaw#124734 and moved
approveDevicePairing to src/infra/device-pairing-approval.ts. Nothing on
either side touched this import line, so the merge stays conflict free
and only the typecheck reports the missing export.
steipete added a commit that referenced this pull request Aug 27, 2026
…118720)

* fix(agents): node plugin tool calls report a generic client timeout

Plain node-hosted plugin tool calls send no invocation budget, so the Gateway
arms no deadline over pairing, wake, and policy work and the node registry falls
back to its own 30s pending timer that only starts at dispatch. The agent-side
wait defaults to the same 30s but starts earlier, so the caller always abandons
the request first and the Gateway answer that carries nodeCommandDispatched
retry-safety provenance can never arrive.

Send the same 30s budget explicitly and give the caller the +5s grace the node
MCP path already uses, so the Gateway answer wins the race.

* test(gateway): prove the node invoke deadline answer reaches the agent

Adds an end-to-end proof that runs a real Gateway, pairs a real node that
accepts the forwarded command and never answers, and drives the shipped agent
tool through the real gateway client. It asserts the agent receives the
Gateway's structured timeout with nodeCommandDispatched provenance rather than a
client-side gateway timeout.

* fix(gateway): keep node invoke dispatch inside the caller budget

The invocation budget only started once dispatch was reached, so pairing
revalidation before it spent nothing. With the Gateway deadline now armed for
plain node plugin tools, that let a send land after the deadline had already
answered the caller with nodeCommandDispatched:false, advertising a command the
node had in fact received as retry-safe.

Anchor the budget at entry and re-derive what is left after pairing
revalidation, refusing to dispatch once it is exhausted.

* test(gateway): restore the Gateway URL after the invoke deadline proof

The shared Gateway fixture does not snapshot OPENCLAW_GATEWAY_URL, so the
proof left later tests in the same worker pointing at its stopped ephemeral
server. Capture and restore the key, including its previously-unset case.

* fix(gateway): read the node invoke budget after request serialization

Pairing revalidation is not the only step that can spend the caller budget
before the pending timer is armed: tool parameters are unbounded, so
serializing them and resolving the pending system.run event can outlive the
remaining budget on their own.

Reading the budget once all of that work is behind the call site keeps the node
timeout and the pending timer starting from what is actually left, so an
exhausted budget refuses the dispatch instead of arming a timer that answers
after the caller already reported a timeout.

* test(gateway): pin node invoke dispatch provenance against a budget-consuming send

The review asked for the final event envelope to be serialized before the
deadline admission check, on the grounds that a slow serialization could let
the Gateway report nodeCommandDispatched: false for a command the node did
receive. Envelope build, send and onDispatchReady are one synchronous block,
so nothing can settle the pending request between them. Pin that invariant
with a send that spends the whole remaining budget.

* test(gateway): type the node socket send mock with its call signature

The budget-consuming send regression wraps the recorded socket send, and
ReturnType<typeof vi.fn> resolves to a mock without a call signature, so
tsgo rejected the wrapper with TS2348 while vitest ran it fine.

* test(gateway): follow the node pairing helpers into device-pairing-node

main folded src/infra/node-pairing.ts into src/infra/device-pairing-node.ts,
so the deadline proof stopped resolving its pairing import after the merge.

* fix(gateway): scope the invoke deadline to caller-supplied budgets

Callers that omit timeoutMs, such as fs.listDir and the exec-approval
paths, have always used the registry's 30-second fallback as a
post-dispatch pending timer. Anchoring that fallback before pairing
revalidation turned it into a dispatch admission check, so a slow
revalidation could answer TIMEOUT without ever dispatching. Only a
positive caller-supplied budget anchors the deadline now, which keeps
the plain plugin-tool path covered while those callers keep their
established semantics.

* fix(test): import approveDevicePairing from its new module

main split the device pairing lifecycle modules in #124734 and moved
approveDevicePairing to src/infra/device-pairing-approval.ts. Nothing on
either side touched this import line, so the merge stays conflict free
and only the typecheck reports the missing export.

* refactor(gateway): move node invoke deadline budget to a sibling module

node-registry-private.ts sits at 693 counted lines on main against a 700-line
max-lines ratchet, and the inline budget bookkeeping pushed it to 703, which is
what turned check-lint-core-2 red. The budget arithmetic moves to
node-registry.invoke-budget.js unchanged; the call site keeps the same two reads.

* refactor(gateway): move system.run invoke helpers to their sibling module

The max-lines ratchet caps src/gateway/node-registry-private.ts at 700
effective lines and main now sits at 699, so the dispatch budget guard
this branch adds takes the file to 705 and check-lint-core fails.

resolvePendingSystemRunEvent and normalizeSystemRunInvokeParams are
module-private and both already delegate to normalizeSystemRunTimeoutMs
in node-registry.system-run.ts, so that module is where they belong.
Pure move: no behavior change and no new export surface.

* fix(gateway): keep the moved system.run helpers within the ratchet baselines

The previous commit moved resolvePendingSystemRunEvent and
normalizeSystemRunInvokeParams into node-registry.system-run.ts. It changed no
behavior, but it did move three per-file measurements.

normalizeSystemRunTimeoutMs was exported because node-registry-private.ts
consumed it; the two callers that moved were its only external consumers, so
after the move the export had none and Knip reported it as an unused production
export. It is module-private now.

The moved code also carried two `as Record<string, unknown>` assertions that
were grandfathered under the old file. The new file's baseline is 0, so both
now carry the // SAFETY: invariant the ratchet asks for, and the source file's
baseline entry is shrunk from 3 to 1 as the ratchet's own message requested.

* test(gateway): fix typed node invoke serialization fixture

Close over the typed execution payload instead of reading contextual this
inside toJSON, whose surrounding invoke params contract is unknown.
Keep the serialization delay and independent execution-budget assertions.

The 141 registry tests and focused canonical-inherited test type graph pass.

Co-authored-by: Yigtwxx <[email protected]>

* docs(changelog): avoid node deadline entry merge conflict

Move only this PR's credited release-note entry beside the existing Gateway
client watchdog entry, away from the concurrently edited section boundary.
The entry and tested runtime behavior are unchanged.

Co-authored-by: Yigtwxx <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
…penclaw#118720)

* fix(agents): node plugin tool calls report a generic client timeout

Plain node-hosted plugin tool calls send no invocation budget, so the Gateway
arms no deadline over pairing, wake, and policy work and the node registry falls
back to its own 30s pending timer that only starts at dispatch. The agent-side
wait defaults to the same 30s but starts earlier, so the caller always abandons
the request first and the Gateway answer that carries nodeCommandDispatched
retry-safety provenance can never arrive.

Send the same 30s budget explicitly and give the caller the +5s grace the node
MCP path already uses, so the Gateway answer wins the race.

* test(gateway): prove the node invoke deadline answer reaches the agent

Adds an end-to-end proof that runs a real Gateway, pairs a real node that
accepts the forwarded command and never answers, and drives the shipped agent
tool through the real gateway client. It asserts the agent receives the
Gateway's structured timeout with nodeCommandDispatched provenance rather than a
client-side gateway timeout.

* fix(gateway): keep node invoke dispatch inside the caller budget

The invocation budget only started once dispatch was reached, so pairing
revalidation before it spent nothing. With the Gateway deadline now armed for
plain node plugin tools, that let a send land after the deadline had already
answered the caller with nodeCommandDispatched:false, advertising a command the
node had in fact received as retry-safe.

Anchor the budget at entry and re-derive what is left after pairing
revalidation, refusing to dispatch once it is exhausted.

* test(gateway): restore the Gateway URL after the invoke deadline proof

The shared Gateway fixture does not snapshot OPENCLAW_GATEWAY_URL, so the
proof left later tests in the same worker pointing at its stopped ephemeral
server. Capture and restore the key, including its previously-unset case.

* fix(gateway): read the node invoke budget after request serialization

Pairing revalidation is not the only step that can spend the caller budget
before the pending timer is armed: tool parameters are unbounded, so
serializing them and resolving the pending system.run event can outlive the
remaining budget on their own.

Reading the budget once all of that work is behind the call site keeps the node
timeout and the pending timer starting from what is actually left, so an
exhausted budget refuses the dispatch instead of arming a timer that answers
after the caller already reported a timeout.

* test(gateway): pin node invoke dispatch provenance against a budget-consuming send

The review asked for the final event envelope to be serialized before the
deadline admission check, on the grounds that a slow serialization could let
the Gateway report nodeCommandDispatched: false for a command the node did
receive. Envelope build, send and onDispatchReady are one synchronous block,
so nothing can settle the pending request between them. Pin that invariant
with a send that spends the whole remaining budget.

* test(gateway): type the node socket send mock with its call signature

The budget-consuming send regression wraps the recorded socket send, and
ReturnType<typeof vi.fn> resolves to a mock without a call signature, so
tsgo rejected the wrapper with TS2348 while vitest ran it fine.

* test(gateway): follow the node pairing helpers into device-pairing-node

main folded src/infra/node-pairing.ts into src/infra/device-pairing-node.ts,
so the deadline proof stopped resolving its pairing import after the merge.

* fix(gateway): scope the invoke deadline to caller-supplied budgets

Callers that omit timeoutMs, such as fs.listDir and the exec-approval
paths, have always used the registry's 30-second fallback as a
post-dispatch pending timer. Anchoring that fallback before pairing
revalidation turned it into a dispatch admission check, so a slow
revalidation could answer TIMEOUT without ever dispatching. Only a
positive caller-supplied budget anchors the deadline now, which keeps
the plain plugin-tool path covered while those callers keep their
established semantics.

* fix(test): import approveDevicePairing from its new module

main split the device pairing lifecycle modules in openclaw#124734 and moved
approveDevicePairing to src/infra/device-pairing-approval.ts. Nothing on
either side touched this import line, so the merge stays conflict free
and only the typecheck reports the missing export.

* refactor(gateway): move node invoke deadline budget to a sibling module

node-registry-private.ts sits at 693 counted lines on main against a 700-line
max-lines ratchet, and the inline budget bookkeeping pushed it to 703, which is
what turned check-lint-core-2 red. The budget arithmetic moves to
node-registry.invoke-budget.js unchanged; the call site keeps the same two reads.

* refactor(gateway): move system.run invoke helpers to their sibling module

The max-lines ratchet caps src/gateway/node-registry-private.ts at 700
effective lines and main now sits at 699, so the dispatch budget guard
this branch adds takes the file to 705 and check-lint-core fails.

resolvePendingSystemRunEvent and normalizeSystemRunInvokeParams are
module-private and both already delegate to normalizeSystemRunTimeoutMs
in node-registry.system-run.ts, so that module is where they belong.
Pure move: no behavior change and no new export surface.

* fix(gateway): keep the moved system.run helpers within the ratchet baselines

The previous commit moved resolvePendingSystemRunEvent and
normalizeSystemRunInvokeParams into node-registry.system-run.ts. It changed no
behavior, but it did move three per-file measurements.

normalizeSystemRunTimeoutMs was exported because node-registry-private.ts
consumed it; the two callers that moved were its only external consumers, so
after the move the export had none and Knip reported it as an unused production
export. It is module-private now.

The moved code also carried two `as Record<string, unknown>` assertions that
were grandfathered under the old file. The new file's baseline is 0, so both
now carry the // SAFETY: invariant the ratchet asks for, and the source file's
baseline entry is shrunk from 3 to 1 as the ratchet's own message requested.

* test(gateway): fix typed node invoke serialization fixture

Close over the typed execution payload instead of reading contextual this
inside toJSON, whose surrounding invoke params contract is unknown.
Keep the serialization delay and independent execution-budget assertions.

The 141 registry tests and focused canonical-inherited test type graph pass.

Co-authored-by: Yigtwxx <[email protected]>

* docs(changelog): avoid node deadline entry merge conflict

Move only this PR's credited release-note entry beside the existing Gateway
client watchdog entry, away from the concurrently edited section boundary.
The entry and tested runtime behavior are unchanged.

Co-authored-by: Yigtwxx <[email protected]>

---------

Co-authored-by: Peter Steinberger <[email protected]>
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 cli CLI command changes commands Command implementations gateway Gateway runtime 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: XL 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