Repository navigation
Conversation
Seven files in this slice bound elapsed time. Three bounds guarded a complexity regression and now count the work that regression repeats: - ManagedArtifactInspector: count TypeDef row decodes through ManagedDecodeBudget.reserveRow, which every metadata row cursor calls. The inspection decodes 16,002 for 16,001 rows; the bound is two per row. A per-attribute TypeDef scan decodes 16,000 x 16,001. - SolidityMetadata: count JSON.stringify calls, one per scalar in a key identity. Two repeated keys nested 62 arrays deep serialize two scalars. - environmentStateWriteExplain (copied and slugged fields): count reads of the request body through a Proxy, like the composed-body test. The explanation reads 8 per member; the bound is 16. Searching the body again for each field reads every member per field. Each counter throws at its bound, so a regression fails at once instead of running out the old workload. Two complexity bounds stay. WabtOutput's 1,000 ms glue-literal bound guards regex backtracking inside V8; the adapter's calls and AST visits are the same either way. The explain queue bound (5,000 ms) guards Array.prototype.shift moving a 500,000-element queue; body reads and node visits are unchanged, and a vitest spy on shift recurses because the spy itself calls shift. The other five bounds time a lifecycle deadline, not work: serveEnvironmentState (close does not wait for a stalled 30 s download), PlaywrightScenarioBrowser x2 (a 50 ms command_timeout_ms fires on a handshake or target lookup that never settles) and ProviderProcess.launcherExit (stop does not wait the 1,000 ms kill grace without new exit evidence). They are unchanged. Validation: each regression was applied to production code (uncommitted) and the base and new test files were run against it. Per-attribute TypeDef scan (the pre-morluto#1943 loop, ported): base failed after 133 s (bound 2,000 ms), new failed in 0.4 s. Body indexed again for each field: base failed after 191 s (bound 5,000 ms), new failed in 0.2 s. Key identity derived at every nesting level: base passed, new failed (63 serializations vs 2). Identity derived twice per level: base never reached its bound (killed after 90 s), new failed in 15 ms. Dropping the owner index cache passes the new count, but ManagedMemberOwnership.test.ts "indexes wide valid member lists once per layout" fails on it. test:local on the three files: 245 passed. check:fast: passed. Refs morluto#10513
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
[Low impact] The changes appear safe to merge. SummaryReplaces three elapsed-time checks with work counts while leaving production code unchanged.
Reviews (3) · Last reviewed commit: "test(dotnet): import the managed decode ..." · Reviewed by Greptile |
Main moved ManagedDecodeBudget from src/dotnet to src/domain/managed/managedDecodeBudget. The row-reservation count spies on its prototype, so the test now imports the class from there.
Summary
Refs #10513. This slice covers the remaining
src/files. It complements #10619, #10627 and the native-parser and JavaScript-lifetime slices. It replaces 3 of the 10 wall-clock bounds in these files with work counts. Two complexity bounds stay because no deterministic measure fits them. Five bounds are deadline contracts and are left unchanged. Production code is not changed.Change and scope
src/dotnet/ManagedArtifactInspector.test.ts: counts TypeDef row decodes through the existingManagedDecodeBudget.prototype.reserveRow. A normal run decodes 16,002 rows for 16,001 rows. The limit is 2 per row.src/evm/SolidityMetadata.test.ts: countsJSON.stringifycalls. A normal run makes exactly 2.src/domain/analysisView/environmentStateWriteExplain.test.ts(copied/slugged fields): counts request-body reads through a Proxy, asenvironmentStateWriteComposed.test.tsalready does. A normal run reads 8 times per member. The limit is 16.WabtOutput.test.ts:520: the cost is regex backtracking inside V8, and calls and AST visits are identical either way.environmentStateWriteExplain.test.ts:979: the cost isArray.prototype.shifton a 500,000-element queue. A spy onshiftrecurses.serveEnvironmentState.test.ts:1196: close must not wait for a stalled 30 s download.PlaywrightScenarioBrowser.test.ts:1383, 1434: a 50 mscommand_timeout_msmust fire.ProviderProcess.launcherExit.test.ts:172, 205: the 1,000 ms kill grace.Evidence and regression coverage
Each regression below was applied to production code in an uncommitted copy, then reverted:
Gaps:
ManagedMemberOwnership.test.ts("indexes wide valid member lists once per layout") still catches that change.Validation performed
npm run test:localon the three files: 245 passed.npm run check:fastpassed.Author readiness
Human owner: @Davmunrey
Before merge
type(scope): outcome.