Validation #931 — basketball-api#425 — POST /admin/contract/offer
Validation: Board Item #931 — basketball-api#425
Summary
- Board item: #931 on
board-westside-basketball - Ticket: basketball-api#425 — Add POST /admin/contract/offer endpoint
- PR: forgejo_admin/basketball-api#426
- Merged: 2026-04-10
- Repo type: API (basketball-api)
- Environment: prod
- Verdict: PASS
What Shipped
- New endpoint
POST /admin/contract/offer - New service module
services/contract_offers.py - New test file
tests/test_contract_offer.py - Alembic migration 041 creating
contract_audit_logtable (8 columns, FK to players, index on player_id) - Handles 4 state transitions:
none→offered,declined→offered,offered→offered(force),signed→offered(tier change with audit archive)
Checks Performed
- Migration applied:
alembic_versionat 041 on podvvfsx. PASS. - Endpoint auth-gated: Endpoint returns HTTP 401 without JWT, confirms routing + auth wiring. PASS.
- Schema verified:
contract_audit_logtable: 8 columns, FK toplayers, index onplayer_id. PASS. - End-to-end prod usage: 6 contracts minted successfully through the endpoint:
- Audit log working: Jacelyn's
signed→offeredtier change producedcontract_audit_logrow id 1 withevent_type='tier_change',actor='draneylucas@gmail.com'. First successful signed-to-re-offer transition on the platform. PASS.
Evidence
alembic_version= 041 on podvvfsx- HTTP 401 on unauthenticated request
- 6 contracts minted in prod
contract_audit_logrow id 1 (Jacelyn tier change)
Note on #422 Interaction
Jacelyn's first mint attempt returned HTTP 500 because the 16U Local Queens team (created by #422) had
age_group='U16', which failed the SQLAlchemy enum read. Resolved by NULLing age_group on team 12. This is a #422 data issue, not a #425 endpoint defect — once the upstream data was corrected, #425 worked end-to-end without modification.Verdict Rationale
PASS — fully deployed, schema verified, auth-gated, and exercised end-to-end in prod with 6 successful contract mints including the first-ever signed→offered tier change flow and its audit log entry.