Skip to content

Commit 543c1b8

Browse files
committed
refactor: #2363 and #2364 filed; real Rush ran
Hosted and agent mode ran under real Rush 5.182.1 on four pnpm lines. Rush itself is clean. The real-Rush test of hosted mode has never run (#2363), and on pnpm 9 and 10 ordinary commands drop a hosted pin with no message (#2364). Assisted-by: Claude Code:claude-fable-5-2
1 parent 98b0fac commit 543c1b8

2 files changed

Lines changed: 88 additions & 15 deletions

File tree

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
[agent] 2026-11-29: architecture refactor
2+
3+
**`main`:** cfc870f. The run started at 08:56Z.
4+
5+
### Chosen
6+
No PR this run. Three routine PRs are open (#2261, #2265, #2267), so step 3 applies: open none and verify leads instead. All three are `ready` and unchanged since 2026-11-26: none merged or closed, and no maintainer has commented on the discussion. No `arch-audit` issue has been opened by anyone else since the last run, and no lead is left to verify.
7+
8+
So this run took an area no entry names: **a Rush monorepo**. The guide says all three modes work there, no per-tool routine has a label for Rush, and the one test of hosted mode under the real Rush is opt-in. Hosted and agent mode ran under Rush 5.182.1 with four pnpm lines. Rush itself is clean. Two problems came out of it: the real-Rush test has never run (#2363), and on pnpm 9 and 10 ordinary commands take a hosted patch out of the lock with no message (#2364).
9+
10+
### PR
11+
None opened. #2261, #2265 and #2267 still await review. `main` has not moved from cfc870f.
12+
13+
### Leads and issues
14+
15+
**New: L92, filed as #2363. Test code only.** `rush_hosted_real_rush_update_install` (CLI `tests/e2e_redirect_rush_sim.rs`, line 589) is the one test that runs hosted mode under the real Rush. It reports `ok` on three CI legs and runs nothing: no workflow sets `RUSH_E2E`, and with it set the fixture's Rush 5.100.0 fails `rush update` on a pnpm 9 lock, which the test prints as `SKIP … (network?)` and passes. The same Rush with pnpm 8.15.9 finishes, so it is the pairing, there since the test was added (e9b0a582). #1400 fixed this class for the suite's pnpm probe and left these two skips. With the Rush version set to 5.182.1 and nothing else changed, the test runs every assertion and passes on `main`. Two mutants of the hosted pnpm rewrite, one build:
16+
17+
```
18+
simulated tests real-Rush test … RUSH_E2E=1 … and Rush 5.182.1
19+
main pass "ok" (skipped) "ok" (skipped) pass
20+
M1: every Rush lock left alone fail "ok" (skipped) "ok" (skipped) fail
21+
M2: a lock with @rush-temp/ left pass "ok" (skipped) "ok" (skipped) fail
22+
```
23+
24+
M2 is the shape Rush writes without pnpm workspaces. No fixture in the repository holds it, so only a lock that Rush wrote reaches it.
25+
26+
**New: L93, filed as #2364.** On pnpm 9 and 10 a hosted pin is one `resolution` line, and these commands write the upstream release back, exit 0 and say nothing. Each cell starts from a scan and a frozen install into an empty store (node loads the patched file):
27+
28+
```
29+
9.15.9 one pkg 9.15.9 workspace 10.28.0, 10.34.9 one pkg … workspace
30+
install, --frozen, --fix-lockfile kept kept kept kept
31+
pnpm add / remove / update <other> kept LOST kept kept
32+
pnpm update LOST LOST LOST kept
33+
pnpm update -r, pnpm dedupe LOST LOST LOST LOST
34+
a second member adds the same release LOST LOST
35+
```
36+
37+
After `pnpm dedupe` on 10.34.9 pnpm prints "Already up to date", the developer's tree still holds the patched file, and a fresh clone of the committed lock installs the upstream one. `list` then says "No patches in this project" (exit 0) and `vex` the same (exit 2): the tool is truthful, and the next scan pins again. What is missing is the warning. For pnpm 11.20 and newer the registry route's text says pnpm "keeps them when it resolves again (`pnpm add`, `update`, `dedupe`)"; for 9 and 10 the scan names `pnpm clean --lockfile` and `--force` only, and the guide has the line for vlt and for Bun but not here. In a Rush repo the scan says "the hosted wiring survives `rush update`": true for the refresh, false after `rush add -p <the patched release>` in a second project (9.15.9 and 10.28.0), and after the same edit by hand in three runs of four on 9.15.9. A comment on the issue adds npm 10.9.9 and Yarn 1.22.22: a bare `npm update` or `yarn upgrade` loses the pin and installs the upstream file, undocumented; `bun update` does too, documented. The planned fix is wording in the warning and the guide. Whether pnpm 9 and 10 should get a pin that holds is left to a maintainer in the issue.
38+
39+
**Seen and not filed:**
40+
- **`rollback` in a Rush repo with `preventManualShrinkwrapChanges` prints no hint** that `rush install` will refuse the restored lock, where the scan warns (`redirect_rush_repo_state_stale`). Rush's own message names the remedy ("Please run \"rush update\""), and the lock is restored byte for byte.
41+
- **Agent mode's next steps in a Rush repo say "after every `npm install`"**, not `rush install`. Wording.
42+
- **An in-place install after the scan can leave the upstream file** (pnpm 9.15.9 alone; one subspace of two under Rush with pnpm 10.28.0). The scan's warning says so, and `vex` refuses with `not_applied`.
43+
44+
### Areas examined
45+
All with the binary built from `main`, real Rush 5.182.1 (5.100.0 for the test's own fixture), a real `left-pad` 1.3.0 and a stand-in patch API.
46+
47+
- **Hosted mode under Rush**, pnpm workspaces, on pnpm 9.15.9 and 10.28.0: the scan rewrites `common/config/rush/pnpm-lock.yaml`; `rush install` lands the patched file; `vex` attests; a fresh clone installs it; `rollback` restores the lock byte for byte. With `preventManualShrinkwrapChanges`, and a `rush.json` and `pnpm-config.json` that hold comments: `rush install` refuses, `rush update` recovers and keeps the pin. Clean.
48+
- **Subspaces** (pnpm 10.28.0): both locks pinned, both keep the pin through `rush update`, and an install into an empty `common/temp` lands the patched file in both.
49+
- **pnpm 12.21.0 and 11.28.12 under Rush**: a plain `rush install` fails with `ERR_PNPM_TARBALL_URL_MISMATCH`; `pnpm_config_trust_lockfile=true` installs the patched file on 12; on 11 that alone exits 0 with the upstream file and the experiment `usePnpmFrozenLockfileForRushInstall` fixes it. Each is what the warning says.
50+
- **A repo without pnpm workspaces** (the test's fixture, Rush 5.182.1): the lock with `@rush-temp/` entries is rewritten and installs.
51+
- **Agent mode under Rush**: the scan applies through the symlink farm, the pnpm store keeps its bytes, `apply --check` passes, a `rush purge` and `rush install` bring the upstream file back and `apply --check` then exits 1, `rollback` restores.
52+
- **What ordinary commands do to a hosted pin**: 11 pnpm commands on 9.15.9, 10.28.0 and 10.34.9, one package and a workspace; eight Rush commands on two pnpm lines; eight npm, five Yarn classic and five Bun commands.
53+
- Not run: vendored mode in a Rush repo (`e2e_vendor_rush` runs it against the real Rush in CI), Rush with npm or Yarn, pnpm 9.0 to 9.14, Yarn berry and vlt in the command matrix, and Windows.
54+
55+
### Lessons
56+
- **An opt-in test is a claim nobody checks. Grep the workflows for its variable, then run it opted in.** `grep -rn RUSH_E2E .github scripts` returned nothing, and the opted-in run printed its own SKIP. A skip that blames the network deserves the tool's real error: here it was three lines above.
57+
- **Find the pairing before blaming the sandbox.** One table of three `rush update` runs (the same Rush with an older pnpm, a newer Rush with the same pnpm) turned "fails here" into "fails everywhere".
58+
- **A mutant that only the real tool's files reach shows what a simulation leaves open.** The blunt mutant fails the simulated tests too, which proves little. The one keyed on a string that only Rush writes passes all of them.
59+
- **Start every cell of a command matrix from a clean install.** The first matrix began from an in-place install, where pnpm 9 still held the upstream file, and it mixed two causes. The second, from a frozen install into an empty store, is the one in the issue.
60+
- **Run a cell that surprises you again.** The Rush edit-by-hand cell kept the pin in the matrix and lost it three times by hand. The issue says "three runs of four", not "lost".
61+
- **Quote file names built from a label.** The first Rush matrix printed eight rows of the starting state because an unquoted redirect failed on a space; the exit codes of 1 were the tell.
62+
- **Real Rush here**: `npm x -y @microsoft/rush@5.182.1 -- <command>` in the repo, with every `RUSH_*` variable unset (Rush refuses unknown ones) and `HOME` set to a scratch home. Rush fetches the pnpm that `rush.json` names. `rush purge` returns at once and did not always clear `common/temp` in this sandbox: move the directory aside to get a clean install. The stand-in patch API is 70 lines of Python: `POST …/patches/batch`, `GET …/patches/by-package/<purl>`, `POST …/patches/package` (the grant: the tarball's URL and `integrity.sha512`), `GET …/patches/view/<uuid>` with the git-sha256 of `package/index.js` before and after, `GET …/patches/blob/<hash>` for agent mode, and the tarball. Pass `--api-url`, `--org`, `--api-token` and `--patch-server-url`. The patched tarball is `npm pack left-pad@1.3.0` with one line added.
63+
- The hunt took about 40 minutes of wall time: the CLI build 2, choosing the area 8, Rush by hand 8, the test and its mutants 14 (two builds, nine suite runs in the background), the command matrices 6, the two write-ups the rest.
64+
- The register was at 11,997 characters and is at 11,984. L92 and L93 joined the `filed` row, #2364 the Next PR line after #2355 and #2363 its test-only tail; the area is one phrase of the Areas row. To make room, six notes lost an aside each.
65+
- The owner was notified at 09:38Z of #2364 and #2363.
66+
67+
### Needs a person
68+
- **#2364:** on pnpm 9 and 10, `pnpm update` and `pnpm dedupe` take a hosted patch out of the lock with no message, and the scan never says they can. It asks whether those pnpm lines should get a pin that holds.
69+
- **Review #2261, #2265 and #2267.** This is the thirty-ninth run in a row that could only verify leads.
70+
- **#2270** still blocks `ci-ok` on every PR; #2280 is open for it.
71+
- **#2359 is in v5.0.0 and v5.1.0**, and **#2353 is new on `main` since v5.1.0 and not released.**
72+
- **#2347, #2340, #2309, #2277 and #2297 need an answer.** **#2299**, **#2315** and **#2362** each ask which of two fixes a maintainer prefers.
73+
- Fifty-five confirmed problems wait for a slot, in the order the register's "Next PR" line gives.

0 commit comments

Comments
 (0)