CodeQL / Analyze (actions) (push) Has been cancelled
Docker / build (push) Has been cancelled
Build and Test Go Project / build (macos-latest) (push) Has been cancelled
Build and Test Go Project / build (ubuntu-latest) (push) Has been cancelled
Build and Test Go Project / build (windows-latest) (push) Has been cancelled
GoReleaser Release / release (push) Has been cancelled
MCP Server Diff / mcp-diff (push) Has been cancelled
Publish to MCP Registry / publish (push) Has been cancelled
- Extract storeLine() and accumulate() helper closures to eliminate
duplicated line processing and truncation logic
- Simplify main loop by using early return pattern (newlineIdx < 0 -> break)
- Add test for empty response body edge case
- Add test for exact maxLineSize boundary condition (10MB)
The refactored code reduces nesting and makes the flow clearer:
accumulate handles byte collection with truncation detection,
storeLine handles ring buffer storage with truncation markers.
* add sliding window for actions logs
* refactor: fix sliding
* remove trim content
* only use up to 1mb of memory for logs
* update to tail lines in second pass
* add better memory usage calculation
* increase window size to 5MB
* update test
* update vers
* undo vers change
* add incremental memory tracking
* use ring buffer
* remove unused ctx param
* remove manual GC clear
* fix cca feedback
* extract ring buffer logic to new package
* handle log content processing errors and use correct param for maxjobloglines
* fix tailing
* account for if tailLines exceeds window size
* add profiling thats reusable
* remove profiler testing
* refactor profiler: introduce safeMemoryDelta for accurate memory delta calculations
* linter fixes
* Update pkg/buffer/buffer.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* use flag for maxJobLogLines
* add param passing for context window size
* refactor: rename contextWindowSize to contentWindowSize for consistency
* fix: use tailLines if bigger but only if <= 5000
* fix: limit tailLines to a maximum of 500 for log content download
* Update cmd/github-mcp-server/main.go
Co-authored-by: Adam Holt <omgitsads@github.com>
* Update cmd/github-mcp-server/main.go
Co-authored-by: Adam Holt <omgitsads@github.com>
* move profiler to internal/
* update actions test with new profiler location
* fix: adjust buffer size limits
* make line buffer 1028kb
* fix mod path
* change test to use same buffer size as normal use
* improve test for non-sliding window implementation to not count empty lines
* make test memory measurement more accurate
* remove impossible conditional
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Adam Holt <omgitsads@github.com>