[PR #2242] [MERGED] Fix built-in agent interval gating #5505

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2242
Author: @cha1latte
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/issue-2163-built-in-interval-agents


📝 Commits (1)

  • 1043fbf Fix built-in agent interval gating

📊 Changes

2 files changed (+275 additions, -6 deletions)

View changed files

📝 src/engine/generation/agent-runner.test.ts (+260 -0)
📝 src/engine/generation/agent-runner.ts (+15 -6)

📄 Description

Linked issue

Closes #2163

Why this change

  • Automated Chat Summary and Card Evolution Auditor still exposed run interval controls, but the refactor branch no longer built interval gates for those built-ins. That let both post-processing agents call the LLM every turn instead of waiting for their configured cadence.

What changed

  • Restored built-in interval-gate metadata for chat-summary and card-evolution-auditor.
  • Kept chat summary on user-message cadence and card evolution auditor on assistant-message cadence.
  • Added focused engine tests for skip/run boundaries on both built-ins, plus kept existing director regeneration cadence coverage intact.

Refactor impact

Primary owner:

  • engine generation

Impact areas reviewed:

  • src/engine/generation/agent-runner.ts
  • src/engine/generation/agent-runner.test.ts

Boundary notes:

  • React-free engine behavior only. No feature UI, shared API, Rust, storage schema, dependency, or remote-runtime boundary changes.
  • The issue's secondary summaryContextSize parity note is intentionally out of scope for this cadence fix.

Pressure points touched:

  • Post-processing agent resolution and automatic interval gating.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Codex reproduced the bug with a focused Vitest regression before the production fix: chat-summary and card-evolution-auditor each called the mock LLM once when they should have been suppressed.
  • pnpm exec vitest run src\engine\generation\agent-runner.test.ts passed after the fix: 6 tests passed.
  • pnpm typecheck passed.
  • pnpm check passed.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\issue-2163-bugfix-verification.json passed.
  • Bunny review pass: issue match, proof quality, boundary, diff scope, and repo gates are clean for draft PR.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Internal cadence bugfix for existing built-in agents; no new discoverable behavior or UI surface.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

  • N/A. This is React-free engine cadence behavior with no visible UI state; proof is the before/after command evidence above.

🔄 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/2242 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/issue-2163-built-in-interval-agents` --- ### 📝 Commits (1) - [`1043fbf`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1043fbf6f1b9c302f956a20f7ae865113442e052) Fix built-in agent interval gating ### 📊 Changes **2 files changed** (+275 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `src/engine/generation/agent-runner.test.ts` (+260 -0) 📝 `src/engine/generation/agent-runner.ts` (+15 -6) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #2163 ## Why this change - Automated Chat Summary and Card Evolution Auditor still exposed run interval controls, but the refactor branch no longer built interval gates for those built-ins. That let both post-processing agents call the LLM every turn instead of waiting for their configured cadence. ## What changed - Restored built-in interval-gate metadata for `chat-summary` and `card-evolution-auditor`. - Kept chat summary on user-message cadence and card evolution auditor on assistant-message cadence. - Added focused engine tests for skip/run boundaries on both built-ins, plus kept existing director regeneration cadence coverage intact. ## Refactor impact Primary owner: - engine generation Impact areas reviewed: - `src/engine/generation/agent-runner.ts` - `src/engine/generation/agent-runner.test.ts` Boundary notes: - React-free engine behavior only. No feature UI, shared API, Rust, storage schema, dependency, or remote-runtime boundary changes. - The issue's secondary `summaryContextSize` parity note is intentionally out of scope for this cadence fix. Pressure points touched: - Post-processing agent resolution and automatic interval gating. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Codex reproduced the bug with a focused Vitest regression before the production fix: `chat-summary` and `card-evolution-auditor` each called the mock LLM once when they should have been suppressed. - `pnpm exec vitest run src\engine\generation\agent-runner.test.ts` passed after the fix: 6 tests passed. - `pnpm typecheck` passed. - `pnpm check` passed. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\issue-2163-bugfix-verification.json` passed. - Bunny review pass: issue match, proof quality, boundary, diff scope, and repo gates are clean for draft PR. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [ ] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Internal cadence bugfix for existing built-in agents; no new discoverable behavior or UI surface. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence - N/A. This is React-free engine cadence behavior with no visible UI state; proof is the before/after command evidence above. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:53 +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#5505
No description provided.