Skip to content

feat(action): add failure-only report uploads and size warnings - #1433

Open
BenSheridanEdwards wants to merge 1 commit into
mainfrom
fix/artifact-storage-defaults
Open

BenSheridanEdwards wants to merge 1 commit into
mainfrom
fix/artifact-storage-defaults

Conversation

@BenSheridanEdwards

@BenSheridanEdwards BenSheridanEdwards commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Why

Teams need predictable CI artifact storage without losing the evidence required for review. The existing single-bundle, changed-only default needs explicit compression, a failure-only publication option, and visible guidance for large reports.

Closes #1418.

What changed

  • report-upload accepts on-failure: publish evidence failures and failing certify diffs; skip successful advisory/content-only reports. Untrusted captures retain their evidence. Approval configurations reject this option.
  • Report uploads explicitly use compression level 9. The opt-in split capture keeps one complete map transfer with compression level 6 and three-day retention; the default remains a single in-job comparison.
  • Artifact HTML discloses an initial uncompressed bundle estimate above 1 MB while preserving the existing byte-budget and receipt rules.
  • Setup/reference guidance explains retention, raw diagnostic uploads, and the split transfer boundary. No permissions, dependencies, or report schema changes.

Reviewer view

single capture -> in-job comparison -> report publication policy -> one compressed report bundle
split capture -> one compressed complete map transfer (3 days) -> trusted comparison -> same publication policy
on-failure + approval workflow -> reject (approval needs the report)
large initial bundle estimate -> visible HTML notice, existing budget/receipt rules

Proof

Storage warning rendered from a synthetic receipt fixture

The fixture explicitly states that it does not certify a CSS comparison. It retains a synthetic 1.1 MB JSON receipt to exercise the real current-branch renderer. Reproduce after building with node docs/proof/artifact-storage/generate.mjs.

Before implementation, the new scenarios produced 14 failures and one passing compatibility case (the existing single-workflow shape). All 250 affected Action/init/HTML tests then passed with one Node test worker. Astra found a P2 mismatch with GitHub’s case-insensitive boolean comparisons; normalized flags/modes fix it. Five added regressions failed before that fix, and all 32 targeted publication checks pass afterward.

Proof Law: this PR is false if failure-only publication suppresses untrusted review evidence, permits approval workflows without a report, drops a failing certify diff, uploads every raw capture by default, omits the large-estimate warning, or relaxes the existing byte budget/receipt rules.

Behaviour changes

The existing on-change default and its clean-run skip remain. Custom callers may opt into on-failure; the documentation defines failure by the StyleProof verdict rather than promising an artifact when report generation itself fails. A skipped-publication comment now describes the upload policy without falsely claiming that nothing changed. Large artifact reports gain an HTML size notice.

Not asked for

Deleting existing artifacts, changing CI permissions or approval rules, removing map evidence from the trusted split stage, changing capture coverage, releasing the package, or touching held report/release PRs.

Review guide

Start with the delivery and report-artifact steps in action.yml, then renderArtifactHtml in src/report/html.ts. Large estimates render a second time to fit the notice under the same budget. The new Action cases execute the actual inline program; the scaffold tests inspect real generated workflows. The proof generator retains no large fixture files in the repository.

Verification summary

Current security hold — not merge-ready. A fresh bounded pnpm audit --audit-level=high fails for locked picomatch 4.0.5 (GHSA-fc5q-39xc-vjpf). No validated compatible remedy is currently available. No dependency, audit-threshold, release-age or other security control was changed. Earlier passing implementation/hosted checks below do not establish current security readiness.

  • Focused Action/init/HTML suites: 250 passed, zero failures, one Node worker.

  • Demo freshness: passed (node scripts/demo-report.mjs --check).

  • Final pnpm run verify: passed, including 7092 unit tests, zero failures.

  • Independent Astra review found one P2 boolean-comparison mismatch; it is fixed and covered by five red-then-green cases.

  • The earlier full run had one workflow-example mismatch (7,091 passing); the checked-in example now contains the intended compression setting and its unchanged comparison test passes.

  • The committed PNG was inspected at reviewer size; its synthetic-fixture and uncompressed-estimate qualifications are fully visible.

  • Effective hook path was checked in this worktree: .husky/_, with no config.worktree override. The preceding Route state recipe's one-shot mock is never removed and can answer a later crawl surface #1417 commit/push logs show all intended hooks executing.

  • Normal pre-commit hooks passed (lint, formatting, gitleaks, Fallow, commitlint). Normal pre-push hooks passed: 1552 unit tests; 1267 Chromium tests passed, one existing non-Chromium-only case skipped. The hosted Firefox project selects that case.

  • Hosted required and latest PR-body validation passed on 25352db5f9606204bc6f5e569cf545f0788610c2.

  • Final independent Astra review: APPROVE recommendation on that exact head. The reviewer also inspected the committed PNG and independently checked boolean compatibility and failure-policy cases. No GitHub approval, human signoff or merge was submitted.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Note

Synthetic action dogfood receipt. This report is the final deliberately failing fixture in the action contract suite. It proves that unproven evidence is rejected; it does not certify this pull request.

🗺️ StyleProof report

📊 View the side-by-side visual report →


Coverage, determinism, report/diff consistency, or Change Reach (changeReach: 'gate') evidence is incomplete — this is not a base recapture failure. Repair the named evidence in the report.

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Note

Live StyleProof-on-StyleProof (advisory). This report is captured from the surfaces declared in styleproof.config.ts (example/demo). home@* carries matching productState {id, revision} (comparable / certifying path); the product-state acknowledgement file stays armed but empty so undeclared new pairs fail closed. fail-on-diff is false; the check is not part of hosted required CI. The synthetic Action contract suite remains action-dogfood.yml.

🗺️ StyleProof report

Report publication was skipped by the upload policy. The verdict is in the run summary.


Advisory-only mode: no reviewable changes detected — the StyleProof dogfood check remains green.

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.

Keep CI artifact storage small by default (changed-only uploads, compression)

1 participant