Repository navigation
refactor(providers): split provider_github.zig into focused modules - #437
Conversation
provider_github.zig (1,408 lines) becomes a thin root that re-exports the
same public API over provider_github/{pin,files,archive,sources,
registry_cache,preview,resolve,test_fixtures}.zig. Moves plus import fixes
only: helpers shared across the new files gained `pub`, `extraction_count`
stays a var in the root (sources.zig bumps it through the root import), and
a `test {}` block in the root references every module so no file's tests
are dropped by lazy analysis.
Claude-Session: https://claude.ai/code/session_01R2K5sJDL5Msn1uRTkybiDP
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Refactor-only split of
src/cli/provider_github.zig(1,408 lines) under the toolkit's 1,000-line rule, following the labelle-bgfxgfx/pattern: a thin re-exporting root plus a directory of focused files. No caller changes; the public API is re-exported unchanged.File map
src/cli/provider_github.zigextraction_count(avarcan't be aliased),test {}referencing every moduleprovider_github/pin.zigPin,Document,lock_name,parse,checkPins+ identity/strict-document testprovider_github/files.zigread,cacheRoot,uniqueName,sha256Hex,writeAtomicallyprovider_github/archive.zigarchivePath, download, verifiedarchive,cachedManifest, tar validation (safe path, ASCII, control chars, device names, case-folded file/dir) + its testsprovider_github/sources.zigSources,Extractions,checkNameprovider_github/registry_cache.zigregistry_cache_dir/file,registry_hint_scan_limit,cachedRegistryOwner,cacheRegistry+ hint testsprovider_github/preview.zigpreview_name,PreviewEntry,Preview, digest,writePreview/loadPreview/checkPreview,removePreview+ preview-binding testsprovider_github/resolve.zigregistry_url,resolve(preview /--accept, lock writing) + whole-document and schema-2 claim testsprovider_github/test_fixtures.zigAcceptFixture,testProviderArchive(test-only)What changed besides moves
pub(read,uniqueName,sha256Hex,writeAtomically,archive,validateTar,safeArchivePath,cachedManifest,cacheRegistry,jsonText,removePreview,PreviewEntry.toPin, the fixture's methods). None of them are re-exported from the root.sources.zigbumpsgithub.extraction_countthrough the root import, since avarcannot be re-exported.pipeline.zigkeeps readingprovider_github.extraction_count.filesbecamefiles_modinarchive.zig) becausevalidateTarhas a local namedfiles.Test counts (before / after)
zig build test-provider-dispatchzig build testThe +1 in both is the new unnamed
test {}reference block in the root, which counts as a test. With that block removed temporarily the dispatch step reports 73/73, so every original named test still runs.Verification
zig fmt --check(on the changed files),zig build,zig build -Dtarget=x86_64-windows,zig build test(includes the agnosticism guard) andzig build test-provider-dispatchall exit 0. The Python e2e suites also pass, with each exit code checked separately: provider_dispatch (25), provider_github (70), provider_config (21), provider_hooks (43), provider_targets (40) and plugin_compat.https://claude.ai/code/session_01R2K5sJDL5Msn1uRTkybiDP
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.