Skip to content

[B1.2] Freeze Beta-era public package surface + stability classes (#1223) - #1266

Merged
SisyphusZheng merged 1 commit into
devfrom
kimi/v044-b1.2-surface-freeze
Sep 3, 2026
Merged

[B1.2] Freeze Beta-era public package surface + stability classes (#1223)#1266
SisyphusZheng merged 1 commit into
devfrom
kimi/v044-b1.2-surface-freeze

Conversation

@SisyphusZheng

Copy link
Copy Markdown
Member

Problem

Issue #1223 (stage #1150, umbrella #1155): the Beta-era public package surface had no per-export stability classification. docs/current/PACKAGE_SURFACE.md classified subpaths (supported vs internal) but not the ~180 named exports behind them, so nothing mechanically prevented an unclassified or speculative export from shipping in Beta.1.

Owner

Implementer role under dispatch packet B1.2 ("Freeze Beta-era public package surface + stability classes", ADR-0151), executed per .agents/v044-kimi-implementer.md.

Before

  • PACKAGE_SURFACE.md carried a subpath-level supported/internal map only; no stability class existed for any named export.
  • deno task package-surface:check verified subpath drift but could not see named exports.
  • Latent doc drift: the alpha.13 bullet claimed composeFetchMiddleware on the element root (it lives only in ./build-utils); the build-utils bullet omitted insertBeforeBodyClose, normalizeRoutePatternForURLPattern and composeFetchMiddleware.

After

  • PACKAGE_SURFACE.md gains a "Beta.1 export stability classes" section: the five-class vocabulary (stable-candidate / experimental / internal-importable / compatibility-only / deprecated), a machine-readable package-export-classes block classifying every named export of every published subpath of all five packages, per-package human tables, and a semantic-owner vs physical-source table (App-owned action/loader protocol and adapter-owned build-contract types physically on ADR-0122 frozen element files — documented with compatibility reason and removal condition, no migration).
  • tools/check-package-surface.ts now enumerates every subpath's real exports through the same TypeScript module resolution as the public-interface snapshot and fails on unclassified exports, stale classifications, unknown class values, subpath/package mismatches, or classified names missing from prose. Executable body wrapped in import.meta.main so the pure helpers are unit-testable; new tools/check-package-surface.test.ts (6 tests).
  • Doc drift fixed (composeFetchMiddleware location, complete build-utils enumeration); experimental-table move conditions updated to record the B1.2 decision to keep element/property/DANGEROUS_KEYS trio at the element root for the Beta line.
  • No product-code changes; no new APIs, packages or subpaths.

Why-not-second-owner

This change introduces no duplicate-looking implementation. The classification check reuses the existing publicInterfaceShape export enumerator (tools/check-public-interface-snapshot.ts) as the single export-discovery mechanism rather than adding a second parser.

Evidence

All run against commit c491864 (base c7fb6fc):

  • deno task package-surface:check → exit 0 (RED proof: gate failed with "missing or invalid package-export-classes block" before the doc edit; three drift mutations — unknown class, removed classification, stale classification — each failed with precise diagnostics, then restored to GREEN)
  • deno test tools/check-package-surface.test.ts tools/checkers.test.ts tools/check-public-interface-snapshot.test.ts (repo test permissions) → 16 passed, 0 failed
  • deno task fmt:check → exit 0
  • deno task lint → exit 0
  • deno task workflow:check → exit 0
  • deno task docs:truth → exit 0 (includes docs:check-version-anchors, docs:check-recipe-parity)
  • deno task docs:check-role-neutral / docs:check-public / docs:check-strategy / docs:check-current / docs:check-claims → exit 0 each
  • deno task text-integrity:check → exit 0
  • deno task interface:snapshot → exit 0
  • deno task pack:dry-run → exit 0
  • deno task package-artifacts:check → exit 0

deno task test not run in full: no product code changed (packet condition); the touched tooling is covered by the targeted tool tests above.

Scope

Packet-owned paths only:

  • docs/current/PACKAGE_SURFACE.md — classification section, machine block, ownership table, three minimal alignment fixes.
  • tools/check-package-surface.ts — surface/public-api check tooling (extended, no existing check weakened).
  • tools/check-package-surface.test.ts — new unit tests for the classification helpers.

No product-code edits were needed: every export already matched its documented classification after doc alignment, so no export lists were touched. Nothing outside the packet was edited; no ADR-0122 frozen path was touched (no ADR-0151 commit-message citation required).

Risk

  • package-surface:check now runs TypeScript program construction per subpath entry (same cost profile as interface:snapshot); gate duration increases moderately.
  • Classification judgments (e.g. framework-contract types as internal-importable, OpenElementRouteKind/OpenElementRouteNode as compatibility-only) are documented decisions reviewable in the tables; reclassifying is a one-line doc edit that the gate will enforce against source.
  • deprecated class is currently unused by design.
  • [B1] Freeze Beta-era public package surface and stability classes #1223 intentionally left open for the thinker to close.

Part of #1223. Stage #1150, umbrella #1155.

…es (#1223)

Extend package-surface:check so the machine-readable package-export-classes
block in PACKAGE_SURFACE.md must classify every named export of every
published subpath (stable-candidate / experimental / internal-importable /
compatibility-only / deprecated), verified against source through the same
TypeScript module resolution as the public-interface snapshot; unclassified,
stale or prose-undocumented exports fail the gate.

Document the semantic-owner vs physical-source splits (App-owned action/loader
protocol and adapter-owned build contract types physically on ADR-0122 frozen
element files) with compatibility reason and removal condition; no physical
migration. Fix the composeFetchMiddleware location wording and complete the
build-utils helper enumeration.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying openelement with  Cloudflare Pages  Cloudflare Pages

Latest commit: c491864
Status: ✅  Deploy successful!
Preview URL: https://01277d67.lessjs.pages.dev
Branch Preview URL: https://kimi-v044-b1-2-surface-freez.lessjs.pages.dev

View logs

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

APIError: Insufficient Balance

opencode session  |  github run

@SisyphusZheng
SisyphusZheng merged commit 17ec6a5 into dev Sep 3, 2026
9 checks passed
@SisyphusZheng
SisyphusZheng deleted the kimi/v044-b1.2-surface-freeze branch September 3, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant