Skip to content

fix(cli): align layout deprecation (DEP-0006) with the envelope schema and precedent - #7175

Merged
josephfarina merged 1 commit into
mainfrom
fix-layout-deprecation-shape
Oct 8, 2026
Merged

josephfarina merged 1 commit into
mainfrom
fix-layout-deprecation-shape

Conversation

@josephfarina

@josephfarina josephfarina commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fix-forward for the layout deprecation (DEP-0006, merged in #7136). Aligns the implementation with the documented envelope schema, the DEP-0005 theme add precedent, and AST-017 FR28/FR29a/FR29d/FR31.

Changes

  1. JSON shape (layout.mjs): meta.deprecations: [{id, replacements}] instead of meta.deprecation: {id, cleanup, replacement}. Matches the response.doc.mjs schema ("A deprecations field is an array of {id, replacements} entries") and the DEP-0005 precedent in theme add.

  2. Help/manifest label (define-command.mjs): the deprecated CommandDoc field now renders in --help and astryx manifest --json as [DEPRECATED: ...] appended to the command description. The layout command descriptions change (intentionally); every non-layout command is unchanged.

  3. API exports (expand.mjs, check.mjs, grammar.mjs): @deprecated JSDoc on the leaf function declarations so it survives into the generated .d.mts types (verified). Barrel re-export tags were dropped by tsc declaration emit, so the tags are on the leaves instead.

  4. DEP-0006 record (AST-042 spec): added direct authority field (FR28), expanded surface to include the programmatic API exports, updated warning to describe the array shape.

  5. Tests (layout.deprecation-lifecycle.test.mjs): 6 tests pinning the meta.deprecations JSON envelope on all 3 subcommands, the human stderr warning, its suppression in JSON mode, and the help [DEPRECATED] label. Matches the DEP-0005 test precedent.

What is unchanged

  • Canonical stdout, exit codes, data shape, type discriminator — identical to published 0.6.6
  • Every non-layout command's manifest, help, docs index — unchanged
  • Manifest comparison vs main: zero commands differ (the layout description already carries the deprecated label from the merged feat(cli): deprecate the astryx layout command group (DEP-0006) #7136), response types identical

Tests

  • Full CLI suite: 6,098 passed (385 files, 2 expected fail)
  • check:changesets ✓ (patch mode, 33 changesets, published 0.6.6)
  • check:knowledge ✓, typecheck:strict ✓, cli-api-types-verify ✓, readme:check ✓, lint ✓
  • @deprecated verified in generated .d.mts for all 3 layout functions

Writing rubric results

  • R1: present tense
  • R2: no research in the record
  • R3: evidence names facts (spec refs, API names), not PRs
  • R4: n/a (no DECs)
  • R5: no PR/issue refs in the record
  • R6: no open questions

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 8, 2026
@vercel

vercel Bot commented Oct 8, 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 Oct 8, 2026 8:51pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 8, 2026, 8:55 PM UTC

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

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | 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.

Thanks for the quick fix-forward. The envelope alignment checks out: JSON output now uses the documented meta.deprecations array, help and the manifest label the layout group as deprecated, and the DEP-0006 record names its direct authority — with command data, exit codes, and non-layout output unchanged.

One part needs a follow-up before this ships: the @deprecated tags for layoutExpand, layoutCheck, and layoutGrammar are placed on the barrel re-exports, and they don't survive TypeScript declaration generation. Generating the published API types produces bare re-export lines with no deprecation marking, so TypeScript consumers won't see an authoring-time warning. Moving the tags onto the three leaf function declarations (where their return types already live) and verifying the emitted declarations would fix it. It would also help to pin the new envelope entry and the help/manifest label with tests, the way the DEP-0005 precedent does — that coverage would have caught the declaration drop.

Minor note: the description says the manifest comparison showed zero differing commands, but the layout entry does (intendedly) change — worth correcting that line to command set / non-layout unchanged.

[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 the fix-forward — most of this now checks out end to end. All three subcommands emit meta.deprecations: [{id: 'DEP-0006', replacements: ['build', 'template', 'docs layout']}] with data and exit codes unchanged, help and the manifest label only the layout group, the generated declarations now mark layoutExpand, layoutCheck, and layoutGrammar, and the new lifecycle tests pin the envelope, the stderr warning, and the help label.

One required surface is still unlabeled: explicit lookup. The reference pages for the layout group and subcommands and for the three API functions — including the command page search "layout expand" returns first — show no deprecation id and no replacements, and the response-type reference documents the meta.deprecations entry for the DEP-0005 precedent but not for the layout types. The lifecycle rules ask for help and explicit lookup to label a deprecated command, and for explicit reference to stay visibly labeled with the replacement; today an agent that reads the reference before running anything is taught layout with copyable examples and no warning. Carrying the same label into those lookup pages and response-type entries, with a test pinning it next to the new lifecycle tests, would complete the alignment.

Two wording notes while you're in there: the singular envelope shape never shipped (the original deprecation changeset is still pending), so the new changeset's "instead of" comparison will read oddly when both publish together — folding the final shape into the original changeset would keep the release notes accurate; and the API barrel still has an empty comment block left over from moving the marking to the leaf functions.

[Automated review]

@josephfarina
josephfarina force-pushed the fix-layout-deprecation-shape branch from 3208704 to fd21588 Compare October 8, 2026 19:45

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

Approving. Both earlier points are fixed. astryx docs cli/commands/layout, layout-expand, -check, -grammar and cli/api/functions/layout-expand, -check, -grammar now name DEP-0006 and the three replacements, a new test pins the command page, and the layout.* response types list meta.deprecations. The layout API functions return no meta, so their return types rightly stay unchanged. The release note no longer compares against a shape that never shipped. JSON data, exit codes and stdout still match 0.6.6.

Non-blocking: on the three function pages the notice is spliced into the middle of the description, so it reads “…a compressed XLE/XLO Deprecated (DEP-0006). … in a future minor release.expression, then…”. Moving it to the end of each description fixes that.

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

Approving again at this head. Against the approved fd21588, the PR's own change differs only in three ways: the regenerated README response-types table now lists meta.deprecations (the README check passes; it failed at fd21588), an empty doc comment in the API index is gone, and the lifecycle test now covers all seven reference pages and the response types. The CLI output is the same as at fd21588: every reference page names DEP-0006, JSON data and exit codes match 0.6.6, and all three subcommands carry meta.deprecations.

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

Approving again at this head. Against the approved dae2881 the PR commit differs in one file only: the lifecycle test now parses the response-types enum table and checks that each layout.* row names DEP-0006 and its replacements. The lifecycle test file passes 14/14 on this head and fails on base (12/14) where the rows carry no DEP-0006. Changeset, spec, docs and runtime source are byte-identical, so the CLI output verified at dae2881 stands.

[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 the continued fix-forward — nearly all of this now checks out end to end. The JSON envelope uses the documented meta.deprecations array with data and exit behavior in their established shape, help and the manifest label only the layout group, the generated declarations mark layoutExpand, layoutCheck, and layoutGrammar, the command and response-type references name DEP-0006 and the replacements, the generated README is in sync, the record names its direct authority, and the expanded lifecycle tests pass.

One fix is still needed: on the three API function reference pages (layoutExpand(), layoutCheck(), layoutGrammar()), the deprecation notice is spliced into the middle of the opening sentence, so it reads "…a compressed XLE/XLO Deprecated (DEP-0006). … in a future minor release.expression, then…". Moving the notice to its own sentence at the end of each description (the command pages already phrase it cleanly) would fix the reference text, and strengthening the docs test beyond substring presence would keep it from regressing unnoticed.

[Automated review]

…a and precedent

1. JSON: meta.deprecations array matching DEP-0005 shape and response.doc.mjs
2. Help/manifest: render the CommandDoc deprecated field
3. API exports: @deprecated on layoutExpand/Check/Grammar (FR29a)
4. DEP-0006 record: direct authority field (FR28)

@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 the continued fix-forward — this now checks out end to end. The JSON envelope uses the documented meta.deprecations array with data and exit behavior in their established shape, help and the manifest label only the layout group, the generated declarations mark layoutExpand, layoutCheck, and layoutGrammar, the command, function, and response-type references name DEP-0006 and the replacements in clean prose, the generated README is in sync, the record names its direct authority, and the lifecycle tests pass.

Approving. Landing before the pending deprecation changeset publishes keeps the first released deprecation surface complete and readable on every surface.

[Automated review]

@josephfarina josephfarina reopened this Oct 8, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 7af0d49

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 8, 2026
@josephfarina josephfarina reopened this Oct 8, 2026
@josephfarina
josephfarina merged commit 0e97faa into main Oct 8, 2026
100 of 109 checks passed
josephfarina added a commit that referenced this pull request Oct 8, 2026
…roject lacks (#7183)

* [fix] template and build tell you what the template needs that your project lacks

When astryx template scaffolds a file that imports packages the project
does not have (heroicons, recharts, lucide-react, etc.), the receipt now
includes a ready-to-run install command with version ranges from the CLI
workspace. astryx build shows the same notes on its start template.

When the template uses StyleX and the project has no compiler plugin, the
receipt warns and points to astryx docs styling-overview. The agent-docs
block stops saying "do not use xstyle" flat-out and acknowledges that
some templates need it.

detectStylingSystem now covers @stylexjs/rollup-plugin, webpack-plugin,
and nextjs-plugin alongside the existing entries.

* address review: document new fields for consumers, exclude Node builtins

- Name notes, missingPackages, installCommand (and BuildStart notes)
  in response-types.doc.mjs, template.doc.mjs, build.doc.mjs.
- Exclude node: prefixed imports and builtinModules from the package
  scanner, with tests for both and for subpath-to-root mapping.
- Regenerate README tables.

* regenerate README on merged tree (includes #7175 layout deprecation)
@github-actions
github-actions Bot deleted the fix-layout-deprecation-shape branch October 9, 2026 06:25

This branch was successfully deployed

1 active deployment
Preview — 7af0d49d Deployed Oct 8, 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