Log review gate config failures - #67
Merged
Merged
Conversation
Summary: - Narrow review-agent and tracker config rescues to expected config exception shapes. - Log review_agent_config_failed and tracker_config_failed before using the existing disabled or unknown fallback. - Add focused orchestrator tests for enabled, disabled, expected config failures, unexpected exceptions, and tracker fallback logs. Rationale: - Config mistakes should not silently bypass the review-agent gate. - Expected config errors keep the current fail-open behavior with an explicit log, while unrelated runtime errors still bubble. Tests: - mix test test/symphony_elixir/orchestrator_status_test.exs:2239 test/symphony_elixir/orchestrator_status_test.exs:2265 test/symphony_elixir/orchestrator_status_test.exs:2280 test/symphony_elixir/orchestrator_status_test.exs:2294 - mix specs.check - make check (fails: MCP Unix socket open returns :eperm in this environment, causing MCP/AppServer socket expectations to fail)
There was a problem hiding this comment.
Pull request overview
This PR makes review-gate and tracker configuration failures visible by narrowing rescues to expected config-related exceptions and emitting explicit error logs instead of silently failing open.
Changes:
- Log
tracker_config_failedwhen reading/normalizing tracker kind fails with expected config exceptions, while still returning:unknown. - Log
review_agent_config_failed(including repo key and optional issue context) when review-agent settings fail with expected config exceptions, while still returningfalse. - Add tests that assert (a) valid configs do not log, (b) expected config failures log + fail open, and (c) unexpected exceptions bubble.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
lib/symphony_elixir/orchestrator.ex |
Narrows config-related rescues, adds targeted error logging, and threads issue context into review-agent enabled checks. |
test/symphony_elixir/orchestrator_status_test.exs |
Adds regression tests for config error logging, fail-open behavior, and bubbling unexpected exceptions. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2283
to
+2288
| Application.put_env(:symphony_elixir, :config_cache_file_reader, fn _path -> | ||
| raise RuntimeError, "config cache exploded" | ||
| end) | ||
|
|
||
| Cache.clear() | ||
|
|
Summary: - Restore the previous config_cache_file_reader app env after the unexpected-exception review-agent gate test. - Clear the config cache during cleanup so later tests do not observe the temporary raising file reader. Rationale: - The test mutates global application env and should not leak that state into the rest of the suite. Tests: - mix test test/symphony_elixir/orchestrator_status_test.exs:2239 test/symphony_elixir/orchestrator_status_test.exs:2265 test/symphony_elixir/orchestrator_status_test.exs:2280 test/symphony_elixir/orchestrator_status_test.exs:2304 - mix specs.check - make check (fails: MCP Unix socket open returns :eperm in this environment, causing MCP/AppServer socket expectations to fail)
5 tasks
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.
Context
Review-agent config errors silently disabled the pre-push review gate.
TL;DR
Log expected review-agent config failures instead of swallowing every error.
Summary
Alternatives
Test Plan
make allmix test test/symphony_elixir/orchestrator_status_test.exs:2239 test/symphony_elixir/orchestrator_status_test.exs:2265 test/symphony_elixir/orchestrator_status_test.exs:2280 test/symphony_elixir/orchestrator_status_test.exs:2304mix specs.checkmake checkfailed locally: MCP Unix socket open returns:eperm, causing MCP/AppServer socket expectation failures.