refactor: fix DRY violations across extractor, generator, parser, and CLI#3
Merged
refactor: fix DRY violations across extractor, generator, parser, and CLI#3
Conversation
Convert the plain-text architecture diagram in the README to a Mermaid flowchart that renders as an interactive diagram on GitHub. The diagram accurately reflects the actual code flow: the Evidence Engine merges findings back into the RuntimeContract, which then feeds into the Goss Generator. https://claude.ai/code/session_01UDZyz5H4DwwJfx4riRNwFH
… helpers Fixes latent bug in cmd_probe that returned exit code 2 without writing output files when warnings were present.
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
ContractAssertion::new()constructor and convert all 26 inline struct literalsis_shell_interpreter/is_shell_nameinto a single path-aware functionmake_process_assertionhelper to deduplicate ENTRYPOINT/CMD logicresolve_dest_pathhelper to deduplicate COPY/ADD path resolutionmake_package_assertionhelper to deduplicate 5 package detector functionsload_contract,resolve_force_wait,emit_output) and fix latent bug incmd_probethat returned exit code 2 without writing output filespasses_confidencehelper to deduplicate confidence filtering in generatorparse_sources_and_desthelper to deduplicate COPY/ADD parser logicTest plan
cargo test— all 85 tests pass (58 unit + 3 integration + 24 golden)cargo clippy -- -D warnings— zero warningscargo build --release— successContractAssertion { ... }struct literals