[PR #45] [MERGED] refactor: split retry-agents out of generate route #4415

Closed
opened 2026-10-22 04:07:24 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/45
Author: @TheLonelyDevil9
Created: 4/2/2026
Status: ✅ Merged
Merged: 4/2/2026
Merged by: @SpicyMarinara

Base: main ← Head: pr/generate-route-decomposition


📝 Commits (4)

  • 897be5c chore: finish config and release hygiene follow-ups
  • 62d9379 feat: harden update checks and release guardrails
  • 4d191fc refactor: extract retry agent route from generate monolith
  • 0de6ecd Merge branch 'main' into pr/generate-route-decomposition

📊 Changes

17 files changed (+968 additions, -660 deletions)

View changed files

📝 .env.example (+2 -0)
➕ .github/workflows/publish-github-release.yml (+62 -0)
📝 .github/workflows/pull-request-checks.yml (+3 -0)
📝 CHANGELOG.md (+3 -0)
📝 CONTRIBUTING.md (+7 -3)
📝 README.md (+2 -1)
➖ installer/Marinara-Engine-Installer-1.4.7.exe (+0 -0)
📝 package.json (+2 -0)
📝 packages/server/src/config/runtime-config.ts (+8 -0)
📝 packages/server/src/routes/admin.routes.ts (+3 -2)
📝 packages/server/src/routes/generate.routes.ts (+22 -612)
➕ packages/server/src/routes/generate/retry-agents-route.ts (+641 -0)
➕ packages/server/src/routes/generate/sse.ts (+24 -0)
📝 packages/server/src/routes/updates.routes.ts (+96 -41)
📝 packages/server/src/utils/crypto.ts (+2 -1)
➕ scripts/check-tracked-installers.mjs (+34 -0)
➕ scripts/render-release-notes.mjs (+57 -0)

📄 Description

Summary

  • extract the /api/generate/retry-agents SSE handler into its own route module
  • move shared SSE response helpers into a dedicated routes/generate helper
  • keep generate.routes.ts focused on the main /api/generate path plus route registration

Why

generate.routes.ts is still one of the highest-risk files in the repo because too many unrelated behaviors live in one place. Even small changes become harder to review, harder to test mentally, and easier to break.

This PR is intentionally narrow. The core objective is to carve out one complete route boundary without changing its external behavior, so future fixes in the generation stack are safer and the remaining monolith becomes easier to decompose in smaller reviewable steps.

Notes

  • This PR is stacked on top of #44.
  • Until #44 merges, the GitHub diff will also include the storage/release-correctness commits from that branch.
  • After #44 merges, this PR should collapse to the retry-route decomposition only.

Validation

  • pnpm check

Result

  • packages/server/src/routes/generate.routes.ts drops from 5,712 lines before extraction to 4,770 lines on this branch.
  • /retry-agents keeps the same route path, SSE event shapes, and persistence behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/45 **Author:** [@TheLonelyDevil9](https://github.com/TheLonelyDevil9) **Created:** 4/2/2026 **Status:** ✅ Merged **Merged:** 4/2/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `pr/generate-route-decomposition` --- ### 📝 Commits (4) - [`897be5c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/897be5c8683ada54fec9769f6562fd7e1fda0cf5) chore: finish config and release hygiene follow-ups - [`62d9379`](https://github.com/Pasta-Devs/Marinara-Engine/commit/62d9379d3e8df15f7f03d05c9020308fcae42f96) feat: harden update checks and release guardrails - [`4d191fc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4d191fcdfd1701b9fe468ec22d2770f29cfb7de0) refactor: extract retry agent route from generate monolith - [`0de6ecd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0de6ecdbe1176efebed881d486ee1d0442bf8235) Merge branch 'main' into pr/generate-route-decomposition ### 📊 Changes **17 files changed** (+968 additions, -660 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+2 -0) ➕ `.github/workflows/publish-github-release.yml` (+62 -0) 📝 `.github/workflows/pull-request-checks.yml` (+3 -0) 📝 `CHANGELOG.md` (+3 -0) 📝 `CONTRIBUTING.md` (+7 -3) 📝 `README.md` (+2 -1) ➖ `installer/Marinara-Engine-Installer-1.4.7.exe` (+0 -0) 📝 `package.json` (+2 -0) 📝 `packages/server/src/config/runtime-config.ts` (+8 -0) 📝 `packages/server/src/routes/admin.routes.ts` (+3 -2) 📝 `packages/server/src/routes/generate.routes.ts` (+22 -612) ➕ `packages/server/src/routes/generate/retry-agents-route.ts` (+641 -0) ➕ `packages/server/src/routes/generate/sse.ts` (+24 -0) 📝 `packages/server/src/routes/updates.routes.ts` (+96 -41) 📝 `packages/server/src/utils/crypto.ts` (+2 -1) ➕ `scripts/check-tracked-installers.mjs` (+34 -0) ➕ `scripts/render-release-notes.mjs` (+57 -0) </details> ### 📄 Description ## Summary - extract the `/api/generate/retry-agents` SSE handler into its own route module - move shared SSE response helpers into a dedicated `routes/generate` helper - keep `generate.routes.ts` focused on the main `/api/generate` path plus route registration ## Why `generate.routes.ts` is still one of the highest-risk files in the repo because too many unrelated behaviors live in one place. Even small changes become harder to review, harder to test mentally, and easier to break. This PR is intentionally narrow. The core objective is to carve out one complete route boundary without changing its external behavior, so future fixes in the generation stack are safer and the remaining monolith becomes easier to decompose in smaller reviewable steps. ## Notes - This PR is stacked on top of #44. - Until #44 merges, the GitHub diff will also include the storage/release-correctness commits from that branch. - After #44 merges, this PR should collapse to the retry-route decomposition only. ## Validation - `pnpm check` ## Result - `packages/server/src/routes/generate.routes.ts` drops from 5,712 lines before extraction to 4,770 lines on this branch. - `/retry-agents` keeps the same route path, SSE event shapes, and persistence behavior. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:07:24 +07:00
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#4415
No description provided.