Interpolate log fields instead of passing an object #107

Merged
padreug merged 1 commit from fix/renderer-log-object-args into dev 2026-09-24 07:31:55 +00:00
Owner

Electron's console bridge stringifies each console argument on its way to the journal, so console.log('msg:', { a, b }) arrives as msg: [object Object] and every field is lost.

That cost a debugging session today. A cassette-state publish that had in fact applied an operator refill correctly looked, from the journal, like nothing had happened, because the d-tag, event id and stamp were all inside the object.

Three call sites, the only ones in the renderer passing an object. The publish line now also carries seq and the applied-op count, which are the two things worth knowing when an operation seems not to have landed.

Before:

[OperatorConfig] cassettes-state published: [object Object]

After:

[OperatorConfig] cassettes-state published: id=3410168e43d4… created_at=1790200110 seq=1 applied_ops=1 d=bitspire-cassettes-state:df20…

Recorded in CLAUDE.md's debugging invariants so it does not come back.

CLAUDE.md and operator-fees.ts are both already prettier-dirty on dev, so I reapplied these edits by hand rather than letting the formatter bury a three-line fix under a full-file reflow. That drift is worth its own cleanup commit sometime.

Typecheck passes, 135 machine tests pass.

Electron's console bridge stringifies each console argument on its way to the journal, so `console.log('msg:', { a, b })` arrives as `msg: [object Object]` and every field is lost. That cost a debugging session today. A cassette-state publish that had in fact applied an operator refill correctly looked, from the journal, like nothing had happened, because the d-tag, event id and stamp were all inside the object. Three call sites, the only ones in the renderer passing an object. The publish line now also carries `seq` and the applied-op count, which are the two things worth knowing when an operation seems not to have landed. Before: ``` [OperatorConfig] cassettes-state published: [object Object] ``` After: ``` [OperatorConfig] cassettes-state published: id=3410168e43d4… created_at=1790200110 seq=1 applied_ops=1 d=bitspire-cassettes-state:df20… ``` Recorded in CLAUDE.md's debugging invariants so it does not come back. `CLAUDE.md` and `operator-fees.ts` are both already prettier-dirty on `dev`, so I reapplied these edits by hand rather than letting the formatter bury a three-line fix under a full-file reflow. That drift is worth its own cleanup commit sometime. Typecheck passes, 135 machine tests pass.
Electron's console bridge stringifies each console argument on its way to
the journal, so `console.log('msg:', { a, b })` arrives as
`msg: [object Object]` and every field is lost.

That cost a debugging session today: a cassette-state publish that had
in fact applied an operator refill correctly looked from the journal like
nothing had happened, because the d-tag, event id and stamp were all
inside the object.

Three call sites, the only ones in the renderer passing an object. The
publish line now also carries seq and the applied-op count, which are the
two things worth knowing when an operation seems not to have landed.

Recorded in CLAUDE.md's debugging invariants so it does not come back.
padreug deleted branch fix/renderer-log-object-args 2026-09-24 07:31:55 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
aiolabs/bitspire!107
No description provided.