Validation #931 — basketball-api#425 — POST /admin/contract/offer

validation-931 Doc

validation sop-compliance

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_log table (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_version at 041 on pod vvfsx. PASS.
  • Endpoint auth-gated: Endpoint returns HTTP 401 without JWT, confirms routing + auth wiring. PASS.
  • Schema verified: contract_audit_log table: 8 columns, FK to players, index on player_id. PASS.
  • End-to-end prod usage: 6 contracts minted successfully through the endpoint:
  • Audit log working: Jacelyn's signed→offered tier change produced contract_audit_log row id 1 with event_type='tier_change', actor='draneylucas@gmail.com'. First successful signed-to-re-offer transition on the platform. PASS.

Evidence

  • alembic_version = 041 on pod vvfsx
  • HTTP 401 on unauthenticated request
  • 6 contracts minted in prod
  • contract_audit_log row 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.