[GH-ISSUE #5069] [Feature]: Continue behavior-preserving dead-code cleanup #2803

Closed
opened 2026-10-21 05:55:49 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Xelvanis on GitHub (Aug 15, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5069

Originally assigned to: @SpicyMarinara on GitHub.

What problem does this solve?

A prior broad cleanup pass was completed in #4386, but later generation-lifecycle audits identified additional client state and compatibility plumbing that is now demonstrably unreachable or unused. Leaving these remnants in place makes the active chat and streaming ownership harder to understand and creates false maintenance paths.

Proposed solution

Continue the behavior-preserving cleanup as a focused series on one topic branch. Each confirmed cleanup should remain independently reviewable in its own commit, with exact consumer searches, proportionate regression proof, and no mixed behavioral changes.

The initial commits:

  • remove the unreachable committed-stream state machine while retaining the real durable-row shadow owner;
  • remove unused Zustand transcript and swipe-index mirrors now owned by React Query and durable messages.
  • remove the redundant generation setup lock after making controller publication atomically clear the Illustrator-tail exception.
  • make the main generation handler capture its typed active-generation registry directly, removing untyped decoration readback and impossible missing-map branches.
  • remove the zero-consumer token-only SSE client parser and its stale contributor/reviewer contract references while retaining streamEvents as the sole active parser.
  • collapse duplicate cached/fetched update-check success responses into one construction path while preserving cache, failure, channel, and apply semantics.

Further cleanup items should be added only after their reachability and current owner are independently verified.

Alternatives considered

  • Open a separate issue and PR for every very small deletion. This improves isolation but adds substantial coordination overhead while the one-commit-per-cleanup rule already preserves reviewability and reversion.
  • Remove dead code opportunistically during unrelated changes. This obscures intent and makes proof and review harder to evaluate.

Additional context

This is a follow-up to the completed cleanup initiative in #4386, not a claim that its original scope was unfinished. The current work covers newly triaged remnants on present staging. Any cleanup that reveals a user-visible behavior change should leave this mechanical lane and receive separate scope.

Template check

  • I DID NOT read this template and provide the requested details.
Originally created by @Xelvanis on GitHub (Aug 15, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/5069 Originally assigned to: @SpicyMarinara on GitHub. <!-- task-id: marinara-code-cleanup-umbrella-202608 --> ## What problem does this solve? A prior broad cleanup pass was completed in #4386, but later generation-lifecycle audits identified additional client state and compatibility plumbing that is now demonstrably unreachable or unused. Leaving these remnants in place makes the active chat and streaming ownership harder to understand and creates false maintenance paths. ## Proposed solution Continue the behavior-preserving cleanup as a focused series on one topic branch. Each confirmed cleanup should remain independently reviewable in its own commit, with exact consumer searches, proportionate regression proof, and no mixed behavioral changes. The initial commits: - remove the unreachable committed-stream state machine while retaining the real durable-row shadow owner; - remove unused Zustand transcript and swipe-index mirrors now owned by React Query and durable messages. - remove the redundant generation setup lock after making controller publication atomically clear the Illustrator-tail exception. - make the main generation handler capture its typed active-generation registry directly, removing untyped decoration readback and impossible missing-map branches. - remove the zero-consumer token-only SSE client parser and its stale contributor/reviewer contract references while retaining `streamEvents` as the sole active parser. - collapse duplicate cached/fetched update-check success responses into one construction path while preserving cache, failure, channel, and apply semantics. Further cleanup items should be added only after their reachability and current owner are independently verified. ## Alternatives considered - Open a separate issue and PR for every very small deletion. This improves isolation but adds substantial coordination overhead while the one-commit-per-cleanup rule already preserves reviewability and reversion. - Remove dead code opportunistically during unrelated changes. This obscures intent and makes proof and review harder to evaluate. ## Additional context This is a follow-up to the completed cleanup initiative in #4386, not a claim that its original scope was unfinished. The current work covers newly triaged remnants on present `staging`. Any cleanup that reveals a user-visible behavior change should leave this mechanical lane and receive separate scope. ## Template check - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:55:49 +07:00
Author
Owner

@Xelvanis commented on GitHub (Aug 15, 2026):

Implementation owner: @Xelvanis. Work is tracked incrementally in draft PR #5070 on cleanup/code-cleanup; each cleanup remains a separate focused commit.

<!-- gh-comment-id:5303140294 --> @Xelvanis commented on GitHub (Aug 15, 2026): Implementation owner: @Xelvanis. Work is tracked incrementally in draft PR #5070 on `cleanup/code-cleanup`; each cleanup remains a separate focused commit.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2803
No description provided.