Decompose scan and findings modules#117
Merged
Merged
Conversation
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.
Summary
cli/scan.pymodule with acli/scan/package organized around the existing scan phases and shared helpers.core/findings.pymodule with acore/findings/package split by identity, mutation, remediation, summary, reviewer, and report-building responsibilities.agents_shipgate.cli.scanandagents_shipgate.core.findings, and add a smoke test to pin those re-exports.Review follow-up
core.findingsre-exports._sanitize_for_output.source_loading.pyintocli/scan/validation.py.surface_sanitization.pytosurface_redaction.pyand removed non-canonicalcli.scanre-exports forREGISTRYand manifest loaders.Why
Concern A identified sustained file-size growth on the orchestrator and findings paths. The previous E3 decomposition reduced function-level complexity, but the next maintainability step is moving those named phase helpers into explicit package modules so future work lands in focused files instead of recreating monoliths.
Impact
This is intended as a behavior-preserving refactor. Public import paths, report schemas, exit codes, run IDs, finding fingerprints, and privacy redaction ordering are preserved.
Validation
python -m pytest tests/test_e3_prime_compat.py tests/test_baseline_integrity.py tests/test_adapter_registry.py tests/test_adapter_contracts.py tests/test_reviewer_summary.py tests/test_reports.py tests/test_privacy.py tests/test_scan.py(179 passed)python -m pytest(1839 passed, 4 skipped)python -m ruff check .git diff --check