fix(scheduler): log WriteFile error + EM state run 10 — closes #65#95
Merged
fix(scheduler): log WriteFile error + EM state run 10 — closes #65#95
Conversation
Recovered broken worktree (incomplete WIP #51 fix left build broken). Stashed WIP, fixed #51 properly in PR #93 (log run() errors). PR #89 merged — 25 tests, closes #68 + #66. Issue #92 (Preflight/Goose) triaged P2. PR budget 2/3. Sprint: P2 bug sweep (#52, #65) + dogfood readiness. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g — closes #65 Silent discard meant failed log writes (full disk, missing dir, bad perms) were invisible. Governance tools must not silently lose audit records. Co-Authored-By: Claude Sonnet 4.6 <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.
Summary
os.WriteFilesilently discarding errors inexecuteAgent()— closes bug: scheduler.go silently ignores os.WriteFile error when writing agent run log #65fmt.Printfwarning when log write fails so audit log failures are visibleWhat changed
internal/scheduler/scheduler.goline 242 (one-line fix):Why this matters
ShellForge is a governance tool — silent audit log loss is a P2 reliability issue. If
outputs/logs/doesn't exist, disk is full, or permissions are wrong, run telemetry was silently discarded with no indication.Test plan
go build ./cmd/shellforge/passesgo test ./...— 25/25 pass (governance, intent, normalizer)EM run 10 actions (this run)
🤖 Generated with Claude Code