Repository navigation
Run each suite under its own hang limit, print its slowest tests, and time it - #164
Conversation
… time it - build.json's testTimeoutMilliseconds is the suite's hang limit; the test and timing steps require it and fail before compiling, naming it, when it is missing. - The test step writes the run's test times to _build/test-results.json and prints the 10 slowest, even with --skip-test-details. - The new timing step runs the compiled tests three times without coverage and fails a test file whose median is over 2 s plus 50%, unless README lists it with its own time. - The times are read and judged through the checkout's own @noldova/context.testing, loaded as the coverage report already loads it. - context's packages move to 0.0.8, which has the run limit, results file and timing classes. Issue #161 Agent: DEV1 (developer) Agent-Model: Anthropic Opus 5.5, Medium
rostislavrotaru
left a comment
There was a problem hiding this comment.
Reviewed: #164 at e6e457d
Verdict: Changes needed
Findings: 1 Should fix, 2 Low, as line comments
Why it's right: the required hang limit, the 10 slowest tests on every run, and pipelines timing (3 runs, 2 s + 50%, the README list) work through the checkout's own context.testing with no new dependency, and the lock moves only the six context packages. But an unreadable results file reads as "over". Linux x64 CI took 53 s against main's 45 s: say the reason in the PR body (likely the new entry-point process tests).
Agent: LEAD (lead)
Agent-Model: Anthropic Opus 5.5, High
The times report exits with its own code, 3, for a file over its time, and with the unread code, 2, for a results file that is missing or isn't test times, in both modes; the timing step names each. A fault still ends with its stack trace. BuildConfig takes the hang limit as an optional parameter, and the testing module loader reads the error code with an in check and the module through its declared shape, not a cast. Agent: DEV1 (developer) Agent-Model: Anthropic Opus 5.5, Medium
rostislavrotaru
left a comment
There was a problem hiding this comment.
Reviewed: #164 at fd43f2b
Verdict: Approve
Findings: 0 Should fix, 0 Low, as line comments
Why it's right: both modes now read the results files through one path, so an unread or malformed file exits 2 and "over" exits 3, with tests for each; the hang limit is required, the slowest tests print on every run, and the timing step works through the checkout's own context.testing. CI is green, and Linux x64 took 43 s against main's 45 s. The automation's #163 moves the same context pins and closes once this merges.
Agent: LEAD (lead)
Agent-Model: Anthropic Opus 5.5, High
## Summary The release's `archive` step checks the sibling packages a package takes as peers. In noldova-com/context#110, context's packages move their siblings from exact `dependencies` to `peerDependencies` at `>=<version> <next minor>`. Without this change, the step would check nothing for them. - `src/noldova.tools.pipelines/src/services/archive-step.ts`: for every expected package an archive names under `peerDependencies`, the range must be exactly `>=<version> <next minor>`, such as `>=0.0.9 <0.1.0`. Otherwise it reports, for example, "noldova-b-0.0.4.tgz: its peer @noldova/a is ^0.0.4, not >=0.0.4 <0.1.0." - Peers that aren't packages of the release, such as third-party ones, are left alone. - The exact `dependencies` check is unchanged. - `src/noldova.tools.pipelines/src/models/version.ts`: `nextMinor()` gives the first release of the next minor version, with no nightly date, so a nightly `0.0.9-nightly.20261114` gives `0.1.0`. - `src/noldova.tools.pipelines/src/resources.ts`: the range's format and the new finding. - `src/noldova.tools.pipelines/src/api/index.d.ts` and `src/noldova.tools.pipelines/README.md`: the check, `nextMinor()`, and `peerDependencies` among the fields that throw `JsonException` when they aren't an object of texts. The branch started from #164's head, since both change `resources.ts` and `index.d.ts`, and merged main once #164 landed. It's 0 commits behind main. ## Linked issue Issue: #165 Its release, and the pin in context that moves to it, remain after this PR. ## Testing - **Tests:** CI's suite on Linux x64. - `version.test.ts`: `nextMinor()` of 0.0.9, 1.4.1 and a nightly. - `archive-step.test.ts`: - a sibling peer in its range, beside a third-party peer, passes; - a wrong lower bound, a wrong upper bound, a wider upper bound, an exact version and a caret each fail with the finding; - `peerDependencies` that aren't an object throw `JsonException` naming the archive's manifest. - **Test step's time:** on Linux x64, "Test the packages" took 31 s and 34 s in this branch's two runs at 35b2a83, against 22-28 s in main's last three runs. The likely cause, not measured: the 7 new archive-step cases each make a real Git repository and run git and tar, as the step's other cases do. Runner spread covers part of it, since one commit's runs on another PR (e6e457d, #164) took 22 s and 32 s. - **Not checked:** a real context release's archives. That happens at context 0.0.9's release, once this is released and context's `.pipelines` pin moves to it. Agent: DEV1 (developer) Agent-Model: Anthropic Opus 5.5, Medium
Closes #167 `TypeScript.findCompiler` reads the module-not-found code with `Resources.codeField in error`, which narrows the error to a `code` member, as `services/testing-module-loader.ts` does since #164. `Reflect.get` no longer appears in the package. ## Changed - `src/noldova.tools.pipelines/src/services/type-script.ts`: the `in` check replaces `Reflect.get`. - `src/noldova.tools.pipelines/tests/services/type-script.test.ts`: the two tests read the cause's and the rejection's `code` the same way, instead of with `Reflect.get`. No test is new: the behaviour is unchanged, and the two existing tests cover both branches (a missing package becomes a `BuildException`; any other resolution failure passes through). Agent: DEV1 (developer) Agent-Model: Anthropic Opus 5.5, Medium
Summary
pipelines testnow runs each repository's suite under its own hang limit and prints its slowest tests. A newpipelines timingstep checks the test files' times, apart from the tests.BuildConfigreadsbuild.json'stestTimeoutMilliseconds, a positive whole number of milliseconds. It refuses 0 or less, and@noldova/context.jsonrefuses one that isn't an integer.TestStepandTimingSteprequire it and pass it to the test run asCONTEXT_TEST_TIMEOUT_MILLISECONDS. Without it, they fail before compiling, naming the setting. There is no default.TestSteppasses_build/test-results.jsonto the run asCONTEXT_TEST_RESULTS_FILE, removing an earlier run's copy first.--skip-test-details, throughservices/test-times-entry-point.ts(new). It fails when the times can't be read.services/timing-step.ts(new),pipelines timing, runs after the test step. It runs the compiled tests three times without coverage and judges each test file's median time.@noldova/context.testing(TestTimeRecord,TestTimingCheck), loaded in a process of its own.services/testing-module-loader.ts(new) holds that loading, whichcoverage-entry-point.tsdid itself until now and now shares.ITestingModuledeclares the classes used. tools.pipelines gains no dependency.@noldova/context.collections,core,exceptions,json,testingandtext, each 0.0.7 to 0.0.8.index.d.tsdescribe the setting, the slowest tests and the timing step.Linked issue
Issue #161
This PR ships the tool's side. This repository's own
npm testruns the published tool that.pipelinespins. Its owntestTimeoutMilliseconds, measured from main's runs, the reason in README's Checks, andnpm run test:timingtherefore come in the.pipelinesbump after this release, which closes #161.Testing
build-config.test.ts: reads the setting or none, refuses 0, −1 and 1.5.test-step.test.ts:timing-step.test.ts(new):build.json, a missing setting, no tests, uncompiled tests, and a fault;npm install --package-lock-onlyon a Linux test machine.@noldova/context.testing0.0.8 run, which this repository's tests reach only through a stand-in. That happens with the.pipelinesbump.Agent: DEV1 (developer)
Agent-Model: Anthropic Opus 5.5, Medium