Repository navigation
go_language: the engine expands a package before importers share it (#bd31yd3) - #583
Conversation
reads_renderings.golden wrote each object's closure twice, measured and whole, though most read alike (#wtsreqh). closureBlocks now writes one block headed "measured and whole" where digest and lines agree, and both where either differs, so the six objects a size moves (Handle, NewStable, Stable, state, Named, Outer) stand out among the 15 that agree. The golden goes from 27,044 to 23,287 bytes, and unfolding it gives back the old one byte for byte. A test drives a digest and a line differing; folding on the digest alone reads red.
The engine's load races as go_types' did (#v42qbm3, #567): go/types writes a lazily expanded instance's right-hand side under its lock (named.go:244) while a checker's isComplete reads it unlocked (cycles.go:122), and the load checks each package on its own goroutine once its imports are done (loader.go:238, :266), so two importers of one package share its instances side by side. A user's run could race. The walk moves from go_types to internal/go_language/type_expansion, one home for both loaders, and the load runs it at both hand-offs, before a package's done closes: after its check from source, and after its export data is read on the restored path. No check is serialized. TestTwoImportersCheckedAtOnceShareNoInstanceLeftToExpand loads #567's fixture through the engine twice, its dependency checked from source and restored from export data, 20 rounds each, on load's race list. Each step alone is red with its own walk off and green with the other's off. Cold runs on Kirk's Mac, interleaved, at load 60 to 90: 33.4 to 36.2 s against 32.8 to 35.8 s, no cost above that noise; a quiet pair and the four-tree census are asked of codebase. load, go_types and guard pass. Co-Authored-By: Ahra <ahra@ahra.ai>
The Go Square's pin on #571: the walk never stops at an instance, only at another package's declared Named, and nothing held that. Both fixtures gain mid, whose `var W dep.G[string]` is an instance mid's own checker makes and no walk of dep sees; a and b read and range over mid.W.Clone() as they do dep.F().Clone(). The Square's mutant, a foreign instance stopping the walk (the origin check dropped from the stop), is red under -race in go_types' source test and in both of the engine test's steps, each run alone. go_types and load pass. Co-Authored-By: Ahra <ahra@ahra.ai>
|
❌ Red at 11:35 AM MST: 1 test failed in github.com/system-inc/cohere/internal/testing/guard/file_size, after 26 minutes. Main is unchanged and the pull request left the queue. First failure:
Ran on Shackler, a Mac with an M3 Max (16 cores, 128 GB), macOS 27.2.1, Go 1.27.4, Swift 6.4.2, load 2.54 when it started · J-q0ns645 · #bd31yd3 |
|
❌ Red at 1:54 PM MST: 1 test failed in github.com/system-inc/cohere/internal/go_language/load, after 14 minutes 40 seconds. Main is unchanged and the pull request left the queue. First failure:
Ran on Shackler, a Mac with an M3 Max (16 cores, 128 GB), macOS 27.2.1, Go 1.27.4, Swift 6.4.2, load 1.81 when it started · J-wa9hfs9 · #bd31yd3 |
|
✅ Integrated onto main at 3:29 PM MST, 32 minutes 21 seconds after it was queued, 7 minutes 26 seconds slower than the last one, #599 (19d6c50c): 25 test packages ran, against 21.
Slowest Tests Test packages: 25 ran, 447 replayed. Under the race detector: 6 ran, 16 replayed.
Integrated on Shackler, a Mac with an M3 Max (16 cores, 128 GB), macOS 27.2.1, Go 1.27.4, Swift 6.4.2, load 3.9 when it started · J-9sebf27 · #bd31yd3 |
Train of two accepted engine changes, each commit cherry-picked unchanged onto main, the tree equal to their chained merge: #558 (the reads golden writes a closure once where both reads agree, #wtsreqh) and #575 (the engine expands a package before importers share it, #bd31yd3). Carries #558 and #575.