chore: refactor site handler to take cache dir#21918
Merged
spikecurtis merged 1 commit intomainfrom Feb 6, 2026
Merged
Conversation
Contributor
Author
This was referenced Feb 4, 2026
Contributor
There was a problem hiding this comment.
Code Review
Reviewed refactoring of site handler to take cache directory. The refactoring improves encapsulation by moving the ExtractOrReadBinFS call into the site package. Found 2 minor issues to address.
Summary
✅ Architecture: Good encapsulation improvement - site package now owns the extraction logic
✅ Error handling: Proper error propagation replacing panics
✅ Tests: All test updates handle new error return correctly
Issues Found
- Error message lacks specificity - The Fatal log message could better indicate the root cause
- Unused import in test - The
golang.org/x/exp/mapsimport adds complexity for test setup that could be simplified
174915d to
55ff2fc
Compare
0320b65 to
8251b2e
Compare
55ff2fc to
f220d00
Compare
8251b2e to
4429923
Compare
4429923 to
af3fb2f
Compare
f220d00 to
69d8817
Compare
af3fb2f to
9ec9c39
Compare
69d8817 to
aa754c2
Compare
cstyan
approved these changes
Feb 4, 2026
9ec9c39 to
6bb53c2
Compare
aa754c2 to
937a341
Compare
b478cc5 to
2816283
Compare
937a341 to
1c048ce
Compare
1c048ce to
be4da2b
Compare
2816283 to
110dcbb
Compare
Merge activity
|
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.

relates to: coder/internal#1300
Refactors the options to the site handler to take the cache directory, rather than expecting the caller to call
ExtractOrReadBinFSand pass the results.This is important in this stack because we need direct access to the cache directory for compressed file caching.