Skip to content

refactor(runs): the shared run records, recording and events - #258

Merged
leemour merged 1 commit into
mainfrom
refactor/shared-runs
Sep 30, 2026
Merged

leemour merged 1 commit into
mainfrom
refactor/shared-runs

Conversation

@leemour

@leemour leemour commented Sep 30, 2026

Copy link
Copy Markdown
Owner

T6 item 3c (plan docs_ai/plans/2026-09-30-max-onto-services.md, corrected 2026-09-30).

  • src/runs/ deleted. Recording (recorded, startRecording for max bot), run directories and the event format are cli-messaging 0.62.0's.
  • max runs stays max's thin command over the shared run functions — the shared runsCommand reads cli-messaging's environment registry, which max does not register into, so its output would bypass max's streams.
  • src/wire-events.ts keeps what only MAX knows: idsOf / countsIn from MAX payloads and the warning codes. The send identity in events is send (was cid), as in the shared events.
  • maxError → providerError in events, run.json and error details (shared providerErrorKey). The bot transport changes that import/field only.
  • Tests: module tests of the deleted twins are covered in cli-messaging; max's integration tests move to src/run-log.test.ts, src/every-failure.test.ts. 1170 tests.

User-visible (changelog, «Изменено — может сломать скрипты»): send instead of cid in trace/record events; providerError instead of maxError.

Checked: pnpm lint && pnpm typecheck && pnpm test && pnpm test:matrix && pnpm docs:check.

🤖 Generated with Claude Code

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>
@leemour leemour closed this Sep 30, 2026
@leemour leemour reopened this Sep 30, 2026
@leemour
leemour merged commit 4a81013 into main Sep 30, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant