From be5fd274bae0e92a5255e39482ad107913996711 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Mon, 9 Nov 2026 05:13:24 +0000 Subject: [PATCH 1/3] chore(ci): move Monty upstream check from CI to maintenance Drop the daily monty-upstream.yml workflow; just check-monty-upstream is now a maintenance checklist item. A scheduled run that stays red until a re-sync lands is noise. --- .github/workflows/monty-upstream.yml | 34 ---------------------------- knowledge/log.md | 4 ++++ knowledge/operations/dependencies.md | 4 ++-- knowledge/operations/maintenance.md | 6 +++++ 4 files changed, 12 insertions(+), 36 deletions(-) delete mode 100644 .github/workflows/monty-upstream.yml diff --git a/.github/workflows/monty-upstream.yml b/.github/workflows/monty-upstream.yml deleted file mode 100644 index 3a0d3a16c..000000000 --- a/.github/workflows/monty-upstream.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Monty Upstream Watch - -# 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. -# -# Not a PR check: it reads live crates.io/OSV state, which changes without -# any repository change, so it must not block unrelated PRs. - -on: - schedule: - # Daily 06:17 UTC: advisories should surface within a day. - - cron: '17 6 * * *' - workflow_dispatch: - -permissions: - contents: read - -jobs: - watch: - name: Upstream releases and advisories - runs-on: ubuntu-latest - timeout-minutes: 10 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - persist-credentials: false - - - name: Check upstream Monty - run: python3 scripts/check_monty_upstream.py diff --git a/knowledge/log.md b/knowledge/log.md index b58c7c1cd..4ead94ac5 100644 --- a/knowledge/log.md +++ b/knowledge/log.md @@ -4,6 +4,10 @@ * **Monty forks re-synced to 1.5.0**: the first re-sync since the forks were created, and what the daily upstream watch went red for. Upstream moved ~9k lines and touched all 14 fork-edited files, so the `bashkit fork:` edits were re-applied by 3-way merge (upstream 1.4.0 / fork / upstream 1.5.0) rather than by hand: 9 conflicts, all in the repr helpers and the `fancy-regex` plumbing. Net drift went *down*. Upstream reached fancy-regex 0.20, so that marked version divergence and the marked `Captures<'_, str>` adaptations in `re_match.rs`/`re_pattern.rs` are gone (1.5.0 replaced `Captures` with span buffers); keeping upstream's new `repr_should_truncate` name let every repr call site return to upstream verbatim, leaving the fork's semantics (a time hit raises, a memory hit truncates) in one helper body. The per-VM memory probe and checkpoint hook merged cleanly: upstream's new `ExecutionClock` work touches different parts of `resource.rs`. Behavior changes taken: `'ab' * (2**62)` now raises `OverflowError` up front instead of reaching the memory meter, and the host import callback receives an `ImportArgs` (module plus search path) where it took a bare name -- bashkit answers `NotFound` on the name, so upstream's new file imports stay out. `cpu-clock`/`nix` came along because features and added dependencies are not markable. See [Dependencies](operations/dependencies.md#monty-forks), [Python Builtin](runtimes/python-builtin.md). +## 2026-11-09 + +* **Monty upstream check moved to maintenance**: the daily `monty-upstream.yml` workflow is gone; `just check-monty-upstream` is now a maintenance checklist item. A scheduled run that stays red until a large re-sync lands is noise, and re-syncs happen in maintenance passes anyway. See [Maintenance](operations/maintenance.md). + ## 2026-11-07 * **Monty in nightly ASan and soak**: the nightly ASan job ran default features, so the Monty forks (unsafe in the metered allocator and VM) were never sanitized. It now has a `--features python` step (307 integration + 66 lib python tests passed locally under ASan, 81 s), and a new `python-stress-soak` job runs the tenant stress suite 300 rounds in release. See [Python Builtin](runtimes/python-builtin.md). diff --git a/knowledge/operations/dependencies.md b/knowledge/operations/dependencies.md index b60135f18..f33397316 100644 --- a/knowledge/operations/dependencies.md +++ b/knowledge/operations/dependencies.md @@ -78,8 +78,8 @@ 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` (`just check-monty-upstream`, run in + every maintenance pass, not CI) 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 diff --git a/knowledge/operations/maintenance.md b/knowledge/operations/maintenance.md index a4367977b..161de9e3c 100644 --- a/knowledge/operations/maintenance.md +++ b/knowledge/operations/maintenance.md @@ -53,6 +53,12 @@ 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` - Supply chain audit passes - Dependency tree analysis (`cargo tree --duplicates`, usage grep): - No unused/dead dependencies in workspace or crate Cargo.toml files From 5e603d259d6210519914f76bc059ddedb3233af4 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Mon, 9 Nov 2026 05:20:55 +0000 Subject: [PATCH 2/3] chore(knowledge): keep log headings newest-first --- knowledge/log.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/knowledge/log.md b/knowledge/log.md index 4ead94ac5..3f0eaa9c6 100644 --- a/knowledge/log.md +++ b/knowledge/log.md @@ -1,13 +1,13 @@ # Bashkit Knowledge Update Log -## 2026-11-08 - -* **Monty forks re-synced to 1.5.0**: the first re-sync since the forks were created, and what the daily upstream watch went red for. Upstream moved ~9k lines and touched all 14 fork-edited files, so the `bashkit fork:` edits were re-applied by 3-way merge (upstream 1.4.0 / fork / upstream 1.5.0) rather than by hand: 9 conflicts, all in the repr helpers and the `fancy-regex` plumbing. Net drift went *down*. Upstream reached fancy-regex 0.20, so that marked version divergence and the marked `Captures<'_, str>` adaptations in `re_match.rs`/`re_pattern.rs` are gone (1.5.0 replaced `Captures` with span buffers); keeping upstream's new `repr_should_truncate` name let every repr call site return to upstream verbatim, leaving the fork's semantics (a time hit raises, a memory hit truncates) in one helper body. The per-VM memory probe and checkpoint hook merged cleanly: upstream's new `ExecutionClock` work touches different parts of `resource.rs`. Behavior changes taken: `'ab' * (2**62)` now raises `OverflowError` up front instead of reaching the memory meter, and the host import callback receives an `ImportArgs` (module plus search path) where it took a bare name -- bashkit answers `NotFound` on the name, so upstream's new file imports stay out. `cpu-clock`/`nix` came along because features and added dependencies are not markable. See [Dependencies](operations/dependencies.md#monty-forks), [Python Builtin](runtimes/python-builtin.md). - ## 2026-11-09 * **Monty upstream check moved to maintenance**: the daily `monty-upstream.yml` workflow is gone; `just check-monty-upstream` is now a maintenance checklist item. A scheduled run that stays red until a large re-sync lands is noise, and re-syncs happen in maintenance passes anyway. See [Maintenance](operations/maintenance.md). +## 2026-11-08 + +* **Monty forks re-synced to 1.5.0**: the first re-sync since the forks were created, and what the daily upstream watch went red for. Upstream moved ~9k lines and touched all 14 fork-edited files, so the `bashkit fork:` edits were re-applied by 3-way merge (upstream 1.4.0 / fork / upstream 1.5.0) rather than by hand: 9 conflicts, all in the repr helpers and the `fancy-regex` plumbing. Net drift went *down*. Upstream reached fancy-regex 0.20, so that marked version divergence and the marked `Captures<'_, str>` adaptations in `re_match.rs`/`re_pattern.rs` are gone (1.5.0 replaced `Captures` with span buffers); keeping upstream's new `repr_should_truncate` name let every repr call site return to upstream verbatim, leaving the fork's semantics (a time hit raises, a memory hit truncates) in one helper body. The per-VM memory probe and checkpoint hook merged cleanly: upstream's new `ExecutionClock` work touches different parts of `resource.rs`. Behavior changes taken: `'ab' * (2**62)` now raises `OverflowError` up front instead of reaching the memory meter, and the host import callback receives an `ImportArgs` (module plus search path) where it took a bare name -- bashkit answers `NotFound` on the name, so upstream's new file imports stay out. `cpu-clock`/`nix` came along because features and added dependencies are not markable. See [Dependencies](operations/dependencies.md#monty-forks), [Python Builtin](runtimes/python-builtin.md). + ## 2026-11-07 * **Monty in nightly ASan and soak**: the nightly ASan job ran default features, so the Monty forks (unsafe in the metered allocator and VM) were never sanitized. It now has a `--features python` step (307 integration + 66 lib python tests passed locally under ASan, 81 s), and a new `python-stress-soak` job runs the tenant stress suite 300 rounds in release. See [Python Builtin](runtimes/python-builtin.md). From 15b9836238caedb57eab0d0f69cae9d8dc3a8e88 Mon Sep 17 00:00:00 2001 From: Mykhailo Chalyi Date: Mon, 9 Nov 2026 18:27:30 +0000 Subject: [PATCH 3/3] fix(ci): keep Monty advisories on the daily schedule MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review follow-up: the first pass deleted `monty-upstream.yml` outright, which also deleted the only automated advisory coverage the Monty forks have. The forks are renamed crates (`bashkit-monty`, `bashkit-monty-types`), so cargo audit/deny and Dependabot cannot match an advisory filed against upstream `monty` by name — that is the whole reason this workflow exists. Folding it into maintenance would have stretched CVE detection for the embedded python3 from about a day to the maintenance cadence. Only the release half carried no signal on a schedule: 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 a scheduled run reported a known state rather than news. The two halves now run where each belongs: - advisories daily in `monty-upstream.yml`, via the script's existing `--no-release`, which is green by default; - release drift in every maintenance pass, as the full `just check-monty-upstream`. The workflow invokes the script directly because the `just` recipe takes no arguments and so cannot pass `--no-release`. Same pinned checkout SHA, same `contents: read`, same cron, and still not a PR check: it reads live OSV state, which changes without any repository change. Verified both modes locally against live OSV: `--no-release` prints three `ok: no open advisories` lines and exits 0, and the full check adds the two release lines and also exits 0 now that the forks are at 1.5.0. The 263 repo script tests pass, including the CI pinning checks. --- .github/workflows/monty-upstream.yml | 47 ++++++++++++++++++++++++++++ knowledge/operations/dependencies.md | 17 ++++++++-- knowledge/operations/maintenance.md | 5 ++- 3 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/monty-upstream.yml diff --git a/.github/workflows/monty-upstream.yml b/.github/workflows/monty-upstream.yml new file mode 100644 index 000000000..b05e58c67 --- /dev/null +++ b/.github/workflows/monty-upstream.yml @@ -0,0 +1,47 @@ +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 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. +# +# 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: + # Daily 06:17 UTC: advisories should surface within a day. + - cron: '17 6 * * *' + workflow_dispatch: + +permissions: + contents: read + +jobs: + watch: + name: Upstream advisories + runs-on: ubuntu-latest + timeout-minutes: 10 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - name: Check upstream Monty advisories + run: python3 scripts/check_monty_upstream.py --no-release diff --git a/knowledge/operations/dependencies.md b/knowledge/operations/dependencies.md index f33397316..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` (`just check-monty-upstream`, run in - every maintenance pass, not CI) fails 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 161de9e3c..cfec40ea7 100644 --- a/knowledge/operations/maintenance.md +++ b/knowledge/operations/maintenance.md @@ -58,7 +58,10 @@ documented safe-version pin; they must not justify weaker execution limits. `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` + 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