fix: SF predictor bootstrap cp --remove-destination — survive root-owned stale predictor.yaml (config#1034)#423
Merged
Conversation
…ned stale predictor.yaml (config#1034) The 2026-06-12 Friday shell run failed at PredictorTraining: an ad-hoc SSM edit on 06-07 (run as root, no sudo -u ec2-user) left alpha-engine-predictor/config/predictor.yaml root-owned on the always-on box, and 'sudo -u ec2-user cp' cannot open a root-owned 644 file for truncation even though ec2-user owns the directory. cp --remove-destination unlinks the target first (allowed via directory ownership) and recreates it owned by ec2-user, so a stale root-owned file self-heals on the next run instead of failing the branch. Applied to both bootstrap cp sites (PredictorTraining + ModelZooRotation). Frozen byte-identical fixture regenerated per its documented procedure (deliberate, reviewed change to a spot state's absent-path command). Box ownership was also fixed directly (chown); this change is the structural guard against recurrence. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What failed
Friday shell run
friday-shell-2026-06-12-eod-…failed at Branch B / PredictorTraining bootstrap:cp: cannot create regular file '/home/ec2-user/alpha-engine-predictor/config/predictor.yaml': Permission denied.Root cause: an ad-hoc SSM edit on 2026-06-07 (SSM runs as root by default; the edit lacked
sudo -u ec2-user) leftpredictor.yaml+predictor.yaml.bak-260607-autopromoteownedroot:root 644. The SF bootstrap'ssudo -u ec2-user cpcan't open a root-owned 644 file for truncation, even though ec2-user owns the directory.Fix
cp --remove-destinationat both bootstrap cp sites (PredictorTraining + ModelZooRotation): unlink-then-create succeeds via directory ownership and leaves the new file owned by ec2-user — a stale root-owned dropping self-heals on the next run instead of killing the branch.The frozen byte-identical fixture (
tests/fixtures/sf_prekeystone_spot_commands.json) is regenerated per its documented procedure — this is a deliberate, reviewed change to the spot states' absent-path command.Already done operationally (no PR possible — box state)
chown ec2-user:ec2-useron both files (verified).friday-shell-2026-06-12-rerun-postchownlaunched to validate before the real Saturday 6/13 09:00 UTC run.Deploy note
The live SF definition is deployed manually (
infrastructure/deploy_step_function.sh) — merging this PR does not update the live state machine. Tomorrow's Saturday run is unblocked by the chown regardless; this lands the guard for the future at the next SF deploy.Tracking: cipher813/alpha-engine-config#1034
Tests
Full suite green in worktree: 1977 passed, 2 skipped.
🤖 Generated with Claude Code