Repository navigation
docs(flow): decomposition plan for the largest files - #1497
Merged
Merged
Conversation
…size ratchet DECOMPOSITION.md maps replayer.py (one 17.5k-line class, 260 methods, 88 attributes written mid-run), proposes a step pipeline with mechanism, action-executor, check and delivery-gate seams, names the invariants and how each PR proves them, and orders small move-only PRs. It supersedes REPLAYER_DECOMPOSITION.md, whose self-annotated mixins mypy rejects. scripts/check_file_size_ratchet.py fails when a listed file grows past the budget table in the doc; tests/test_file_size_ratchet.py runs it in Python CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Five pull requests by module group, ratchet budgets set when PR 1 merges and raised in-diff by growing PRs, coverage reported then floored at the measured value, one resolution ladder. The ratchet script and test leave this docs-only PR and land with the safety net. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
abrichr
marked this pull request as ready for review
October 24, 2026 18:44
3 of 4 tasks
abrichr
enabled auto-merge
October 24, 2026 19:00
abrichr
added this pull request to the merge queue
Oct 24, 2026
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
Docs only.
packages/flow/docs/design/DECOMPOSITION.mdis a measured plan to splitruntime/replayer.py(18,258 lines),__main__.py,qualification.py,ir.pyand Desktopdispatch.pywithout changing behavior.REPLAYER_DECOMPOSITION.mdis marked superseded: its mixin mechanism (self: "Replayer") fails mypy, and the new doc shows a Protocol-typed replacement that passes the strict flags.What the doc finds:
replayer.pyis one class: 260 methods and 109 attributes, 88 of them written outside__init__. 14 methods are over 200 lines._run_step_on_active_surface(1,316 lines) is already a pipeline; the API and GUI paths repeat effect setup, the identity refusal and handling of a delivery whose outcome is unknown.isinstance(self.backend, ...)capability checks; 27 inline refusals whose order is a safety property.The plan: five behavior-preserving pull requests by module group, each made of move commits proven by AST equality and seam commits read in full. Section 9 records the review decisions. The size ratchet lands with PR 1, the safety net.
Test plan
🤖 Generated with Claude Code