Commit Graph

26 Commits

Author SHA1 Message Date
david 443a0f460e feat: add team generator library with multiple strategies
Implement team generation algorithms for tournament partnerships:
- Random pairing (Fisher-Yates shuffle)
- ELO-based pairing (strongest + weakest)
- Even matches (balance competitive levels)
- Minimize repeat partnerships
- Support for byes with odd participant counts
- Team balance calculation utilities

Refs #22
2026-04-03 19:26:28 -07:00
david df856c62df feat: add round-robin schedule generator
Implement circle-method algorithm for generating round-robin tournament
schedules. Handles both even and odd team counts with bye rounds.

Includes unit tests for algorithm correctness, input validation, and
expected round/matchup calculations.
2026-04-02 00:57:49 -07:00
david 967bdc1b89 fix(tests): resolve password validation, csv upload, and admin auth issues
Pull Request / unit-tests (pull_request) Successful in 57s
Pull Request / acceptance-tests (pull_request) Failing after 28m30s
Pull Request / analyze-bump-type (pull_request) Has been skipped
- Set explicit min/max password length in Better Auth config (8-128 chars)
- Fix CSV upload tests to use multipart/form-data instead of data
- Add @chromium-admin annotations to tests requiring admin access
2026-04-01 20:35:38 -07:00
david 5caa284b3c fix: add defensive checks to prisma.ts to prevent build failures
Test / unit-tests (push) Has been cancelled
2026-03-31 23:44:43 -07:00
david 501e1b7e23 fix: version bumping and Docker registry authentication (#17)
Release / release (push) Failing after 1m9s
Test / unit-tests (push) Successful in 2m5s
## Summary

This PR fixes the release workflow to properly handle version bumping on PR merge and uses the new Docker registry authentication secrets.

## Changes

### Release Workflow (release.yml)
- **Version Bumping**: Now automatically bumps version on PR merge
  - Determines bump type from commit messages (major/minor/patch)
  - Commits version bump to `package.json` and `CHANGELOG.md`
  - Creates git tag for the release
- **Docker Registry Auth**: Uses `DOCKER_LOGIN` and `DOCKER_PASSWORD` secrets
  - Falls back gracefully if secrets are not configured
- **Tag Handling**: Checks if tag exists before creating (prevents failures)

### PR Workflow (pr.yml) - NEW
- Runs unit tests on every PR
- Analyzes commits to suggest bump type
- Comments the suggested bump type on the PR

### Documentation
- Added `WORKFLOW_ARCHITECTURE.md` explaining the workflow design

## Workflow Architecture

**Two-step process:**
1. **PR Workflow** (on PR): Analyzes commits and suggests bump type
2. **Release Workflow** (on merge): Bumps version, creates tag, builds Docker image

## Benefits

1. **No CI Loops**: Version bump commits are detected and skipped
2. **Clear Communication**: PR comments inform developers of version impact
3. **Semantic Versioning**: Automated adherence to semver rules
4. **Traceability**: Git tags and changelog reflect all changes

## Testing

The new workflows will be tested when this PR is merged.

Closes #13 (Add database test safety configuration)

Reviewed-on: #17
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
2026-04-01 05:03:14 +00:00
david d595dfa62d fix: update Prisma client configuration and test files for Prisma 7.x compatibility 2026-03-31 10:41:04 -07:00
david 103c62497c fix: update authentication to support http://dhg.lol:51193 2026-03-31 09:16:58 -07:00
david 9609a15534 fix: configure Better Auth for euchre.notsosm.art domain 2026-03-31 09:01:33 -07:00
david 31c93de81a fix: disable trusted origins validation 2026-03-31 04:55:03 -07:00
david 39e7573e76 fix: add dhg.lol:51193 to trusted origins 2026-03-31 04:44:04 -07:00
david 62f10a232f fix: parse TRUSTED_ORIGINS environment variable for Better Auth 2026-03-31 04:41:01 -07:00
david e3137085c8 feat: add Glicko2 rating system support 2026-03-31 03:38:16 -07:00
david cfd36d375c feat: add OpenSkill rating system support 2026-03-31 03:38:12 -07:00
david e0d159ad8d fix: remove logging from prisma client and fix users API routes 2026-03-31 01:15:57 -07:00
david 492a18aa1b fix: remove duplicate win/loss increment in partnership stats calculation 2026-03-31 01:08:53 -07:00
david b8d90897a4 fix: await params in Next.js 16 routes and pages for TypeScript compatibility 2026-03-31 00:50:56 -07:00
david 3465082816 fix(prisma): use PostgreSQL adapter for Prisma v7 client connection 2026-03-31 00:10:47 -07:00
david e1034adfcf fix(prisma): add datasourceUrl to PrismaClient constructor for v7 compatibility 2026-03-31 00:04:16 -07:00
david 5d1755f082 chore: add variant scoring fields, fix tie handling, and fix test files for normalizedName 2026-03-30 22:48:31 -07:00
david 4d9cbc9259 fix: add site_admin support to tournament permissions and fix session cache issues 2026-03-30 22:09:50 -07:00
david 07804b5f8f feat: add site_admin role, casual match support, and tournament deletion 2026-03-30 21:49:43 -07:00
david d821dd7ce2 fix: include participants in getManageableTournaments query 2026-03-30 21:34:16 -07:00
david 3a78f354ad feat: add recalculateAllElo function for idempotent ELO recalculation 2026-03-30 21:28:09 -07:00
david c9415d490e fix: improve error handling and type safety
- Replaced 'any' types with proper TypeScript types
- Improved error handling with instanceof checks
- Removed unused imports (calculateExpectedTeamScore)
- Updated error messages to be more descriptive
- Removed deprecated eslint.config.mjs file
2026-03-29 21:20:40 -07:00
david 803f936e2f feat: add PostgreSQL database adapter support 2026-03-29 20:08:53 -07:00
david 123df671f5 nextjs-rewrite (#5)
Reviewed-on: #5
Co-authored-by: David Gwilliam <dhgwilliam@gmail.com>
Co-committed-by: David Gwilliam <dhgwilliam@gmail.com>
2026-03-30 02:30:13 +00:00