Commit dadf542
* fix(service-automation): route the three startup seams' causes to structured meta (#5661)
`registerRunObject` (warn), the boot `probe()` (error) and the wait-timer re-arm
(error) each interpolated a FOREIGN error's text into the log MESSAGE. They are
the fourth instalment of the family #5048 / #5575 / #5636 closed, and were out
of all three scopes.
`ObjectLogger.write()` emits one timestamp+level record head per call, so a
message carrying newlines becomes several physical lines of which only the first
is attributable. The two `error` seams exist precisely to be read — #4632 raised
them so an operator could find them — and the `warn` one runs in `init()`, inside
`serve`'s boot-quiet window, where `BootLogCapture.offer()` DROPS a head-less
line rather than merely mangling it.
All three now log a newline-free, self-sufficient message and hand the cause to
`describeThrownForLog`, in the slot the `Logger` contract names: `warn`'s second
argument, `error`'s third. #4632's required consequence-and-fix text stays in the
first line; only the trailing interpolation is replaced by a pointer to the meta.
`check:durability-log-level` stays green (24 seams; neither `error` demoted).
Tests: new `plugin-startup-log-cause.test.ts` (13 cases) reads real bytes off a
real `ObjectLogger` per the #5662 precedent, pinning per seam that a multi-line
cause reaches meta and not the message, the argument slot, and that a
cause-less boot writes zero bytes; two closing cases render the old and new
shapes side by side and measure the difference. The #4420 probe case in
`plugin-suspended-run-wiring.test.ts` is re-judged rather than re-spelled: it now
asserts both directions, since a message-only assertion would also pass if the
cause were dropped entirely.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWS4heBoAitLmzCLhcYdbK
* test(service-automation): drop the new fake engine's unused delete so check:engine-double-contract passes (#5661)
`check:engine-double-contract` (a lint-job gate, not eslint) pinned the new
`plugin-startup-log-cause.test.ts`: its `fakeDataEngine` declared a bare
`async delete() { return true; }`, and an engine double whose delete does not
route through `assertEngineDeleteDispatch` may accept a call the real
`ObjectQL.delete` refuses — how #4434 shipped a dead REST route with a green
suite.
Removed the method instead of pinning it, and the choice is measured to the
ledger's own standard rather than assumed. An `appendFileSync` marker as the
first statement of that `delete` printed 0 times over this file's suite; the
control — the same injection in `find` — printed 11 times in the same run, so
the silence is evidence, not a broken probe. These seams drive `probe()`,
`list()` and the boot flow pull only; nothing deletes a suspended run.
`SuspendedRunStoreEngine` declares `delete?` optional, so omitting it is the
faithful shape.
Pinning would have certified a method that models nothing, and whose body was
loose in a second way the pin does not address: it answered success while
removing no row. A future case that needs deletion writes a real one and the
gate requires the predicate then; the store also warns when the engine has no
`delete()`, which the byte-exact assertions here would surface at once. The
reasoning is recorded on the fixture so the next reader does not re-derive it.
check:engine-double-contract: OK — 27 pinned, 65 in the DEBT ledger, 1 exempt
(the shrink-only baseline is untouched — no entry added, none lowered).
Package suite: 63 files / 754 tests passed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWS4heBoAitLmzCLhcYdbK
---------
Co-authored-by: Claude Code <noreply@anthropic.com>
1 parent 288e5a4 commit dadf542
4 files changed
Lines changed: 690 additions & 8 deletions
File tree
- .changeset
- packages/services/service-automation/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
0 commit comments