mirror of
https://github.com/Hmbown/DeepSeek-TUI.git
synced 2026-09-03 06:50:13 +08:00
* fix(ci): skip the PR-issue link gate for bot-authored PRs
The `link` job fails on every dependabot PR (e.g. #5010-#5016): dependabot
bodies are machine-generated dependency bumps that never contain a closing
keyword, so the gate exits 1 ("This PR neither closes an issue nor says why
it doesn't", run 30665868640/job 91272641294).
Skip the gate step when the PR author is a GitHub-verified bot account
(`pull_request.user.type == 'Bot'`, set by GitHub so it cannot be spoofed).
This covers dependabot today and any other automation (renovate, etc.)
without hand-editing every bot body, while keeping the gate strict for every
human PR.
Policy choice: all verified bots, not just dependabot[bot]. Bots cannot
respond to a prompt, and their changes never close issues; the check's
purpose is keeping human work linked to its issue.
* fix(ci): provision the deny container's Rust toolchain explicitly
cargo-deny runs inside EmbarkStudios/cargo-deny-action@v2's alpine container
(host triple x86_64-unknown-linux-musl, rustup default 1.85.0-musl). The
repo's rust-toolchain.toml pins `channel = "stable"` with no target, so the
action's `rustup show` (entrypoint.sh) resolves it to
`stable-x86_64-unknown-linux-musl` — not installed — and every run prints:
error: override toolchain 'stable-x86_64-unknown-linux-musl' is not
installed: the toolchain file at '/github/workspace/rust-toolchain.toml'
specifies an uninstalled toolchain
then auto-installs mid-run (network-dependent ~12s detour; hard failure if
the download stalls; seen in run 30665967039/job 91272951661).
Pass `rust-version: stable` so the entrypoint provisions the channel
(`rustup default stable`, same musl host triple) before cargo-deny touches
the workspace; the toolchain file then resolves to an installed toolchain.
* fix(deps): bump event-listener 5.4.1 -> 5.4.2 (RUSTSEC-2026-0221)
cargo-deny (advisories) fails on every dependabot PR (e.g. run
30665967039/job 91272951661) with the unsound advisory:
error[unsound]: `event-listener` allows `!Send` tags to cross thread
boundaries via `StackSlot` (RUSTSEC-2026-0221)
event-listener 5.4.1 unconditionally implements Send/Sync for StackSlot,
allowing a !Send tag to cross threads via Event::with_tag. Pulled in via
codewhale-tui -> codewhale-workflow-js -> rquickjs -> rquickjs-core ->
async-lock (and event-listener-strategy). Advisory solution: >=5.4.2, the
latest published version.
`cargo update -p event-listener` lands exactly on 5.4.2 (also drops its now
unneeded concurrent-queue dependency). No deny.toml ignore needed.
* fix(ci): fetch the locked graph before the offline runtime-contract check
The Lint job's "Check runtime-contract budget" step fails on every
dependabot PR (run 30665967040/job 91273020141, PR #5016):
error: failed to download `assert-json-diff v2.0.2`
Caused by: attempting to make an HTTP request, but --offline was specified
subprocess.CalledProcessError: ... returned non-zero exit status 101.
[runtime-contract-budget] ERROR: runtime-contract measurement failed with exit code 1
Root cause: check-runtime-contract-budget.py hardcodes CARGO_NET_OFFLINE=true
and runs `cargo test --locked` on codewhale-tui, which needs the dev-dependency
graph (wiremock -> assert-json-diff). Clippy above builds no test targets, and
Swatinem/rust-cache keys its registry cache on Cargo.lock, so any lock-changing
PR (every dependabot bump) misses the cache and the offline test cannot
download the missing crate. Reproduced locally with the identical error by
removing assert-json-diff from the registry cache and re-running the exact
CI command.
Fix: fetch the full locked graph (`cargo fetch --locked`, dev-deps included)
once in the heavy path before the measurement, so the hermetic offline
measurement is deterministic on every branch. The budget contract itself is
unchanged and still enforced.
* fix(ci): reviewed source-structure budget update for merged LaTeX module
Merging #4981 (LaTeX rendering) added crates/tui/src/tui/history/
latex_render.rs (1734 lines) and grew aggregate owned Rust source to the
measured merged state (644756 lines). The ratchet's contract requires an
explicit reviewed update for new thousand-line modules and aggregate
growth; this commit allows the merged module and raises the ceiling to
the exact CI-measured value. Verified: check-source-structure-budget.py
PASS on the branch; runtime-contract budget still PASS 55/55.
48 lines
1.5 KiB
YAML
48 lines
1.5 KiB
YAML
name: cargo-deny
|
|
|
|
permissions: {}
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- '.github/workflows/cargo-deny.yml'
|
|
- '**/Cargo.toml'
|
|
- '**/Cargo.lock'
|
|
- 'deny.toml'
|
|
push:
|
|
branches: [main, master]
|
|
schedule:
|
|
# Run weekly on Monday at 06:31 UTC
|
|
- cron: '31 6 * * 1'
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
deny:
|
|
name: cargo-deny
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
checks:
|
|
- advisories
|
|
- bans licenses sources
|
|
# Prevent sudden announcement of a new advisory from failing CI
|
|
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
# rust-toolchain.toml pins `channel = "stable"` with no target, so
|
|
# inside the action's alpine (musl) container rustup resolves it to
|
|
# `stable-x86_64-unknown-linux-musl` — which the container does not
|
|
# have. Without provisioning, the action's `rustup show` step prints
|
|
# "error: override toolchain 'stable-x86_64-unknown-linux-musl' is not
|
|
# installed" and then auto-installs mid-run (network-dependent ~12s
|
|
# detour, hard failure if the download stalls). `rust-version` makes the
|
|
# entrypoint run `rustup default stable` (same musl host triple) before
|
|
# cargo-deny touches the workspace, so the toolchain file resolves to an
|
|
# already-installed toolchain on every run.
|
|
- uses: EmbarkStudios/cargo-deny-action@v2
|
|
with:
|
|
command: check ${{ matrix.checks }}
|
|
rust-version: stable
|