Files
magpie/internal
yetone 972f69fdc7 dsh: a start's first round goes by the last magpie's record (#2278)
A start's first dsh round read every profile through the yaml emitter to
find what the last magpie's round had found: nothing to write. On a real
account that was ~60 MB of the first minute's 523 MB.

The round's key (dsh's files, the gateway, the models) is now summed with
sha256, the same in every process, and a round that ends with nothing to
write records it in the cache folder (dsh-rounds.json, temp + rename).
A start's first round goes by that record when it is this magpie
version's; a dev build never does. A file, the models or the version
changed has the round run as before.

Run:
- go test ./internal/agent (mica): ok 188s.
- GOOS=darwin/linux/windows go vet ./internal/agent ./internal/gateway
  ./internal/appdir: ok.
- Broken by hand: with the record not read, TestDshFirstRoundGoesByTheLastMagpies
  is red ("read and wrote dsh's files 1 times").
- Real account, mote sandbox HOME, a start after one start (pprof
  alloc_space at 50s): dshRounds.once 101 MB -> 38 MB (the catalog
  only), yaml emitter 43 MB -> none, total 522 MB -> 463 MB. Footprint
  peak 168 MB (w11) -> 165 MB.

Not tried: Windows and Linux real starts; the record is plain JSON in
appdir.Cache() there too.
2026-11-12 07:03:00 +08:00
..
…
…
…
…
…
2026-11-11 08:14:28 +08:00
…
…
…