Skip to content

fix(cli): preserve 0.6 docs compatibility - #6695

Merged
cixzhang merged 1 commit into
mainfrom
fix/v0.6.4-preserve-compatibility
Sep 28, 2026
Merged

cixzhang merged 1 commit into
mainfrom
fix/v0.6.4-preserve-compatibility

Conversation

@cixzhang

@cixzhang cixzhang commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Projects using the published @astryxdesign/[email protected] documentation authoring contracts can take the next release without source or runtime breakage:

  • exhaustive ReferenceContentBlock renderers keep the same six cases;
  • existing title-only sections continue to compile and receive deterministic index keys;
  • ambiguous legacy title queries keep returning the first match;
  • existing full-topic text output keeps its 0.6.x formatting;
  • new progressive-disclosure Doctor findings remain warnings.

Problem and solution fit

The pending docs-graph Changeset was classified as breaking because it widened an existing discriminated union and changed established section-key, lookup, output, and Doctor behavior. Those new capabilities can instead remain additive.

This change isolates graph-only blocks behind GraphContentBlock, preserves legacy runtime behavior, and keeps strict validation only for explicitly authored new section IDs.

Typed theme descriptors are not changed here. That surface is experimental and its existing patch Changeset remains authoritative.

Expected behavior and authority

The 0.6.3 tag defines the published ReferenceContentBlock, section lookup, error suggestion, and full-topic text contracts.

Smallest restoration

  • Keep ReferenceContentBlock at its six published members; expose workflow, collection, and reference separately as GraphContentBlock for NamespaceDoc.
  • Keep legacy title-substring lookup and title-shaped ERR_UNKNOWN_SECTION suggestions.
  • Assign deterministic suffixed or section-N keys to legacy sections that lack usable unique title keys.
  • Validate explicit new section IDs strictly.
  • Keep unknown stamped docs on the 0.6.x legacy shape-sniffing path.
  • Keep new progressive-doc checks warning-only.
  • Limit 120-column formatting to the additive --index path; preserve existing full-topic text.
  • Reclassify only the docs-graph Changeset from breaking/minor to feature/patch.

Evidence

  • Existing type and self-doc contract suites cover the separated stable and graph-only unions.
  • Existing regression suites cover duplicate and non-Latin legacy titles, explicit-ID failures, first-match lookup, extension merging, suggestion payloads, Doctor severity, unknown stamped docs, CLI text output, and self-doc/type drift.
  • The published 0.6 stacked docs list and two-line usage footer are restored; the text/JSON parity check documents the intentional omission of the newer package field.
  • A real Changesets plan resolves all ten stable packages to 0.6.4 patch.

Scope

  • One compatibility defect is restored.
  • Experimental typed-theme descriptor behavior is outside this PR.
  • The additive GraphContentBlock API is explicit and required to keep the existing union stable.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm check:repo
  • pnpm lint
  • pnpm build
  • pnpm exec tsc -p packages/cli/tsconfig.authoring-contract.json --noEmit
  • focused compiler, docs discovery, section lookup, Doctor, CLI, text/JSON parity, self-doc, type-contract, and golden-read suites: green
  • Changesets: 122 pending entries; all ten stable packages plan 0.6.4 patch

@vercel

vercel Bot commented Sep 28, 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 Sep 28, 2026 10:48pm UTC

Request Review

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

astracat-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
⏳ Queued (for maintainers only) Sep 28, 2026, 10:59 PM UTC

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

github-actions Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Previews ready: Storybook and Sandbox were built with this PR's docsite. CI evidence will be added when available.

View Storybook for this PR · View Sandbox for this PR

@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.

Thanks for isolating the new docs-graph and theme surfaces instead of widening the released ones. The restoration itself checks out: the stable content-block union, legacy topic lookup and error behavior, and the bounded catalog reader all match the published compatibility rules, and the focused compatibility suites and type check pass.

One change is needed before this can ship as the patch release it aims to be:

  • Pack verification rejects some valid 0.6.3 catalog packages. For an integration package whose version-1 theme catalog entry names a file such as index.ts (rather than a <name>Theme file), integration pack --check reports the themes root as containing no discoverable contribution files and returns not packable — even though discovery in the same run finds the theme, locally and in the packed tarball. The file inventory only recognises theme folders that hold a descriptor or a <name>Theme source, so a catalog-only folder counts as zero files. Enumerating the catalog's listed files (and the manifest) when a version-1 catalog is present at the root, with a regression test for a non-<name>Theme entry, would complete the restoration for these packages.

Everything else in the change is ready: once catalog packages of every released entry form pass pack verification, this is approvable as a patch release.

[Automated review]

@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.

