Skip to content

refactor(control-plane): retire dead local snapshot and standing-decision wrapper - #7870

Open
hhyykk wants to merge 1 commit into
mainfrom
codex/retire-dead-python-cleanup-20261102
Open

hhyykk wants to merge 1 commit into
mainfrom
codex/retire-dead-python-cleanup-20261102

Conversation

@hhyykk

@hhyykk hhyykk commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Goal And Delivered Outcome

  • Outcome basis / optional anchor: TypeScript control-plane migration RFC §2.4 and §8 (no permanent Python/TS twins; delete an adapter with its last real caller).
  • Goal/source and gap: Two Python adapters and one private TS runtime operation had no production caller left. coordination/local_snapshot.py lost its last caller in refactor(authority): retire legacy Markdown mutation callers #6396, but the retirement ledger still said to keep it for Todo mutation authorization. build_standing_decision_authority() was called only by tests and one example; production reaches the same TS owner through the composed todo.read batch.
  • Observable before → after, with the validation row that proves it: dead adapters and a test-only RPC → removed, with the same semantic assertions now running through the production read path; ledger and RFC checkpoint updated. No runtime behavior change. Proven by the Validation rows below.
  • Issue/task and intended base: Self-contained request; base loopx-project/loopx:main. No issue closure claimed.

Author Declaration

  • Written by: model_agent: Factory Droid (lead, review and commits) with OpenAI Codex CLI (implementation).

Implemented against

  • Specification and revision: RFC sections above at e9eda527a.
  • Criteria:
Criterion (spec clause) Disposition Symbol / path Test or command
Delete an adapter only with its last real caller: local_snapshot.py has no reference in code, tests, packaging or manifests implemented loopx/control_plane/coordination/local_snapshot.py (deleted) repository-wide search; canary premerge
Remove the test-only build_standing_decision_authority() and its standalone todo.standing_decision.project handler and request decoder; keep standing_decision_source_items() and the shared TS owner implemented loopx/control_plane/todos/standing_decision.py; loopx/control_plane/todos/standing_decision.ts; loopx/control_plane/effect_runtime_handlers.ts tests/control_plane/test_standing_decision_order.py; tests/control_plane/test_todo_decision_scope_consistency.py; tests/control_plane_ts/standing_decision.test.ts
Keep chronology, revocation, scope, canonical-id and invalid-item coverage through the composed todo.read path; add contradictory-authority refusal without explicit legacy order implemented tests above; examples/control_plane/todo-standing-decision-authority-smoke.py; tests/control_plane_ts/effect_runtime_fairness.test.ts same
Correct the stale retention row and record the retirement (EN and zh-CN) implemented docs/architecture/rfcs/ledger/shared-goal-authority-state-provider-v0/2026-09-28-retirement-cadence{,.zh-CN}.md; docs/architecture/rfcs/typescript-control-plane-migration-v0{,.zh-CN}.md scripts/check_rfc_bilingual.py --base origin/main --head HEAD
  • Self-check before submission: Read the full diff, re-searched every removed symbol and method name across the repository, and ran the checks under Validation. Verified DCO trailers.

Migration economics receipt

Field Result
Canonical owner Unchanged: todos/standing_decision.ts via todo.read; lease facts with native executors
Legacy code deleted 111 product lines (67 local_snapshot.py, 33 Python wrapper/imports, 9 TS decoder/schema, 1 handler registration, 1 docstring line)
Bridge code added 0
Cross-runtime calls Production paths unchanged; the removed RPC had no production caller
Product net change −110 lines
Scaffolding None added; tests use a small local helper over the production composition
Facade exit local_snapshot.py, the Python wrapper and the standalone RPC are deleted now

Scope And Continuation

  • Completed scope and remaining work: Complete within this scope.
  • Slice boundary / successor: N/A. A follow-up candidate, retiring the duplicated turn-scoped settlement predicate in work_items/delivery_outcome.py, was analyzed and deliberately not included. Several refusal paths (Host-result validation, the slot-accounting fallback scan, the missing-outcome refusal in refresh) cross no TS request today, so a cutover would add a cross-runtime call or reorder refusal.

