Repository navigation
fix: GLM relay round 2 (port check, file-size line count) - #16
Merged
Merged
Conversation
A 601-line file whose last line lacks a newline is counted as 600 and passes the LIMIT=600 check; likewise allowlisted files appear one line shorter than their true size, so a file that grew to ceiling+1 with no trailing newline is reported as at-ceiling and passes. Found by the GLM relay (systemgate__scripts__check_file_sizes.py_p0__bugs__0), confirmed by GLM votes (round 2). Regression test to add: Create a 601-line tracked source file without a trailing newline and verify the check reports it as over the LIMIT=600 limit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lueError SYSTEMGATE_PORT='80 40' or 'http' (e.g. a trailing space beyond strip, or a typo like '804O') -> int() raises ValueError inside get_settings(), crashing every caller with an unrelated traceback instead of a clear config error. Found by the GLM relay (systemgate__systemgate__config.py_p0__bugs__0), confirmed by GLM votes (round 2). Regression test to add: Set SYSTEMGATE_PORT to '804O' and '70000' and assert get_settings() raises a ConfigError with a message naming SYSTEMGATE_PORT, while '8040' still parses to 8040. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
docker-py's containers.list(sparse=True) returns containers whose attrs are not prefetched; accessing container.attrs triggers a reload/inspect per container (and in some versions yields an empty/partial dict lacking Names/Ports/State), so rows lose name/image/ports or N extra API round-trips occur, contradicting the comment at line 169 and possibly emitting 'container_identity_unavailable' for every container. Found by the GLM relay (systemgate__systemgate__runtime.py_p0__bugs__0), confirmed by GLM votes (round 2). Regression test to add: Assert that with a mocked docker client, containers.list is called without sparse=True and that a single container whose list-time attrs include Names/Image/State/Ports yields a row with name, image, status, and its port bindings without any per-container reload/inspect calls. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
GLM's bcdc411 dropped sparse=True claiming it does not avoid inspect calls. It does: docker-py's non-sparse list calls containers.get (an inspect) per container, and returns the inspect shape, where Names, State and Ports do not exist as the code reads them. The test pins sparse=True. Co-Authored-By: Claude Opus 5.5 <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.
Round-2 GLM relay fixes, reviewed by Claude.
SYSTEMGATE_PORTnow fails with a clearConfigErrorinstead of a bareValueErrortrace.check_file_sizes.pycounts a last line without a trailing newline.sparse=Truefrom the container list. That would add one inspect per container and change the shape the code reads (Names,State,Ports).Tests: 72 passed, 8 skipped. Ruff check clean. File sizes ok.
🤖 Generated with Claude Code