Conversation
A web-driven core update that failed part-way white-screened a panel: Composer, running as apache, could not delete a vendor file owned by another user and aborted mid-extract, leaving vendor/webtigers/tiger-core half-removed (functions.php gone) -> fatal on autoload -> every request 500. Tiger_Update_Composer::update() is now atomic and fails clean: - DEEP writability preflight: walk the whole vendor tree (is_writable only checked the top dir before) and abort BEFORE any change if the web user can't replace a nested dir, naming it + a fix command. Deletion needs write on the containing dir, so we test dirs. - Stage the target package ASIDE (rename to var/update-rollback-*) before Composer runs. This is the rollback point AND removes the failure mode: with the old dir gone, Composer does a clean fresh install with nothing to delete. - Restore-on-failure: if Composer errors, or "succeeds" but the package is missing/incomplete (tiger-core must have Version.php + functions.php), move the previous version back. A failed update never leaves the site broken. Version 1.15.1; CHANGELOG. 4 new unit tests for the deep preflight, the intact check, and restore (11 pass). Note: the full release-swap distribution model (pre-vendored bundle + symlink flip; never run Composer on a live box) remains the longer-term direction in TIGER-225; this hardens the in-place path meanwhile. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A web-driven core update that failed part-way white-screened a panel (host1, 2026-09-24): Composer, running as
apache, couldn't delete avendor/file owned by another user and aborted mid-extract, leavingvendor/webtigers/tiger-corehalf-removed (functions.phpgone) → fatal on autoload → every request 500.Root cause is tool-independent: the update mutated
vendor/in place with no rollback, and the preflight only checkedis_writable(vendor)(the top dir), missing a nested dir the web user didn't own.What
Tiger_Update_Composer::update()is now atomic and fails clean:var/update-rollback-*first. That's the rollback point, and it removes the failure mode (Composer does a clean fresh install with nothing to delete).Version.php+functions.php), the previous version is moved back. A failed update never breaks the site.Version → 1.15.1, CHANGELOG updated. 4 new unit tests (deep preflight, intact check, restore); 11 pass.
Follow-up
The full release-swap model (pre-vendored bundle + symlink flip; never run Composer on a live box) stays the longer-term direction in TIGER-225 — this hardens the in-place path meanwhile.
🤖 Generated with Claude Code
https://claude.ai/code/session_01ASauLLscjqdsNqBNsx2Typ