Skip to content

refactor(sdk): keep helper types private - #139601

Merged
vincentkoc merged 1 commit into
mainfrom
refactor/private-sdk-internal-types
Sep 6, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor/private-sdk-internal-types

Conversation

@vincentkoc

Copy link
Copy Markdown
Member

What Problem This Solves

Resolves a maintainer-requested SDK boundary cleanup where helper-only declaration types in Plugin SDK implementation modules were exported even though they are not supported public SDK contracts.

Why This Change Was Made

The change keeps 14 helper-only type aliases local to src/plugin-sdk/api-baseline.ts, src/plugin-sdk/api-diff.ts, and src/plugin-sdk/memory-core-bundled-runtime.ts. It preserves the public aggregate types and runtime values, including PluginSdkApiExport, PluginSdkApiBaseline, PluginSdkApiDiff, PluginSdkApiDiffSurface, DreamingArtifactsAuditSummary, and ShortTermAuditSummary.

User Impact

No runtime behavior changes. Plugin developers keep the documented/public SDK types, while unsupported internal helper shapes stop appearing as exported source-level implementation details.

Evidence

  • Frozen public main before publication: e10007407d7ce25cf13d816123607993699dc6f3.
  • Patch identity before commit: git diff --full-index --binary | shasum -a 256 -> cd40292de50dc6015459a48de1a74f23c4331157ddf3823fe804b6b83a00ccb1.
  • Current-main source check: no external imports from the three src/plugin-sdk/* target modules for the 14 helper type names; package/entrypoint metadata does not expose these files as typed public SDK entrypoints.
  • git diff --check passed.
  • Fresh autoreview: scoped-clean, no accepted/actionable P0-P2 findings.
  • Prior focused local proof on the same patch identity: 104 tests passed across the affected SDK files.

Hosted exact-head PR CI will provide the final merge gate after this draft is marked ready.

@clawsweeper

clawsweeper Bot commented Sep 6, 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.

@vincentkoc vincentkoc self-assigned this Sep 6, 2026
@openclaw-barnacle openclaw-barnacle Bot added size: XS maintainer Maintainer-authored PR labels Sep 6, 2026
@vincentkoc
vincentkoc marked this pull request as ready for review September 6, 2026 01:39
@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. labels Sep 6, 2026
@clawsweeper

clawsweeper Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed September 5, 2026, 9:45 PM ET / September 6, 2026, 01:45 UTC.

ClawSweeper review

What this changes

Makes 14 helper types private within SDK reporting and bundled memory modules while preserving their aggregate types and runtime exports.

Merge readiness

✅ Ready for maintainer review

No blocking findings. This remains useful internal cleanup: current main still exports these helpers, while inspected consumers and public SDK contracts do not require them. Member authorship and the maintainer label also preclude cleanup closure.

Priority: P3
Reviewed head: 4553b54fd770ef617b75de353e24cb859c53abcd

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) Focused, behavior-preserving cleanup with supported caller and package boundaries and no blocking findings.
Proof confidence 🌊 off-meta tidepool Not applicable: This member-authored PR only changes internal declaration exports, preserving SDK report generation and memory facade execution; the external-contributor runtime-proof gate does not apply.
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 PR only changes internal declaration exports, preserving SDK report generation and memory facade execution; the external-contributor runtime-proof gate does not apply.
Evidence reviewed 7 items Introduced change and current-main comparison: The pinned introduced patch only removes export modifiers from 14 type aliases and compacts one declaration. Comparing the reviewed head with fetched main shows that main retains all 14 exports; the verified test-merge result touches only the same three modules.
Public contract boundary: Package metadata and the canonical entrypoint inventory contain none of the three changed modules. The export builder derives typed public exports from that inventory. The SDK overview documents this boundary, so source-level helper exports do not constitute supported public subpaths.
Release contract check: The v2026.9.2 entrypoint inventory also omits api-baseline, api-diff, and memory-core-bundled-runtime. Its export builder uses the same inventory-based public boundary. The release package.json blob was unavailable locally, so no claim is made about inspecting that blob.
Findings None None.
Security None None.

How this fits together

SDK reporting compares public plugin contracts between revisions, while the bundled memory facade connects core diagnostics to the memory plugin. These helper types describe report and diagnostic results without providing separate public plugin entrypoints.

flowchart TD
  A[Public SDK inventory] --> B[SDK baseline renderer]
  B --> C[API comparison reports]
  D[Core memory diagnostics] --> E[Bundled memory facade]
  E --> F[Memory plugin]
  F --> G[Audit and repair results]
Loading

Before merge

None.

Agent review details

Security

None.

PR surface

Source -3. Total -3 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 3 14 17 -3
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 14 17 -3

Review metrics

Metric Value Why it matters
Production versus test delta Production net −3 lines; tests unchanged; 0 executable statements changed The reduction comes from declaration formatting and export visibility, with no added runtime complexity.

Technical review

Best possible solution:

Keep helper aliases local to their owning modules while retaining the aggregate contracts and plugin-owned exports used by callers.

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

Not applicable: this is declaration-visibility cleanup, not a reported runtime failure.

Is this the best way to solve the issue?

Yes. Removing unnecessary export modifiers at the declaration owners is the smallest coherent solution; adding compatibility aliases or moving the types would preserve unnecessary surface or add churn.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0e80d86c470f.

Labels

Label changes:

  • add P3: This is a bounded internal type-export cleanup with no demonstrated runtime or public-contract change.
  • 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 member-authored PR only changes internal declaration exports, preserving SDK report generation and memory facade execution; the external-contributor runtime-proof gate does not apply.

Label justifications:

  • P3: This is a bounded internal type-export cleanup with no demonstrated runtime or public-contract 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 PR only changes internal declaration exports, preserving SDK report generation and memory facade execution; the external-contributor runtime-proof gate does not apply.

Evidence

What I checked:

  • Introduced change and current-main comparison: The pinned introduced patch only removes export modifiers from 14 type aliases and compacts one declaration. Comparing the reviewed head with fetched main shows that main retains all 14 exports; the verified test-merge result touches only the same three modules. (src/plugin-sdk/api-diff.ts:14, 0e80d86c470f)
  • Public contract boundary: Package metadata and the canonical entrypoint inventory contain none of the three changed modules. The export builder derives typed public exports from that inventory. The SDK overview documents this boundary, so source-level helper exports do not constitute supported public subpaths. (scripts/lib/plugin-sdk-entries.mts:34, 4553b54fd770)
  • Release contract check: The v2026.9.2 entrypoint inventory also omits api-baseline, api-diff, and memory-core-bundled-runtime. Its export builder uses the same inventory-based public boundary. The release package.json blob was unavailable locally, so no claim is made about inspecting that blob. (scripts/lib/plugin-sdk-entrypoints.json:1, 3928bad9badf)
  • Caller and sibling boundaries: The API-diff script imports preserved aggregate types. Doctor imports preserved audit summaries and runtime functions. Matching memory helper names elsewhere resolve to the memory plugin's own definitions and runtime-api exports, which this patch leaves unchanged. Searches of the checkout and fetched main found no consumer importing a removed helper from the changed modules. (extensions/memory-core/runtime-api.ts:20, 4553b54fd770)
  • Existing contract coverage: Read the baseline suite covering private declaration reachability, public inventories, deterministic output, and API comparisons, plus the memory facade delegation suite. The PR body reports 104 passing focused tests; these were not rerun during this read-only review. The introduced diff passes git diff --check. (src/plugin-sdk/api-baseline.test.ts:650, 4553b54fd770)
  • Area-history routing: Current-main logs identify Ayaan Zaidi's API-diff refactor and Dallin Romney's declaration deduplication work as relevant routing context. Some deeper history objects were unavailable, so these are routing suggestions without source-line introduction claims. (src/plugin-sdk/api-diff.ts, 0e80d86c470f)

Likely related people:

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

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.

@vincentkoc

vincentkoc commented Sep 6, 2026 •

Copy link
Copy Markdown
Member Author

Maintainer pre-merge proof for exact head 4553b54fd770ef617b75de353e24cb859c53abcd.

Scope:

  • Removes export modifiers from 14 helper-only TypeScript declaration shapes in src/plugin-sdk/api-baseline.ts, src/plugin-sdk/api-diff.ts, and src/plugin-sdk/memory-core-bundled-runtime.ts.
  • Preserves public aggregate SDK types and all runtime values.
  • Runtime JavaScript behavior changed: 0 executable statements.
  • Production delta: +14/-17, net -3.

Fresh/live proof:

  • git diff --check passed before publication.
  • Fresh autoreview was scoped-clean with no accepted/actionable P0-P2 findings.
  • Hosted exact-head CI is green for run 34004463322; live rollup reread showed 248 check runs, 0 pending, 0 blocking.
  • openclaw/ci-gate succeeded on 34004463322.
  • GitHub commit verification reread: verified=true, reason=valid, verified_at=2026-09-06T01:38:43Z.
  • ClawSweeper exact-head review: refactor(sdk): keep helper types private #139601 (comment); no findings, Before merge: None, no rank-up moves.

Native landing preparation:

  • Used a clean ordinary landing clone with public origin, checked out to current public main wrapper code.
  • Verified wrapper bytes matched refs/remotes/origin/main.
  • Ran one generated Git object write probe and removed only that generated probe object.
  • Added only the reviewed task-local native tooling dependencies required by the current wrapper: [email protected], [email protected], [email protected], [email protected], and [email protected].
  • Verified those copied package directories by package name/version, package.json fingerprint, regular-directory status, no workspace package leak, and import smoke.
  • Ran scripts/pr review-init 139601.
  • Ran scripts/pr review-checkout-main 139601 and scripts/pr review-guard 139601.
  • Ran scripts/pr review-checkout-pr 139601 and scripts/pr review-guard 139601.
  • Ran scripts/pr review-artifacts-init 139601.
  • Filled native review artifacts for this exact head with recommendation READY FOR /prepare-pr.
  • Ran scripts/pr review-validate-artifacts 139601.
  • Ran OPENCLAW_TESTBOX=1 scripts/pr prepare-run 139601; hosted gates passed and prep_head_sha / pr_head_sha remained 4553b54fd770ef617b75de353e24cb859c53abcd.
  • Ran scripts/pr merge-run 139601; GitHub reported a base-branch race after native verification, so the retained lock was recovered after confirming no live PR refactor(sdk): keep helper types private #139601 tool remained.
  • Ran native merge recovery for the retained outcome, then final scripts/pr merge-run 139601 reconciliation reported MERGED exact attempted head 4553b54fd770ef617b75de353e24cb859c53abcd as dbba8d30da1a9062865cbeff2c1e5e0c96b15062.

Terminal merge proof:

  • GitHub PR readback: state=MERGED, mergedAt=2026-09-06T02:15:11Z, headRefOid=4553b54fd770ef617b75de353e24cb859c53abcd, mergeCommit.oid=dbba8d30da1a9062865cbeff2c1e5e0c96b15062.
  • Current public main readback: 11fe45e6181f33a4b480b7ce2f53216ae856d9ae.
  • Squash commit dbba8d30da1a9062865cbeff2c1e5e0c96b15062 is contained in current public main.
  • Remote source branch refactor/private-sdk-internal-types is absent after merge cleanup.
  • Source patch hash and squash patch hash for the scoped files both equal cd40292de50dc6015459a48de1a74f23c4331157ddf3823fe804b6b83a00ccb1.
  • Squash changed only the three scoped files listed above.
  • Squash commit signature verified with the GitHub web-flow public key B5690EEEBB952194.

No build was run because this patch only removes TypeScript type export modifiers, preserves the definitions and runtime exports, and does not touch package exports, published SDK entrypoint metadata, lazy module topology, or runtime JavaScript behavior.

@vincentkoc
vincentkoc merged commit dbba8d3 into main Sep 6, 2026
248 checks passed
@vincentkoc
vincentkoc deleted the refactor/private-sdk-internal-types branch September 6, 2026 02:15
vincentkoc added a commit to ylcn91/openclaw that referenced this pull request Sep 6, 2026
* commit '6c55a99226ed0611ca088004c81b00fb296f1f71': (182 commits)
  test(ui): scope dashboard settings setup to the top frame (openclaw#139618)
  refactor(skills): share pending proposal creation (openclaw#139617)
  fix(release): accept frozen targets before worker bundles (openclaw#136699)
  fix(gateway): preserve percent sequences in media filenames (openclaw#139508)
  fix: preserve current update availability alongside update history (openclaw#139501)
  feat(diagnostics): expose garbage collection duration metrics (openclaw#139592)
  fix(ui): keep Logbook timestamps clear of the activity stripe (openclaw#139539)
  fix(ui): keep Swarm outcomes visible after completion (openclaw#139490)
  test: check file accessibility without runtime-specific return values (openclaw#139590)
  refactor(sdk): keep helper types private (openclaw#139601)
  fix(cron): preserve current-session delivery intent (openclaw#139491)
  fix: prevent browser profile permission hangs in Doctor (openclaw#139612)
  fix(agents): repair storage-failure test fixture after failover owner move (openclaw#139531)
  fix(cli): keep note text with Windows and Unicode line endings (openclaw#139512)
  fix(agents): keep isolated completion context on its admitted generation (openclaw#139607)
  fix: avoid declaration builds during source-server updates (openclaw#139392)
  fix(models): keep discovered models after catalog refresh failures (openclaw#139357)
  fix(gateway): record a transcript notice when a run fails before replying (openclaw#139439)
  refactor(ios): reuse shared integer conversion (openclaw#139581)
  fix(sessions): prevent database lock failures during reclamation (openclaw#139469)
  ...
vincentkoc added a commit that referenced this pull request Sep 6, 2026
* commit 'refs/openclaw/tasks/pr-135167-main-latest':
  test(ui): scope dashboard settings setup to the top frame (#139618)
  refactor(skills): share pending proposal creation (#139617)
  fix(release): accept frozen targets before worker bundles (#136699)
  fix(gateway): preserve percent sequences in media filenames (#139508)
  fix: preserve current update availability alongside update history (#139501)
  feat(diagnostics): expose garbage collection duration metrics (#139592)
  fix(ui): keep Logbook timestamps clear of the activity stripe (#139539)
  fix(ui): keep Swarm outcomes visible after completion (#139490)
  test: check file accessibility without runtime-specific return values (#139590)
  refactor(sdk): keep helper types private (#139601)
  fix(cron): preserve current-session delivery intent (#139491)
  fix: prevent browser profile permission hangs in Doctor (#139612)
  fix(agents): repair storage-failure test fixture after failover owner move (#139531)
  fix(cli): keep note text with Windows and Unicode line endings (#139512)
  fix(agents): keep isolated completion context on its admitted generation (#139607)
  fix: avoid declaration builds during source-server updates (#139392)
  fix(models): keep discovered models after catalog refresh failures (#139357)
  fix(gateway): record a transcript notice when a run fails before replying (#139439)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Sep 6, 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: XS 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