Skip to content

test(generator): reuse immutable graph input bytes - #247

Draft
leoafarias wants to merge 1 commit into
mainfrom
conductor/ack-generator-inputs
Draft

leoafarias wants to merge 1 commit into
mainfrom
conductor/ack-generator-inputs

Conversation

@leoafarias

@leoafarias leoafarias commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

The two generator graph suites repeatedly enumerate and read every visible dependency asset. Cache immutable dependency bytes once per test isolate and copy them into a fresh reader/writer for each case. Fixtures, generated output, resolvers and tracking keep their existing per-build lifecycle. The snapshot retains about 60 MB per participating isolate and assumes package files stay unchanged during that isolate; fresh invocations reload them.

All 112 original graph cases, including 93 strict rejection cases, keep their fixtures and diagnostic/output assertions. Five added cases check byte parity, buffer/fixture/output/tracking isolation, concurrent readers and valid/missing-JSON-part ordering. Both generation phases and the real clean/rebuild/cycle/JSON/compilation/runtime/second-build contracts remain intact.

Validation:

  • Independent full review of the exact final diff: no findings. Both graph files mechanically match base with only imports and six setup replacements.
  • Both controlled graph orders pass 112 cases with zero skips: 290.229s → 238.186s (17.9%) and 281.994s → 220.038s (22.0%). SDK, dependency/config hashes, commands, case names and per-file orders match. The contaminated initial run is excluded. Added-test cost is separate; no whole-CI saving is claimed.
  • Full local generator: all 399 tests pass. Strict workspace analysis, root/remaining Dart/example tests, Flutter adapter and both Chrome selections pass (Ack 161; JSON Schema builder 3), retaining five existing platform/live-service skips. All 11 local check selections completed; the aggregate exits 1 only for the unchanged-base formatting discrepancy below.
  • Dependency-source/package-mapping refresh probes pass. Pinned CI formatting and five preflight jobs pass. Local Dart 3.13 formatting flags five byte-identical base files; none belongs to this patch.

Blocked: Minimum Dart SDK and main CI fail compiling json_serializable 6.14.1 with source_helper 1.4.0 (duplicate extensions/imports). A Dart 3.9 control reproduces this exact failure on original base sources: 648 files verified, both new cache files absent. Main CI's 12 failing real-build cases are unchanged; all 112 graph and five new cases pass there. Upstream's 6.15.1 ambiguity fix requires Dart 3.12. A separate compatibility correction is needed; no dependency/release change or gate bypass is included.

Base: 07df51338f8fcdf0c06c0c9d0e16e81ddf65f494. Head: c573ac4ebe77a3b9c7fee845b934d9f6f27f0b59. Exact commands, logs, review, measurements and risks are retained in rollout ack-results/RESULTS.md. The draft remains blocked until required gates pass.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant