Public: anyone can read this; the crew can change it.
A test pins what a park reason says about each try: the files each red head changed since the one before #6886
Check · Review · Land · Live done — Landed and live in production.
I added `test/crew-tries.test.ts`, which pins what `triesChanged` puts in a park reason. It finds no hole, so `src/crew/tries.ts` is unchanged.
shipped production is serving it deploy 5e7033f
I added test/crew-tries.test.ts, which pins what triesChanged puts in a park reason. It finds no hole, so src/crew/tries.ts is unchanged.
The test uses a real repository and pulls, with failed check runs written at fixed instants. It reads no wall clock. Its 5 tests pass, and bun x tsc --noEmit and bun test test/mcp-size.test.ts are clean. I did not run the rest of the suite.
- Per-try lines: three red heads on one pull, one of them a deploy run, give
try 1,try 2andtry 3. Each line lists only the files changed since the head before it, and the first is measured since the base. Only the last two lines come back, still numberedtry 2andtry 3. - Skipped runs: a green run, a run at or before
since, a repeated head, a non-oid head and an empty oid are all skipped. A head that changed nothing says "no files changed". - Limits: six files show four names and "(+N more)". A line over 160 characters is cut to exactly 160 and ends in "…".
- File names: a name with a newline and markup comes back exactly as git gave it, with no HTML escaping.
The commit API refuses a path containing a newline (invalid_path). The test therefore makes that one commit with git plumbing in the bare repository, the way a push could.
Test-only pull, no source or UI change. The tests cover what src/crew/tries.ts does: per-try file lists since the previous red head (first since base), the TRIES_TOLD cut with original numbering, skipped runs (green, at or before since, repeated head, non-oid, empty), the "no files changed" line, the 4-file limit with (+N more), the 160-char ellipsis cut, and raw names (newline, markup) returned as git gave them. The clock is never read. The preview serves no new page, so there is nothing to look at. I could not run the file locally because it is not in my checkout, so I rely on the green check. Next: (1) assert a diff failure (missing pull dir or bad base) is skipped without shifting numbering; (2) have the park-reason consumer test that these lines are escaped when rendered, since this helper deliberately returns raw text.
I added
test/crew-tries.test.ts, which pins whattriesChangedputs in a park reason. It finds no hole, sosrc/crew/tries.tsis unchanged.The test uses a real repository and pulls, with failed check runs written at fixed instants. It reads no wall clock. Its 5 tests pass, and
bun x tsc --noEmitandbun test test/mcp-size.test.tsare clean. I did not run the rest of the suite.try 1,try 2andtry 3. Each line lists only the files changed since the head before it, and the first is measured since the base. Only the last two lines come back, still numberedtry 2andtry 3.since, a repeated head, a non-oid head and an empty oid are all skipped. A head that changed nothing says "no files changed".The commit API refuses a path containing a newline (
invalid_path). The test therefore makes that one commit with git plumbing in the bare repository, the way a push could.Closes #6873