diff --git a/.github/workflows/monty-upstream.yml b/.github/workflows/monty-upstream.yml index 3a0d3a16c..b05e58c67 100644 --- a/.github/workflows/monty-upstream.yml +++ b/.github/workflows/monty-upstream.yml @@ -1,15 +1,28 @@ -name: Monty Upstream Watch +name: Monty Upstream Advisories # The embedded python3 runs on renamed forks of Monty (crates/bashkit-monty, # crates/bashkit-monty-types). cargo audit/deny and Dependabot match by crate -# name, so upstream `monty` releases and advisories never reach the forks. -# This job fails when upstream ships a newer stable release than the fork -# base, or when OSV lists an advisory affecting it. A red run means: re-sync -# the forks, or triage the advisory (ACKNOWLEDGED in the script). -# See knowledge/operations/dependencies.md. +# name, so an advisory filed against upstream `monty` can never reach the +# forks through them. This job is the only automated thing that would, which +# is why it stays on a daily schedule. # -# Not a PR check: it reads live crates.io/OSV state, which changes without -# any repository change, so it must not block unrelated PRs. +# Advisories only (`--no-release`). The same script also checks whether +# upstream shipped a newer stable release than the fork base, and that half +# deliberately does NOT run here: it goes red the moment upstream releases and +# stays red until a large fork re-sync lands, so it carried no signal on a +# schedule. It is a maintenance checklist item instead, run as +# `just check-monty-upstream` (the full check, both halves). +# See knowledge/operations/maintenance.md and +# knowledge/operations/dependencies.md. +# +# The script is invoked directly rather than through the `just` recipe, +# because that recipe takes no arguments and so cannot pass `--no-release`. +# +# A red run here means: triage the advisory, then either re-sync the forks or +# record it in the script's ACKNOWLEDGED map with a reason. +# +# Not a PR check: it reads live OSV state, which changes without any +# repository change, so it must not block unrelated PRs. on: schedule: @@ -22,7 +35,7 @@ permissions: jobs: watch: - name: Upstream releases and advisories + name: Upstream advisories runs-on: ubuntu-latest timeout-minutes: 10 steps: @@ -30,5 +43,5 @@ jobs: with: persist-credentials: false - - name: Check upstream Monty - run: python3 scripts/check_monty_upstream.py + - name: Check upstream Monty advisories + run: python3 scripts/check_monty_upstream.py --no-release diff --git a/knowledge/log.md b/knowledge/log.md index 3ae70514b..e43d8d872 100644 --- a/knowledge/log.md +++ b/knowledge/log.md @@ -2,6 +2,7 @@ ## 2026-11-09 +* **Monty upstream watch split: advisories stay daily, release drift moves to maintenance**: the daily `monty-upstream.yml` went red the moment upstream shipped 1.5.0 and stayed red until a ~9k-line fork re-sync landed, which is noise rather than signal. The *release* half is therefore a maintenance checklist item now (`just check-monty-upstream`). The *advisory* half stays on the daily schedule, via the script's existing `--no-release`: the fork crates are renamed, so cargo audit/deny and Dependabot can never match an upstream `monty` CVE by name, and this workflow is the only automated thing that would. Moving it to a quarterly pass would have stretched CVE detection from about a day to about a quarter. Advisory-only is green by default, so it has the opposite noise profile to the release check. The workflow invokes the script directly rather than the `just` recipe, which takes no arguments. See [Dependencies](operations/dependencies.md#monty-forks), [Maintenance](operations/maintenance.md). * **Coreutils drift port keeps up with two upstream refactors**: the weekly `Coreutils Args Drift` run went red on 2026-11-09 (13 compile errors against uutils 6a7d199ed), from two unrelated upstream changes that the port tool had no rewrite for. uucore's `FormatError` moved from a hand-written `impl Display` to `#[derive(thiserror::Error)]`, putting every `translate!`/`translate_text!` call inside an `#[error("{}", ...)]` attribute, where the expression-only Fluent pass never reached it; folding now walks attribute token streams too, and macro arguments are carried as raw `TokenStream` rather than `Expr` because thiserror's `.0` field shorthand tokenizes but is not valid expression syntax. Separately, `--quoting-style` moved into the shared `uucore::quoting_style::parser`, so `ls` began re-exporting `QUOTING_STYLE` and calling `clap_quoting_argument()`, both of which made generated `ls_args.rs` reference `uucore`; args mode now inlines registered uucore clap helpers (const/static spliced into `mod options`, builder fns emitted at root, paths flattened, `translate!` keys resolved against uucore's own locales). The helper registry is an allowlist with per-shape validation, same TM-INF-025 reasoning as the `uu_app()` validator: an unregistered path stays untouched and surfaces as a compile error instead of being vendored blind. Only user-visible change is `ls --quoting-style` help text losing its trailing period, which is upstream's wording. See [Coreutils Argument Port](runtimes/coreutils-args-port.md). ## 2026-11-08 diff --git a/knowledge/operations/dependencies.md b/knowledge/operations/dependencies.md index b60135f18..982676761 100644 --- a/knowledge/operations/dependencies.md +++ b/knowledge/operations/dependencies.md @@ -78,8 +78,7 @@ the fork (upstream tests excepted), and on any dependency or feature in a fork `Cargo.toml` that differs from upstream's (the `monty-types` rename aside). Dependabot does not bump crates only the forks declare, so upstream security fixes arrive by re-sync: -1. `scripts/check_monty_upstream.py` (daily `monty-upstream.yml`, - `just check-monty-upstream`) goes red when crates.io has a newer stable +1. `scripts/check_monty_upstream.py` fails when crates.io has a newer stable `monty`/`monty-types` than the fork base, or when OSV (RustSec + GitHub advisories) lists a vulnerability for crates.io `monty`/`monty-types` or PyPI `pydantic-monty` at the base version. Name-matching tools (cargo @@ -87,6 +86,20 @@ crates only the forks declare, so upstream security fixes arrive by re-sync: A triaged advisory that does not affect bashkit goes in the script's `ACKNOWLEDGED` with its reason. `cargo deny` still covers advisories against the fork's own dependency versions (the Audit job). + + Its two halves run on different cadences, because they have opposite + noise profiles: + + - **Advisories**, daily in `monty-upstream.yml` via `--no-release`. Green + by default, and nothing else in the toolchain can match an upstream + `monty` CVE by name, so a day is the right detection latency. + - **Release drift**, in every maintenance pass as the full + `just check-monty-upstream`. It goes red the moment upstream releases + and stays red until a re-sync lands (1.4.0 to 1.5.0 moved ~9k lines), + so on a schedule it reported a known state rather than news. + + The workflow calls the script directly: the `just` recipe takes no + arguments and therefore cannot pass `--no-release`. 2. For a fix: re-copy the new upstream release into both forks, re-apply every `bashkit fork:` edit (the drift check lists what moved), bump `VERSION` and the two hashes in `check_monty_fork.py`, and copy upstream's new diff --git a/knowledge/operations/maintenance.md b/knowledge/operations/maintenance.md index a4367977b..cfec40ea7 100644 --- a/knowledge/operations/maintenance.md +++ b/knowledge/operations/maintenance.md @@ -53,6 +53,15 @@ documented safe-version pin; they must not justify weaker execution limits. - `cargo update` run after all version bumps to lock latest patch versions - No known CVEs in dependency tree - License and advisory checks pass (`deny.toml`) +- Monty forks current with upstream: `just check-monty-upstream` (crates.io + `monty`/`monty-types` vs the fork base, OSV advisories for `monty`, + `monty-types`, PyPI `pydantic-monty`). cargo audit/deny and Dependabot miss + both because the fork crates are renamed. A newer release or an open + advisory means re-sync the forks per [Dependencies](dependencies.md#monty-forks), + or record a triaged advisory in the script's `ACKNOWLEDGED`. The release + half is why this is a maintenance item: the advisory half already runs + daily in `monty-upstream.yml`, so by the time a pass starts an open + advisory has normally surfaced on its own - Supply chain audit passes - Dependency tree analysis (`cargo tree --duplicates`, usage grep): - No unused/dead dependencies in workspace or crate Cargo.toml files