refactor: drop the unread backend field from Automation templates - #3334
Open
yihanzhu wants to merge 2 commits into
Open
refactor: drop the unread backend field from Automation templates#3334yihanzhu wants to merge 2 commits into
yihanzhu wants to merge 2 commits into
Conversation
ScheduledTaskExecutionTemplate.backend is durable state nothing reads: the fire path builds the execution session without it, and after apache#3249 session creation no longer accepts a backend from any caller. Drop the field from the template, stop copying header.backend in executionTemplateFromHeader (the writer that could freeze a legacy 'fake' into a new record, apache#3211), and stop emitting it from the protocol decoder. The execution decoder is a closed shape, so the key moves from the required list to the optional one instead of disappearing: Automations frozen by older builds still carry it and must stay decodable. It is tolerated on the way in and never lands on the decoded value. No migration, matching apache#3226 and apache#3249 for session headers. Closes apache#3306 Generated-by: Claude Code (Fable 5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Pin the full decoded template shape with deepEqual instead of asserting only the key's absence, and route the stored direction through the query-result frame so the regression exercises the outermost decode path. Generated-by: Claude Code (Fable 5) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
5 tasks
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.
Summary
ScheduledTaskExecutionTemplate.backendis durable state nothing reads: the fire path builds the execution session without consulting it, and after #3249 session creation no longer accepts a backend from any caller. This drops the field from the template, stops copyingheader.backendinexecutionTemplateFromHeader— the writer that could still freeze a legacy'fake'into a brand-new record (#3211) — and stops emitting it from the protocol decoder. No migration, the same position #3226 and #3249 took for session headers.Fixes #3306
Review focus
The execution decoder is a closed shape, so
backendmoves from the required key list to the optional one instead of disappearing: Automations frozen by older builds still carry it and must stay decodable. The key is tolerated on the way in — all three directions (stored, create, update) — and never lands on the decoded value.BackendOrigin/isBackendForlose their last caller and go with it.Verification
@maka/coresuite: 563 pass;@maka/runtime-hostsuite: 1024 pass; rootformat:checkandlintpassbackend: 'fake'decodes in all three directions and the decoded value never carries the key@maka/runtime-hostno longer compilesAI use
Select exactly one:
Tool(s) and scope: Claude Code (Fable 5) — implementation and tests, under my direction and review. The commit carries a Generated-by trailer.
Checklist
Does this PR entail a change in behavior?
backend; stored records that do remain readable🤖 Generated with Claude Code