[PR #6519] [CLOSED] Improve existing Pino diagnostics with retained logs and error references #7211

Closed
opened 2026-10-23 04:17:34 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6519
Author: @SirAdoni
Created: 9/22/2026
Status: ❌ Closed

Base: staging ← Head: contrib/e01-diagnostics-current


📝 Commits (1)

  • 2668c54 feat(diagnostics): retain bounded logs and traceable error references

📊 Changes

30 files changed (+2040 additions, -65 deletions)

View changed files

📝 .env.example (+6 -0)
📝 CHANGELOG.md (+2 -0)
➕ LOGGING.md (+66 -0)
➕ e2e/diagnostics.e2e.ts (+79 -0)
📝 packages/client/src/lib/api-client.ts (+62 -13)
➕ packages/client/src/lib/client-diagnostics.ts (+226 -0)
📝 packages/client/src/localization/locales/en.json (+2 -0)
📝 packages/client/src/main.tsx (+20 -0)
📝 packages/server/src/app.ts (+47 -13)
📝 packages/server/src/config/env-watcher.ts (+4 -5)
📝 packages/server/src/config/runtime-config.ts (+18 -0)
➕ packages/server/src/lib/diagnostic-operation.ts (+36 -0)
➕ packages/server/src/lib/diagnostics.ts (+165 -0)
📝 packages/server/src/lib/logger.ts (+100 -25)
➕ packages/server/src/lib/rotating-sink.ts (+209 -0)
📝 packages/server/src/middleware/error-handler.ts (+13 -3)
➕ packages/server/src/routes/diagnostics.routes.ts (+88 -0)
📝 packages/server/src/routes/generate/sse.ts (+70 -2)
📝 packages/server/src/routes/index.ts (+2 -0)
➕ packages/server/src/services/llm/diagnostic-provider.ts (+261 -0)

...and 10 more files

📄 Description

Linked issue

Refs #6453 — E01 logging improvements, accepted in https://github.com/Pasta-Devs/Marinara-Engine/issues/6453#issuecomment-5761794958. Supersedes closed #6438, which GitHub would not allow the author to reopen.

Why this change

Failures across browser, HTTP and provider operations are difficult to correlate from console output alone. This extends the existing Pino logging with bounded local diagnostic records and error references users can share with developers.

What changed

  • Retain bounded rotating application logs and request/provider/stage context through existing logging paths.
  • Preserve reusable error references across HTTP and generation-stream failures.
  • Accept bounded, sanitized browser error reports through the existing authentication and CSRF protections.
  • Preserve provider defaults, admission, rate limiting and cancellation behavior.

E02 persistent generation jobs and continuation after closing a tab are excluded. Owner: @SirAdoni, with AI assistance.

Validation

Integration with current staging and renewed privacy, compatibility and regression checks are in progress. Previous validation is not claimed for the refreshed branch. Final results will replace this draft status.

  • 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

  • Manually verify a displayed error reference can be found in local logs.
  • Manually inspect logs with debug disabled and explicitly enabled before sharing.

Docs and release impact

Logging documentation, environment settings and changelogs; no release version change.

  • Updated docs as needed
  • Translated docs updated or follow-up opened where applicable
  • Version/release files updated if applicable

UI evidence (if applicable)

Focused browser evidence will use synthetic data only.


🔄 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/6519 **Author:** [@SirAdoni](https://github.com/SirAdoni) **Created:** 9/22/2026 **Status:** ❌ Closed **Base:** `staging` ← **Head:** `contrib/e01-diagnostics-current` --- ### 📝 Commits (1) - [`2668c54`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2668c54f0c823d00c10eaa42273719d653f755d1) feat(diagnostics): retain bounded logs and traceable error references ### 📊 Changes **30 files changed** (+2040 additions, -65 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+6 -0) 📝 `CHANGELOG.md` (+2 -0) ➕ `LOGGING.md` (+66 -0) ➕ `e2e/diagnostics.e2e.ts` (+79 -0) 📝 `packages/client/src/lib/api-client.ts` (+62 -13) ➕ `packages/client/src/lib/client-diagnostics.ts` (+226 -0) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) 📝 `packages/client/src/main.tsx` (+20 -0) 📝 `packages/server/src/app.ts` (+47 -13) 📝 `packages/server/src/config/env-watcher.ts` (+4 -5) 📝 `packages/server/src/config/runtime-config.ts` (+18 -0) ➕ `packages/server/src/lib/diagnostic-operation.ts` (+36 -0) ➕ `packages/server/src/lib/diagnostics.ts` (+165 -0) 📝 `packages/server/src/lib/logger.ts` (+100 -25) ➕ `packages/server/src/lib/rotating-sink.ts` (+209 -0) 📝 `packages/server/src/middleware/error-handler.ts` (+13 -3) ➕ `packages/server/src/routes/diagnostics.routes.ts` (+88 -0) 📝 `packages/server/src/routes/generate/sse.ts` (+70 -2) 📝 `packages/server/src/routes/index.ts` (+2 -0) ➕ `packages/server/src/services/llm/diagnostic-provider.ts` (+261 -0) _...and 10 more files_ </details> ### 📄 Description ## Linked issue Refs #6453 — E01 logging improvements, accepted in https://github.com/Pasta-Devs/Marinara-Engine/issues/6453#issuecomment-5761794958. Supersedes closed #6438, which GitHub would not allow the author to reopen. ## Why this change Failures across browser, HTTP and provider operations are difficult to correlate from console output alone. This extends the existing Pino logging with bounded local diagnostic records and error references users can share with developers. ## What changed - Retain bounded rotating application logs and request/provider/stage context through existing logging paths. - Preserve reusable error references across HTTP and generation-stream failures. - Accept bounded, sanitized browser error reports through the existing authentication and CSRF protections. - Preserve provider defaults, admission, rate limiting and cancellation behavior. E02 persistent generation jobs and continuation after closing a tab are excluded. Owner: @SirAdoni, with AI assistance. ## Validation Integration with current staging and renewed privacy, compatibility and regression checks are in progress. Previous validation is not claimed for the refreshed branch. Final results will replace this draft status. - [ ] `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 - [ ] Manually verify a displayed error reference can be found in local logs. - [ ] Manually inspect logs with debug disabled and explicitly enabled before sharing. ## Docs and release impact Logging documentation, environment settings and changelogs; no release version change. - [ ] Updated docs as needed - [ ] Translated docs updated or follow-up opened where applicable - [ ] Version/release files updated if applicable ## UI evidence (if applicable) Focused browser evidence will use synthetic data only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:17:34 +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#7211
No description provided.