Two EcoReplay BodySerializer tests fail on clean checkout (ArgumentException: Can not convert Object to String) #67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
ward exec test-mod-replay(mods/replay/tests/EcoReplay.Tests.csproj) has 2 failing tests on a pristine checkout ofmain, unrelated to any recent change:BodySerializerTests.NamedEntity_IsCollapsedToItsNameBodySerializerTests.DeeplyNestedEntityGraph_DoesNotRecurseBoth fail with
System.ArgumentException : Can not convert Object to String.(7 passed, 2 failed, 9 total).Context
Found while validating the
Eco.ReferenceAssembliespin bump in #66. The failures are not caused by that change: the test project compiles only../src/BodySerializer.csagainst Newtonsoft.Json alone (noEco.ReferenceAssembliesreference), and both failures reproduce on the clean pre-change tree. The CImodscompile gate (make build-mods, #60) does not run these unit tests, so they fail silently outside CI.Repro
Ask
Fix
BodySerializer(or the tests) sotest-mod-replayis green, and consider wiringtest-mod-replayinto the CImodsjob so replay regressions are gated, not just compile errors.Refs
Discovered during #66 (Eco pin audit).
Director surface (read-only) - grounding for the engineer run.
Reproduced on a clean
main:dotnet test mods/replay/tests/EcoReplay.Tests.csproj-> 2 failed / 7 passed, bothSystem.ArgumentException : Can not convert Object to String:BodySerializerTests.NamedEntity_IsCollapsedToItsNameBodySerializerTests.DeeplyNestedEntityGraph_DoesNotRecurseThe test project compiles only
../src/BodySerializer.csagainst Newtonsoft.Json (noEco.ReferenceAssemblies), so the fix is fully headless and self-verifying - no live server, no Eco SDK. Themake build-modsgate does not run these unit tests, which is why they fail silently.Done-condition:
ward exec test-mod-replay(ordotnet teston that project) green onmain.🔒 Reserved by
ward agent --driver claude— containerengineer-claude-eco-app-67on hostKAI-DESKTOP-TOWERis carrying this issue (reserved 2026-07-06T03:14:52Z). Concurrentward agentruns are blocked until it finishes or the reservation goes stale (2h0m0s TTL);--forceoverrides.Do not comment on or edit this issue to steer the run while it is reserved. The engineer seeded the body once at launch and never re-reads it, so a comment or edit reaches only human readers, never the running engineer. A correction goes to a new issue, dispatched fresh — that is the only channel that reaches a run in flight. Where the forge supports it, ward locks this conversation to make that a road-block rather than a convention (ward#494).
run seed context — what this run is carrying (ward#609)
coilyco-gaming/eco-app#67· branchissue-67· driverclaude· workflowdirect-mainengineer-claude-eco-app-67· wardv0.413.0· dispatched2026-07-06T03:14:52ZIssue body as seeded:
Static container doctrine and seed boilerplate are identical every run and omitted here (they ride ward v0.413.0).
— Claude (she/her), via
ward agentWARD-OUTCOME: done - BodySerializer now retypes summarized props to
objectso sealed entities collapse to their name; test-mod-replay wired into the CI mods job; all 9 replay tests green on main (a4551e0).The diagnosis was the whole job here. The symptom (
Can not convert Object to String) pointed at the tests, but a top-level-class probe of the exact same code serialized"Actor":"Bob"correctly, so the bug hid behind one keyword: the tests'FakeEntityisprivate **sealed** class. Newtonsoft has a quiet optimization where a sealed property-type contract is treated as final, so it skips re-resolving the contract from the value ourSummaryValueProvideractually returns, and serializes the summary string against the sealed entity's object contract, emitting{}. That fought back for a while, because everything about the resolver looked right and the value provider genuinely returned the right string.What made me fairly confident in the fix rather than nervous: sealed is the common case for real Eco entities, so this wasn't a test artifact, it was a live recorder bug dropping named references to empty objects. Retyping each summarized property to
objectdefeats the sealed shortcut cleanly, the real mod still compiles against Eco.ReferenceAssemblies, and I also wiredtest-mod-replayinto CI (sharing the compile gate's NuGet-egress retry loop) so this class of behavioural regression can't pass silently again.One rough edge worth a possible follow-up: the mods job now does two NuGet restores (compile + test) behind separate 3x retry loops. It's correct but a little slow on the flaky runner. If egress keeps biting, folding both into one restore or an in-cluster NuGet proxy (already flagged in #69) would be the durable move.