[PR #1013] [MERGED] Fix Spotify disabled tool logging #4881

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1013
Author: @cha1latte
Created: 5/19/2026
Status: ✅ Merged
Merged: 5/19/2026
Merged by: @cha1latte

Base: staging ← Head: fix/issue-1001-spotify-disabled-logs


📝 Commits (1)

  • 9e09f43 Fix Spotify disabled tool logging

📊 Changes

3 files changed (+56 additions, -11 deletions)

View changed files

➕ docs/pr-evidence/issue-1001-spotify-availability-proof.png (+0 -0)
📝 packages/server/src/routes/generate.routes.ts (+18 -11)
➕ packages/server/src/routes/generate/spotify-tool-availability.ts (+38 -0)

📄 Description

Linked issue

Closes #1001

Why this change

  • RP chat generation could emit Spotify credential/tool omission debug logs even when the Spotify agent was disabled and Spotify had never been configured. The unfiltered chat tool pool made Spotify look requested just because the built-in Spotify tools existed.

What changed

  • Added a small Spotify tool availability helper that treats Spotify as requested only when a filtered chat tool list explicitly includes a Spotify function or an agent enables Spotify tools.
  • Kept unavailable Spotify tools filtered out of main generation while suppressing the noisy omission log for the unfiltered default tool pool.
  • Preserved existing behavior for explicit per-chat Spotify tool selection and Spotify agent tool execution.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

  • Codex reproduced the bug with node scratch\issue-1001-spotify-availability-repro.mjs --before; the old availability logic returned needsSpotify=true for a disabled Spotify agent with no per-chat filter.
  • Codex verified the fix with pnpm --dir packages\server exec tsx ..\..\scratch\issue-1001-spotify-availability-verify.ts --after.
  • Edge cases covered by the focused verifier:
    • Unfiltered all-tools pool no longer requests Spotify credentials or logs unavailable Spotify omission.
    • Explicit per-chat Spotify tool selection still requests credentials and logs unavailable omission.
    • Spotify agent tool selection still requests credentials and logs unavailable omission.
    • Non-Spotify filtered chat tools do not request Spotify credentials or log Spotify omission.
  • Codex ran pnpm check; it passed (impeccable:check, lint, shared/server/client build).
  • No human-only verification is required for the core claim; this is a backend tool-availability/logging path.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

Not a UI change. Non-UI proof artifact:

Issue 1001 Spotify availability proof


🔄 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/1013 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/19/2026 **Status:** ✅ Merged **Merged:** 5/19/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `staging` ← **Head:** `fix/issue-1001-spotify-disabled-logs` --- ### 📝 Commits (1) - [`9e09f43`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9e09f4340d04cd3f99817c7468e5ba87fc867406) Fix Spotify disabled tool logging ### 📊 Changes **3 files changed** (+56 additions, -11 deletions) <details> <summary>View changed files</summary> ➕ `docs/pr-evidence/issue-1001-spotify-availability-proof.png` (+0 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+18 -11) ➕ `packages/server/src/routes/generate/spotify-tool-availability.ts` (+38 -0) </details> ### 📄 Description <!-- Target branch: `staging`. The default base in this UI is `main` (release branch). --> <!-- Change the base to `staging` before submitting unless this is a maintainer-approved mainline change. --> <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #1001 ## Why this change <!-- What user problem, bug, or goal does this solve? --> - RP chat generation could emit Spotify credential/tool omission debug logs even when the Spotify agent was disabled and Spotify had never been configured. The unfiltered chat tool pool made Spotify look requested just because the built-in Spotify tools existed. ## What changed <!-- List the key changes in this PR --> - Added a small Spotify tool availability helper that treats Spotify as requested only when a filtered chat tool list explicitly includes a Spotify function or an agent enables Spotify tools. - Kept unavailable Spotify tools filtered out of main generation while suppressing the noisy omission log for the unfiltered default tool pool. - Preserved existing behavior for explicit per-chat Spotify tool selection and Spotify agent tool execution. ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Codex reproduced the bug with `node scratch\issue-1001-spotify-availability-repro.mjs --before`; the old availability logic returned `needsSpotify=true` for a disabled Spotify agent with no per-chat filter. - Codex verified the fix with `pnpm --dir packages\server exec tsx ..\..\scratch\issue-1001-spotify-availability-verify.ts --after`. - Edge cases covered by the focused verifier: - Unfiltered all-tools pool no longer requests Spotify credentials or logs unavailable Spotify omission. - Explicit per-chat Spotify tool selection still requests credentials and logs unavailable omission. - Spotify agent tool selection still requests credentials and logs unavailable omission. - Non-Spotify filtered chat tools do not request Spotify credentials or log Spotify omission. - Codex ran `pnpm check`; it passed (`impeccable:check`, lint, shared/server/client build). - No human-only verification is required for the core claim; this is a backend tool-availability/logging path. ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) Not a UI change. Non-UI proof artifact: ![Issue 1001 Spotify availability proof](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/9e09f4340d04cd3f99817c7468e5ba87fc867406/docs/pr-evidence/issue-1001-spotify-availability-proof.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:11:25 +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#4881
No description provided.