refactor(runs): the shared run records, recording and events - #258
Merged
Merged
Conversation
T6 item 3c. src/runs/ is gone: max records runs with cli-messaging's recorded/startRecording, writes its events in the shared DiagnosticEvent format, and reads runs back with the shared findRun/listRuns/readEvents. max runs stays max's own thin command over them, because the shared runsCommand reads cli-messaging's environment registry, which max does not use. What only MAX knows stays: src/wire-events.ts builds an event's ids and counts from MAX payloads, now naming the send identity `send` as the shared events do. MAX's refusal key is providerError everywhere, maxError before. The bot transport changes its import and that field name only. The module tests of the deleted twins live on in cli-messaging; max keeps its integration tests (src/run-log.test.ts, src/every-failure.test.ts). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
T6 item 3c (plan
docs_ai/plans/2026-09-30-max-onto-services.md, corrected 2026-09-30).src/runs/deleted. Recording (recorded,startRecordingformax bot), run directories and the event format are cli-messaging 0.62.0's.max runsstays max's thin command over the shared run functions — the sharedrunsCommandreads cli-messaging's environment registry, which max does not register into, so its output would bypass max's streams.src/wire-events.tskeeps what only MAX knows:idsOf/countsInfrom MAX payloads and the warning codes. The send identity in events issend(wascid), as in the shared events.maxError→providerErrorin events,run.jsonand errordetails(sharedproviderErrorKey). The bot transport changes that import/field only.src/run-log.test.ts,src/every-failure.test.ts. 1170 tests.User-visible (changelog, «Изменено — может сломать скрипты»):
sendinstead ofcidin trace/record events;providerErrorinstead ofmaxError.Checked:
pnpm lint && pnpm typecheck && pnpm test && pnpm test:matrix && pnpm docs:check.🤖 Generated with Claude Code