mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-04 03:57:09 +00:00
feat(trace): record the device a run executed on
meta.json carried the host but not the device, so a trace could not say what hardware produced it without the campaign manifest beside it. An experiment splitting cells across api levels could only join them through that manifest. Claude-Session: https://claude.ai/code/session_01A5KmftdEJ49A9z5mF5ESrX
This commit is contained in:
1 parent
a7f26e27c4
commit
7b6a346443
4 files changed
+38
-1
No files matched your search
@@ -197,6 +197,11 @@ type Meta struct {
|
||||
// several hosts, so a per-host effect has to be detectable rather than
|
||||
// invisible.
|
||||
Host string `json:"host,omitempty"`
|
||||
// Device is the target the run drove, from --device. One host drives
|
||||
// several emulators at different API levels, so without it a trace on its
|
||||
// own cannot say what produced it and a per-device split can only be
|
||||
// recovered by joining against the campaign manifest.
|
||||
Device string `json:"device,omitempty"`
|
||||
}
|
||||
|
||||
type Writer struct {
|
||||
|
||||
@@ -463,6 +463,7 @@ func TestWriteMeta_ArmMembershipRoundTrip(t *testing.T) {
|
||||
MaxSteps: 300,
|
||||
DurationMillis: 180000,
|
||||
Host: "emulator-farm-01",
|
||||
Device: "emulator-5556",
|
||||
}
|
||||
if err := writer.WriteMeta(meta); err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -496,7 +497,7 @@ func TestWriteMeta_OmitsArmMembershipWhenUnset(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
for _, key := range []string{"arm", "generator", "label_source", "model", "instructions", "max_steps", "duration_millis", "host"} {
|
||||
for _, key := range []string{"arm", "generator", "label_source", "model", "instructions", "max_steps", "duration_millis", "host", "device"} {
|
||||
if strings.Contains(string(body), `"`+key+`"`) {
|
||||
t.Errorf("meta.json carries %q when unset:\n%s", key, body)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user