-
Notifications
You must be signed in to change notification settings - Fork 0
refactor(#52): Unified OpenTelemetry Pipeline & CI Console Bridge #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
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
- Replace tea.Program with ports.Renderer in Bridge and OTelTracer - Update WithProgram() -> WithRenderer() - Call renderer.OnTaskLog() instead of program.Send() - Update all tests to use mockRenderer instead of mocking tea.Program - Fix test assertions to use assert.Positive per linter
- Add OutputMode field to RunOptions - Remove log file redirection to .same/debug.log - Implement environment detection and renderer selection (TUI vs Linear) - Update telemetry setup to use Bridge with ports.Renderer - Simplify concurrent execution lifecycle (remove manual cancel) - Remove obsolete TestApp_Run_LogSetupFailure test - Generate mocks for ports package
- Add --output-mode/-o flag with choices: auto, tui, linear - Add --ci flag as shorthand for --output-mode=linear - Wire OutputMode to app.RunOptions - Default to auto mode (environment-based detection)
Task output now flows exclusively through the OpenTelemetry span → renderer pipeline. The logger in the shell executor was creating duplicate output: once via slog (unformatted) and once via the renderer (formatted with [TaskName] prefixes). Removed: - Executor.logger field - logWriter type and methods - MultiWriter wrapping of stdout/stderr - Logger dependency from shell adapter node - Logger mocks from all executor tests
- Add color palette with 8 visually distinct colors - Implement hash-based color assignment for deterministic task colors - Apply task color to log prefixes [taskName] in all outputs - Colorize task name in completion messages while preserving symbol colors - Add tests for color assignment consistency and distribution
d0d0572 to
b5bb3ff
Compare
- Import ports package in scheduler tests - Cast MockSpan to ports.Span interface in Return() calls - Regenerate mocks to include MarkExecStart() method - All tests now pass with -race flag
- Remove logger from shell.NewExecutor() - Replace tea.Program with Renderer interface - Simplify MarkExecStart() to only add OTel event - Update tests to use mockRenderer
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
- Add comprehensive tests for TUI renderer (lifecycle, events, error handling) - Add tests for linear renderer edge cases (nil writers, unknown spans, buffer flushing) - Add tests for telemetry bridge with OTel SDK tracers - Add tests for app layer linear mode and inspect mode - Add table-driven tests for run command output mode flags - Add mockgen directive for Renderer interface - Refactor duplicate test code to use table-driven pattern
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.
Closes #52