Validation

Public-safe summaries only, including in HTML comments. Do not paste raw logs,
private data or prompts, private screenshots, credentials, internal URLs, connection
strings, or local paths. Use repository-relative commands without sensitive
arguments, aggregate results, and already-public CI links. If evidence is
private, report its category and limitations only; do not upload it to prove a claim.

  • Tested revision: 99619c8
  • Run state: finished
  • Input classes: synthetic
Check kind Result Public-safe evidence / limitation
unit passed Python decision-scope, standing-decision, user-completion and chat gate suites: 193 passed, 0 failed.
unit passed TS standing_decision, effect_runtime_fairness, todo_read, decision_scope, archive_capture, todo_archive_selection: 54 passed, 0 failed.
real_entrypoint passed examples/control_plane/todo-standing-decision-authority-smoke.py through the composed read and quota should-run.
static passed check_rfc_bilingual.py --base origin/main --head HEAD; loopx canary premerge --from-git-diff --git-diff-base origin/main including the maintainability ratchet and semantic vocabulary drift; merge gate passed.
  • Coverage and gaps: The removed RPC had no production caller, so production behavior is unchanged by construction; the migrated tests keep every previous assertion. Installed-artifact checks were not run separately. One reviewer note: the removed RPC rejected a non-boolean legacy_source_order (for example the string "false"), while the production todo.read path already treats any value other than true as not-legacy. That is existing production behavior, not a change introduced here.

See validation disclosure guidance.

Frontend / Visual Evidence

  • UI impact: none.
  • Before: N/A; no UI surface change.
  • After: N/A; no UI surface change.
  • First viewport and preview: N/A; no UI impact.
  • States and viewports shown: N/A; no UI impact.
  • Source data: none.
  • Attention review: N/A; no layout change.
  • Craft review: N/A; no visual change.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring (no functional changes)
  • Documentation update
  • Test update

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

  • Direction / acceptance reference, when applicable: TypeScript control-plane migration RFC, Stage 2B deletion rule (adapter exits with its last caller).

Shared-authority RFC fixture impact

  • Production-scale fixture schema: N/A; no migration or shared-authority qualification claimed.
  • Semantic dimensions changed, or reviewed no-impact rationale: N/A; only uncalled adapters and a test-only RPC are removed.
  • Provider conformance arms run: N/A; no conformance claim.
  • Read-only legacy/file/PostgreSQL three-arm rehearsal (required for promotion, runtime-routing, or compatibility-projection changes): N/A; none of these changes is proposed.

Boundary Checklist

  • Reviewed diff and body for private state, credentials, raw traces, internal links and local machine paths; none included in this body. Test fixtures are synthetic.
  • No maintainer-owned benchmark work duplicated.
  • Change remains scoped to the request described above.
  • Paired RFC and ledger files changed together (EN and zh-CN).
  • UI impact marked none.
  • Every branch commit includes a DCO Signed-off-by trailer (git commit -s).

…sion wrapper

- Delete coordination/local_snapshot.py: no caller has remained since #6396
  removed the last Todo mutation consumer of todo_snapshot_from_mapping.
- Delete build_standing_decision_authority() and its standalone
  todo.standing_decision.project handler and request decoder. Production
  reads already reach the shared TS owner through the composed todo.read
  batch; tests and the example now exercise that path with the same
  chronology, revocation, scope and invalid-item assertions, plus a TS
  case for contradictory authority without explicit legacy order.
- Correct the stale retention row in the retirement ledger and record the
  wrapper retirement in the TS migration checkpoint (EN and zh-CN).

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Signed-off-by: hhyykk <4408344+hhyykk@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-02T04:22:21.451854Z 99619c8 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

This branch has not been deployed

No deployments
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