Skip to content

fix(build): order the docs-site build after every package build - #47

Merged
GQAdonis merged 1 commit into
mainfrom
fix/docs-site-build-order
Oct 8, 2026
Merged

GQAdonis merged 1 commit into
mainfrom
fix/docs-site-build-order

Conversation

@GQAdonis

@GQAdonis GQAdonis commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

pnpm run ci:build fails intermittently on a fresh clone with:

generate-api-reference FAIL (2 policy/artifact failures):
  - new undocumented stable export: createGraphStore (prometheus-entity-management)
  - new undocumented stable export: graphStore (prometheus-entity-management)

site/package.json declares none of the workspace packages as dependencies, so turbo's ^build gives the docs site no ordering against them. Its prebuild (scripts/generate-api-reference.mjs) runs TypeDoc, which resolves @prometheus-ags/entity-graph-core etc. through node_modules to their built dist/*.d.ts. When the prebuild starts before those packages have built, the re-exported symbols lose their doc comments and the policy check fails. A warm turbo cache hides it locally, which is why it went unnoticed; CI never reached this step because the Cargo fetch failed first (#45).

Fix: turbo.json gives @prometheus-ags/entity-graph-docs-site#build an explicit dependsOn on all 13 package builds. No lockfile or dependency changes.

Test plan

  • RED: rm -rf packages/*/dist && pnpm exec turbo run build --force on main reproduces the failure deterministically (prebuild at log line 11, entity-graph-core tsup at line 19).
  • GREEN: same command with this change: prebuild runs at line 483, after every package; generate-api-reference PASS; 22/22 tasks.
  • CI Build all workspaces step green once fix(ci): regenerate the Tauri fixture Cargo.lock (MSRV-aware) #45 lets CI reach it.

🤖 Generated with Claude Code

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T10:36:02.329761Z 2e9e8c6 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e9e8c6fab

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread turbo.json
Comment on lines +47 to +50
"outputs": [
"build/**",
".docusaurus/**"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Cache every generated docs artifact

On a clean checkout where this task is a cache hit, Turborepo restores only the declared outputs, but the prebuild also emits the ignored docs/api/npm/**, docs/api/index.mdx, docs/packages/*.mdx, and api-sidebar.generated.json files. Because none of those paths is listed here, the same successful build leaves these artifacts present on a cache miss and absent on a hit, so subsequent source-level documentation checks or consumers observe nondeterministic state. Include all generated paths in this task's outputs.

AGENTS.md reference: AGENTS.md:L355-L359

Useful? React with 👍 / 👎.

@GQAdonis
GQAdonis force-pushed the fix/docs-site-build-order branch 3 times, most recently from 184ae7c to 50369f5 Compare October 8, 2026 11:53
site/package.json declares no workspace package as a dependency, so turbo's
`^build` gave the docs site no ordering against the packages whose built
`dist` its prebuild (scripts/generate-api-reference.mjs) resolves through
node_modules. On a fresh clone the prebuild raced the package builds and
failed with "new undocumented stable export: createGraphStore / graphStore
(prometheus-entity-management)"; a warm turbo cache hid it locally.

Reproduced deterministically with `rm -rf packages/*/dist && turbo run build
--force` (prebuild started before entity-graph-core's tsup), then fixed by
giving `@prometheus-ags/entity-graph-docs-site#build` an explicit dependsOn
on all 13 package builds. The same forced build now runs the prebuild after
the packages and passes (22/22 tasks).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@GQAdonis
GQAdonis force-pushed the fix/docs-site-build-order branch from 50369f5 to ed9b0f0 Compare October 8, 2026 14:55
@GQAdonis
GQAdonis merged commit 629ab28 into main Oct 8, 2026
5 of 6 checks passed
@GQAdonis
GQAdonis deleted the fix/docs-site-build-order branch October 8, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant