Skip to content

turbo type-check / build declare no inputs, so a content-only change replays a cached green locally #81

Description

@os-zhuang

Observation from #78, filed rather than fixed — it is a local-verification hazard, not a defect in the shipped site, and the fix is a judgement call about turbo config rather than a mechanical edit.

What happened

First verification run on a branch that changed 19 files under content/docs/:

$ pnpm turbo run type-check --continue
• Remote caching disabled, using shared worktree cache
@objectos/docs:type-check: cache hit, replaying logs 6eb08f6bec2cc211
@objectos/docs:type-check: > @objectos/docs@0.0.0 type-check /home/user/objectos-issue-61/apps/docs
Tasks: 1 successful, 1 total
Time: 55ms >>> FULL TURBO

Note the path: the replayed logs are from objectos-issue-61, a different agent's worktree. Zero of this branch's content changes were checked, and the run reports success in 55ms. Re-running with --force executed for real (15.6s) and also passed — so in this instance the green was true, but it was true by luck, not by measurement.

Why

turbo.json declares no inputs for either task:

"build": { "dependsOn": ["^build"], "outputs": ["dist/**", ".next/**", "!.next/cache/**"] },
"type-check": { "dependsOn": ["^build"] }

With no inputs, turbo's default hash covers the package's own directoryapps/docs/** — plus lockfile and root config. content/docs/** sits at the repo root, outside the package, so editing it does not move the hash. apps/docs/type-check runs fumadocs-mdx && next typegen && tsc --noEmit, and build renders every MDX page to static HTML, so both genuinely consume that content; the hash simply does not say so.

build is the more consequential of the two: it is the step that would catch a page that no longer renders.

Scope — this is a local hazard, not a CI defect

On GitHub Actions each job is a fresh checkout with no populated turbo cache and remote caching disabled, so CI runs both tasks cold every time. Nothing currently ships wrong. The exposure is:

  • an agent or developer verifying a content change locally reads a cached green and believes the pages were rendered;
  • the cache is shared across worktrees in this container, so the stale entry can come from a sibling agent's tree, which makes the false green harder to spot than a self-inflicted one.

Suggested fix

Declare the real inputs so the hash tells the truth in both directions:

"build": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", "../../content/docs/**"], "outputs": [...] },
"type-check": { "dependsOn": ["^build"], "inputs": ["$TURBO_DEFAULT$", "../../content/docs/**"] }

(Exact glob wants checking against turbo's root-relative semantics — globalDependencies at the root may be the better lever, since content/docs/ is not owned by apps/docs.)

Worth deciding at the same time whether the repo wants a documented --force convention for content-only verification, as a belt-and-braces measure for anyone on an older turbo.

Not urgent, and not blocking anything today. Filed so the next person who sees FULL TURBO on a content PR knows it is expected and knows what it does not prove.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions