Skip to content

install-deps: isolate failures so one bad dep never blocks the rest - #170

Merged
JPDuchesne merged 1 commit into
mainfrom
install-deps-failure-isolation
Sep 16, 2026
Merged

JPDuchesne merged 1 commit into
mainfrom
install-deps-failure-isolation

Conversation

@JPDuchesne

Copy link
Copy Markdown
Contributor

One integration failing aborted the whole install-deps run — during d3mlabs/plans#36 leg-2 validation, the brew wwise-cli failure (Homebrew unwritable by ai-agent) aborted the Installer's bare-each dispatch, so the unrelated cmake integration never ran and googletest was never fetched. The same bare-each pattern lived inside brew/gh/cmake install_all.

The manifest declares no cross-integration edges, so the failure policy for the (degenerate) dependency DAG is attempt-all:

  • Integration#collect_failures isolates per-dep failures; brew, gh, cmake raise Integration::PartialInstallError after attempting every dep.
  • Preamble failures (brew tap registration) still fail the integration as one entry — every dep is predetermined to fail for the same root cause.
  • cmake only rewrites deps.cmake/deps.targets.cmake when every dep succeeded (stale-but-consistent, same philosophy as the install stamp).
  • Installer#dispatch rescues per integration and aggregates into InstallFailedError, entries ordered by wave (root causes before derivative failures). Raising preserves stamp semantics — no stamp on any failure — and the non-zero exit.

Test-first: the six new tests were written and confirmed failing before the fix (the installer test failed with exactly the incident shape: googletest never dispatched). Full suite green except the 4 pre-existing BuildContainerTest failures that also fail on clean main on this machine.

When real cross-integration edges appear, the build-wave partition generalizes to a topological sort and failure propagation follows the DAG — this design degrades into that without changing shape.

Made with Cursor

One integration failing aborted the whole install-deps run: the brew
wwise-cli failure (Homebrew unwritable by the agent user) aborted the
Installer's bare-each dispatch, so the unrelated cmake integration never
ran and googletest was never fetched. The same bare-each pattern lived
inside brew/gh/cmake install_all: the first failing dep aborted the rest.

The manifest declares no cross-integration edges, so the failure policy
for the (degenerate) dependency DAG is attempt-all:

- Integration#collect_failures isolates per-dep failures; brew, gh and
  cmake raise Integration::PartialInstallError after attempting all deps.
- Preamble failures (brew tap registration) still fail the integration
  as one entry — every dep is predetermined to fail for that root cause.
- cmake only rewrites deps.cmake/deps.targets.cmake when every dep
  succeeded: a file generated from a partial set would silently drop the
  failed deps' variables (stale-but-consistent, like the install stamp).
- Installer#dispatch rescues per integration and aggregates entries into
  InstallFailedError, ordered by wave (root causes before derivative
  failures). Raising keeps stamp semantics: no stamp on any failure.

Co-authored-by: Cursor <cursoragent@cursor.com>
@codecov

codecov Bot commented Sep 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@JPDuchesne
JPDuchesne merged commit aab06a0 into main Sep 16, 2026
5 checks passed
@JPDuchesne
JPDuchesne deleted the install-deps-failure-isolation branch September 16, 2026 15:39
JPDuchesne added a commit that referenced this pull request Sep 16, 2026
Agent-isolation and emulated-Mac fixes: install-deps failure isolation with typed errors (#170), brew escalation to the prefix owner + AgentBootstrap sudoers edge (#171), BuildKit secret files in a verified per-uid dir under the data root — colima-visible and substitution-proof (#173), build-watcher guest-load liveness signal + 15m stall window (#174), sigpending ulimit for Rosetta signal-queue aborts (#175), and brew trust before tap in docker-install-build-deps (tap-rot fix).
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