Skip to content

chore(ui-sdk): remove twelve unused internal entry names - #4073

Merged
schlessera merged 4 commits into
mainfrom
chore/3412-ui-sdk-entry-names
Nov 16, 2026
Merged

schlessera merged 4 commits into
mainfrom
chore/3412-ui-sdk-entry-names

Conversation

@schlessera

@schlessera schlessera commented Nov 15, 2026 •

Copy link
Copy Markdown
Owner

Closes #3412

What changed

Remove 12 unused names from the ui-sdk internal entry and regenerate its API report. Keep the three names now imported by ui-server. Underlying declarations remain in their source modules.

Why this shape

Follows #3412 and the internal-entry rule in docs/decisions/public-export-boundary.md: internal exports carry no compatibility promise. No supported API, behavior, or guard changes. A patch changeset records the internal-entry cleanup, as required by the shipped-file gate.

Proof

Base: cc326cc64348a765325adc1cbe74248d60844845. Ran the issue’s exact per-name git grep -lw command before editing. Baseline declaration build passed for ui-server, ui-backend-claude, ui-backend-pi and ui-react. After removal, the same build checks all four together, so the emit result below covers every candidate with all proposed removals applied simultaneously.

Name Base grep result Decision / declaration emit
FIRST_PARTY_PROVIDER_RECIPIENTS packages/ui-server/src/brain/host-boundary.ts:34,194 Keep: direct importer
MAX_PROVIDER_REQUEST_BYTES No outside hits Remove: four consumer emits pass
WORKER_PROVIDER_RELAY_SOCKET No outside hits Remove: four consumer emits pass
providerUsage No outside hits Remove: four consumer emits pass
ProviderOperation No outside hits Remove: four consumer emits pass
ProviderRelayOptions packages/ui-server/tests/provider-relay-taint.test.ts:14,60,154 Keep: direct importer
ProviderRelayRefusal packages/ui-server/tests/provider-relay-taint.test.ts:14,67,155 Keep: direct importer
ProviderUsage No outside hits Remove: four consumer emits pass
NativePoolAccess No outside hits Remove: four consumer emits pass
NativePoolCreatePurpose No outside hits Remove: four consumer emits pass
NativePoolState No outside hits Remove: four consumer emits pass
assertScratchMask No outside hits Remove: four consumer emits pass
launchMaintenanceWorker No outside hits Remove: four consumer emits pass
probeWorkerHostAsync No outside hits Remove: four consumer emits pass
WORKER_PROVIDER_RELAY_DIR No outside hits Remove: four consumer emits pass

Open-PR audit: inspected all 33 open PR diffs. No added outside import of any removed name. #4050 repeats the pool types in its internal-entry export line; #4064 references them inside ui-sdk or API reports. Neither adds an outside importer. MaintenanceResult is unchanged.

Temporary removal audit failed on the base, naming all 12 candidates, then passed after removal. Existing API-surface snapshot was run before regenerating the report to prove it rejects the stale inventory. Mutation: restore one removed export against the regenerated report, observe the same snapshot fail, then restore and pass. No permanent compile-heavy test added (explicitly out of scope).

Validation:

  • bun run build --for ui-server,ui-backend-claude,ui-backend-pi,ui-react: exit 0 both at the base and after all 12 removals.
  • NODE_OPTIONS=--max-old-space-size=6144 bun run typecheck: exit 0. The initial default 2 GiB heap run aborted with an explicit JavaScript heap out-of-memory diagnostic; no TypeScript diagnostic was reported.
  • bun run test tests/api-surface.test.ts packages/ui-server/tests/declaration-surface.test.ts: 56 pass, 0 fail, 190 assertions.
  • Snapshot failing-first: 0 pass, 1 fail, expected export-list mismatch before report regeneration.
  • Snapshot mutation: restoring providerUsage gives 0 pass, 1 fail at tests/api-surface.test.ts:48; final focused run passes after restoring the removal.
  • bun scripts/check-changeset-packages.ts and bunx --no-install changeset status: pass; all manifest package names resolve, no major bumps.
  • Initial preflight required an added changeset; the final run below includes it.
  • A subsequent preflight stopped during lint with truncated diagnostics; direct oxlint with captured pipes exited 0. Recovery does not attribute or correct that failure (ci: retain diagnostics for transient local fast-invariant batch failures #4069).
  • Default temporary-storage preflight: 972 pass, 11 fail, with SQLITE_IOERR_WRITE and EDQUOT errors. A base-entry control of the four failing files also reproduced EDQUOT without the export removals. Existing unmilestoned ci: diagnose temporary-storage quota failures cascading through local fast invariants #4017 tracks this condition. The final preflight uses an owned directory on the workspace filesystem via TMPDIR, retaining the same assertions and guards.

Merged main at 49edacd86: resolved one conflict in packages/ui-sdk/src/internal.ts by keeping main's new NativeTurnTree export (documented in the integration contract) and still dropping the three unused pool types. The regenerated API report differs from main only by the 12 removals. bun run typecheck exit 0.

{"version":1,"kind":"brain-check-pr-receipt","head":"49edacd869b532bdc333d7736c803b03245e6644","base":"origin/main","mode":"focused","startedAt":"2026-11-16T13:18:04.294Z","finishedAt":"2026-11-16T13:19:14.132Z","checks":[{"name":"all lint and leakage gates","categories":["changeset"],"outcome":"passed","elapsedMs":12623.214239},{"name":"environment documentation","categories":["changeset"],"outcome":"passed","elapsedMs":131.03909399999975},{"name":"pending changeset package names","categories":["changeset"],"outcome":"passed","elapsedMs":111.48766900000192},{"name":"contribution changeset","categories":["changeset"],"outcome":"passed","elapsedMs":19.182732000001124},{"name":"affected fast invariants","categories":["verify","unit"],"outcome":"passed","elapsedMs":56934.557604}]}

Final TMPDIR preflight passed every gate (993 fast-invariant tests, zero failures).

Checklist

  • Acceptance criteria met with per-name grep and four-package declaration emit.
  • Milestone 0.45.0 assigned to issue and PR.
  • No supported machine contract, provider history, guard, or documented behavior changed.
  • No personal data in the diff; local leakage gate passed.
  • Orchestrator will request and assess candidate hosted proof before landing.

Anything left open

Nothing in issue scope. Candidate confirmation and merge belong to the orchestrator. Existing unmilestoned #4017 tracks temporary-storage quota failures; #4069 tracks incomplete transient diagnostics. No new follow-up issue filed.

Collision audit at head 4b3ab33f0ba7d2a6383bbd09fbe085e1632e72f7 (bun scripts/collisions.ts --json --pr 4073):

…ry-names

# Conflicts:
#	packages/ui-sdk/src/internal.ts
@schlessera
schlessera marked this pull request as ready for review November 16, 2026 15:18
@schlessera
schlessera merged commit 524986d into main Nov 16, 2026
24 of 25 checks passed
@github-actions

Copy link
Copy Markdown

This PR's squash 524986d8a79d1cf593f9159fcaa43a07684cab1f landed on main while main was red at 05bf0d6a02fb12fd1ead402b8a7638031ddcbeec (incident #4098) without being a declared fix. Merge blocking while red is cooperative; this report is the detection.

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

Labels

area: ui-sdk Wire protocol, runtime schemas, the server and client SDK surfaces. type: chore Tooling, CI, release plumbing, dependencies.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ui-sdk: 15 more internal entry names have no outside importer after #2534

1 participant