Skip to content

fix(core): make preset empty work without github.com and improve template download errors - #36508

Merged
FrozenPandaz merged 1 commit into
masterfrom
NXC-4687
Aug 5, 2026
Merged

fix(core): make preset empty work without github.com and improve template download errors#36508
FrozenPandaz merged 1 commit into
masterfrom
NXC-4687

Conversation

@jaysoo

@jaysoo jaysoo commented Jul 29, 2026

Copy link
Copy Markdown
Member

Current Behavior

--preset empty is coerced to the nrwl/empty-template GitHub download, and 23.1.0 template downloads hard-fail in sandboxed environments (npm-only egress) with an unhelpful NETWORK_ERROR.

Expected Behavior

--preset empty normalizes to the ts preset (nx new, npm registry only) and wins over --template, so appending it to a failed command escapes the download. Download errors are classified as blocked egress unless the response is a 404 (missing repo/branch), and the message/AI hints point to checking network/sandbox configuration or using --preset=empty. Also tightens the template slug check so nrwl/../other-org cannot escape the nrwl org. Note --preset empty and --template empty are different: the former is the npm-only escape hatch, the latter is shorthand for the nrwl/empty-template download.

Scope: this is the actionable-error option, chosen over auto-falling back from templates to presets (they generate different content). The non-interactive default (no --template/--preset) still requires github.com and now fails with guidance instead of silently switching output.

Related Issue(s)

NXC-4687

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit af5fe0c
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/6a7353f490b4570007a92fab
😎 Deploy Preview https://deploy-preview-36508--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for nx-dev ready!

Name Link
🔨 Latest commit af5fe0c
🔍 Latest deploy log https://app.netlify.com/projects/nx-dev/deploys/6a7353f42c831800082c4192
😎 Deploy Preview https://deploy-preview-36508--nx-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@nx-cloud

nx-cloud Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

View your CI Pipeline Execution ↗ for commit af5fe0c

Command Status Duration Result
nx affected --targets=lint,test,build,e2e,e2e-c... ✅ Succeeded 26m 48s View ↗
nx run-many -t check-imports check-lock-files c... ✅ Succeeded 5s View ↗
nx-cloud record -- pnpm nx-cloud conformance:check ✅ Succeeded 54s View ↗
nx build workspace-plugin ✅ Succeeded <1s View ↗
nx-cloud record -- nx sync:check ✅ Succeeded 17s View ↗
nx-cloud record -- nx format:check ✅ Succeeded 5s View ↗

☁️ Nx Cloud last updated this comment at 2026-08-05 15:48:31 UTC

@jaysoo jaysoo changed the title fix(core): fall back to preset generation when template download cannot reach github.com fix(core): make preset empty work without github.com and improve template download errors Jul 29, 2026
@jaysoo
jaysoo force-pushed the NXC-4687 branch 2 times, most recently from b7d1982 to 55e7129 Compare July 30, 2026 12:26
@jaysoo
jaysoo marked this pull request as ready for review July 30, 2026 12:43
@jaysoo
jaysoo requested a review from a team as a code owner July 30, 2026 12:43
@jaysoo
jaysoo force-pushed the NXC-4687 branch 3 times, most recently from dbc94ad to e821ff4 Compare August 5, 2026 13:03
…late download errors

## Current Behavior
--preset empty is coerced to the nrwl/empty-template github download. 23.1.0 template downloads hard-fail in sandboxed envs (npm-only egress) with an unhelpful NETWORK_ERROR (~90% of the 23.1.0 create-error spike, 88% AI agents).

## Expected Behavior
--preset empty normalizes to the ts preset (nx new, npm registry only) so it works where github.com is blocked. NETWORK_ERROR message and AI hints say github.com is unreachable, check network and sandbox configuration, or use --preset=empty and build on top.

## Related Issue(s)
Fixes NXC-4687
@FrozenPandaz
FrozenPandaz enabled auto-merge (squash) August 5, 2026 16:12
@FrozenPandaz
FrozenPandaz merged commit 4a63dc8 into master Aug 5, 2026
25 checks passed
@FrozenPandaz
FrozenPandaz deleted the NXC-4687 branch August 5, 2026 16:12
FrozenPandaz pushed a commit that referenced this pull request Aug 5, 2026
## Current Behavior

The review-pr skill has no docs-specific checks. PRs touching astro-docs
content get only a thin editorial-direction note at trim time.

## Expected Behavior

A new read-only docs-reviewer agent runs when the diff touches
astro-docs content and checks the changed pages against
astro-docs/STYLE_GUIDE.md and the CLAUDE.md docs instructions, plus
structural hazards (redirects for moved pages, sidebar-label-coupled
routes, Markdoc validity). Its verdicts feed the review verdict like the
other analyzers.


