Commit Graph

443 Commits

Author SHA1 Message Date
Cal Corum
73353c2086 Add deployment details to CLAUDE.md (container name, logs, CI/CD)
Align production environment section with Major Domo's format:
container name, remote log command, co-hosted services, tea PR workflow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 19:05:16 -06:00
Cal Corum
b3220f0d25 Remove CLAUDE.md from .gitignore
CLAUDE.md should be tracked in version control.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 08:33:47 -06:00
Cal Corum
9d37e3a190 Optimize CLAUDE.md from 119 to 31 lines
Remove generated architecture docs, vague data flow sections, and boilerplate.
Keep commands, key patterns, and development notes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 08:33:47 -06:00
cal
4a06a80101 Merge pull request 'ci: switch Docker build cache to type=registry' (#14) from ci/registry-cache into main
All checks were successful
Build Docker Image / build (push) Successful in 2m58s
2026-02-11 22:14:25 +00:00
cal
0d60597022 ci: switch Docker build cache from type=gha to type=registry
Some checks failed
Build Docker Image / build (pull_request) Failing after 14s
The gha cache backend silently fails on Gitea Actions due to Docker
networking issues between the Buildx builder container and the
act_runner cache server. Registry-based caching stores layers on
Docker Hub, which is more reliable for self-hosted runners.
2026-02-11 22:12:26 +00:00
cal
066ee7d6f8 Merge pull request 'master' (#13) from master into main
All checks were successful
Build Docker Image / build (push) Successful in 48s
Reviewed-on: #13
2026-02-11 21:37:51 +00:00
cal
272ad102c0 Update VERSION
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m15s
2026-02-11 21:35:13 +00:00
Cal Corum
bc4daeece1 fix: unpack range() objects in pitcher error rating checks
range() objects were used directly in list membership checks instead of
being unpacked with *, causing all pitcher error ratings in range values
(roughly e27+) to silently fail during x-checks. Also fixed two range
boundary mismatches on dice 12 and dice 6.

Closes #12

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 15:33:37 -06:00
cal
128b669b85 Merge pull request 'fix: preserve batter at plate when half-inning ends on caught stealing' (#11) from fix/cs-batter-skip-1.9.1 into main
All checks were successful
Build Docker Image / build (push) Successful in 1m31s
2026-02-11 04:37:53 +00:00
Cal Corum
1eda66a06c fix: preserve batter at plate when half-inning ends on caught stealing
Some checks failed
Build Docker Image / build (pull_request) Failing after 15s
When a half-inning ended with a CS (or pickoff), the batter who was at
the plate was incorrectly skipped in the next inning. The side-switch
code unconditionally advanced the batting order by 1 without checking
whether the last play was a plate appearance. Now checks opponent_play.pa
before incrementing, matching the existing non-side-switch logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 22:37:42 -06:00
cal
df97b76294 Merge pull request 'fix/position-validation-lineup' (#10) from fix/position-validation-lineup into main
All checks were successful
Build Docker Image / build (push) Successful in 1m12s
Reviewed-on: #10
2026-02-11 04:15:44 +00:00
cal
0168279f6d Update VERSION
All checks were successful
Build Docker Image / build (pull_request) Successful in 2m20s
2026-02-11 04:12:42 +00:00
Cal Corum
1a9efa8f7e fix: add locked_play context manager to prevent stuck play locks
Early returns in log_chaos, log_sac_bunt, and log_stealing left play
locks permanently stuck because the lock was acquired but never released.
The new locked_play async context manager wraps checks_log_interaction()
and guarantees lock release on exception, early return, or normal exit.

Migrated all 18 locking commands in gameplay.py and removed redundant
double-locking in end_game_command.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:54:44 -06:00
cal
a0b5feebf7 Merge pull request 'fix: validate player positions in lineup before game start' (#9) from fix/position-validation-lineup into main
All checks were successful
Build Docker Image / build (push) Successful in 1m20s
Reviewed-on: #9
2026-02-08 03:17:21 +00:00
cal
a79bfbe6eb Update VERSION
All checks were successful
Build Docker Image / build (pull_request) Successful in 5m27s
2026-02-08 03:03:50 +00:00
Cal Corum
c4577ed46f fix: validate player positions in lineup before game start
Some checks failed
Build Docker Image / build (pull_request) Failing after 16s
Prevents PositionNotFoundException from crashing mlb-campaign when a
player is placed at a position they cannot play (e.g. an outfielder
listed at Catcher in the Google Sheet). Adds early validation in
get_lineups_from_sheets and proper error handling at all read_lineup
call sites so the user gets a clear message and the game is cleaned up.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 19:32:27 -06:00
cal
caabf9c6d2 Merge pull request 'master' (#8) from master into main
All checks were successful
Build Docker Image / build (push) Successful in 48s
Reviewed-on: #8
2026-02-04 15:41:29 +00:00
Cal Corum
a9fa2abbd1 Merge homelab/master - resolve VERSION conflict to 1.8.4
All checks were successful
Build Docker Image / build (pull_request) Successful in 44s
2026-02-04 09:40:00 -06:00
Cal Corum
aaca46d72f Merge branch 'main' of https://git.manticorum.com/cal/paper-dynasty-discord 2026-02-04 09:38:43 -06:00
Cal Corum
c98feea295 Merge branch 'master' 2026-02-04 09:38:18 -06:00
cal
a8b8f59bff Update VERSION
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m11s
2026-02-04 15:35:58 +00:00
cal
7038924e56 Update VERSION
Some checks failed
Build Docker Image / build (pull_request) Failing after 15s
2026-02-04 15:34:14 +00:00
Cal Corum
89801e1d42 Fix circular import by moving play lock functions to separate module
HOTFIX: Production bot failed to start due to circular import.

Root cause: utilities/dropdown.py importing from command_logic/logic_gameplay.py
while logic_gameplay.py imports from utilities/dropdown.py.

Solution: Created play_lock.py as standalone module containing:
- release_play_lock()
- safe_play_lock()

Both modules now import from play_lock.py instead of each other.

Error message:
  ImportError: cannot import name 'release_play_lock' from partially
  initialized module 'command_logic.logic_gameplay' (most likely due
  to a circular import)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 09:33:37 -06:00
cal
d181ee6201 Merge pull request 'Fix play lock system to prevent permanent user lockouts' (#7) from master into main
All checks were successful
Build Docker Image / build (push) Successful in 51s
Reviewed-on: #7
2026-02-04 15:27:33 +00:00
cal
5233c04e17 Update VERSION
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m15s
2026-02-04 15:25:17 +00:00
Cal Corum
48c86e54fd Merge remote-tracking branch 'homelab/main'
Some checks failed
Build Docker Image / build (pull_request) Failing after 24s
2026-02-04 09:24:15 -06:00
Cal Corum
ebf006e5c6 Fix play lock system to prevent permanent user lockouts
CRITICAL BUG FIX: Play locks were never released on exceptions, causing
permanent user lockouts. Found 13 stuck plays in production.

Changes:
1. Added lock_play parameter to checks_log_interaction() (default True)
2. Removed unnecessary locks from read-only commands:
   - /settings-ingame (game settings, not play state)
   - /show-card defense (read-only display)
   - /substitute commands (just show UI, lock in callback)
3. Added safe_play_lock() context manager for automatic lock release
4. Added play locking to substitution callbacks:
   - SelectBatterSub.callback()
   - SelectReliefPitcher.callback()
5. Global error handler now releases stuck locks automatically

Architecture:
- Commands that display UI or read data: No lock
- Commands that modify play state: Lock at last possible moment
- 3-layer defense: manual release, context manager, global handler

Resolves race condition from concurrent play modifications.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-04 09:21:18 -06:00
cal
c055276dd9 Merge pull request 'Update .gitea/workflows/docker-build.yml' (#6) from fix-docker-push into main
All checks were successful
Build Docker Image / build (push) Successful in 1m17s
Reviewed-on: #6
2026-02-04 07:11:33 +00:00
cal
735d51ab2e Update VERSION
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m5s
2026-02-04 07:09:05 +00:00
cal
8183549b65 Update .gitea/workflows/docker-build.yml
Some checks failed
Build Docker Image / build (pull_request) Failing after 11s
2026-02-04 07:07:58 +00:00
cal
0fb980aec1 Merge pull request 'debug-discord-notis' (#5) from debug-discord-notis into main
All checks were successful
Build Docker Image / build (push) Successful in 54s
Reviewed-on: #5
2026-02-04 07:00:12 +00:00
cal
1f4fad4a66 Update .gitea/workflows/docker-build.yml
All checks were successful
Build Docker Image / build (pull_request) Successful in 57s
2026-02-04 06:58:18 +00:00
cal
56746a8f6a Update .gitea/workflows/docker-build.yml
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m3s
2026-02-04 06:53:48 +00:00
cal
f36bcaccd2 Update .gitea/workflows/docker-build.yml
Some checks failed
Build Docker Image / build (pull_request) Failing after 1m4s
2026-02-04 06:49:54 +00:00
cal
ab0f42d615 Update VERSION
Some checks failed
Build Docker Image / build (pull_request) Failing after 1m9s
2026-02-04 06:47:22 +00:00
cal
b90006cbab Update .gitea/workflows/docker-build.yml
Some checks failed
Build Docker Image / build (pull_request) Failing after 13s
2026-02-04 06:45:52 +00:00
cal
6eece9f1db Update .gitea/workflows/docker-build.yml 2026-02-04 06:43:59 +00:00
cal
cd1b485946 Merge pull request 'Update VERSION' (#4) from cal-patch-1 into main
All checks were successful
Build Docker Image / build (push) Successful in 46s
Reviewed-on: #4
2026-02-04 06:37:15 +00:00
cal
f0c124b00f Update .gitea/workflows/docker-build.yml
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m8s
2026-02-04 06:35:09 +00:00
cal
a360e8812d Update .gitea/workflows/docker-build.yml
All checks were successful
Build Docker Image / build (pull_request) Successful in 1m2s
2026-02-04 06:28:55 +00:00
cal
8bd30211e0 Update VERSION
Some checks failed
/ build (pull_request) Has been cancelled
2026-02-04 06:22:40 +00:00
cal
61a0ad60ba Merge pull request 'Pulling master over to main' (#3) from master into main
All checks were successful
/ build (push) Successful in 1m17s
Reviewed-on: #3
2026-02-04 06:16:29 +00:00
cal
63ea86f35a Update .gitea/workflows/docker-build.yml
All checks were successful
/ build (pull_request) Successful in 2m9s
2026-02-04 06:13:37 +00:00
cal
8ff9cc02e7 Merge branch 'main' into master
All checks were successful
/ build (pull_request) Successful in 1m1s
2026-02-04 06:09:45 +00:00
cal
c252ab3f1a Merge pull request 'Update .gitea/workflows/docker-build.yml' (#2) from cal-patch-2 into main
All checks were successful
/ build (push) Successful in 34s
Reviewed-on: #2
2026-02-04 06:02:36 +00:00
cal
175a19b372 Update .gitea/workflows/docker-build.yml
All checks were successful
/ build (pull_request) Successful in 57s
2026-02-04 06:01:01 +00:00
cal
a1c7aec7af Merge pull request 'Add automated docker build' (#1) from cicd/docker-build into main
All checks were successful
/ build (push) Successful in 32s
Reviewed-on: #1
2026-02-04 05:54:35 +00:00
cal
7ad8d03f98 Update .gitea/workflows/docker-build.yml
All checks were successful
/ build (pull_request) Successful in 57s
2026-02-04 05:52:17 +00:00
cal
91e96a2876 Update .gitea/workflows/docker-build.yml
Some checks failed
/ build (pull_request) Failing after 1m4s
2026-02-04 05:48:40 +00:00
cal
d094809838 Add automated docker build
Some checks failed
Build Docker Image / build (pull_request) Failing after 6m57s
2026-02-04 05:41:18 +00:00