Skip to content

chore(tests): re-measure the unit lane against its stated Tier 1 budget - #994

Merged
sydevs-bot merged 12 commits into
mainfrom
claude/chore-990-unit-lane-budget
Oct 20, 2026
Merged

sydevs-bot merged 12 commits into
mainfrom
claude/chore-990-unit-lane-budget

Conversation

@sydevs-bot

@sydevs-bot sydevs-bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Measured the unit lane: 204 files, 2653 tests. Three sessions on one container spec, all on 2026-10-20, read 47 · 59 · 78 s — where the docs claimed 1–2 s for ~200 cases.
  • Both of chore(tests): re-measure the unit lane against its stated Tier 1 budget #990's branches apply, to different tiers. Tier 2's target was stale and is raised. Tier 1's is now < 12 s per edit, measured from what a narrowed hook costs rather than from the lane or from one spec.
  • The hook misses it by timing out, so every src/** edit is told its tests failed while 2653 pass. The repair is fix(tests): the per-edit hook times out and reports a false failure #993 — the hook is a protected path.
  • The invariant is a spec, not prose (tests/unit/perf-figures-pinned.spec.ts). It caught two live defects in this PR's own figures.

Change outline

The three-tier contract is the thing that changed. One rule per line, from
docs/rules/testing-reqs.md § Three-tier speed contract.

 Tier 1 — Hook   `pnpm test:unit`
-  target < 5 s                       # claimed, never measured
+  target < 12 s per edit — not met   # bounds the WIDEST measured edit (7.8 s)
+  the lane is 47–78 s, so the hook's 30 s timeout always fires
+  → the report says "Unit tests failed" and carries no failure
+  → disregard it, run `pnpm test:unit` yourself, until #993
 Tier 2 — Pre-PR  lint + typecheck + typecheck:tests + test:unit
-  target < 45 s
+  target < 210 s                     # over the SLOWEST cold check.sh (174 s)
 Tier 3 — CI      ≤ 20 min            # unchanged

Where a figure lives, who may state one, and what reds when they disagree.
tests/PERF.md held the integration lane's numbers already; it now holds the
unit lane's, and is the single writer the other four quote.

 tests/PERF.md                        # was: integration lane only
+├── the invariant                    # every tier figure elsewhere is a copy of one here
+├── How to measure                   # + the unit lane, and its widest per-edit selection
+├── The unit lane — 2026-10-20       # THREE sessions' measurements, and their spread
 └── The integration lane …           # two headings scoped, bodies untouched
+tests/unit/perf-figures-pinned.spec.ts   # NEW — the invariant, as a check that can go red
 docs/rules/testing-reqs.md           # 5 figures → measured, + the ⚠ hook paragraph
 tests/AGENTS.md                      # lane table + the typecheck:tests figure
 AGENTS.md, README.md                 # "the fast unit lane" → the number

Why Tier 1 targets 12 s

< 5 s and ~65 s were the two options put to review. Neither survived the
measurement, for opposite reasons, so the reviewer's ask for a middle ground
is what the number now rests on.

Tier 1's target is a per-edit cost, so what it bounds is a narrowed hook's
selection — not the lane.
Selecting the specs that name an edited module
measures:

An edit to Specs selected Cost
the median module 1 1.3 s
@/plugins/login 7 6.9 s
@/payload-types, the generated file 18 7.8 s

12 s bounds the widest of those with room for the spread below, and matches
SahajAtlasWeb's own measured per-edit budget on the same core count — the
hook this one would copy (#993). 5 s sits below the widest real selection,
so no hook reaches it, which is a sharper objection than the one this PR first
made. 65 s was the whole lane wearing the hook's name.

What the spec holds, and what it deliberately does not

Four claims, each red on its own:

  1. PERF.md's recorded file count against the *.spec.ts files on disk. The one figure a machine settles without timing anything, and the proxy for the lane growing — 113 files carried < 5 s to 198 unnoticed.
  2. Every consumer doc quotes PERF.md's lane figure, so a re-measurement that stops at PERF.md reds all four rather than passing quietly.
  3. Tier 2's target covers the gate its own row names, cold.
  4. Tier 1's target covers the widest recorded per-edit selection — what stops it drifting back to a figure no hook can meet.

⚠ It asserts no wall-clock time. A timing bound inside the lane reds on a loaded machine, and a check everyone learns to ignore is worth less than the prose it replaced. Re-measuring therefore edits PERF.md and the four consumers in one commit, by design.

Preview

Docs and one spec — no route, field or behaviour changes, so the Railway preview
renders nothing this PR touches. The diff is the whole change.

Test results

  • Lean gate: ✓ .claude/skills/pr-prep/check.sh — lint, typecheck, typecheck:tests, test:unit. 110 s this session, against 138 s and 174 s before; the target still bounds the slowest.
  • Targeted specs: 2653 passed (204 files), the whole unit lane, twice more while measuring
  • The new spec: 11 cases. Every one was watched failing against a real or injected defect before it was kept — three were live: the stale 198, Tier 2's 120 s target, and Tier 1's 5 s against the 7.8 s widest edit.
  • Build: N/A — CI does not build; Railway does, and no source changed

Manual verification

  1. Take the measurement on your own machine — the one acceptance criterion a routine container cannot satisfy:
    nproc && time pnpm test:unit
    Add a row under The unit lane in tests/PERF.md with your core count, and update the four consumer docs — the new spec reds until you do. The container's figures are an upper bound, not your number.
  2. Check the per-edit figure Tier 1's target rests on, which is the half a narrowed hook will pay:
    time pnpm exec vitest run $(grep -rl "from '@/payload-types'" tests/unit) \
      --project unit --config ./vitest.config.mts
  3. Watch the false failure, so the ⚠ paragraph is not taken on trust:
    echo "{\"tool_input\":{\"file_path\":\"$PWD/src/lib/richEditor/index.ts\"}}" > /tmp/edit.json
    CLAUDE_PROJECT_DIR=$PWD node .claude/hooks/unit-test.mjs < /tmp/edit.json
    It prints Unit tests failed after editing src/lib/richEditor/index.ts after 30 s, with only Vitest's banner in the tail.

Notes for reviewer

  • The question thread is answered and closed. 12 s is the middle ground, built in 926df32, and claim 4 above is what holds it there. No thread is open.
  • The headline number is unreliable, and that is the finding. Three sessions on the same container spec, the same day, with 3% more files across the range: 59.2 → 77.9 → 47.2 s, a 66% span, the fastest reading taken on the most files. check.sh moved the same way: 138, 174, 110 s. So every target bounds the slowest reading recorded for it, never a median, and PERF.md says not to read a 60% move as a regression. All three samples are kept.
  • fix(tests): the per-edit hook times out and reports a false failure #993 carries what this PR may not write. .claude/hooks/unit-test.mjs and .claude/skills/pr-prep/check.sh are protected paths, so the hook repair and the last two "fast unit lane" claims need an attended session. fix(tests): the per-edit hook times out and reports a false failure #993 says so at the top, so the loop hands it back rather than stalling on it.
  • The worth-checking judgement: the serial-floor claim. wall = S + P/N fitted to the first session's 1- and 4-worker runs gives S ≈ 19 s, and that fit predicts its 3-worker run to within 0.2 s. It is two points fitted and one point confirming, not a proof. Its unmeasured 15- and 63-worker extrapolations were cut. It is why narrowing the hook, not cutting the lane, is the route to any per-edit budget.
  • Review findings — /code-review high returned seven, all in derived claims rather than measurements, all confirmed by re-measuring and fixed in 1195487. None dismissed. The adversarial review then returned three; all three are adopted. The one worth naming: the first commit's 53e4569 breadcrumb was this clone's shallow graft commit, not the commit it claimed; git fetch --deepen=300 reaches the real one.
Detail

Why Tier 2's target is 210 s and not 120. The row names check.sh as what fires it, and check.sh also starts Postgres through scripts/ensure-test-db.sh — which the four commands' 104 s excludes. Cold runs measured 138, 174 and 110 s. A target set on one reading of a varying measurement is the drift this PR exists to stop, so the target bounds the slowest cold run on record and the rule is written down.

Why not make the lane itself faster. isolate: false on the unit project would plausibly bring the lane under the hook's 30 s timeout, and was not measured or taken: it masks the false failure without reaching any per-edit budget, and it shares module state across spec files, which the lane's vi.resetModules() env-swap pattern and its five jsdom specs rely on not happening. Recorded in #993 as the rejected alternative.

Measurements behind the claims (4 cores, Intel Xeon @ 2.80 GHz, 15 GB, routine container, 2026-10-20).

  • Third session, after merging main again, 204 files / 2653 tests: lane 47.16 / 46.38 / 47.82 s, median 47.2 s; phases transform 10.0 s, import 90.5 s, tests 12.9 s, environment 3.6 s; check.sh 110 s. Per-edit selections 1.3 s (1 spec), 6.9 s (7), 7.8 s (18).
  • Second session, 203 files / 2643 tests: lane 82.19 / 77.93 / 73.21 s, median 77.9 s; phases transform 14.4 s, import 141.6 s, tests 17.5 s, environment 5.2 s; check.sh 174 s cold.
  • First session, 198 files / 2575 tests: 60.29 / 58.75 / 59.23 s, median 59.2 s; 1 worker 140.5 s, 4 workers 49.2 s; slowest file 1.8 s; one spec alone 1.9–3.0 s; lint 28.5 s, typecheck 8.4 s, typecheck:tests 8.2 s, the four summed 104 s; check.sh 138 s cold, 103 s warm.

The consumer docs still quote 78 s, the slowest median, because that is the upper bound the invariant asks for. A reader whose own lane runs in 47 s is not reading a stale doc.

How stale the figure was. 228c3a1 (2026-09-02) moved docs/rules/testing-reqs.md to its current path carrying < 5 s, over 113 spec files. Its own origin is older than this clone reaches, deepened or not.

Base merged twice. origin/main merged in cleanly at the start of each session, so every commit builds on the current base. #985 brought four unit specs and #978 brought a fifth — each time the file-count claim is what caught the stale figure, which is the clearest evidence the spec earns its place.

Tool limitation hit. The routine clone is shallow, so git log -S reports the graft commit as the origin of any string older than the window. It looks exactly like a real answer. git fetch --deepen=<n> and a re-run is the check.

Closes #990


🤖 Generated with Claude Code

https://claude.ai/code/session_01YGohWMMXeuCCytWsDLHL1N

`docs/rules/testing-reqs.md` gave Tier 1 `< 5 s` and Tier 2 `< 45 s`, and
`tests/AGENTS.md` called the unit lane "~1–2 s for ~200 cases". Measured on
4 cores: the lane is 59 s for 198 files and 2575 tests, and the lean gate is
138 s. `README.md` and the root `AGENTS.md` both called the lane "fast".

Both branches of #990 apply, to different tiers. Tier 2's target was stale,
so it is raised to the measurement. Tier 1's is not stale — 5 s is what the
per-edit hook needs, and one spec costs 1.9 s — so it is kept, and what
misses it is the hook running all 198 files to answer about one.

That gap is not latency. `.claude/hooks/unit-test.mjs` bounds the lane with a
30 s `execSync` timeout, so at 59 s the timeout always fires and the catch
branch reports `Unit tests failed after editing <file>` with a tail holding
no failure. Every src edit is told its tests broke while 2575 of them pass.
The repair is #993: the hook sits under a protected path, which no unattended
run may write.

The numbers live in `tests/PERF.md`, which already held the integration
lane's, with the machine, the date and the Vitest breakdown behind each. The
four other docs now quote it and say so, so the next drift has one place to
go red rather than four prose claims to contradict.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GF8TwbmG6sGqbDKXnommQN
The `/code-review high` pass found seven defects, all in what the first
commit *derived* rather than in what it measured. Re-measuring settled each:

- Vitest's non-watch default is `max(cores - 1, 1)`, so 59.2 s is a 3-worker
  figure, not 4. Dividing it by cores made the extrapolation several times
  too fast. `--maxWorkers=4` is 49.2 s, measured.
- Fitting `wall = S + P/N` to the 1- and 4-worker runs gives S ≈ 19 s,
  P ≈ 122 s, and predicts the 3-worker run at 59.4 s against 59.2 s measured.
  The serial floor, not a core count, is why no machine reaches 5 s — a
  stronger claim than the one it replaces, and one three runs support.
- The `53e4569` breadcrumb was this clone's shallow graft, not the commit it
  named. `git fetch --deepen=300` reaches `228c3a1` (2026-09-02), which moved
  `testing-reqs.md` to its current path carrying `< 5 s` over 113 spec files.
- Tier 2's 138 s is `check.sh`, which also starts Postgres. The row's own four
  commands sum to 104 s. Both are now stated, each against what it measures.
- `typecheck` "15–20 s" and `typecheck:tests` "6 s" are 8 s each, and were
  violating the invariant the same commit introduced. Measured and recorded.
- One spec is 1.9–3.0 s, not 1.9 s, and a narrowed hook runs several. #993
  now owes the per-edit number rather than inheriting a guess.
- `/usr/bin/time -p` is absent on the routine containers (exit 127). All four
  measurement commands take the shell keyword.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GF8TwbmG6sGqbDKXnommQN
A second `check.sh` run came in at 103 s against the first run's 138 s, which
lands the warm figure on the four commands' own 104 s sum. The 35 s is
`scripts/ensure-test-db.sh` starting Postgres, which costs nothing once port
5432 answers — so the gate has two honest numbers, not one, and which you get
depends on whether a database is already running.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GF8TwbmG6sGqbDKXnommQN
@railway-app
railway-app Bot temporarily deployed to sahajcloud / SahajCloud-pr-994 October 20, 2026 16:30 Destroyed

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 question for the reviewer, one per thread.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread docs/rules/testing-reqs.md Resolved
@railway-app

railway-app Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

🚅 Deployed to the SahajCloud-pr-994 environment in sahajcloud

Service Status Web Updated
SahajCloud ✅ Success (View Logs) Web Oct 20, 2026 at 4:41 pm UTC
1 service not affected by this PR
  • mailpit

@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 20, 2026
@sydevs-bot

sydevs-bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 no session running

recent dispatches
  • 18:28Z address-review · attempt 1 · session · done
  • 18:28Z address-review · attempt 1 · session
  • 16:52Z address-review · attempt 1 · session · done
  • 16:52Z address-review · attempt 1 · session
  • 16:44Z review-pr · attempt 1 · session · done

Written by the sydevs dispatcher. Sessions never edit this comment.

@sydevs-bot sydevs-bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧐 Adversarial review

The diff matches #990: it measures the lane, records the result with machine and date, and makes the five stated numbers agree. Scope is right — the two surviving stale claims are under .claude/, a protected path, and #993 carries them rather than this PR stalling. Keeping Tier 1's 5 s and raising Tier 2's is the defensible split, and the question thread leaves that choice to you.

One gap against the ticket: it asked to keep the decision checkable, and the answer is prose — what went stale the first time. tests/PERF.md grew 92 lines for a figure, a core count and a date, a third of it the authoring run's own story.

Findings

  • consider — the measurement invariant has no enforcement, where #990 asked for checkable (tests/PERF.md:15).
  • consider — Tier 2 targets < 120 s while the gate named in the same row measures 138 s cold (docs/rules/testing-reqs.md:26).
  • consider — two paragraphs document the authoring session, not the lane (tests/PERF.md:91 and 84–89).

What was checked

  • Profile read. All 5 changed files read whole, plus the hook, check.sh, #990, #993.
  • The ⚠ hook paragraph holds: the timeout is 30000 ms, and the catch branch prints Unit tests failed after editing <file>.
  • find tests/unit -name '*.spec.ts' | wc -l → 198, matching the "198 files" claims.
  • Grepped every *.md, *.sh and *.mjs for fast unit, 1–2 s, under 5 second, 45 s. Only the two .claude/ files #993 lists survive, so no writable claim was missed. /usr/bin/time is absent here, so that ⚠ holds too.
  • #993 carries both hook defects, the three stale claims and the rejected isolate: false alternative, so #990's third criterion is met.
  • Not verified: the getDefaultThreadsCount citation — no node_modules here. Timings not re-run. No preview to open, no contract surface touched.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

Comment thread tests/PERF.md Resolved
Comment thread docs/rules/testing-reqs.md Resolved
Comment thread tests/PERF.md Resolved
@sydevs-bot sydevs-bot added bot:working Lock: a cloud session is running on this item. Removed when it ends. and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 20, 2026
`tests/PERF.md` declared itself the single writer of every tier figure and
nothing held it to that, which is how `< 5 s` came to describe a 59 s lane.
#990 asked for the decision to stay checkable; the answer was prose.

`tests/unit/perf-figures-pinned.spec.ts` reds on each of the three ways the
figures can drift apart: the recorded file count against the specs on disk,
a consumer doc that stops quoting PERF.md's lane figure, and a Tier 2 target
below the cold cost of the gate its own row names.

It asserts no wall-clock time on purpose. A timing bound inside the lane
goes red on a loaded machine, and a check people learn to ignore is worth
less than the prose it replaced.

Addresses #994 (comment)

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014mDVAnCGQKXxtEwbwXQ7Zq
The row targeted < 120 s while naming `check.sh` as what fires it, and
`check.sh` measures 138 s on a session's first run: it also starts Postgres
through `scripts/ensure-test-db.sh`, which the four commands' 104 s excludes.
A target the named gate cannot meet is the drift this PR is about, one tier
up.

The target now bounds the gate, cold, and the row carries both figures so
nothing has to re-derive which one it is.

Addresses #994 (comment)

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014mDVAnCGQKXxtEwbwXQ7Zq
Two passages described the run that wrote this file rather than the lane it
measures, in a file whose new opening declares every figure a measurement.

The `228c3a1` paragraph dated the staleness and then reported that the clone
could not reach the figure's origin. Someone re-measuring uses neither, and
the PR body carries the shallow-clone caveat already.

The 15- and 63-worker numbers were extrapolations, not runs. The `S ≈ 19 s`
fit they hung off stays: it is why no core count reaches 5 s, which is the
claim the budget decision rests on.

Addresses #994 (comment)

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014mDVAnCGQKXxtEwbwXQ7Zq
Merging `main` brought #985's four specs in, so the recorded 198 files and
2575 tests described the branch before the merge. The new spec is a fifth.
203 / 2643 now, and the figure pinned in all four consumer docs follows.

Re-measuring on the current base also turned up something about the figures
themselves. Three runs give a 77.9 s median against the first session's
59.2 s, on the same container spec, the same day, for 2.5% more files — and
the three runs fell monotonically from 82 s to 73 s as caches warmed. So a
single container's reading is reproducible to about ±30% and no better. Both
samples are recorded rather than one replacing the other, the slower median
is what the consumers quote, and the file says not to read a 20% move as a
regression.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014mDVAnCGQKXxtEwbwXQ7Zq
This session's own lean-gate run took 174 s, against the 138 s recorded from
the previous one — so a 150 s target was already false when it was written,
for the same reason the lane's two medians sit 30% apart.

A target set on one reading of a varying measurement is the drift this PR
exists to stop, so the rule is now stated: Tier 2's target bounds the
slowest cold run on record, and both cold figures are in `tests/PERF.md`.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_014mDVAnCGQKXxtEwbwXQ7Zq
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Three threads adopted, main merged in first — clean, and #985's four specs made this PR's own file count stale.

  • Enforcement — tests/unit/perf-figures-pinned.spec.ts (4e8bbbc) holds the PERF.md invariant: file count against disk, each consumer doc's lane figure, Tier 2's target against the gate's cold cost.
  • Tier 2 vs its own gate — e419b06, 60dc843. Target is < 210 s, over the slowest cold check.sh on record.
  • Authoring prose — 9381ebd. Both passages cut; the S ≈ 19 s fit stays.

The figures are less reproducible than this PR claimed (575fdda). 203 files / 2643 tests, median 77.9 s against the first session's 59.2 s — same container spec, same day. The gate ran 174 s against 138 s. Both samples recorded; the docs quote the slower.

Tier 1's question thread stays open. Lean gate green.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot removed the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 20, 2026
@sydevs-bot
sydevs-bot marked this pull request as ready for review October 20, 2026 17:31
@sydevs-bot
sydevs-bot requested a review from Ardnived October 20, 2026 17:31
@sydevs-bot
sydevs-bot enabled auto-merge October 20, 2026 17:32
@sydevs-bot sydevs-bot moved this from Revising to Approved in SYDevelopers Technical Roadmap Oct 20, 2026
@sydevs-bot sydevs-bot added the bot:working Lock: a cloud session is running on this item. Removed when it ends. label Oct 20, 2026
Tier 1 asked for a middle ground between 5 s and the lane, and the only
per-edit cost that is reachable is a narrowed hook's. Measured it: the
specs naming an edited module are 1 file for the median module (1.3 s),
7 for `@/plugins/login` (6.9 s) and 18 for the generated
`@/payload-types` (7.8 s). The target is 12 s — it bounds the widest of
those with room for the spread this file now records, and it matches
SahajAtlasWeb's own measured per-edit budget on the same core count,
whose hook this one would copy.

5 s sat below the widest real selection, so no hook could meet it. 65 s
was the whole lane wearing the hook's name.

The spec gains the claim that keeps it honest: Tier 1's target covers the
widest recorded selection, the way Tier 2's covers its cold gate. Watched
it red against the old 5 s before keeping it.

A third session's measurement comes with it. The merged base added a
spec, which the file-count claim caught, and the lane measured 47 s where
the last session read 78 — three medians spanning 66% on one container
spec in one day. The docs keep quoting the slowest as an upper bound.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YGohWMMXeuCCytWsDLHL1N
The new Tier 1 claim is itself a case, so the lane runs 2653 and not the
2652 the previous commit recorded. Found by running the gate, which is
the only thing that reports this figure — the spec pins the file count to
disk and takes the test count on trust.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01YGohWMMXeuCCytWsDLHL1N
@sydevs-bot

Copy link
Copy Markdown
Contributor Author

Tier 1 targets < 12 s per edit — the middle ground you asked for, in 926df32. Lean gate green.

Adopted — the Tier 1 thread, resolved. The target is a per-edit cost, so I measured what a narrowed hook costs: 1 spec for the median module (1.3 s), 7 for @/plugins/login (6.9 s), 18 for the generated @/payload-types (7.8 s). 12 s bounds the widest and matches SahajAtlasWeb's measured budget on 4 cores. The spec gained a claim that reds if the target drops below the widest recorded edit — watched it fail against 5 s first.

The base merged clean, and brought a fifth unit spec. The file-count claim caught it, so the counts are now 204 / 2653.

One finding, not a thread. The lane measured 47 s here against 78 s last session — same container, same day, more files. A 66% span across three readings, so every target now bounds the slowest reading recorded for it, never a median. The docs keep quoting 78 s.

Nothing is open. #993 still carries the hook itself.

🤖 Written by the sydevs autonomous loop — see what this is


Generated by Claude Code

@sydevs-bot sydevs-bot added awaiting and removed bot:working Lock: a cloud session is running on this item. Removed when it ends. labels Oct 20, 2026
@sydevs-bot
sydevs-bot added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit bb64d7b Oct 20, 2026
33 checks passed
@sydevs-bot
sydevs-bot deleted the claude/chore-990-unit-lane-budget branch October 20, 2026 19:15
@sydevs-bot sydevs-bot moved this from Approved to Done in SYDevelopers Technical Roadmap Oct 20, 2026
sydevs-bot pushed a commit that referenced this pull request Oct 20, 2026
#994 re-measured the unit lane and rewrote every tier figure. Three files
conflicted, and all three are files this branch touches only in 3b05cad, the
pure `prettier --write` commit — so each took main's content and was
re-formatted, rather than merged hunk by hunk:

- README.md — #994's `test:unit` row, naming the 78 s figure
- tests/AGENTS.md — #994's unit-lane speed cell
- docs/rules/testing-reqs.md — #994's tier targets, its Tier 1 false-failure
  block and its 8 s typecheck figures, plus this branch's own two additions
  re-applied on top: `pnpm format:check` in the Tier 3 row, and the paragraph
  on why Tier 2 omits it

README.md and tests/AGENTS.md are byte-for-byte `prettier(main's version)`.
AGENTS.md auto-merged and differs from it only by this branch's three
hand-written lines.

#994 also adds tests/unit/perf-figures-pinned.spec.ts, which captures each
figure out of tests/PERF.md with patterns written against single-space table
pipes. Prettier pads a table's columns to its widest cell, so every capture
missed and the suite threw at module scope — 11 cases, red before this commit
and green after. The patterns now allow whitespace around a cell's pipes, which
pins the same figures under either spelling. PERF.md's note on keeping the cell
shapes says so too.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PboE8yeU78GsynhzDDTr2a
sydevs-bot pushed a commit that referenced this pull request Oct 20, 2026
#1007 moved the per-block field notes out of `src/collections/AGENTS.md`
into `src/lib/richEditor/blocks/AGENTS.md`, keeping only the `⚠` bullet
reporting #989. This branch fixes #989, so that bullet is now false in
both files it landed in: the condition reads `imagePosition`, and the
checkbox renders.

Took main's structure — the block table stays moved, not restored — and
dropped the stale warning. `blocks/AGENTS.md` keeps the field note in the
shape of its `textColor` twin, with the #989 breadcrumb and the reason
`position` is the wrong name.

#994's new `perf-figures-pinned` spec then went red on a conflict no
textual hunk shows: it pins `tests/PERF.md`'s spec count to the files on
disk, and this branch adds the 205th. PERF.md records the current tree's
counts by its own rule, so it and the four consumer docs move together,
as that spec requires.

Lean gate green: lint, typecheck, typecheck:tests, 2657 tests across 205
files. `tests/int/translations-field.int.spec.ts` 26 passed.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01VMsfQPCwjEaRYV2sLpaeP9
sydevs-bot pushed a commit that referenced this pull request Oct 20, 2026
Main's #1007 trimmed the agent guides; this branch extends two of the files
it trimmed. Three hunks, resolved toward both sides:

- `docs/rules/access.md`: took #1007's removal of the manager-role table, a
  config copy it cut deliberately. The dropped `atlas-manager` row carried
  one thing the config does not show — that `imports: create` is also what
  keeps the collection's admin pages visible — so that moved onto the
  `imports` paragraph, which already owns the collection's access block.
- `docs/rules/admin-ui.md`: took #1007's trim of the `@payloadcms/ui` table
  and of the custom-field paragraph. `ProgressBar` is exported, so the
  warning below the table no longer had a curated list to be absent from;
  it now names what the component actually is.
- `docs/rules/admin-ui.md`: kept the `WorkflowButtons` section. It documents
  `src/components/admin/WorkflowButtons/`, which only this branch carries,
  so #1007 never saw it.

`tests/PERF.md` needed a count, not a resolution. #994 recorded 204 unit
specs and #990's spec pins that figure to the tree, so the merged tree's 215
files and 2783 tests reddened it with neither side wrong. Re-recorded the two
counts, and the three consumer docs that restate them. Timings are untouched:
PERF.md keeps each one with the session that measured it.

Lean gate green: lint, typecheck, typecheck:tests, 215 unit files / 2783
tests, in 83 s.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012KhBAi8xKwJspy75uAvmDV
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

chore(tests): re-measure the unit lane against its stated Tier 1 budget

3 participants