A component can name the files its build reads elsewhere

Freshness compared the commits under a component's own cwd, which is
right about where its files are and wrong about what its build reads.
tdep-survey's two clients each source one shared scripts/android-sdk-env.sh:
a fix committed there changed what every build does, moved no component's
subtree head, rebuilt nothing, and left every card correctly reporting
"current" while answering a narrower question than the reader was asking.

alsoWatch names the rest. The paths join the component's own in the same
subtree-head and dirty comparisons -- git takes several pathspecs, so it
stays one call each -- and it is part of the acceptance gate like any
other declared field. Declared rather than inferred: which files a build
reads is not knowable from here, and both wrong guesses are expensive.

Raised by the tdep-survey session, which traced why its dioxus client
could never become stale on the serving host.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
irisandClaude Opus 5 committed 2026-09-01 11:11:07 -04:00
1 parent f00c3b970f
commit b67c70fa2f
7 files changed
+209 -18

No files matched your search

+30
View File
@@ -261,6 +261,36 @@ either against source, which is what makes it cheap and needs no knowledge
of what the build reads. The consequence is that it only means anything
once `olderThan` has itself been built at least once.
### Files a build reads from somewhere else
A component is considered out of date when the commits under its own
directory move past the ones it was built from — `cwd`, or the project
root for a component that names none. That is right about where a
component's *files* are and wrong about what its build *reads*: a project
whose clients each source one shared script, which locates their SDK and
their signing key, has a file that changes what every build does and moves
no component's directory. A commit to it rebuilds nothing, and every card
correctly reports "current" while answering a narrower question than you
were asking.
A component can name the rest of what it reads:
```ron
Apk(
name: "app",
cwd: "app-dioxus",
build: "./build-android-arm.sh",
alsoWatch: ["scripts"],
),
```
Those paths join its own in the same comparison — a commit touching any of
them is a commit to this component, and an uncommitted change in one makes
its freshness unknown, exactly as one in its own directory does. Declared
rather than worked out, because which files a build reads is not something
this server can know: guess too wide and every commit rebuilds everything,
too narrow and you are back to the silence above.
Paths are relative to `projectPath` (absolute ones are also accepted), and
`build` is argv, run without a shell — written either as a line you would
type or as explicit arguments; the string form splits on whitespace and