## Example

I used `/review-pr` skill on #36508.

Here's what was returned in the review when I asked:

```
/btw was docs-reviewer agent used, why or why not. if so, what was surfaced?

    Yes, docs-reviewer was dispatched — as part of the full 10-agent fleet, not conditionally.

    Why it ran: the skill treats docs-reviewer as an always-run agent, on two grounds. Its coverage question ("does this change leave prose docs stale or missing?") applies to every diff, since a code change can invalidate prose without touching a docs file. And its compliance question applies here
    specifically because the diff does change docs content — 3 of the 10 changed files are under astro-docs/src/content/docs/ (kb/resolve-circular-dependencies.mdoc, reference/nx-json.mdoc, reference/environment-variables.mdoc). So both halves of its remit were live.

    Verdict: DOCS_CONCERN, EVIDENCE line 81, verified.

    What it surfaced:

    1. The finding that mattered most — it corrected my charter. I had asserted in pre-established measurement 6 that no redirect covered /docs/troubleshooting/resolve-circular-dependencies, making the new {% linkcard %} href a reader-facing 404. That was wrong: netlify.toml lives at
    astro-docs/netlify.toml, not the repo root, and my pre-dispatch grep targeted the wrong path. Lines 951-952 there already 301 that exact path to /docs/kb/resolve-circular-dependencies, pre-existing on base, well ahead of the /docs/* catch-all at 1117. I confirmed this directly afterward.

    1. It then kept the finding alive on a different, narrower basis: validate-links.ts compares rendered hrefs against the built sitemap with no redirect awareness, and astro-docs:test lists validate-links in dependsOn — so it breaks CI rather than readers. It explicitly rated this important rather
    than DOCS_BROKEN for that reason, which was the right call. code-reviewer independently reached the same correction and conclusion.
    2. A style-guide violation Vale can't catch — the rewritten NX_IGNORE_CYCLES cell uses a semicolon; STYLE_GUIDE.md says use two sentences. No Vale rule covers semicolons, so it would have shipped.
    3. Coverage came back clean, with the sweep shown — it checked kb/enforce-module-boundaries.mdoc, kb/incremental-builds.mdoc and concepts/* for prose the new flag might have staled, and found none, correctly reasoning that an off-by-default option changes no existing page's described behavior.
    4. Structural checks clean — no pages added/moved/renamed/deleted, so no redirects or sidebar.mts changes owed; Markdoc valid ({% cardgrid %}/{% linkcard %} nesting matches siblings, both new fences are ```jsonc with the // nx.json first-line comment rather than a title= attribute).
    5. Suggestions — cross-page duplication (the KB page restates the reference section near-verbatim, same code block included), the "derived command graph / task graph" point repeated three times in twelve lines, the new anchor having no inbound link, and the new config flag being positioned above
    the actual remediation steps on a page whose job is fixing cycles.

    One boundary worth noting: editorial direction (whether docs recommend something the team shouldn't encourage) is deliberately not this agent's call — that stays with the orchestrator at trim time. Nothing in this diff triggered it.
```

## Related Issue(s)

Fixes NXC-4728

<!-- polygraph-session-start -->
---
<p><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.ops.cloud.nx.app/polygraph/session-logo-v4-dark.svg"><img
src="https://static.ops.cloud.nx.app/polygraph/session-logo-v4-light.svg"
width="16" height="22" align="middle" alt="Polygraph"></picture> <a
href="https://snapshot.app.trypolygraph.com/orgs/69cdc268b6aa527e4129c2b4/sessions/humble-beaver-3540ffdd">View
session ↗</a></p>
<!-- polygraph-session-end -->
polygraph-snapshot-app Bot pushed a commit that referenced this pull request Aug 11, 2026
…late download errors (#36508)

## Current Behavior

`--preset empty` is coerced to the `nrwl/empty-template` GitHub
download, and 23.1.0 template downloads hard-fail in sandboxed
environments (npm-only egress) with an unhelpful NETWORK_ERROR.

## Expected Behavior

`--preset empty` normalizes to the `ts` preset (`nx new`, npm registry
only) and wins over `--template`, so appending it to a failed command
escapes the download. Download errors are classified as blocked egress
unless the response is a 404 (missing repo/branch), and the message/AI
hints point to checking network/sandbox configuration or using
`--preset=empty`. Also tightens the template slug check so
`nrwl/../other-org` cannot escape the nrwl org. Note `--preset empty`
and `--template empty` are different: the former is the npm-only escape
hatch, the latter is shorthand for the `nrwl/empty-template` download.

Scope: this is the actionable-error option, chosen over auto-falling
back from templates to presets (they generate different content). The
non-interactive default (no `--template`/`--preset`) still requires
github.com and now fails with guidance instead of silently switching
output.

## Related Issue(s)

NXC-4687
polygraph-snapshot-app Bot pushed a commit that referenced this pull request Aug 11, 2026
## Current Behavior

The review-pr skill has no docs-specific checks. PRs touching astro-docs
content get only a thin editorial-direction note at trim time.

## Expected Behavior

A new read-only docs-reviewer agent runs when the diff touches
astro-docs content and checks the changed pages against
astro-docs/STYLE_GUIDE.md and the CLAUDE.md docs instructions, plus
structural hazards (redirects for moved pages, sidebar-label-coupled
routes, Markdoc validity). Its verdicts feed the review verdict like the
other analyzers.


## Example

I used `/review-pr` skill on #36508.

Here's what was returned in the review when I asked:

```
/btw was docs-reviewer agent used, why or why not. if so, what was surfaced?

    Yes, docs-reviewer was dispatched — as part of the full 10-agent fleet, not conditionally.

    Why it ran: the skill treats docs-reviewer as an always-run agent, on two grounds. Its coverage question ("does this change leave prose docs stale or missing?") applies to every diff, since a code change can invalidate prose without touching a docs file. And its compliance question applies here
    specifically because the diff does change docs content — 3 of the 10 changed files are under astro-docs/src/content/docs/ (kb/resolve-circular-dependencies.mdoc, reference/nx-json.mdoc, reference/environment-variables.mdoc). So both halves of its remit were live.

    Verdict: DOCS_CONCERN, EVIDENCE line 81, verified.

    What it surfaced:

    1. The finding that mattered most — it corrected my charter. I had asserted in pre-established measurement 6 that no redirect covered /docs/troubleshooting/resolve-circular-dependencies, making the new {% linkcard %} href a reader-facing 404. That was wrong: netlify.toml lives at
    astro-docs/netlify.toml, not the repo root, and my pre-dispatch grep targeted the wrong path. Lines 951-952 there already 301 that exact path to /docs/kb/resolve-circular-dependencies, pre-existing on base, well ahead of the /docs/* catch-all at 1117. I confirmed this directly afterward.

    1. It then kept the finding alive on a different, narrower basis: validate-links.ts compares rendered hrefs against the built sitemap with no redirect awareness, and astro-docs:test lists validate-links in dependsOn — so it breaks CI rather than readers. It explicitly rated this important rather
    than DOCS_BROKEN for that reason, which was the right call. code-reviewer independently reached the same correction and conclusion.
    2. A style-guide violation Vale can't catch — the rewritten NX_IGNORE_CYCLES cell uses a semicolon; STYLE_GUIDE.md says use two sentences. No Vale rule covers semicolons, so it would have shipped.
    3. Coverage came back clean, with the sweep shown — it checked kb/enforce-module-boundaries.mdoc, kb/incremental-builds.mdoc and concepts/* for prose the new flag might have staled, and found none, correctly reasoning that an off-by-default option changes no existing page's described behavior.
    4. Structural checks clean — no pages added/moved/renamed/deleted, so no redirects or sidebar.mts changes owed; Markdoc valid ({% cardgrid %}/{% linkcard %} nesting matches siblings, both new fences are ```jsonc with the // nx.json first-line comment rather than a title= attribute).
    5. Suggestions — cross-page duplication (the KB page restates the reference section near-verbatim, same code block included), the "derived command graph / task graph" point repeated three times in twelve lines, the new anchor having no inbound link, and the new config flag being positioned above
    the actual remediation steps on a page whose job is fixing cycles.

    One boundary worth noting: editorial direction (whether docs recommend something the team shouldn't encourage) is deliberately not this agent's call — that stays with the orchestrator at trim time. Nothing in this diff triggered it.
```

## Related Issue(s)

Fixes NXC-4728

<!-- polygraph-session-start -->
---
<p><picture><source media="(prefers-color-scheme: dark)"
srcset="https://static.ops.cloud.nx.app/polygraph/session-logo-v4-dark.svg"><img
src="https://static.ops.cloud.nx.app/polygraph/session-logo-v4-light.svg"
width="16" height="22" align="middle" alt="Polygraph"></picture> <a
href="https://snapshot.app.trypolygraph.com/orgs/69cdc268b6aa527e4129c2b4/sessions/humble-beaver-3540ffdd">View
session ↗</a></p>
<!-- polygraph-session-end -->
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