Skip to content

Sync: dev to main - #537

Merged
aamoghS merged 15 commits into
mainfrom
dev
Oct 25, 2026
Merged

aamoghS merged 15 commits into
mainfrom
dev

Conversation

@github-actions

@github-actions github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Automated PR tracking changes from dev into main.


Note

Medium Risk
New judging workflow can remove entries from results via disqualify and depends on GitHub rate limits; schema and console polling add operational surface but decisions stay manual with extensive tests.

Overview
Adds a judging repo check for hackathon editions: when organisers enable it, the app polls GitHub for each project’s linked repos (using pushed_at, not commit dates), compares against the submission deadline plus configurable grace, and surfaces flagged entries in a new Repo check console section. Organisers can disqualify (same effect as removing an entry), clear, or reinstate; nothing is auto-disqualified. Runs are kicked off from the judging console poll (repoCheckIfDue, ~15 minutes, DB claim for multi-instance), with optional GITHUB_TOKEN for higher API limits.

Schema and API work includes judging_repo_check, judging_config repo-check fields, services/judging/repo-check.ts, admin tRPC procedures, and restoreLockedEntry shared by restore and reinstate flows.

Separately, root scripts/*.mjs move to tooling/scripts as TypeScript (guard-local, local, uptime-probe, clickup-task); package.json, CI uptime workflow, and docs paths are updated accordingly.

Reviewed by Cursor Bugbot for commit 31871ad. Bugbot is set up for automated code reviews on this repo. Configure here.

aamoghS and others added 8 commits October 25, 2026 17:23
Organisers switch the check on per edition, run it on demand and confirm
or clear each flag. Disqualifying removes the project from judging the way
removeEntry does; reinstating restores it through the shared restore path.
Scripts now live in tooling/scripts as TypeScript and run on Node's built-in type stripping, with no build step and no install needed for the uptime probe. Invocations, the root test script and docs are updated.
refactor(scripts): move repo scripts into a typed @query/scripts package
aamoghS and others added 7 commits October 25, 2026 17:46
Results are saved per entry under the edition lock against the current row, so a decision made during a run survives it. A pending late flag is no longer wiped by a later error, unreadable or ok check, and the latest attempt is kept beside it. Every distinct repo link (at most three) is checked, entries checked longest ago go first, and a 403 that mentions a rate limit stops the run instead of reading as unreadable.
Check now waits up to 25 seconds for the run, a stale in-process run no longer blocks the next, a new grace re-works pending flags, and reinstating restores only the removal the disqualification made.
…ning

Documents the new behaviour and adds the commented-out GITHUB_TOKEN entry to apphosting.yaml.
Evidence a failed or empty fetch could not reload is kept from the earlier check, and gatherEvidence reports what failed. A run settles late versus on time from the stored push time against the grace read under the edition lock, and setRepoCheck changes the grace and drops pending flags in one transaction under that lock.
feat(judging): late-push repo check with organiser decisions
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor Author

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@query/eslint-config workspace:* UnknownUnknown
npm/@query/tsconfig workspace:* UnknownUnknown
npm/@types/node ^24.19.2 UnknownUnknown
npm/eslint ^10.11.0 UnknownUnknown
npm/typescript ^7.0.2 UnknownUnknown

Scanned Files

  • tooling/scripts/package.json

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor Author

Visit the preview URL for this PR (updated for commit 31871ad):

https://hacklytics2027--pr-537-sknjoc81.web.app

(expires Sun, 01 Nov 2026 22:34:16 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: c48ba34db61581e25fe2978355160b5eefe0e83f

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 31871ad. Configure here.

): Promise<{ done: Promise<void> } | undefined> {
const last = repoCheckThrottle.get(hackathonId);
if (last !== undefined && now.getTime() - last < REPO_CHECK_EVERY_MS) return;
repoCheckThrottle.set(hackathonId, now.getTime());

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Failed claims block the next auto-run

Medium Severity

repoCheckIfDue writes repoCheckThrottle before the database claim. A failed claim (judging still draft, switch off, or another instance already claimed) still silences this process for 15 minutes. setRepoCheck clears that map so a switch or grace change can run on the next poll; opening judging does not.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 31871ad. Configure here.

@aamoghS
aamoghS merged commit 574b44c into main Oct 25, 2026
17 of 21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⤵️ pull dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant