Repository navigation
fix(cli): align layout deprecation (DEP-0006) with the envelope schema and precedent - #7175
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size SummaryNo component packages changed. Accessibility AuditStatus: No accessibility violations detected. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
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]
2d6a784 to
3208704
Compare
There was a problem hiding this comment.
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]
3208704 to
fd21588
Compare
There was a problem hiding this comment.
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]
02be1a5 to
dae2881
Compare
There was a problem hiding this comment.
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]
dae2881 to
fbcd368
Compare
There was a problem hiding this comment.
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]
There was a problem hiding this comment.
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)
fbcd368 to
7af0d49
Compare
There was a problem hiding this comment.
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]
|
/approve-spec 7af0d49 |
…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)
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
JSON shape (
layout.mjs):meta.deprecations: [{id, replacements}]instead ofmeta.deprecation: {id, cleanup, replacement}. Matches theresponse.doc.mjsschema ("Adeprecationsfield is an array of{id, replacements}entries") and the DEP-0005 precedent intheme add.Help/manifest label (
define-command.mjs): thedeprecatedCommandDoc field now renders in--helpandastryx manifest --jsonas[DEPRECATED: ...]appended to the command description. The layout command descriptions change (intentionally); every non-layout command is unchanged.API exports (
expand.mjs,check.mjs,grammar.mjs):@deprecatedJSDoc on the leaf function declarations so it survives into the generated.d.mtstypes (verified). Barrel re-export tags were dropped by tsc declaration emit, so the tags are on the leaves instead.DEP-0006 record (
AST-042 spec): addeddirect authorityfield (FR28), expandedsurfaceto include the programmatic API exports, updatedwarningto describe the array shape.Tests (
layout.deprecation-lifecycle.test.mjs): 6 tests pinning themeta.deprecationsJSON 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
datashape,typediscriminator — identical to published 0.6.6astryx layoutcommand group (DEP-0006) #7136), response types identicalTests
.d.mtsfor all 3 layout functionsWriting rubric results