code-to10 reconcile: re-pin handler accounting and longfunc inventory for the unified line

Target keeps the 6-mixin split, so the source line's 239/223/16 and
its mixin-homed 17-method list do not apply here. Recomputed by AST
on this line: handler accounting 244 total / 150 in server.py /
94 moved, no duplicates (243/149 + _update_goal_task); longfunc
still 17 methods with the same names, 16 homed in server.py and
_full_auto_execute in handler_fullauto.py, plus module-level
migrate_tasks_table in server.py (114 lines). No method split or
dropped; both tests' docstrings state the re-pin explicitly.
This commit is contained in:
host committed 2026-11-03 02:49:27 +00:00
1 parent 22ac542760
commit 34b9a34896
2 files changed
+34 -20

No files matched your search

@@ -9,10 +9,14 @@ Pins the split contract so a future violation fails CI:
as #238 arch_conformance.scan_imports);
- server.py re-exports the moved shared helpers as identical objects,
so `from cloud.server import _task_to_dict` keeps working;
- handler method accounting: 243 total, 149 left in server.py itself,
- handler method accounting: 244 total, 150 left in server.py itself,
94 in mixins, no name defined twice. (v5 rebase: main #275 added
5 resident methods that legitimately stay in server.py, so the
stack's 238/144 becomes 243/149; moved count stays 94.)
stack's 238/144 becomes 243/149; moved count stays 94.
Reconcile: goal live-update adds _update_goal_task in server.py,
so 243/149 becomes 244/150; moved count still 94. The source
line's 239/223/16 counts its 12-mixin split and do not apply on
this line, which keeps the target's 6-mixin split.)
Only the standard library; no real model, no network, no secrets.
"""
@@ -140,7 +144,7 @@ class TestReexports(unittest.TestCase):
class TestMethodAccounting(unittest.TestCase):
def test_total_243_no_duplicates(self):
def test_total_244_no_duplicates(self):
seen = {}
dups = []
classes = [CloudControlPlaneHandler]
@@ -155,9 +159,9 @@ class TestMethodAccounting(unittest.TestCase):
dups.append((seen[name], cls.__name__, name))
seen[name] = cls.__name__
self.assertEqual(dups, [])
self.assertEqual(total, 243)
self.assertEqual(total, 244)
self.assertEqual(len(_own_methods(CloudControlPlaneHandler)),
243 - 94)
244 - 94)
if __name__ == "__main__":
+25 -15
View File
@@ -7,9 +7,19 @@ pins the full 17-method list by AST over ``cloud/handler_*.py``
plus ``cloud/server.py`` -- no external summary document is the
source of truth, the code itself is.
Reconcile re-pin (code-to10-reconcile): the unified line keeps
the target's 6-mixin split, so 16 of the 17 methods live in
``cloud/server.py`` (``CloudControlPlaneHandler``) rather than in
the source line's lifecycle/core/admin/browser/webhook mixins;
the method NAMES are the same 17, only their homes differ, and
no method was split or dropped to reach this list. The
module-level >100-line definition likewise lives in
``cloud/server.py`` (``migrate_tasks_table``, 114 lines) on this
line, not in ``handler_support.py``.
Counting rule, stated because a naive AST count gives 18:
the 17 are class methods. The 18th >100-line definition,
``handler_support.migrate_tasks_table`` (module-level function,
``server.migrate_tasks_table`` (module-level function,
not a mixin method), is asserted separately as the ONLY
module-level >100-line definition, so the 17/18 difference is
explained, not hidden. No method is split by this batch:
@@ -21,20 +31,20 @@ import unittest
from pathlib import Path
EXPECTED_METHODS = {
("handler_admin.py", "AdminMixin._task_pr"),
("handler_admin.py", "AdminMixin._metrics"),
("handler_browser.py", "BrowserMixin._browser_stream"),
("handler_core.py", "TaskCoreMixin._create_task"),
("handler_core.py", "TaskCoreMixin._create_followup"),
("server.py", "CloudControlPlaneHandler._task_pr"),
("server.py", "CloudControlPlaneHandler._metrics"),
("server.py", "CloudControlPlaneHandler._browser_stream"),
("server.py", "CloudControlPlaneHandler._create_task"),
("server.py", "CloudControlPlaneHandler._create_followup"),
("handler_fullauto.py", "FullAutoMixin._full_auto_execute"),
("handler_lifecycle.py", "TaskLifecycleMixin._task_thread_read"),
("handler_lifecycle.py", "TaskLifecycleMixin._deliver_to_thread"),
("handler_lifecycle.py", "TaskLifecycleMixin._task_wait"),
("handler_lifecycle.py", "TaskLifecycleMixin._merge_task"),
("handler_lifecycle.py", "TaskLifecycleMixin._loop_run"),
("handler_lifecycle.py", "TaskLifecycleMixin._release_task"),
("handler_lifecycle.py", "TaskLifecycleMixin._continue_task"),
("handler_webhook.py", "WebhookMixin._handle_github_webhook"),
("server.py", "CloudControlPlaneHandler._task_thread_read"),
("server.py", "CloudControlPlaneHandler._deliver_to_thread"),
("server.py", "CloudControlPlaneHandler._task_wait"),
("server.py", "CloudControlPlaneHandler._merge_task"),
("server.py", "CloudControlPlaneHandler._loop_run"),
("server.py", "CloudControlPlaneHandler._release_task"),
("server.py", "CloudControlPlaneHandler._continue_task"),
("server.py", "CloudControlPlaneHandler._handle_github_webhook"),
("server.py", "CloudControlPlaneHandler._dispatch_task_route"),
("server.py", "CloudControlPlaneHandler._dispatch"),
("server.py", "CloudControlPlaneHandler._dispatch_project"),
@@ -74,7 +84,7 @@ class LongFuncInventoryTestCase(unittest.TestCase):
# rather than silently dropped from the count.
self.assertEqual(
module_funcs,
{("handler_support.py", "migrate_tasks_table")})
{("server.py", "migrate_tasks_table")})
if __name__ == "__main__":