Skip to content

feat: expose coverage publication outcomes - #37

Open
neilime wants to merge 1 commit into
actions:mainfrom
neilime:feat/publication-outcomes
Open

neilime wants to merge 1 commit into
actions:mainfrom
neilime:feat/publication-outcomes

Conversation

@neilime

@neilime neilime commented Nov 27, 2026

Copy link
Copy Markdown

Expose outcome, report-id, and skip-reason outputs so downstream checks can distinguish an intentional skip, an accepted upload, successful processing, and failure without interpreting logs. For example, an outdated-commit response now produces outcome: skipped, while a successful upload with waiting disabled produces outcome: uploaded.

Exit-code behavior remains unchanged. A processing failure still produces outcome: failed when fail-on-error: false, and retains the accepted report ID. Multiline API messages use delimited outputs to prevent output injection.

Validation: the locked environment's 106 unit tests pass, including extended existing outcome cases and one new multiline-message regression. Ruff lint and formatting checks pass. Usage is documented in docs/usage/publication-outcomes.md.

Closes #36.

Copilot AI balanced review requested due to automatic review settings November 27, 2026 22:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The change is fully wired end-to-end (implementation plus safe output-writing helper), with action metadata, documentation, and expanded tests updated to validate the new output contract across uploaded/processed/skipped/failed paths, leaving no active review concerns.

No open issues 🎉

What changed in this PR

Expose machine-readable publication outputs (outcome, report-id, skip-reason) so downstream workflows can reliably distinguish skip/upload/process/failure states without parsing logs, while preserving existing exit-code behavior.

Changes:

  • Add and emit outcome, report-id, and skip-reason across eligibility resolution and upload/processing flows.
  • Introduce a helper to write outputs via GITHUB_OUTPUT, including delimited multiline values to prevent output injection.
  • Update action metadata, tests, and documentation to cover the new output contract and usage.
File Description
upload_coverage.py Initializes and updates outcome, report-id, and skip-reason outputs throughout the upload and optional processing/wait flow.
test_upload_coverage.py Extends test coverage to parse and assert the new outputs across uploaded/processed/skipped/failed scenarios, including a multiline-message regression case.
test_resolve_upload_context.py Adds assertions that eligibility resolution emits the expected outcome and skip-reason outputs for skipped/failed paths.
resolve_upload_context.py Emits outcome and skip-reason outputs when upload eligibility resolves to skipped or fails early.
docs/​usage/​publication-outcomes.md Documents the meaning of each publication outcome and how to consume the outputs in downstream workflow steps.
action.yml Declares the new composite action outputs and wires them to the underlying step outputs.
action_outputs.py Implements a write_outputs helper to safely write step/action outputs (including multiline values) to GITHUB_OUTPUT.

Review effort: Balanced
Copilot was unable to complete this review at the selected tier due to model policy or plan restrictions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: expose machine-readable coverage publication outcomes

2 participants