refactor: share path-resolution and body-cap helpers#355
Open
TBX3D wants to merge 2 commits into
Open
Conversation
pr summary7 files changed (+106 -31)
|
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #355 +/- ##
=======================================
Coverage ? 54.71%
=======================================
Files ? 82
Lines ? 6872
Branches ? 0
=======================================
Hits ? 3760
Misses ? 2843
Partials ? 269 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
the modules loader and the framework custom-signature loader each hand-rolled the same ~/.config/sif/<sub> (and %LocalAppData%\sif\<sub> on windows) path. extract internal/sifpath.UserSubdir and route both through it so the per-user layout is defined in one place. no behavior change: the helper reproduces the existing paths exactly.
the frameworks detector and the module executor each defined their own 5 MB body cap and ran the same io.ReadAll(io.LimitReader(...)) read. move the cap and the read into httpx.MaxBodySize / httpx.ReadCappedBody so both scanners share one ceiling instead of two consts that can drift. no behavior change: the cap value and read semantics are unchanged.
TBX3D
force-pushed
the
refactor/share-detection-substrate
branch
from
July 10, 2026 04:07
5468abf to
d1b3f4e
Compare
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.
the per-user sif config directory resolution (~/.config/sif on unix, %LOCALAPPDATA% on windows) and the 5MiB response-body cap were each copy-pasted across module loading and framework detection. pulled the first into internal/sifpath.UserSubdir and the second into httpx.ReadCappedBody, with the same resolved paths and cap as before, verified by new tests on the path-layout invariants.