Conversation
|
Warning Review limit reached
More reviews will be available in 26 minutes and 17 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR adds repository audit and README documentation for the codebase and updates one SQL query to reference the ChangesRepository audit and documentation refresh
Category alias update in
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces comprehensive markdown documentation files across the project directories and updates the exists_by_qids_query function in src/api_cod/subs/missing_exists.php to use a new table alias and include a GROUP BY clause. However, a critical SQL syntax error was identified: defining the GROUP BY clause in the initial query string causes a syntax error when optional WHERE conditions are appended later. The feedback advises removing the GROUP BY clause from the initial query and appending it after all optional conditions have been processed.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/api_cod/subs/missing_exists.php (1)
42-69: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick winAppend dynamic filters before
GROUP BY.Lines 66 and 69 currently append
AND aa.category...after the base query already ended withGROUP BY, so category/campaign filters are not applied asWHEREpredicates.🐛 Proposed fix
- GROUP BY - t.qid, - q.title, - t.code, - t.target SQL; @@ if ($category === null && $campaign !== null) { $qua .= " AND aa.category IN (SELECT category FROM categories WHERE campaign = ?)"; $params[] = $campaign; } elseif ($category !== null) { $qua .= " AND aa.category = ?"; $params[] = $category; } + + $qua .= <<<SQL + GROUP BY + t.qid, + q.title, + t.code, + t.target + SQL;🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/api_cod/subs/missing_exists.php` around lines 42 - 69, The dynamic category/campaign filters in the query builder are being appended after the SQL has already ended with GROUP BY, so they never act as WHERE predicates. Update the query construction in the missing_exists flow so the filter fragments are added before the GROUP BY clause (or inserted into the existing WHERE section) and keep the parameter order in sync with $params.
🧹 Nitpick comments (18)
src/test2/README.md (5)
209-209: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd blank lines around table.
The dependencies table at line 209 lacks blank lines above it.
### External Dependencies (loaded via CDN) + | Dependency | Version | CDN |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test2/README.md` at line 209, The dependencies table in the README is missing surrounding spacing. Update the Markdown around the table so there is a blank line before and after the table entry near the dependencies section, keeping the table content unchanged.Source: Linters/SAST tools
31-31: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd language specifier to fenced code block.
src/test2/ index.html # Static HTML shell with inline CSS (2553 bytes)<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/test2/README.mdat line 31, Add a language specifier to the fenced code
block in the README snippet by updating the markdown fence to use a
text-oriented label. Locate the fenced block near the src/test2/ directory
listing and change the opening fence in that section so the code block is
explicitly annotated, keeping the existing content unchanged.</details> <!-- cr-comment:v1:d2c6a3f1cedca9e8f9a264b7 --> _Source: Linters/SAST tools_ --- `39-39`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
Browser loads index.html<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/test2/README.mdat line 39, The fenced code block in the README is
missing a language specifier, so update the Markdown fence to use a suitable
label for plain text. Locate the example under the README section and adjust the
fenced block formatting consistently so the snippet renders with the intended
syntax highlighting.</details> <!-- cr-comment:v1:4099ca923d8f41293e22f440 --> _Source: Linters/SAST tools_ --- `8-8`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add blank lines around table.** The comparison table at line 8 lacks blank lines above it, which violates Markdown linting rules. ```diff ### Differences from `src/test/` + | Aspect | `src/test/` | `src/test2/` |🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test2/README.md` at line 8, The Markdown table in the README is missing required blank lines around it, causing the lint issue. Update the README content around the comparison table so there is an empty line before and after the table, keeping the table itself unchanged; use the table section in README as the target for the fix.Source: Linters/SAST tools
203-203: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd language specifier to fenced code block.
# Open in browser https://mdwiki.toolforge.org/test2/<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/test2/README.mdat line 203, Add a language specifier to the fenced code
block in the README so the snippet is marked as plain text; update the existing
Markdown fence around the “Open in browser” example to use a text fence
consistently.</details> <!-- cr-comment:v1:b72d2aafb62e609f6b6614a6 --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>src/README.md (3)</summary><blockquote> `106-106`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
HTTP GET api.php?get=<endpoint><details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/README.mdat line 106, The fenced code block in the README should
specify its language. Update the Markdown block around the HTTP GET example to
use the appropriate fence identifier, and keep the example content unchanged so
the snippet is rendered and highlighted consistently.</details> <!-- cr-comment:v1:f5cfd313f5626deb5f522974 --> _Source: Linters/SAST tools_ --- `32-32`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
src/ api.php # Primary API entry point (17 lines)<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/README.mdat line 32, Add a language specifier to the fenced code block
in the README so the directory tree example is marked as text. Update the
Markdown fence that contains the src/ listing to use the appropriate code block
language identifier, keeping the content unchanged and matching the style used
elsewhere in the documentation.</details> <!-- cr-comment:v1:4e5dcb1ca85c546d16cecf87 --> _Source: Linters/SAST tools_ --- `74-74`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
┌─────────────────────────────────────────────────────────────┐<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/README.mdat line 74, The fenced code block in README.md is missing a
language specifier; update the markdown fence to use the appropriate identifier
for the ASCII diagram so the block is consistently rendered. Locate the fenced
block near the top-level README content and adjust the opening fence only,
keeping the diagram content unchanged.</details> <!-- cr-comment:v1:b8b7f2ba78adb9d6db018d01 --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>src/test/README.md (4)</summary><blockquote> `183-183`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
# Open in browser https://mdwiki.toolforge.org/test/<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/test/README.mdat line 183, Add a language specifier to the fenced code
block in the test README so the snippet is properly formatted and rendered as
plain text; update the markdown fence near the “Open in browser” section to use
a text-labeled fence, keeping the content and structure unchanged.</details> <!-- cr-comment:v1:2a8d1a805f510156ba2dc61d --> _Source: Linters/SAST tools_ --- `41-41`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
Browser loads index.php (HTML shell)<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/test/README.mdat line 41, The fenced example in the README is missing a
language specifier, so update the Markdown code fence to use a language like
text for the block containing the Browser loads index.php example. Locate the
fenced block in the README snippet and keep the content unchanged while adding
the specifier to the opening fence.</details> <!-- cr-comment:v1:1d8cb8418a9849a260563c95 --> _Source: Linters/SAST tools_ --- `30-30`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
src/test/ index.php # HTML entry point (no PHP code, 1620 bytes)<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/test/README.mdat line 30, The fenced code block in the test README is
missing a language specifier, so update the Markdown fence in the README example
to use the appropriate identifier via the existing code block near the src/test/
directory listing. Keep the content unchanged and only adjust the opening fence
so the block is explicitly marked as text for consistent rendering.</details> <!-- cr-comment:v1:223afabf546b057a88f07f6f --> _Source: Linters/SAST tools_ --- `192-192`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add blank lines around table.** The table at line 192 is not surrounded by blank lines, which violates Markdown linting rules and may cause rendering issues in some parsers. ```diff ### External Dependencies (loaded via CDN) + | Dependency | Version | CDN | |------------|---------|-----|🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/test/README.md` at line 192, The Markdown table in the README is missing surrounding blank lines, which breaks linting expectations. Update the table section in the README so the table is separated from the preceding and following text by empty lines, keeping the table content itself unchanged.Source: Linters/SAST tools
src/api_cod/README.md (2)
27-27: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueAdd language specifier to fenced code block.
src/api_cod/ request.php # Main router and switch/case dispatcher (512 lines)<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/api_cod/README.mdat line 27, Add a language specifier to the fenced
code block in the README so the directory tree uses a proper code fence; update
the Markdown snippet around the src/api_cod/README.md example to use a fenced
block with an explicit text language tag instead of an unlabeled fence.</details> <!-- cr-comment:v1:8a543b19edb2ad7c6a48ddf1 --> _Source: Linters/SAST tools_ --- `62-62`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
HTTP GET api.php?get=<endpoint><details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/api_cod/README.mdat line 62, The fenced code example in the README is
missing a language specifier, so update the Markdown code block to use a text
fence for the snippet that starts with HTTP GET api.php?get=. Locate
the fenced block in the README and change the opening delimiter so the example
is explicitly labeled as plain text.</details> <!-- cr-comment:v1:44d6646ca83cb9efdcf861c2 --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>src/api/README.md (3)</summary><blockquote> `132-132`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
# Forward a request to the main API GET /api/proxy.php?get=pages&limit=10<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/api/README.mdat line 132, The fenced code block in the README is
missing a language specifier, so update the example under the API proxy section
to use a proper fenced block label like text. Make the change in the Markdown
snippet that shows the GET /api/proxy.php request so the block is consistently
annotated and renders correctly.</details> <!-- cr-comment:v1:4b2b07692202956c1b99236e --> _Source: Linters/SAST tools_ --- `24-24`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
src/api/ proxy.php # The entire proxy (49 lines, single file)<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/api/README.mdat line 24, The fenced code block in the API README is
missing a language specifier, so update the markdown snippet to use the proper
fence label for the directory listing example. Locate the fenced block
containing the src/api/ tree and add the language identifier to that code fence
so it is consistently rendered as plain text.</details> <!-- cr-comment:v1:32eea8d0fc89c4e70f728162 --> _Source: Linters/SAST tools_ --- `34-34`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** ```diff
Browser → proxy.php → cURL → https://mdwiki.toolforge.org/api.php → Response → Browser<details> <summary>🤖 Prompt for AI Agents</summary>Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.In
@src/api/README.mdat line 34, The fenced diagram block in the README is
missing a language specifier, so update the Markdown fence to use the requested
text label. Locate the fenced block around the Browser → proxy.php → cURL flow
and change the opening fence to the text variant while keeping the rest of the
content unchanged.</details> <!-- cr-comment:v1:843314da37cb4bddc226a232 --> _Source: Linters/SAST tools_ </blockquote></details> <details> <summary>PROJECT_AUDIT_REPORT.md (1)</summary><blockquote> `217-229`: _📐 Maintainability & Code Quality_ | _🔵 Trivial_ | _💤 Low value_ **Add language specifier to fenced code block.** The ordered list inside the fenced code block should have a language tag (e.g., `text` or `bash`) for proper Markdown rendering and linting compliance. ```diff - ``` + ```text 1. [P0] Remove hardcoded credentials from version control + rotate🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@PROJECT_AUDIT_REPORT.md` around lines 217 - 229, The fenced block in PROJECT_AUDIT_REPORT should include a language specifier so Markdown renders and lints correctly. Update the opening fence for the ordered list block to use a suitable tag such as text, and keep the rest of the content unchanged.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/api/README.md`:
- Around line 140-142: Clarify the PHP compatibility statement in the README
requirements section so it does not claim “full compatibility” for PHP 8.0 when
the codebase still uses FILTER_SANITIZE_STRING. Update the wording in the
Requirements list to reflect the actual supported versions and note the 8.1
deprecation and 8.2+ incompatibility, keeping the change localized to the README
content near the PHP version bullet.
---
Outside diff comments:
In `@src/api_cod/subs/missing_exists.php`:
- Around line 42-69: The dynamic category/campaign filters in the query builder
are being appended after the SQL has already ended with GROUP BY, so they never
act as WHERE predicates. Update the query construction in the missing_exists
flow so the filter fragments are added before the GROUP BY clause (or inserted
into the existing WHERE section) and keep the parameter order in sync with
$params.
---
Nitpick comments:
In `@PROJECT_AUDIT_REPORT.md`:
- Around line 217-229: The fenced block in PROJECT_AUDIT_REPORT should include a
language specifier so Markdown renders and lints correctly. Update the opening
fence for the ordered list block to use a suitable tag such as text, and keep
the rest of the content unchanged.
In `@src/api_cod/README.md`:
- Line 27: Add a language specifier to the fenced code block in the README so
the directory tree uses a proper code fence; update the Markdown snippet around
the src/api_cod/README.md example to use a fenced block with an explicit text
language tag instead of an unlabeled fence.
- Line 62: The fenced code example in the README is missing a language
specifier, so update the Markdown code block to use a text fence for the snippet
that starts with HTTP GET api.php?get=<endpoint>. Locate the fenced block in the
README and change the opening delimiter so the example is explicitly labeled as
plain text.
In `@src/api/README.md`:
- Line 132: The fenced code block in the README is missing a language specifier,
so update the example under the API proxy section to use a proper fenced block
label like text. Make the change in the Markdown snippet that shows the GET
/api/proxy.php request so the block is consistently annotated and renders
correctly.
- Line 24: The fenced code block in the API README is missing a language
specifier, so update the markdown snippet to use the proper fence label for the
directory listing example. Locate the fenced block containing the src/api/ tree
and add the language identifier to that code fence so it is consistently
rendered as plain text.
- Line 34: The fenced diagram block in the README is missing a language
specifier, so update the Markdown fence to use the requested text label. Locate
the fenced block around the Browser → proxy.php → cURL flow and change the
opening fence to the text variant while keeping the rest of the content
unchanged.
In `@src/README.md`:
- Line 106: The fenced code block in the README should specify its language.
Update the Markdown block around the HTTP GET example to use the appropriate
fence identifier, and keep the example content unchanged so the snippet is
rendered and highlighted consistently.
- Line 32: Add a language specifier to the fenced code block in the README so
the directory tree example is marked as text. Update the Markdown fence that
contains the src/ listing to use the appropriate code block language identifier,
keeping the content unchanged and matching the style used elsewhere in the
documentation.
- Line 74: The fenced code block in README.md is missing a language specifier;
update the markdown fence to use the appropriate identifier for the ASCII
diagram so the block is consistently rendered. Locate the fenced block near the
top-level README content and adjust the opening fence only, keeping the diagram
content unchanged.
In `@src/test/README.md`:
- Line 183: Add a language specifier to the fenced code block in the test README
so the snippet is properly formatted and rendered as plain text; update the
markdown fence near the “Open in browser” section to use a text-labeled fence,
keeping the content and structure unchanged.
- Line 41: The fenced example in the README is missing a language specifier, so
update the Markdown code fence to use a language like text for the block
containing the Browser loads index.php example. Locate the fenced block in the
README snippet and keep the content unchanged while adding the specifier to the
opening fence.
- Line 30: The fenced code block in the test README is missing a language
specifier, so update the Markdown fence in the README example to use the
appropriate identifier via the existing code block near the src/test/ directory
listing. Keep the content unchanged and only adjust the opening fence so the
block is explicitly marked as text for consistent rendering.
- Line 192: The Markdown table in the README is missing surrounding blank lines,
which breaks linting expectations. Update the table section in the README so the
table is separated from the preceding and following text by empty lines, keeping
the table content itself unchanged.
In `@src/test2/README.md`:
- Line 209: The dependencies table in the README is missing surrounding spacing.
Update the Markdown around the table so there is a blank line before and after
the table entry near the dependencies section, keeping the table content
unchanged.
- Line 31: Add a language specifier to the fenced code block in the README
snippet by updating the markdown fence to use a text-oriented label. Locate the
fenced block near the src/test2/ directory listing and change the opening fence
in that section so the code block is explicitly annotated, keeping the existing
content unchanged.
- Line 39: The fenced code block in the README is missing a language specifier,
so update the Markdown fence to use a suitable label for plain text. Locate the
example under the README section and adjust the fenced block formatting
consistently so the snippet renders with the intended syntax highlighting.
- Line 8: The Markdown table in the README is missing required blank lines
around it, causing the lint issue. Update the README content around the
comparison table so there is an empty line before and after the table, keeping
the table itself unchanged; use the table section in README as the target for
the fix.
- Line 203: Add a language specifier to the fenced code block in the README so
the snippet is marked as plain text; update the existing Markdown fence around
the “Open in browser” example to use a text fence consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 0e273f71-e699-4ca3-9a34-662b2ea7a7d9
📒 Files selected for processing (7)
PROJECT_AUDIT_REPORT.mdsrc/README.mdsrc/api/README.mdsrc/api_cod/README.mdsrc/api_cod/subs/missing_exists.phpsrc/test/README.mdsrc/test2/README.md
Summary by CodeRabbit
Documentation
Bug Fixes