Repository navigation
fix(ci): stop caching hand-written docs as build outputs j:KIT-6381 - #8708
Conversation
The root build task excluded **/*.md from its inputs but listed docs/** in its outputs. A docs-only change kept the build hash, so a cache hit restored main's docs/ over the edited files, and the build-missing job committed the revert as "Add generated files". No package's build task writes to docs/; generated docs come from build:typedoc, quantic's build:doc and relay's lib/docs, which declare their own outputs. Remove docs/** from the root build outputs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
@coveo/atomic
@coveo/atomic-hosted-page
@coveo/atomic-legacy
@coveo/atomic-react
@coveo/auth
@coveo/bueno
coveo.analytics
@coveo/create-atomic
@coveo/create-atomic-component
@coveo/create-atomic-component-project
@coveo/create-atomic-result-component
@coveo/create-atomic-rollup-plugin
@coveo/create-ui
@coveo/headless
@coveo/headless-react
@coveo/quantic
@coveo/relay
@coveo/shopify
@coveo/thermidor
@coveo/atomic-angular
commit: |
|
Tip All tests passed and all changes approved!🟢 UI Tests: 439 tests unchanged |
There was a problem hiding this comment.
🟢 Approval recommended
The narrow configuration change addresses documentation overwrites while preserving dedicated documentation-task caching.
0 open findings
What changed in this PR
Prevents build-cache restores from overwriting hand-written documentation, addressing the CI revert reported in #8706.
Changes:
- Removes
docs/**from rootbuildoutputs. - Leaves dedicated documentation-generation task outputs unchanged.
| File | Description |
|---|---|
turbo.json |
Stops caching hand-written docs as build outputs. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
https://coveord.atlassian.net/browse/KIT-6381
Motivation
On a docs-only PR, CI reverted the edited docs and committed the revert as "Add generated files". Seen on #8706 for
packages/thermidor/docs/architecture.md.Root Cause
The root
buildtask excludes**/*.mdfrom itsinputsbut listeddocs/**in itsoutputs. A docs-only change keeps the build hash equal tomain's, so CI gets a cache hit, Turbo restoresmain's cacheddocs/over the edited files, and thebuild-missingjob (git add .) commits the result. The same restore also overwrites uncommitted docs edits locally.Changes
docs/**from the rootbuildoutputs.No package's
buildtask writes todocs/, which only holds hand-written docs (ADRs, thermidor docs). Generated docs come from tasks that declare their own outputs and are unaffected:build:typedoc(docs/**,!docs/adr/**, used by the CD typedoc sites), quanticbuild:doc(docs/out/**), and relay's typedoc JSON (lib/docs/, underlib/**).Outputs should only cover files a task generates; a glob that overlaps tracked sources lets a cache restore overwrite them.
Validation
turbo run build build:typedoc build:doc --dry=jsonon thermidor, headless, auth, relay, atomic and quantic:buildoutputs no longer includedocs/**; the docs-generating tasks keep theirs.@coveo/thermidor(--cache=local:rw): build, append a line todocs/architecture.md, build again. Withmain'sturbo.jsonthe cache hit wipes the line; with this change the cache hit keeps it.oxfmt --checkpasses;generate:turbo-lint-inputsproduces no diff.Expect a one-time miss on
buildcaches, since the task's outputs are part of its hash.Checklist
fix(<scope>): <description>)pnpm changeset) if modifying public package source code (not applicable: Turbo config only)