Repository navigation
Flag database functions that nothing calls - #3584
Conversation
… pdfjs-dist pdf-parse 2.4.5 pinned its own pdfjs-dist 5.4 and canvas, so two PDF engines shipped. The fallback now reads PDFs with the pdfjs-dist 6.4 copy the viewer and roster import already use, following pdf-parse's text and image defaults. On every readable PDF in the repo the text is byte-identical and decoded image pixels are identical. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
- Handle inline PDF images without stalling - Exercise real fallback image extraction - Decode padded grayscale image rows correctly
An inline image (BI ... ID ... EI) carries its pixels in the paint operator. The fallback looked it up by id like an image XObject, which waits on an object pdf.js never resolves, so a PDF with an inline image hung the fallback forever. pdf-parse had the same wait. Adds a regression test with a hand-built PDF. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
Keeps the bot's inline image handling, padded one-bit row decoding and real fallback image test. Drops its one-second timeout on image lookups: a large image can take longer than that to decode, and the timeout would then report it as missing and drop it from the index. Inline images, the only case that never resolved, no longer go through the lookup at all. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
Adds an offline check that every function in the drift manifest has a caller in app, worker, script, edge-function code or other SQL. Six functions with no caller today are listed by name until their owners confirm them. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
|
Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing: 1
✨ Finishing Touches
Comment |
🏁 CodeAnt Quality Gate ResultsCommit: ✅ Overall Status: PASSEDQuality Gate Details
|
|
This pull request has been ignored for the connected project Preview Branches by Supabase. |
Old migration bodies, catalog lookups by name and quoted identity strings no longer count as calls, so the check now flags 16 functions instead of 6. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
There was a problem hiding this comment.
BigSimmo has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…to claude/project-thread-8l8vex
PR Summary by QodoFlag database functions with no repository callers
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
|
Claude encountered an error after 2s —— View job I'll analyze this and get back to you. |
Qodo FixerNo findings are available for this PR yet. Findings appear here once Qodo has reviewed the PR. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0e8cb2f267
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
CodeAnt Nitpicks2 code suggestions1. Overloads are collapsed by name, so a caller for one signature makes every live overload appear used even when another has no caller.Api mismatch · 2. This scans historical migrations as current SQL; references from an old function body remain after a later replacement or drop, hiding now-uncalled live functions.Stale reference · |
CodeAnt PR Risk: Medium Risk
Assessed commit: |
A function mentioned only in a comment is no longer treated as called. This flags three more functions, now 19 in total. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Adds regex-based caller detection that could misclassify references, producing misleading CI failures or overlooking unused database functions. Adds an offline test, ✅ 1 closed✅ Bug: Name lookups and old migration bodies are counted as callers
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Approved For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Important Your trial ends in 5 days — upgrade now to keep code review, CI analysis, auto-apply, custom automations, and more. Was this helpful? React with 👍 / 👎 | Gitar |
Code Review by Qodo
No findings for this group No findings for this group No findings for this group Resolved findings 1.
|
Summary
Before: nothing noticed when a function in the live database had no caller left, so unused versions could pile up. The scorecard thought old search versions were unused, but every one is still called: each v2 wraps its v1, and the app falls back to v1.
After: a new offline test,
tests/supabase-function-callers.test.ts, reads the function signatures in the drift manifest and fails if any function has no caller. A caller is one of these:src,worker,scriptsorsupabase/functions, with comments ignoredsupabase/schema.sql, counting only the last definition of each functioncron.scheduleThe following don't count as callers: the generated
database.types.ts, and SQL that names a function without calling it. That covers the function's own definition and body, drop, alter, grant and comment statements,proname = '…'checks, and quoted'public.x(…)'identity strings.Nineteen functions have no caller today. They are listed by name and flagged, not dropped. A second test fails if one of them gains a caller, so the list stays current.
Known limit: the check tracks functions by name, so for the 8 overloaded names it flags only when no version of the function has a caller left.
Areas touched: Data platform and access
Owner approval: the owner approved drafting this on 16 Oct (thread "Repo technical scorecard", item 2, recommended option "Add a check"). There is no database change. Dropping any function needs the owner's own named yes.
Verification
npx vitest run tests/supabase-function-callers.test.ts:Tests 2 passed (2)npx eslint --max-warnings=0andprettier --checkon the file: cleannpm run check:organisation -- --files tests/supabase-function-callers.test.ts:data-platform (Data platform and access)Risk and rollout
Notes
mainis this one file.🤖 Generated with Claude Code
https://claude.ai/code/session_01QevAacecJBjQqMcn5LoexE
Summary by CodeRabbit