-
Notifications
You must be signed in to change notification settings - Fork 62
build: re-land the 7-day soak + pinned tooling, MSRV-ceiling guarded #1153
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 1 commit
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
c1e2ca7
build: re-land the 7-day soak + pinned tooling, MSRV-ceiling guarded …
jdalton 0f324d8
fix(ci,soak): scope the firewall past the cargo suite; take review fixes
jdalton 3b945bc
docs(sfw): claim only what the source shows for SFW_UNKNOWN_HOST_ACTION
jdalton e4da359
fix(soak): never prune a wrong-arithmetic annotation as "cleared"
jdalton d82c563
fix(soak): downloads fall back to unauthenticated and retry once on 5xx
jdalton de5a03b
docs(ci): correct the mock-405 mechanism, cite the upstream fix
jdalton b2f4e21
fix(soak): stop the fixers reformatting files they do not own
jdalton e0eeec1
feat(soak): gate npm's min-release-age-exclude entries too
jdalton f32aa1b
fix(soak): fail loudly when cargo silently ignores min-publish-age
jdalton eb325aa
docs(soak): note that an old nightly silently disables the cargo window
jdalton 9625c4f
feat(soak): explain a window-blocked cargo re-resolution, refuse the …
jdalton 0b92821
fix(soak): take the adversarial-review findings
jdalton aa7fc9f
fix(soak): take the review findings — one is a regression I introduced
jdalton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| #!/usr/bin/env bash | ||
| # sfw shim for __CMD__ — pre-baked into the agent image; mirrors what | ||
| # scripts/soak/external-tools.mts --shims writes on dev machines. Routes the | ||
| # real package-manager invocation through Socket Firewall; the sentinel env | ||
| # var breaks recursion when sfw re-invokes the tool, and the real binary is | ||
| # found by stripping the tool-rack bin dir out of PATH. | ||
| set -euo pipefail | ||
| CLEAN_PATH=$(printf '%s' "$PATH" | tr ':' '\n' | grep -vFx '/root/.local/share/aube/dev-tools/bin' | paste -sd ':' -) | ||
| REAL=$(PATH="$CLEAN_PATH" command -v '__CMD__' || true) | ||
| if [ -n "${__SENTINEL__:-}" ] || [ -z "$REAL" ] || ! command -v sfw >/dev/null 2>&1; then | ||
| # Fail-open must not be SILENT-open: say so once on stderr when the | ||
| # firewall is missing (never on the sentinel re-entry path, where sfw | ||
| # itself is the caller). | ||
| if [ -z "${__SENTINEL__:-}" ] && [ -n "$REAL" ]; then | ||
| echo "[sfw-shim] sfw not on PATH — running __CMD__ unfirewalled" >&2 | ||
| fi | ||
| [ -n "$REAL" ] && exec "$REAL" "$@" | ||
| echo "__CMD__: not found" >&2 | ||
| exit 127 | ||
| fi | ||
| export __SENTINEL__=1 | ||
| # Enterprise sfw defaults to BLOCK for non-registry hosts, which breaks | ||
| # ordinary dev flows the day a Socket key lands; free tier hardcodes | ||
| # ignore and disregards the var, so setting it is always safe. | ||
| export SFW_UNKNOWN_HOST_ACTION=ignore | ||
| exec sfw '__CMD__' "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| --- | ||
| name: soak | ||
| description: Manages the repo's supply-chain soak window (SOAK_DAYS) — checks and fixes the derived surfaces, bumps or disables the window, adds dated per-package exclusions, bumps pinned external tools, and enforces the Ubuntu-PPA MSRV ceiling. Use when a task touches minimumReleaseAge, min-release-age, min-publish-age, rust-version / MSRV, external-tools.json, sfw shims, renovate.json, or taze cooldowns, or when investigating why a freshly published version won't install. | ||
| --- | ||
|
|
||
| # The soak window | ||
|
|
||
| One rule: a release must be at least `SOAK_DAYS` old before this repo | ||
| adopts it. The delay gives the ecosystem time to catch a malicious or | ||
| yanked release before we ever install it. The window is defined exactly | ||
| once — read the current value from `scripts/soak/constants.mts` and never | ||
| hardcode it elsewhere. Every surface derives from or is parity-checked | ||
| against it: | ||
|
|
||
| | Surface | Key | Units | | ||
| |---|---|---| | ||
| | `.cargo/config.toml` | `global-min-publish-age` | `"N days"` | | ||
| | `docs/pnpm-workspace.yaml` | `minimumReleaseAge` | minutes | | ||
| | `docs/.npmrc` | `min-release-age` | days | | ||
| | `docs/taze.config.mts` | `maturityPeriod` | imports `SOAK_DAYS` | | ||
| | `external-tools.json` | `soakBypass` annotations | days | | ||
| | `.github/renovate.json` | `minimumReleaseAge` (explicit — an `extends:` preset doesn't count) | `"N days"` | | ||
| | `Cargo.toml` | `rust-version` ≤ the PPA rustc ceiling (not window-derived — see below) | version | | ||
|
|
||
| ## Commands (mise tasks — the code lives in `scripts/soak/`) | ||
|
|
||
| - `mise run soak` — parity-check every surface (CI-gated, always-run) | ||
| - `mise run soak:fix` — rewrite drifted windows, prune expired exclusions | ||
| - `mise run deps:update` — bump npm (taze) + cargo deps through the window | ||
| - `mise run tools:check` / `tools:fix` / `tools:install` — validate / | ||
| prune-expired-bypasses / install the SRI-pinned external tools | ||
| (`external-tools.json`); `tools:install` also writes the sfw firewall | ||
| shims into the dev-tools bin dir | ||
| - `mise run test:scripts` — the scripts' own unit tests | ||
|
|
||
| A soak change is done when `mise run soak` and `mise run test:scripts` | ||
| both exit 0 — the same gates CI runs. Re-run them after every fix. | ||
|
|
||
| The gates fail closed on invalid states (missing/malformed/wrong-math | ||
| annotations) and WARN on expired ones — stale is not unsafe, and nobody | ||
| has to watch for it: the scheduled `soak-autofix` workflow runs | ||
| `soak:fix` + `tools:fix` daily and commits the pruning as a bot PR. | ||
|
|
||
| ## The MSRV ceiling (the #1039 guard) | ||
|
|
||
| The Ubuntu PPA builds aube's source package on Launchpad with the DISTRO | ||
| rustc. The first soak landing (#1020) bumped the workspace MSRV past it | ||
| (1.95 > 1.93) and the whole port was reverted (#1039) to unbreak the | ||
| release. `mise run soak` now fails any `Cargo.toml` `rust-version` above | ||
| `PPA_RUST_CEILING` (`scripts/soak/paths.mts`, with a dated `checked:` | ||
| note). Raise the ceiling ONLY after confirming Launchpad's rustc moved: | ||
| https://launchpad.net/ubuntu/+source/rustc. | ||
|
|
||
| ## The cargo soak needs nightly — the repo still must not pin one | ||
|
|
||
| `min-publish-age` is an `[unstable]` cargo feature: a stable cargo ignores | ||
| it silently. The repo deliberately ships **no** `rust-toolchain.toml`, | ||
| because a repo-root toolchain file outranks `rustup default` and would | ||
| silently redirect the version-pinned CI legs and the PPA/release builds. | ||
| The nightly is instead requested per-invocation, at the only step that | ||
| picks versions: `scripts/soak/update-deps.mts` runs `cargo +nightly | ||
| update`. Everything else — every CI job, every shipped binary — builds on | ||
| stable. If you need the cargo soak somewhere new, call `cargo +nightly` | ||
| there; do not add a toolchain file. | ||
|
|
||
| ## Change the window (one place) | ||
|
|
||
| 1. Edit `SOAK_DAYS` in `scripts/soak/constants.mts`. | ||
| 2. `mise run soak:fix` (rewrites cargo/npmrc/yaml/renovate; taze follows | ||
| by import). | ||
| 3. `mise run soak` + `mise run test:scripts` — existing exclusion | ||
| annotations encode the old window and will be flagged; re-date or | ||
| remove them, then re-run until both pass. | ||
|
|
||
| **Opt out entirely**: set `SOAK_DAYS = 0` and run the same two steps — | ||
| cargo, pnpm/aube (`minimumReleaseAge: 0`), npm, and taze all treat zero | ||
| as disabled. There is deliberately no env-var bypass: opting out is a | ||
| committed, reviewable change, never a silent one. | ||
|
|
||
| ## Skip the soak for ONE package (dated, temporary) | ||
|
|
||
| Add to `minimumReleaseAgeExclude` in `docs/pnpm-workspace.yaml` with the | ||
| annotation on the line above (block list only — flow `[..]` is rejected | ||
| because a comment line can't attach to an inline entry): | ||
|
|
||
| ```yaml | ||
| # published: YYYY-MM-DD | removable: YYYY-MM-DD | ||
| - 'name@1.2.3' | ||
| ``` | ||
|
|
||
| `removable` = `published + SOAK_DAYS`; `published` must be the real | ||
| registry publish date (the placeholders above are schematic — copying | ||
| them verbatim is rejected). Once `removable` passes, `mise run soak` | ||
| warns until the pin is pruned (`soak:fix` or the soak-autofix workflow | ||
| does it). Bare names / `@scope/*` globs are standing trust and need no | ||
| annotation. External tools use the same shape via a `soakBypass` object | ||
| in `external-tools.json`. | ||
|
|
||
| ## Maintaining this skill | ||
|
|
||
| `scripts/soak/` is the law; this file only documents it — when they | ||
| disagree, fix this file. When editing, follow Anthropic's guidance: | ||
|
|
||
| - [Prompting best practices](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices) | ||
| - [Prompting Claude Fable 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5) | ||
| - [Skill authoring best practices](https://platform.claude.com/docs/en/agents-and-tools/agent-skills/best-practices) | ||
| - [Write an effective AGENTS.md](https://code.claude.com/docs/en/best-practices#write-an-effective-claude-md) | ||
|
|
||
| Keep it concise (goal + constraints, not step enumeration), keep the | ||
| description in third person with explicit "use when" triggers, and keep | ||
| the window value in `constants.mts` rather than restating it here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,33 @@ | ||
| { | ||
| "$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
| "extends": ["local>jdx/renovate-config"], | ||
| "ignorePaths": ["fixtures/**"], | ||
| "extends": [ | ||
| "local>jdx/renovate-config" | ||
| ], | ||
| "ignorePaths": [ | ||
| "fixtures/**" | ||
| ], | ||
| "packageRules": [ | ||
| { | ||
| "description": "Group Sigstore Rust crates so their shared pre-1.0 APIs stay aligned.", | ||
| "matchManagers": ["cargo"], | ||
| "matchPackageNames": ["/^sigstore-/"], | ||
| "matchManagers": [ | ||
| "cargo" | ||
| ], | ||
| "matchPackageNames": [ | ||
| "/^sigstore-/" | ||
| ], | ||
| "groupName": "sigstore crates" | ||
| }, | ||
| { | ||
| "description": "decmpfs 0.1.2 fails to compile for musl targets (FICLONE ioctl request typed c_ulong, which is c_int on musl). Hold at 0.1.0 until upstream fixes it.", | ||
| "matchManagers": ["cargo"], | ||
| "matchPackageNames": ["decmpfs"], | ||
| "matchManagers": [ | ||
| "cargo" | ||
| ], | ||
| "matchPackageNames": [ | ||
| "decmpfs" | ||
| ], | ||
| "allowedVersions": "<=0.1.0" | ||
| } | ||
| ] | ||
| ], | ||
| "minimumReleaseAge": "7 days", | ||
| "internalChecksFilter": "strict" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.