Skip to content

refactor(ape): delegate fbuild loader to running-process - #1638

Draft
zackees wants to merge 2 commits into
feat/ape-host-toolsfrom
feat/ape-core-delegation
Draft

zackees wants to merge 2 commits into
feat/ape-host-toolsfrom
feat/ape-core-delegation

Conversation

@zackees

@zackees zackees commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

fbuild currently owns an APE loader and gives embedded zccache a shell shim. Delegate detection and launch planning to running-process 4.10.16, and pin zccache to the validated commit from forge-ci/zccache#1887 (merged), which uses kernal-api 0.1.26. Embedded compiles now receive the original compiler path.

The adapter preserves FBUILD_APE_LOADER, FBUILD_APE_CACHE_DIR, FBCACHE_DIR, FBUILD_CACHE_DIR and the registered application cache, including fallback order. Spawn helpers share the canonical fork lock without recursively acquiring it. Package lookup, executable permission repair and owner-thread containment from #1633 remain intact.

This is stacked on #1633 so its newer work remains in the ancestry and this PR shows only the migration.

Validation: workspace tests, workspace clippy with warnings denied, all workspace Dylints, platform-boundary checks and the single-reviewer clud-review passed. All nine adapter tests passed, including hostile environments, registered-cache fallback and 48 concurrent first launches. Both real cosmocc compiler integration tests passed with the final dependency pin, including embedded zccache cold miss/warm hit.

The six unreferenced old loader files have now been removed safely in an isolated local worktree (0841f49a); the cleanup has passed review and all nine adapter tests. These resumed commits are not pushed yet. Final validation and ci-full remain required for this platform-sensitive migration.

The first full CI run on 562a07fee23c788c06f8d1cf4edcce753460262c passed every job except Windows: https://github.com/FastLED/fbuild/actions/runs/37146132601. It exposed relative executable resolution against the parent cwd in the hostile-environment fixture.

Commit 6ff4f9074b441d3d7d922b126213a841119ffb86 resolves explicit relative paths against the requested child cwd, preserving OS symlink traversal and bare-name search. All 330 fbuild-core tests pass locally, including the unchanged hostile fixture and a real symlink regression; clippy, targeted Dylint and review pass. Windows validation on the corrected candidate: https://github.com/FastLED/fbuild/actions/runs/37148075175.

Resumed integration checkpoint (2026-10-22; local commits pending push)

The parent #1633 conflicts with current main and its old local gate failed. The final migration branch now integrates current main, retaining the parent's universal package/tool discovery and executable-permission support together with the running-process delegation. Once final review and gates pass, this draft can target main with the complete migration; #1633 can be superseded after that lands.

  • Removed six unreachable legacy loader implementations (697 lines), preserving the public adapter and its tests.
  • Resolved main's esptool test-file move while retaining find_binary_accepts_a_nested_ape_com in the current test module.
  • Regenerated and checked the enforced platform-boundary inventory after removing the old implementation.
  • All ten APE adapter tests pass on the integrated-main candidate (latest run: 1.12 seconds).
  • Updated the local verifier to qualified workflow identities with the merged shared verifier pin; existing step requirements remain.
  • Full combined-diff review and the moved esptool regression pass.
  • A new RED regression reproduced the embedded compiler losing the registered cache fallback when the preferred cache path was unusable. The fix resolves the loader through the complete fallback chain before translating it into the embedded compiler environment.
  • Both real cosmocc 4.0.2 integration tests pass. The embedded-only test also passes independently, proving a cold miss followed by a warm hit with a hostile PATH and an unusable preferred loader-cache path. On loader hosts it inspects the actual executable loader produced in the registered cache, without invoking the planner during verification.
  • Added the reviewed complete-history checkout fix required by the source-bound gate verifier.
  • Current local checkpoint: 2c9b6353. The mandatory full gate is queued behind the existing fbuild clone gate. These resumed commits are not pushed; no final-head hosted or native-platform success is claimed.

@zackees zackees added the ci-full Run the complete release-equivalent CI matrix on this PR SHA label Oct 3, 2026
@coderabbitai

coderabbitai Bot commented Oct 3, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@fastled-project-sync fastled-project-sync Bot moved this to Triage in FastLED Tracker Oct 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-full Run the complete release-equivalent CI matrix on this PR SHA

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

1 participant