Skip to content

feat: connect report-result stats review flow - #90

Closed
diese-tech wants to merge 2 commits into
mainfrom
codex/report-result-stats-flow-252
Closed

feat: connect report-result stats review flow#90
diese-tech wants to merge 2 commits into
mainfrom
codex/report-result-stats-flow-252

Conversation

@diese-tech

Copy link
Copy Markdown
Owner

What

  • changes /report-result to atomically create/recover the pending result and match report
  • reconciles missing Discord receipt, proof-thread, Enter-stats button, and waiting admin card after retries/crashes
  • authorizes host review links through a dedicated enter-match-stats capability and rechecks access on click
  • removes early final approval from the preliminary score card; Deny and Needs Info remain available
  • mirrors host-submitted screenshots from durable storage and posts the admin stats-review link idempotently
  • refreshes Discord winner/score fields from the authoritative admin-reviewed result

Why

The season flow must carry /report-result through host-corrected OCR stats and one admin final decision without duplicate actions, duplicate uploads, or preliminary scores winning a race against official player stats.

Part of diese-tech/sal-site#252.

Dependencies and rollout

No bot deployment or production write was performed.

Verification

  • shared: 7/7 tests
  • database package: 31/31 tests
  • bot: 114/114 tests
  • all packages: typecheck, build, and lint
  • released database contract check: db-v1.11.0
  • git diff --check origin/main...HEAD

Full Discord → deployed site → protected database staging verification remains gated on the database release and deployment secrets.

Copy link
Copy Markdown
Owner Author

Closing as superseded by #96.

This branch was stuck at mergeable_state: dirty — the trade workflow (#94) and scoped roster roles / drops (#95) landed after it was cut, conflicting in six files. #96 carries every commit from this branch plus a merge of current main with those conflicts resolved, and is green on all 10 checks.

Also worth recording here: the dependency this PR described as blocking is gone. It said it was waiting on diese-tech/sal-database#103 and the protected publication of db-v1.18.0. That merged on 2026-08-19, and production has since moved to db-v1.20.0 — so the "small generated-types/contract-lock pin commit" this PR anticipated turned out to be unnecessary on the bot side. Merging main brought the current lock with it, and check:db-contract verifies clean against the released contract.

No work is lost. Continue on #96.


Generated by Claude Code

@diese-tech diese-tech closed this Aug 31, 2026
diese-tech added a commit that referenced this pull request Aug 31, 2026
Changes /report-result to atomically create/recover the pending result and
match report, authorizes the host review link through a dedicated
enter-match-stats capability, mirrors host-submitted screenshots from
durable storage, and posts the admin stats-review link idempotently.

Carries the contents of #90 merged onto current main, resolving the six
conflicts left by the trade workflow (#94) and scoped roster roles and
drops (#95).

Also audits proof-thread writes to matches: setProofThread now records an
audit_logs entry with the submitting operator as actor plus old/new values,
on both first attachment and crash-recovery re-attachment.

Requires SAL_SITE_URL and SAL_SITE_INTERNAL_TOKEN (matching sal-site's
INTERNAL_SERVICE_TOKEN). SAL_MATCH_STATS_ROLE_IDS optionally narrows the
stats-entry role; unset falls back to the operator allowlist.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant