Skip to content

fix(ci): remove unused OpenClaw ID node exports - #195338

Merged
steipete merged 1 commit into
mainfrom
loops/l436-deadcode-deps-exports
Nov 8, 2026
Merged

steipete merged 1 commit into
mainfrom
loops/l436-deadcode-deps-exports

Conversation

@roboclaw-bot

Copy link
Copy Markdown
Collaborator

Related: #194001, #193982

What Problem This Solves

The scheduled main dependency-check job fails both deadcode:dependencies and deadcode:exports after the OpenClaw ID node additions.

User Impact

Internal CI cleanup; runtime behavior and public package contracts are unchanged.

Why This Change Was Made

Keep NodeInviteView, OpenClawIdNodePairingInput, and OpenClawIdNodeRemovedError private because they have no consumer outside their modules. Keep loadNodeTunnelKey private by having the native Gateway fixture seed the same file through the existing endpoint-key owner. Assertions and skip conditions are unchanged.

The first two declarations originated in c1b75daf7946 (#194001); the latter two originated in 21c02885fb1a (#193982). Raw parent-relative patches and current references were inspected. No dependency versions, Knip exemptions, baselines, or test allocations change. Production and test line counts are each unchanged after simplification.

Evidence

  • Focused Node tests: 11 passed, covering tunnel connection/removal, node invitation authority, and endpoint-key persistence/refusal. The native Gateway node-host suite's 7 existing skips remain because its native addon is unavailable; they are not passing integration evidence.
  • Touched-file type-aware lint, narrowed TypeScript project, formatting, and git diff --check passed. All local checks were timed and serialized under the shared lock.
  • Requested local autoreview: Codex gpt-6.1-sol, P0–P2, scoped-clean, no findings.
  • Proof gaps: the original log fetch failed with a stream cancellation; the one allowed API fallback refused terminal escape sequences. The four names above are source-confirmed unused production exports, not a transcription of that missing log. No unused package name is established by the available evidence. Full Knip reruns are unrun because broad host checks and CI-triggering remote warmup are prohibited for this repair lane. Resolution of the entire scheduled job remains unverified; PR CI supplies the available broad proof.

Named test files: src/node-host/openclaw-id-connection.test.ts, src/gateway/openclaw-id/authority.nodes.test.ts, src/gateway/openclaw-id/tunnel-child/keyfile.test.ts, and src/gateway/server.auth.openclaw-id-node-host.test.ts. Combined runner time: 61.25s, including first-use worker preparation; hosted CI seconds pending.

Keep node invitation, pairing, removal-error, and key-loading declarations
private to their implementation modules. Seed the native Gateway fixture
through the existing endpoint-key owner at the same path.

Co-authored-by: Josh Lehman <[email protected]>
Co-authored-by: steipete <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 8, 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.

@github-actions

github-actions Bot commented Nov 8, 2026

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: 730c8ab1f8a9f9af6c310816c6bf17a8193f9cbd
  • Maintainer: @roboclaw-bot
  • Repository role: maintain

These security sensitive changes were made:

  • src/infra/device-pairing-openclaw-id.worker.ts: Controls Gateway authentication, pairing, or caller permissions. Check identity validation, scope checks, and revocation.

Carefully review these changes before merging.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Nov 8, 2026
@clawsweeper

clawsweeper Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

This PR makes four internal declarations private and seeds the native transport fixture through the existing endpoint-key loader.

Example: The native transport fixture prepares node-openclaw-id/endpoint.key.

  • Before: The fixture imports loadNodeTunnelKey solely to obtain the endpoint seed.
  • After: The fixture obtains the same seed through loadOrCreateEndpointKey at the same path.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and source-supported, with successful exact-head type validation but limited evidence for recovery of the full scheduled check.
Proof confidence 🦐 gold shrimp (3/6) This maintainer-authored static cleanup changes no production behavior; reported focused tests support preservation, while the native suite remains skipped and full scheduled-job recovery is unverified.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Unused internal exports violate repository dead-code policy.
Reason: The maintainer-approved direction removes unnecessary internal surface without adding machinery or changing public contracts.

Merge readiness

✅ Ready for maintainer review

Keep this maintainer-authored PR open: it provides a focused cleanup of unused internal exports, with no introduced correctness or security defect found.

Priority: P3
Reviewed head: 730c8ab1f8a9f9af6c310816c6bf17a8193f9cbd

Before merge

None.

Findings

None.

Tests

  • Missing end-to-end proof: The native fixture remained skipped, and the supplied evidence does not establish that the entire scheduled dependency-check failure is resolved.
Agent review details

How this fits together

OpenClaw ID invitation, pairing, and node-transport modules connect approved nodes to a Gateway; the dead-code checks inspect their exported declarations.

flowchart LR
  A[Native transport fixture] --> B[Endpoint key loader]
  C[Node transport] --> B
  B --> D[Endpoint key file]
  C --> E[OpenClaw ID tunnel]
  E --> F[Gateway admission]
Loading

Technical review

Best possible solution:

Retain this minimal export cleanup and the fixture's direct use of the existing endpoint-key owner.

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

Source references establish the unused export surface, and GitHub confirms the scheduled job failed; the detailed failure log was unavailable, and no target code was executed.

Is this the best way to solve the issue?

The patch is the smallest complete cleanup: it removes unnecessary exports and reuses the existing key loader without changing runtime behavior or weakening tests.

AGENTS.md: found and applied where relevant.

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

Provenance checked

Testing

Proof path: unit tests only.

Security

None.

Evidence

What I checked:

  • Pinned introduced diff: The introduced patch removes four export modifiers and replaces the fixture's key-loading call; it changes no production control flow, dependencies, exemptions, or assertions. (730c8ab1f8a9)
  • Existing key owner preserved: The fixture directly invokes the same loader and endpoint.key path used by loadNodeTunnelKey, preserving key creation, reuse, and permission checks. (src/gateway/server.auth.openclaw-id-node-host.test.ts:168, 730c8ab1f8a9)
  • Consumer search: Repository references show no external consumer of the two types or removal-error class; after the fixture change, the key-loading helper is used only within its module. (src/node-host/openclaw-id-transport.ts:35, 730c8ab1f8a9)
  • Current main still contains the exports: The affected files are unchanged between the introduction base and fetched main, so this cleanup is not already implemented there. (9e12c298743e)
  • Exact-head validation: The check-prod-types job completed successfully on the reviewed head; no failing check runs were returned across both pages, while openclaw/ci-gate remained pending. (730c8ab1f8a9)
  • Scheduled failure and inspection limit: The linked scheduled check-dependencies job failed, but its detailed logs redirect to a host blocked by the network allowlist; resolution of the entire scheduled failure remains unverified. (da3cea2ce4a2)

PR surface

Source 0, Tests 0. Total 0 across 5 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 4 4 4 0
Tests 1 4 4 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 8 8 0

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.

Labels

Label changes:

  • add P3: This is internal dead-code cleanup with unchanged production behavior and no demonstrated user-facing outage.
  • 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 internal dead-code cleanup with unchanged production behavior and no demonstrated user-facing outage.
  • 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.

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 8, 2026, 1:29 PM ET / 18:29 UTC.

@steipete
steipete merged commit 564264c into main Nov 8, 2026
130 checks passed
@steipete
steipete deleted the loops/l436-deadcode-deps-exports branch November 8, 2026 18:52
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 9, 2026
Keep node invitation, pairing, removal-error, and key-loading declarations
private to their implementation modules. Seed the native Gateway fixture
through the existing endpoint-key owner at the same path.

Co-authored-by: roboclaw-bot <[email protected]>
Co-authored-by: Josh Lehman <[email protected]>
Co-authored-by: steipete <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. gateway Gateway runtime security-sensitive-changed size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants