Skip to content

fix(al): self-heal corrupt cached alc + chmod (unblock compile hang) - #4

Merged
SShadowS merged 7 commits into
mainfrom
fix/alc-cache-guard
Jun 22, 2026
Merged

fix(al): self-heal corrupt cached alc + chmod (unblock compile hang)#4
SShadowS merged 7 commits into
mainfrom
fix/alc-cache-guard

Conversation

@SShadowS

Copy link
Copy Markdown
Owner

Root cause of the WI-79397 coder "hang": a 252-byte self-execing shell wrapper had overwritten the real ELF alc on the shared do-pipeline-state volume and survived the version-marker cache skip → every compile looped forever (proven: 25s timeout vs real alc 1s).

Guard: fetch-al-extension.sh now re-extracts when bin/linux/alc is not a real ELF (even if the version marker matches) and chmod +x the compiler. Verified: a poisoned version-matched cache auto-re-extracts a clean ELF.

Also includes the design spec for the proper fix (CLI owns alc via the self-contained .Tools.Linux NuGet package, default prerelease channel) under docs/superpowers/specs/.

Live volume already repaired out-of-band; this makes the fix durable + ships on the next image build.

SShadowS added 5 commits June 22, 2026 20:02
A stale/garbage alc on the shared state volume (e.g. a 252-byte self-exec shell
wrapper) survived the version-marker cache skip and made every compile hang in
an infinite exec loop (root cause of the WI-79397 coder "hang"). fetch now:
- re-extracts when the cached bin/linux/alc is not a real ELF, even if the
  version marker matches (is_real_alc check);
- chmod +x the alc compiler after extraction (the VSIX ships it non-exec, which
  otherwise fails with EACCES posix_spawn).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses a production “compile hang” caused by a corrupted cached alc on the shared state volume by adding cache self-healing/permission fixes in the AL extension fetch script, and it adds a design + implementation plan to move long-term ownership of alc into the Continia CLI via NuGet.

Changes:

  • Add an ELF-magic guard in docker/fetch-al-extension.sh to force re-extraction when cached bin/linux/alc is corrupt, even if the .version marker matches.
  • Ensure extracted compiler binaries are executable (chmod +x) to avoid EACCES at runtime.
  • Add design/spec + implementation plan docs for migrating AL toolchain acquisition from VSIX scraping to NuGet-managed .Tools.Linux.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
docs/superpowers/specs/2026-06-22-al-toolchain-nuget-redesign-design.md New design spec describing moving alc ownership to CLI via NuGet.
docs/superpowers/plans/2026-06-22-al-toolchain-nuget-redesign.md New step-by-step implementation plan for the NuGet-based toolchain manager.
docker/fetch-al-extension.sh Adds cache validation/self-heal for corrupt alc and fixes executable permissions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docker/fetch-al-extension.sh Outdated
Comment thread docs/superpowers/specs/2026-06-22-al-toolchain-nuget-redesign-design.md Outdated
SShadowS and others added 2 commits June 22, 2026 20:17
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@SShadowS
SShadowS merged commit d44254e into main Jun 22, 2026
1 check passed
@SShadowS
SShadowS deleted the fix/alc-cache-guard branch June 22, 2026 18:19
SShadowS added a commit that referenced this pull request Jul 13, 2026
fix(al): self-heal corrupt cached alc + chmod (unblock compile hang)
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.

2 participants