Thanks for isolating the new docs-graph and theme surfaces instead of widening the released ones, and for fixing the pack-check gap from the last round — catalog packages with an entry such as index.ts now verify correctly, and the rest of the restoration (the stable content-block union, legacy topic lookup and error behavior, and the bounded catalog reader) still checks out against the focused suites and type check.

One narrower variant of that same gap remains:

  • Pack verification still rejects some valid 0.6.3 catalog packages. When a catalog theme's entry is a <name>Theme file (for example oceanTheme.ts) and its folder contains a file the catalog does not list — a draft or helper the package deliberately does not ship — pack-check requires that unlisted file to be in the tarball and returns not packable, even though discovery finds the theme both locally and in the packed tarball. For an index.ts entry the catalog's file list correctly governs (your new test covers that); for a <name>Theme entry the whole folder is also enumerated, so the outcome depends only on the entry's filename. Making the inventory use the manifest plus the catalog-listed files for any descriptor-less catalog theme, regardless of entry name, with a regression test for this shape, would complete the fix.

Everything else is ready: once catalog packages of every released entry form pass pack verification, this is approvable as a patch release.

[Automated review]

@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.

Thanks for isolating the new docs-graph and theme surfaces instead of widening the released ones, and for completing the pack-check fix from the last round.

The remaining variant is now covered: when a version-1 catalog theme's entry is a <name>Theme file and its folder contains a file the catalog does not list, pack verification now requires only the manifest and the catalog-listed files — a package whose tarball contains exactly those files passes, with regression tests at both the inventory and pack-check levels. Descriptor-owned folders still enumerate their whole directory, mixed roots still prefer descriptors, and an invalid catalog still surfaces its error through discovery rather than through the inventory.

The rest of the restoration still checks out: the stable six-member content-block union with the additive graph type beside it, the legacy topic lookup and error behavior, the bounded warning-only catalog reader with descriptor-only writers, and the two Changesets reclassified to patch. The focused compatibility suites, the authoring type check, and the Changeset check all pass.

This is ready to ship as the patch release it aims to be.

[Automated review]

github-actions Bot added a commit that referenced this pull request Sep 28, 2026
@cixzhang
cixzhang force-pushed the fix/v0.6.4-preserve-compatibility branch from a6a60ff to 6fd7e99 Compare September 28, 2026 17:45
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
@cixzhang
cixzhang force-pushed the fix/v0.6.4-preserve-compatibility branch from 6fd7e99 to 74c319c Compare September 28, 2026 21:38
@cixzhang cixzhang changed the title fix(release): preserve 0.6 compatibility for patch release fix(cli): preserve 0.6 docs compatibility Sep 28, 2026
@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Sep 28, 2026
@cixzhang
cixzhang force-pushed the fix/v0.6.4-preserve-compatibility branch from 74c319c to 27cd735 Compare September 28, 2026 21:41
github-actions Bot added a commit that referenced this pull request Sep 28, 2026
@cixzhang
cixzhang force-pushed the fix/v0.6.4-preserve-compatibility branch 2 times, most recently from 7f3010c to de6964a Compare September 28, 2026 22:25
@cixzhang
cixzhang force-pushed the fix/v0.6.4-preserve-compatibility branch from de6964a to eb59ab6 Compare September 28, 2026 22:37
@cixzhang
cixzhang force-pushed the fix/v0.6.4-preserve-compatibility branch from eb59ab6 to 1d3a550 Compare September 28, 2026 22:40
@cixzhang
cixzhang force-pushed the fix/v0.6.4-preserve-compatibility branch from 1d3a550 to 585c737 Compare September 28, 2026 22:43
@cixzhang
cixzhang enabled auto-merge (squash) September 28, 2026 22:55
@cixzhang
cixzhang merged commit 2bb99ed into main Sep 28, 2026
38 checks passed
josephfarina added a commit that referenced this pull request Sep 28, 2026
…emeTemplate export

One change on main after #6695: the docs tree for the CLI and integrations (AST-046), navigable reads with typed links (AST-047), integration templates that replace Core templates (AST-035, from #6265), and the themeTemplate export (from #6702). JSON keeps its 0.6 shapes; the CLI's text reads one level at a time.
josephfarina added a commit that referenced this pull request Sep 28, 2026
…emeTemplate export

One change on main after #6695: the docs tree for the CLI and integrations (AST-046), navigable reads with typed links (AST-047), integration templates that replace Core templates (AST-035, from #6265), and the themeTemplate export (from #6702). JSON keeps its 0.6 shapes; the CLI's text reads one level at a time.
@github-actions
github-actions Bot deleted the fix/v0.6.4-preserve-compatibility branch September 29, 2026 06:24

This branch was successfully deployed

1 active deployment
Preview — 585c7372 Deployed Sep 28, 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.

2 participants