Skip to content

Init design doc#53

Open
rootandroo wants to merge 1 commit into
mainfrom
api-match-history
Open

Init design doc#53
rootandroo wants to merge 1 commit into
mainfrom
api-match-history

Conversation

@rootandroo

Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sonarqubecloud

Copy link
Copy Markdown

@rootandroo rootandroo marked this pull request as ready for review July 11, 2026 16:01
@rootandroo rootandroo requested a review from a team as a code owner July 11, 2026 16:01
@graphite-app graphite-app Bot requested review from Arshadul-Monir and arklian July 11, 2026 16:01
Comment on lines +33 to +34
WHERE c.run_at >= TIMESTAMPTZ '2026-01-01'
AND c.run_at < TIMESTAMPTZ '2027-01-01';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The SQL query uses hardcoded dates '2026-01-01' and '2027-01-01' instead of parameterizing the {year} path variable. If implemented as written, the endpoint will ignore the year parameter and always return matches for 2026 only.

Fix: Replace with parameterized dates:

WHERE c.run_at >= TIMESTAMPTZ :year || '-01-01'
  AND c.run_at <  TIMESTAMPTZ (:year + 1) || '-01-01'
Suggested change
WHERE c.run_at >= TIMESTAMPTZ '2026-01-01'
AND c.run_at < TIMESTAMPTZ '2027-01-01';
WHERE c.run_at >= TIMESTAMPTZ :year || '-01-01'
AND c.run_at < TIMESTAMPTZ (:year + 1) || '-01-01';

Spotted by Graphite

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

@graphite-app

graphite-app Bot commented Jul 11, 2026

Copy link
Copy Markdown

Graphite Automations

"Request reviewers once CI passes" took an action on this PR • (07/11/26)

2 reviewers were added to this PR based on Henry Chen's automation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant