Promote public CLI interfaces for artifact restore and response codecs#403
Open
Promote public CLI interfaces for artifact restore and response codecs#403
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.
Motivation
cli.pyand tests so the CLI surface depends on stable, shared APIs.Description
src/gabion/cli_support/shared/github_artifact_restore.pyby renaming_restore_aspf_state_from_github_artifacts,_NoRedirectHandler,_download_artifact_archive_bytes, and_state_requires_chunk_artifactsto publicrestore_aspf_state_from_github_artifacts,NoRedirectHandler,download_artifact_archive_bytes, andstate_requires_chunk_artifacts, and exported them via__all__while retaining underscore aliases for compatibility.src/gabion/server_core/command_orchestrator_primitives.pyby exposingnormalize_dataflow_responseandserialize_dataflow_response(and creating underscore aliases back to them) so CLI code can call public normalization/serialization APIs.src/gabion/cli.pyto import and use only the new public symbols and to bind local underscore names to the new public functions at the ingress boundary.tests/gabion/cli_support/shared/test_github_artifact_restore.pyto validate the promoted artifact-restore interfaces and compatibility aliases, and updated CLI output-emitter tests to use the public codec names; refreshedout/test_evidence.jsonaccordingly.Testing
PYTHONPATH=.:src mise exec -- python scripts/policy/policy_check.py --workflowsand--ambiguity-contractwhich completed (note:misewarned about remote version metadata resolution but did not block local checks).PYTHONPATH=.:src mise exec -- python -m pytest -o addopts='' tests/gabion/cli/cli_helpers_cases.pyandPYTHONPATH=.:src mise exec -- python -m pytest -o addopts='' tests/gabion/cli/cli_output_emitters_cases.py tests/gabion/cli_support/shared/test_github_artifact_restore.py, and all tests passed (145 collected across targeted runs; focused runs passed).PYTHONPATH=.:src mise exec -- python -m scripts.misc.extract_test_evidence --root . --tests tests --out out/test_evidence.jsonand updatedout/test_evidence.jsonto include mappings for the new tests.Codex Task