Skip to content

chore(types): classify doc-api check scripts and wire check-examples (SD-673 Phase 2)#3452

Merged
caio-pizzol merged 5 commits into
mainfrom
caio-pizzol/SD-673-phase2-docapi-orphans
May 22, 2026
Merged

chore(types): classify doc-api check scripts and wire check-examples (SD-673 Phase 2)#3452
caio-pizzol merged 5 commits into
mainfrom
caio-pizzol/SD-673-phase2-docapi-orphans

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

Disposes the 6 doc-api check scripts that the Phase 0 audit flagged as not wired into CI. Reading packages/document-api/scripts/README.md reframes the picture: three of the six are intentionally documented as focused local-debug variants of check-contract-outputs (the per-PR superset). One was genuinely missing from the wired chain. Two are intended as per-PR gates but blocked by pre-existing drift on main.

Classification:

Bucket Scripts This PR
Per-PR (wired into docapi:check) check-contract-parity, check-contract-outputs, check-examples Newly wires check-examples
Focused / manual check-stable-schemas, check-agent-artifacts, check-generated-reference-docs No change. "Not in CI by design" framing made explicit in README. The broader check-contract-outputs (already wired) covers their failure modes; these stay as targeted local-debug entry points.
Per-PR intent, blocked by drift check-doc-coverage, check-overview-alignment Not permanently skipped. Blocked by known content drift on main; tracked in SD-3261 (5 missing operation README sections) and SD-3262 (missing overview disclaimers). Wire after the drift is fixed.

Net change:

  • docapi:check now runs 3 scripts (was 2): parity + outputs + examples
  • packages/document-api/scripts/README.md gains a "Which checks run where" section so the disposition is visible at the call site
  • No deletions. The 3 "focused" scripts stay as documented local-debug tools.

Stacks on #3450 (Phase 1). Together they make "is the public contract healthy?" → one CI-wired command per surface (check:public-contract for superdoc; docapi:check for doc-api).

Verified: pnpm run docapi:check → exit 0 (parity: 403 ops; outputs: 446 files; examples: 5 found).

…(SD-673 Phase 2)

Disposes the 6 doc-api check scripts that the Phase 0 audit flagged as
"orphan" (not wired into CI). Reading the existing
`packages/document-api/scripts/README.md` reframes the picture: three
of the six are intentionally documented as focused local-debug
variants of `check-contract-outputs` (the per-PR superset). One is
genuinely missing from the wired chain. Two are intended as per-PR
gates but blocked by pre-existing content drift on main.

Phase 2 makes the classification explicit:

- **Per-PR (wired into `docapi:check`)**: `check-contract-parity`,
  `check-contract-outputs`, **`check-examples`** (newly wired here;
  passes on main, low-cost, ensures workflow example headings stay
  documented in `src/README.md`).
- **Focused / manual**: `check-stable-schemas`, `check-agent-artifacts`,
  `check-generated-reference-docs`. Targeted local-debug variants of
  `check-contract-outputs`. Not wired into CI by design (the superset
  already covers their failure modes). Status was already in the
  scripts README; this PR makes the "not in CI by design" framing
  explicit.
- **Per-PR intent, blocked by drift**: `check-doc-coverage` (5 missing
  operation sections in `src/README.md`), `check-overview-alignment`
  (missing alpha + subject-to-change disclaimers in
  `apps/docs/document-api/overview.mdx`). Wire after the drift is
  fixed. Follow-ups: SD-3261, SD-3262.

Net change:

- `docapi:check` now runs 3 scripts (was 2): parity + outputs + examples.
- `packages/document-api/scripts/README.md` gains a "Which checks run
  where" section so the disposition is visible at the call site.
- No deletions; no script removals. The "focused" ones stay as
  documented local-debug tools.

Stacks on #3450 (Phase 1 CI wiring). After #3450 merges and this
lands, "is the doc-api contract healthy?" has exactly one CI-wired
command (`docapi:check`) covering parity + outputs + examples.

Verified: `pnpm run docapi:check` → exit 0 (parity: 403 ops; outputs:
446 files; examples: 5 found).
@caio-pizzol caio-pizzol requested a review from a team as a code owner May 22, 2026 17:39
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 22, 2026

SD-673

Base automatically changed from caio-pizzol/SD-673-phase1-check-public-contract-ci to main May 22, 2026 17:41
…imers (SD-3262)

`check-overview-alignment.ts` was failing on `main` because the
`apps/docs/document-api/available-operations.mdx` page was missing two
required disclaimers (the script checks for `/\balpha\b/i` and
`/subject to (?:breaking )?changes?/i`). SD-673 Phase 2 deferred this
to a follow-up because it was blocked by content drift.

Changes:

- Add a `<Warning>` block at the top of `available-operations.mdx`:
  "Status: alpha. The Document API surface is stabilizing but is
  still subject to breaking changes between minor versions. Pin a
  version when integrating, and review the changelog before
  upgrading." Honest customer-facing copy (not boilerplate to
  satisfy the script) and satisfies both required patterns.
- Wire `check-overview-alignment` into `docapi:check`. The chain is
  now: parity → outputs → examples → overview-alignment.
- Update `packages/document-api/scripts/README.md`: move
  `check-overview-alignment` from "blocked by drift" to "Per-PR
  (wired)". `check-doc-coverage` stays in the "blocked" bucket but
  the framing is now "blocked by design question" with a pointer to
  SD-3261 (rescoped after the original 5-op drift turned out to be
  348 ops; needs a docs-model decision before wiring).

Note on file path: the original SD-3262 description (and SD-673 Phase
0 audit) referred to `overview.mdx`. The script actually reads
`apps/docs/document-api/available-operations.mdx`; the constant
`OVERVIEW_PATH` in `lib/reference-docs-artifacts.ts` points there.
This PR edits the correct file.

Stacks on #3452 (SD-673 Phase 2). After both merge, `docapi:check`
gates 4 sub-checks; the only remaining orphan is `check-doc-coverage`
under SD-3261.

Verified: `pnpm run docapi:sync:check` → exit 0 (parity 403; outputs
446; examples 5; overview 404 member paths).
Removed alpha status warning from the Document API documentation.
…ew-disclaimers

docs(document-api): wire check-overview-alignment + add status disclaimers (SD-3262)
@caio-pizzol caio-pizzol merged commit 9e82d31 into main May 22, 2026
3 checks passed
@caio-pizzol caio-pizzol deleted the caio-pizzol/SD-673-phase2-docapi-orphans branch May 22, 2026 18:18
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in superdoc-cli v0.12.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in superdoc-sdk v1.11.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented May 22, 2026

🎉 This PR is included in @superdoc-dev/mcp v0.7.0

The release is available on GitHub release

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants