Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/PR_AUTOMATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ Risk labels express required maintainer scrutiny:
| `risk/unknown` | No valid classification was available. |

`cargo-semver-checks` incompatibility forces `risk/high`.
The API check builds baseline and head rustdoc JSON with `cargo rustdoc --locked`,
so both builds use their committed dependency versions before comparison.
A model-suspected breaking change promotes `risk/low` to `risk/medium`.
Path rules can add `scope/core`, `scope/web`, `scope/ffi`, and `scope/tooling`.
The classifier controls `scope/cross-cutting`, `kind/technical-debt`, and documentation-only classification.
Expand Down
28 changes: 22 additions & 6 deletions .github/workflows/pr-automation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -401,13 +401,29 @@ jobs:
sudo -u nobody env -i \
HOME="$semver_home" \
CARGO_HOME="$semver_cargo" \
CARGO_TARGET_DIR="$semver_target" \
PATH="$rust_bin_dir:$PATH" \
"$semver_bin" \
--package ironrdp \
--only-explicit-features \
--features "$CARGO_SEMVER_CHECKS_FEATURES" \
--baseline-rev "$BASE_SHA"
RUSTC_BOOTSTRAP=1 \
RUSTDOCFLAGS="-Z unstable-options --document-private-items --document-hidden-items --output-format=json --cap-lints=allow" \
HEAD_SHA="$HEAD_SHA" \
BASE_SHA="$BASE_SHA" \
SEMVER_BIN="$semver_bin" \
SEMVER_FEATURES="$CARGO_SEMVER_CHECKS_FEATURES" \
Comment on lines +409 to +410

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.

[code-compressor] Inner-script env vars SEMVER_BIN and SEMVER_FEATURES needlessly rename already-named values — low 🟡 — The added inner script receives two values under new aliases: SEMVER_BIN="$semver_bin" and SEMVER_FEATURES="$CARGO_SEMVER_CHECKS_FEATURES". SEMVER_FEATURES is a straight rename of the job-level env var CARGO_SEMVER_CHECKS_FEATURES, forcing the reader to trace a mapping that conveys no information. Passing the values under their existing canonical names preserves identical behavior: the env -i invocation already requires listing every variable explicitly, so nothing about the sandbox, exit-code handling, or feature set changes. SEMVER_ARTIFACT_ROOT is a legitimate rename and HEAD_SHA/BASE_SHA must keep their names for the existing output/notice logic. Optional compression only; no behavioral impact.

SEMVER_ARTIFACT_ROOT="$semver_target" \
bash -euo pipefail -c '
# cargo-semver-checks normally resolves a new dependency graph in a
# placeholder crate. Build rustdoc ourselves so both revisions use
# their committed lockfiles, just like the ordinary CI build.
build_rustdoc() {
git checkout --detach "$2"
CARGO_TARGET_DIR="$SEMVER_ARTIFACT_ROOT/$1" cargo rustdoc --locked \
--package ironrdp --lib --no-default-features --features "$SEMVER_FEATURES"
}
build_rustdoc baseline "$BASE_SHA"
build_rustdoc current "$HEAD_SHA"
"$SEMVER_BIN" \
--current-rustdoc "$SEMVER_ARTIFACT_ROOT/current/doc/ironrdp.json" \
--baseline-rustdoc "$SEMVER_ARTIFACT_ROOT/baseline/doc/ironrdp.json"
'
status=$?
set -e
case "$status" in
Expand Down
Loading