This repository was archived by the owner on Jun 8, 2026. It is now read-only.
FEAT-145: Improve cloud failure handling in symphony loop - #41
Merged
Conversation
- Return structured results from postLoopEvent and uploadArtifacts instead of void, enabling callers to detect and log HTTP/network failures - Refactor executeGitOperations to use a discriminated union GitOperationResult (success | no-changes | error) replacing the null return pattern - Exclude .claude/ from git status porcelain check to prevent gateway work-dir files from being committed during EXECUTE loops - Accumulate warnings array (ARTIFACT_UPLOAD_FAILED, EVENT_POST_FAILED, GIT_PUSH_FAILED, LLM commit timeout) and persist to job store warning field - Add sanitizeErrorMessage() to redact tokens/secrets from error strings before storing them in the job store - Promote several debug-level gateway log calls to info for better observability - Add integration tests for cloud failure scenarios (T-4.2): artifact upload failure and event post failure are reflected in job store warnings - Bump package version to 0.8.6 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Code Review SummaryStatus: Approved Reviewers: Bug Hunter A, Bug Hunter B, Unified Auditor, Premise Reviewer, cloud-command-executor-specialist Findings
MEDIUM Issues (consider)
Validation Stats
Recommendation: Consider extracting shared test helpers before merging. |
- Extract shared test helpers into symphony-test-utils.ts (initGitRepo, startMockApiServer, createFakeRunLoopScript, waitForCompletedEvent, saveEnv/restoreEnv) - Fix waitForRequest: remove stale waiter from array on timeout - Fix async IIFE in mock server: add .catch() handler to surface errors instead of silently swallowing them Testing: typecheck and lint pass Risks: low, test-only changes
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
postLoopEventanduploadArtifacts(replacingvoid) so callers can detect HTTP/network failures and accumulate warningsexecuteGitOperationsto use a discriminated unionGitOperationResult(success | no-changes | error) replacing the null return pattern.claude/fromgit status --porcelaincheck so gateway work-dir files are never accidentally committed during EXECUTE loopssanitizeErrorMessage()to redact tokens/secrets from error strings before storing them in the job storeARTIFACT_UPLOAD_FAILED,EVENT_POST_FAILED,GIT_PUSH_FAILED, LLM commit timeout) to the job storewarningfielddebug-level gateway log calls toinfofor better observabilityTest plan
just desktop-test— existing symphony-loop-execute tests passsymphony-loop-cloud-failures.test.tstests pass (artifact upload failure, event post failure)just desktop-typecheckandjust desktop-lintpass🤖 Generated with Claude Code