Repository navigation
Commit cf31c34
test(spec): the two type-graph test files declare their measured CI budget (#24015)
Part of #23180
Clause-②: no
Two `packages/spec` test files each gain one header line in the third
test-budget class, `compiles the package type graph once`. This is item
3 of ruling record `6212133431` (#23821, letter A). The number follows
item 2 of ruling record `6181973363`: the measured CI reading x 1.25,
rounded up to the next 10 s. Both files declare **30 s**. #23180 stays
open for its other rows; this PR covers only these two.
| file | line 2 |
|:--|:--|
| `src/contracts/scoped-context.test.ts` | `// test-budget: 30 —
compiles the package type graph once: …` (slowest reading 17.1 s, run
`38865071010`) |
| `src/integration/connector-author-shape.test.ts` | `// test-budget: 30
— compiles the package type graph once: …` (slowest reading 21.8 s, run
`38904808867`) |
The reason in each line says why the file belongs to the class: every
probe is compiled in one `ts.createProgram` over the spec entry barrels
it imports. The first read pays that program's type-graph resolution,
and every later probe reads the same program. Each file has exactly one
`ts.createProgram(` call (`:117` and `:131` after this PR).
## The CI reading: 2026-10-16, Test Core (1/6)
Source: the vitest module lines of `@objectstack/spec:test` (the `local`
project, which holds both files) in the `Test Core (1/6)` job of every
hourly scheduled `ci.yml` run on 2026-10-16 UTC, from `00:02Z` to
`17:01Z` (18 runs). Each log was read with the MCP `get_job_logs` tool.
It returns the last 5000 of about 22,100 lines, and both module lines
sat inside that window in every executed run.
**Executed runs (9).** In each, the `local` project's `Start at` falls
inside the job's own window, so the lines are this run's measurement.
| run (UTC) | `connector-author-shape` | `scoped-context` |
|:--|--:|--:|
| `38833767749` (01:11) | 16.80 s | 14.65 s |
| `38838260718` (02:01) | 15.91 s | 14.04 s |
| `38848429828` (04:01) | 18.14 s | 16.71 s |
| `38858901527` (06:02) | 12.56 s | 10.87 s |
| `38865071010` (07:06) | 20.36 s | **17.06 s** |
| `38877591164` (09:01) | 12.93 s | 9.85 s |
| `38891051243` (11:01) | 18.07 s | 16.50 s |
| `38904808867` (13:02) | **21.77 s** | 16.45 s |
| `38936452003` (17:01) | 17.19 s | 15.58 s |
**Not used (9): cache replays.**
- `38827152315` (00:02), `38853598892` (05:01) and `38928622617`
(16:01): the replayed `local` summary reads `Start at` 23:09:27,
04:45:28 and 15:41:37, all before the job began.
- `38843417737` (03:01): the log prints `@objectstack/spec:test: cache
hit, replaying logs`.
- `38912391826` (14:01) and `38920490313` (15:01): the `Test Core`
aggregator lists `@objectstack/spec` among its cache-replayed packages,
and its `check-liveness.test.ts (local)` row reads `replayed log`.
- `38870924976` (08:01), `38884415435` (10:01) and `38897680323`
(12:01): the `local` summary is not in the readable tail, which begins
1.2 to 1.4 minutes into the job. So it printed before that point. An
executed `local` project took 349 to 530 s in the runs above, so only a
replay finishes that early. PR #23937 also counted these three runs as
replayed.
**Arithmetic.** I took the slowest of the 9 executed readings, as PR
#23937 did:
- `connector-author-shape`: 21.773 s x 1.25 = 27.22 s, rounded up to
**30**.
- `scoped-context`: 17.059 s x 1.25 = 21.32 s, rounded up to **30**.
The ruling estimated about 30 s from 16.7 s and 18.1 s. Today's slowest
connector reading (21.8 s) is higher, but it still rounds to 30.
## Verification
All local checks ran at `15e9714ffd`, the head of this PR.
- **The refresh's own parser reads both lines.** I ran the one-line
check from PR #23897's body on each file:
```
{ seconds: 30, cls: 'compiles the package type graph once', reason:
"every probe (…) … rounded up", line: 2 }
```
Both exit 0. `declaredBudgetInTree('@objectstack/spec', FILE)`, the
reader `--diff` uses, returns `{"seconds":30,"cls":"compiles the package
type graph once","line":2}` for both.
- `node scripts/measure-test-shard-timings.mjs --self-test`:
`measure-test-shard-timings: self-test OK`, exit 0.
- **The two files.** I ran them once under `os-verify-lock`: `pnpm
--filter @objectstack/spec exec vitest run --project local
--maxWorkers=2` on the two paths gave `Test Files 2 passed (2)`, `Tests
19 passed (19)` and `VERDICT command-exit 0`. That is 8 + 11 tests, the
same counts the CI module lines show.
- **Typecheck.** `pnpm --filter @objectstack/spec typecheck` under
`os-verify-lock` gave `VERDICT command-exit 0` (`check:test-typecheck:
OK — … 52 file(s) / 242 error(s) / 132 pinned signature(s) held`).
- **The full spec suite was not run locally.** It takes about 900 s on
CI. This PR adds one comment line per file, and CI's `Test Core` runs
the suite.
- **No ablation.** No tested behaviour changed; the diff is comment
lines only.
- **Gates.** `node scripts/pm/dispatch-gates.mjs --commands --repo
objectstack-ai/objectstack` derived 76 commands against merge base
`61a680956`.
- 73 exited 0 on the first pass, each exit code captured before any
pipe.
- `check:doc-formula-expressions` and `check:lean-entry-closure` first
exited 3 (unbuilt `@objectstack/lint` and `@objectstack/objectql`). Both
exited 0 when re-run after a scoped build, which makes 75.
- `check:dual-build-cjs-loads` exited 3 and is NOT MEASURED. It needs
every package's `dist`, and it reads no test file. CI runs it.
- `--ran`: `✓ dispatch-gates --ran: 76 derived famil(ies) accounted for
— 75 run, 1 NOT-MEASURED (1 DERIVED from a recorded exit 3).`
- **Not governed.** `check-governed-merges --branch`: `0 of 2 path(s)
hit the register`, 2 changed lines.
## Acceptance notes
- Only the two header lines change. Every `expect` is byte-identical.
Nothing is deleted, no timeout is raised and no project is moved (ruling
record `6181973363`, item 5).
- **Publishing.** `@objectstack/spec`'s `files[]` ships `dist` and
`src/**/*.zod.ts` from source, never a `*.test.ts`. `npm pack --dry-run`
at this head lists 2094 files with 0 `*.test.ts`; the controls
`src/integration/connector.zod.ts` and `dist/index.js` are present.
Nothing publishes, so this PR takes `skip-changeset` rather than a
changeset, as PRs #23937 and #23819 did.
- **The 30 s line has 8.2 s of headroom over today's slowest connector
reading.** By item 2 of ruling record `6181973363`, the line rises only
through a PR that re-measures and says why in the line.
---
_Generated by [Claude
Code](https://claude.ai/code/session_01LFqdRsuM5nkqoJdHd5ztVk)_
Co-authored-by: Claude <noreply@anthropic.com>1 parent 9e797a8 commit cf31c34
2 files changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
0 commit comments