Skip to content

docs(records): pull requests carry an API delta instead of a committed API report - #10950

Merged
cixzhang merged 5 commits into
mainfrom
specs/api-delta-not-report
Nov 10, 2026
Merged

cixzhang merged 5 commits into
mainfrom
specs/api-delta-not-report

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

The committed per-package API report (packages/*/api-report.md) is large, repeats the public surface in every package, and goes stale between regenerations. The owner decided that pull requests carry a generated public API delta instead. CI's surface compare (one generator run on the merge base and on the exact head, uncommitted, written as CI's API-changes artifact) is the machine source the merge gate reads, and the gate fails closed when it is missing or the generator errors. The review bot's delta, which starts its summary notes or says "New public API: none", is the human view that public-API review reads. It covers new, changed, and removed exports, props, hooks, types, theme targets and CSS custom properties, data attributes, and events. Only the committed per-package report file goes away.

Changed claims

  • architecture:public-component-api INV24: rewritten from "each published package has a committed generated API report" to "each pull request carries a generated public API delta" (CI compare as machine source, merge gate fails closed, review bot's delta as the human view, rows decide no acceptance).
  • architecture:public-component-api INV25: review compares rows of the pull request's API delta (was "API changes").
  • architecture:public-component-api change coupling: the API delta inventories the evidence (was "API changes from the generated reports"); a public surface change shows in the delta and commits no generated report (was "regenerate with pnpm api:report; a stale report is flagged").
  • architecture:public-component-api verification: INV24 evidence is the generator tests, CI's merge-base-to-head compare, and the review bot's per-PR API delta; INV25 routes against the API delta; the INV24 gap drops the committed-report fallback and adds "the review recipe's API delta has no fixture test yet" plus the merge gate's fail-closed read.
  • architecture:public-component-api DEC-6 (new): pull requests carry an API delta, not a committed report. Decider cixzhang, 2026-11-09.
  • architecture:public-component-api INV24 / DEC-6: the merge gate reads the API-changes artifact only for a pull request that changes a published package's source or build, and fails closed when it is missing; for any other pull request the gate reads no artifact, and its review notes say "New public API: none". INV24's verification failure signal is scoped the same way.
  • architecture:knowledge-contracts INV28: a public hook is one a published package exports from a published entry point, as the built API surface lists it; its verification row reads the built surface's hook rows.
  • architecture:list-windowing INV3 verification: evidence is the pull request's API delta (was "the public-API report").
  • architecture:knowledge-contracts contract-before-escalation step 6: "public API delta" (was "public API changes"); INV33 and DEC-21 text unchanged, since neither cites the report.
  • docs/contributing/pull-requests.md: the API report file class is removed from the pre-review report; item a reads the review bot's API delta and drops the pnpm api:report step; item e defines a public hook as one a package exports from a published entry point.

Records only; removing the generated reports, the api:report script and CI steps is a separate pull request.

Writing rubric results

  • R1 narration: none; INV24 and DEC-6 state the rule in the present tense, with no removal order or timeline.
  • R2 research in the record: none.
  • R3 evidence naming a change: none; evidence cells name the generator tests, the CI compare, and the review bot's delta.
  • R4 rejected alternatives over one line or outside a decision: one, inside DEC-6, one line.
  • R5 pull request or issue references remaining: none added.
  • R6 ruled open questions still listing options: none.
  • R7 project status: none; the records state no build status or sequencing (INV24 and DEC-6 describe the gate and the delta, not when they ship).

Scope

Components: none (records only)

Records: public-component-api, list-windowing, knowledge-contracts; contributing: pull-requests

Validation

  • pnpm check:knowledge
  • Prettier
  • git diff --check

Stack: #10950 → #10957

@vercel

vercel Bot commented Nov 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 10, 2026 10:02pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 10, 2026
@astracat-bot

astracat-bot Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 10, 2026, 10:09 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 60a9948

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the direction is approved at this head, but three fixes are needed before it can merge.

  • architecture:knowledge-contracts INV28 still defines a public hook as "a hook that a package's committed API report lists", which the new INV24 ("No package commits a generated API report") leaves empty and contributing item e already redefines, so please amend INV28 in this pull request to "a hook that a published package exports from a published entry point".
  • Miss: the new INV24 says the merge gate "fails closed when it is missing", but CI uploads no API-changes artifact for spec-only, docsite-only or tooling-only pull requests, and spec:AST-030 FR5 bars running the package lanes they leave untouched, so please limit the artifact and the fail-closed read to pull requests that build a published package and say that the rest carry "New public API: none".
  • The branch conflicts with main in docs/architecture/public-component-api.md, where DEC-2 landed at the same place as the new DEC-3, so please rebase and keep DEC-2 with its Decider line above DEC-3, plus main's INV23 sentence and gap line.

The rebased head needs a fresh /approve-spec, and CI, including pnpm check:knowledge, runs once the conflict is gone. The earlier non-blocking inline suggestions still apply: an INV24 gap line for the committed-report fallback CI still runs, the per-row usage example INV24 promises, INV24's attribute list after DEC-2, and the build status in the edited list-windowing rows.

[Automated review]

Comment thread docs/contributing/pull-requests.md Resolved
Comment on lines +496 to +498
- INV24 gap: the review recipe's API delta has no fixture test yet, and no
repository test covers the merge gate's fail-closed read of the compare
artifact.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the removed gap line about comparing with the merge base's committed reports still describes this repository: .github/workflows/ci.yml:1884-1895 falls back to them, scripts/api-report/changes.mjs:289-291 still tells contributors to "Run pnpm api:report and commit the report", and scripts/pre-review.mjs:125 still prints the API report class. Consider an INV24 gap line naming that mismatch until the code change lands.

Comment thread docs/architecture/list-windowing.md Resolved
…eport

# Conflicts:
#	docs/architecture/public-component-api.md
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 43b2fe2

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 170151b

Storybook · Sandbox · built from this PR's head

Package size: no published package changed; no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 36 rows, core 36 rows; run pnpm api:report.

Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the direction is owner-approved at this head, but two record fixes are needed before it can merge.

  • architecture:knowledge-contracts INV28 still defines a public hook as "a hook that a package's committed API report lists", which the new INV24 ("No package commits a generated API report") leaves empty and contributing item e already redefines, so please amend INV28 in this pull request to "a hook that a published package exports from a published entry point".
  • The new INV24 and DEC-6 say the merge gate fails closed when the API-changes artifact is missing, but CI uploads none for spec-only, docsite-only or tooling-only pull requests, and spec:AST-030 FR5 bars running the package lanes they leave untouched, so please limit the artifact and the fail-closed read to pull requests that build a published package and say that the rest carry "New public API: none".
  • Miss: (non-blocking) contributing item a runs before review is requested but points to the review bot's summary notes, which exist only once review has started and are not posted on the pull request, while CI's pull-request report already lists the API changes.

The fixed head needs a fresh /approve-spec. The description's changed-claims list still names the new decision DEC-3, while the record adds it as DEC-6. The earlier non-blocking inline suggestions still apply.

[Automated review]

…eport

# Conflicts:
#	docs/architecture/list-windowing.md
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 90d4e80

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the direction is owner-approved at this head, but two record fixes are needed before it can merge.

  • architecture:knowledge-contracts INV28 still defines a public hook as "a hook that a package's committed API report lists", which the new INV24 ("No package commits a generated API report") leaves empty and contributing item e already redefines, so please amend INV28 in this pull request to "a hook that a published package exports from a published entry point".
  • The new INV24 and DEC-6 say the merge gate fails closed when the API-changes artifact is missing, but CI uploads none for spec-only, docsite-only or tooling-only pull requests (this one included), and spec:AST-030 FR5 bars running the package lanes they leave untouched, so please limit the artifact and the fail-closed read to pull requests that build a published package and say that the rest carry "New public API: none".

The fixed head needs a fresh /approve-spec. The description's changed-claims list still names the new decision DEC-3 while the record adds it as DEC-6, and the earlier non-blocking inline suggestions still apply.

[Automated review]

…ge a published package; INV28 reads public hooks from the built surface

CodeBunny review of #10950: INV28 defined a public hook through the committed API report that INV24 removes; INV24 and DEC-6 failed closed on a missing artifact that CI never uploads for spec, docs or tooling pull requests (spec:AST-030 FR5).
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 52f25f1

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the direction is owner-approved at this head, but two record fixes in docs/architecture/public-component-api.md are needed before it can merge.

  • INV24 and DEC-6 say a pull request that changes no published package "carries no artifact" because its package lanes do not run (spec:AST-030 FR5), but FR2 and FR5 send every shared-or-unknown change (workflows, shared configuration and docs/contributing files, this pull request included) to broad CI, which uploads the API-changes artifact, as CI did for this pull request, so please say in both places that the merge gate reads no artifact for such a pull request and that its review notes say "New public API: none".
  • The INV24 verification row still lists "the merge gate passes when the compare artifact is missing" as a failure for every pull request, so a spec-only pull request that correctly merges without an artifact fires it; please scope it to a pull request that changes a published package.

The fixed head needs a fresh /approve-spec from an engineering owner. The earlier non-blocking suggestions still apply, and the description's writing rubric results leave out R7.

[Automated review]

…ll requests that change a published package

CodeBunny review of #10950: broad CI can still upload the artifact for shared changes (spec:AST-030 FR2/FR5); what matters is that the gate reads none for a pull request that changes no published package. Scopes INV24's verification failure signal the same way.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 170151b

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 10, 2026

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet; its heavy jobs are deferred and run before merge.

INV24 and DEC-6 now say the merge gate reads the API-changes artifact only for a pull request that changes a published package's source or build, and the INV24 failure signal is scoped the same way, so both earlier requests are resolved. This is the bottom of its stack, so it waits on no other pull request; #10957 lands only once both are approved.

The earlier non-blocking suggestions on INV24 in docs/architecture/public-component-api.md still apply: event rows that CI's generator does not produce, the "usage example" per row, and data attributes outside data-astryx-*.

[Automated review]

@cixzhang
cixzhang merged commit 5eaeb40 into main Nov 10, 2026
105 of 108 checks passed
cixzhang added a commit that referenced this pull request Nov 11, 2026
… build (#10957)

* docs(records): pull requests carry an API delta instead of a committed API report

* Merge remote-tracking branch 'origin/main' into specs/api-delta-not-report

# Conflicts:
#	docs/architecture/public-component-api.md

* chore: remove the committed API reports; the API delta comes from the build

* ci: the docsite data tests read a built API surface, and require one in CI

* ci: the docsite hook coverage names the packages docsite-build skips, and fails on any other

* Merge remote-tracking branch 'origin/main' into specs/api-delta-not-report

# Conflicts:
#	docs/architecture/list-windowing.md

* Merge branch 'specs/api-delta-not-report' into chore/remove-api-reports

# Conflicts:
#	.github/workflows/ci.yml
#	package.json
#	packages/core/api-report.md
#	scripts/api-report/changes.mjs
#	scripts/api-report/cli.mjs

* docs(architecture): limit the API artifact to pull requests that change a published package; INV28 reads public hooks from the built surface

CodeBunny review of #10950: INV28 defined a public hook through the committed API report that INV24 removes; INV24 and DEC-6 failed closed on a missing artifact that CI never uploads for spec, docs or tooling pull requests (spec:AST-030 FR5).

* ci: a merge base without Main's API surface builds one, and a delta with no base surface says it was not compared

Without Main's API surface, a pull request that can change a published
package builds the merge base for its surface, even when Main kept its
component sizes (that record stays). When no surface exists, api-changes.json
names each published package whose inputs changed as unknown, never an empty
delta, and the report says the API changes were not compared.

* Merge remote-tracking branch 'origin/specs/api-delta-not-report' into chore/remove-api-reports

* docs(architecture): the merge gate reads the API artifact only for pull requests that change a published package

CodeBunny review of #10950: broad CI can still upload the artifact for shared changes (spec:AST-030 FR2/FR5); what matters is that the gate reads none for a pull request that changes no published package. Scopes INV24's verification failure signal the same way.

* Merge branch 'specs/api-delta-not-report' into chore/remove-api-reports

* Merge branch 'main' into chore/remove-api-reports

Resolves the one conflict by keeping the deletion of packages/core/api-report.md (main changed it in #10771; that change's API rows are in CI's generated delta).
@github-actions
github-actions Bot deleted the specs/api-delta-not-report branch November 11, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 170151be Deployed Nov 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant