Commit Graph
8 Commits
Author SHA1 Message Date
skylar taylor-barrick cc7312bf34 ci: cancel superseded Workspace PR runs (#1458)
* ci: cancel superseded Workspace pull-request runs

The Workspace workflow (the native, MSRV and WASM legs) had no concurrency
group, so every push to a lockfile or dependency pull request started a second
full set of runs while the first set kept going, up to three runners each.

Give pull requests one group per pull request, so a newer push cancels the
older run, and give every other run a group of its own, so a main push, a
release tag or a manual run is neither cancelled nor replaced while queued.
github.ref is refs/pull/<n>/merge for a pull request, so two forks with the
same branch name stay separate. The pattern is the one merged in #772 for the
23 crate workflows, which left this reusable-workflow caller out.

The gate commands, jobs, inputs, matrices, timeouts, triggers and permissions
are untouched.

scripts/test-workspace-concurrency.py checks the policy itself: the two fields
and their documented expression shapes, one group per pull request and one per
other run, cancellation on a pull request only, and no job-level concurrency.
It reads the workflow without wiring anything into CI.

* test(workspace-concurrency): reject a scalar concurrency value

`read_concurrency` matched any line starting with `concurrency:` and read the
indented lines under it as fields. Under `concurrency: |` — a block scalar, not
a mapping — the workflow would have passed every policy check with the reader
alone, while the `PyYAML` cross-check that catches it is skipped when PyYAML is
absent. `concurrency: some-string` was rejected only by accident, through the
empty field set.

Require the header itself to be `concurrency:` (an inline comment allowed), and
test both scalar shapes. CodeRabbit found this on the pull request.

* sonar: analyse the Workspace concurrency guard as a test

scripts/test-workspace-concurrency.py is a unittest module: each case reads a
workflow and asserts on the policy. Listing it in sonar.test.inclusions keeps it
analysed as test code — linted, indexed and reported — instead of counting it as
production code that needs coverage, which is what failed the quality gate at
0.0% Coverage on New Code.

The exact path is appended to the three existing Rust patterns, so no other
script, and nothing else in the repository, is reclassified. No coverage
exclusion, quality threshold, workflow or build change.

* ci: run the Workspace concurrency guard in the gate

scripts/test-workspace-concurrency.py guarded the policy only when someone remembered to
run it, so a reworded concurrency block could land with 16 green checks. The gate's
`command` step now runs it before the cargo steps; `command` covers the Linux and macOS
legs, and it is one python3 call that needs nothing installed and fails in a second, ahead
of an hour of building.

The Windows leg keeps its existing `windows-command`: the script passes on a CRLF copy of
the workflow, but this change does not put an untested step on Windows.
2026-11-14 22:34:05 -06:00
Dylan M. Taylor bcd09376d0 sonar: ignore the weak hashes the encrypted formats require
S4790 reports the MD5 and SHA-1 in the xls, pdf and odf cryptography
modules. Each hash is the one the format specifies: a workbook's FilePass
verifier, a PDF revision 2-4 file key, and an OpenDocument start key or
file checksum. A stronger hash derives a different value, so the files
would no longer open. The three files are excluded with the reason
recorded, as the ICC profile ID already is.
2026-11-14 10:06:14 -05:00
Dylan M. Taylor 75710cfd20 ci: lock workflow actions through an actions.lock lockfile
Mutable action tags are a supply-chain risk: a moved tag runs different code
without a diff. Every workflow action is now pinned through
.github/workflows/actions.lock, and CI verifies the lockfile so an out-of-sync
or tampered one fails instead of running.
2026-11-12 07:18:59 -05:00
Dylan M. Taylor e8f3149224 sonar: leave spec_tables.rs out of duplication detection too (#943) 2026-11-11 18:54:20 -05:00
Dylan M. Taylor b0a2510aac sonar: clear the two new vulnerabilities and stop counting codec tables as duplication (#848) 2026-11-11 14:33:10 -05:00
Dylan M. Taylor 009a46a6b5 sonar: analyse the sources, not only the 3 platform test files (#798)
* sonar: analyse the sources, not only the 3 platform test files

* sonar: every crate's tests are tests, as the coverage job treats them
2026-11-10 22:30:00 -05:00
skylar taylor-barrick b1401e33b1 Share browser download resource ownership (#226)
Add opt-in browser download helpers that own detached links and object URLs, clean up failed or abandoned preparation, and register delayed URL cleanup before issuing a click. Applications retain filename, MIME type, pacing, and user-activation policy.

Include browser lifecycle and failure-path tests, public API documentation, and Sonar test-source classification. All 32 PR checks passed; targeted WASM Clippy and formatting passed in local validation.
2026-10-22 20:49:41 +02:00
Dylan M. Taylor ce89625521 ci: add sonar-project.properties for CI-based analysis
Marks the project ineligible for SonarCloud Automatic Analysis, resolving the
CI-vs-automatic-analysis conflict so the SonarCloud workflow succeeds.
2026-10-21 16:00:28 -04:00