Skip to content

docs: add master audit and follow-up issue drafts#572

Closed
arn0ld87 wants to merge 1 commit into
mainfrom
codex/perform-comprehensive-audit-of-agora-repository
Closed

docs: add master audit and follow-up issue drafts#572
arn0ld87 wants to merge 1 commit into
mainfrom
codex/perform-comprehensive-audit-of-agora-repository

Conversation

@arn0ld87
Copy link
Copy Markdown
Owner

Motivation

  • Provide an evidence-driven, code-referenced master audit covering code quality, simplification opportunities, frontend↔backend contract mismatches, and LLM provider integrations.
  • Break the audit into small, actionable follow-up tasks so no large refactor is started before review and agreement.
  • Capture prioritized fixes and a proposed unified provider abstraction to make the next implementation steps reviewable and testable.

Description

  • Add a comprehensive audit at docs/audits/master-audit-2026-05-22.md that enumerates findings with file references, risk levels, and recommended fixes.
  • Add four focused follow-up issue drafts under docs/issues/ addressing provider naming unification, API error envelope v2, splitting the monolithic llm_client.py, and centralizing SSE retry/reconnect config; each draft includes evidence and acceptance criteria.
  • The changes are documentation-only and do not modify runtime code or behavior, preserving the existing code surface for later, scoped PRs.
  • Commit created with message docs: add master audit and actionable follow-up issue drafts and the five new files staged under docs/audits/ and docs/issues/.

Testing

  • Inspected repository files with commands such as rg --files, rg -n <patterns> backend/app frontend/src, and nl -ba <file> to collect concrete references, and these inspection commands completed successfully.
  • Created and wrote the audit and issue draft files to docs/audits/master-audit-2026-05-22.md and docs/issues/2026-05-22-*.md and committed them with git commit, which succeeded.
  • No unit or integration tests were modified or executed as part of this documentation change, and there are no behavioral code changes introduced by this PR.

Codex Task

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive master audit document and several detailed issue drafts aimed at addressing technical debt and architectural inconsistencies across the backend and frontend. The audit highlights critical areas for improvement, including divergent provider naming conventions, the monolithic nature of the LLM client, inconsistent API error envelopes, and duplicated SSE configuration logic. Feedback on the audit document suggests expanding the proposed canonical provider enum to include missing providers like Anthropic and GitHub Copilot to ensure the documentation accurately reflects the intended system architecture.

- Risk: high
- Problem: Runtime config aliases map `gemini -> google`, while other API/contracts expose both `gemini` and `google` conventions.
- Evidence: `_PROVIDER_ALIASES` normalizes to `google`; invalid-provider error message only lists `google`, not `gemini`.
- Recommended fix: Introduce one canonical provider enum in shared contract (`ollama|openai|gemini|custom_openai`), and normalize all route and registry layers to it.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The proposed canonical provider enum (ollama|openai|gemini|custom_openai) is inconsistent with the current codebase. github_copilot is defined in the backend, and anthropic is present in the frontend. Following the principle that documentation should reflect intended functionality, these should be included in the audit. Furthermore, the backend should be updated to implement anthropic to match the frontend contract, rather than allowing the documentation to remain inconsistent with the intended full provider set.

Suggested change
- Recommended fix: Introduce one canonical provider enum in shared contract (`ollama|openai|gemini|custom_openai`), and normalize all route and registry layers to it.
(ollama|openai|gemini|anthropic|github_copilot|custom_openai)
References
  1. When documentation is inconsistent with the code because the code is incomplete, the correct action is to implement or add the missing code features rather than removing the documentation.

@arn0ld87
Copy link
Copy Markdown
Owner Author

Schließe als duplicate-Pfad (Triage-Review 2026-05-24).

Issue-Drafts in docs/issues/ existieren bereits als gefilete GH-Issues vom selben Audit-Run (2026-05-22):

Parent-Audit-Issue #571 ist ebenfalls CLOSED. Damit würde der docs/issues/-Pfad doppelt mit GH driften.

Audit-Bericht selbst (master-audit-2026-05-22.md) ist faktisch korrekt und behaltenswert — bitte aber in separaten PR ohne docs/issues/-Konvention (existiert sonst nirgends im Repo) ins bestehende docs/-Layout neben docs/AUDIT-2026-05-22.md (#573) konsolidieren.

Nicht eingearbeitet: Gemini-Vorschlag, Anthropic + GitHub Copilot in die kanonische Provider-Enum aufzunehmen.

Empfehlung: close, Audit-MD separat als Doku-PR neu öffnen.

@arn0ld87
Copy link
Copy Markdown
Owner Author

Closed per Triage 2026-05-24 (siehe vorheriger Comment): duplicate gegen #575/#582/#585; Audit-MD bitte separat als Doku-PR ohne docs/issues/-Pfad.

@arn0ld87 arn0ld87 closed this May 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant