Skip to content

feat(adt): surface build-gone health on playtest detail + fix ChangeADTBuild persistence - #4

Merged
anggorodewanto merged 1 commit into
mainfrom
feat/adt-build-health-surface
May 26, 2026
Merged

anggorodewanto merged 1 commit into
mainfrom
feat/adt-build-health-surface

Conversation

@anggorodewanto

Copy link
Copy Markdown
Collaborator

What

Surface a gone/undownloadable ADT build on the playtest detail page instead of only at ApproveApplicant time, and fix a pre-existing ChangeADTBuild persistence bug found while building this.

Investigation (confirmed live)

The reported approve 400 (errorCode=1003303402 / ErrBuildNotFound) is accurate. Probing live ADT (develop.blackbox.accelbyte.io): downloadUrls 404s "build not found" even though the build still appears in ListBuilds — so a list-membership check is insufficient; the faithful signal is the side-effecting IssueDownloadURL call.

Surfacing (persist-at-approve + on-demand check)

  • migration 0009: playtest.adt_build_status (OK/UNAVAILABLE, CHECK-enforced) + adt_build_checked_at
  • CheckADTBuild RPC: on-demand probe of IssueDownloadURL, persists health. Ignores the fallback URL (a fallback masks a dead build for approval but doesn't make the build healthy). ErrBuildNotFound→UNAVAILABLE, success→OK; transient ADT errors don't clobber last-known status.
  • approve / RetryDM record the same health opportunistically via resolveADTDownloadURL, before any fallback masks it
  • repo: SetADTBuildHealth writer (deliberately does NOT bump updated_at)
  • admin Distribution tab: build-health Alert + "Check build" button
  • pth adt build check + smoke dry-run probe; errors.md (4 rows) + cli.md + STATUS_M5 C14

Bundled bug fix — ChangeADTBuild silently dropped the build change

PgPlaytestStore.Update's SET whitelist omits adt_game_id/adt_build_id, so ChangeADTBuild accepted the change and no-oped at the DB — the in-UI recovery path was broken. Its happy-path test passed only because the fake store cloned the whole struct. Now routes through a dedicated UpdateADTBuild writer with a real-PgStore integration regression test.

Verification

  • go test ./... green (repo integration ran migration 0009 + new writers)
  • golangci-lint run 0 issues; buf lint + idempotent proto regen
  • admin: 89 vitest + npm run build
  • make smoke PASS (full boot + new adt build check probe)

🤖 Generated with Claude Code

…DTBuild persistence

Surface a gone/undownloadable ADT build on the playtest detail page instead
of only at ApproveApplicant time (M5.C C14). Confirmed against live ADT: the
downloadUrls issue 404s "build not found" even while the build still appears
in ListBuilds, so a membership check is insufficient — IssueDownloadURL is the
only faithful signal.

- migration 0009: playtest.adt_build_status (OK/UNAVAILABLE, CHECK) + adt_build_checked_at
- CheckADTBuild RPC: on-demand probe of IssueDownloadURL, persists health;
  ignores the fallback URL (a fallback masks a dead build for approval but
  does not make the build healthy); ErrBuildNotFound -> UNAVAILABLE, ok -> OK
- approve / RetryDM record the same health opportunistically via
  resolveADTDownloadURL, before any fallback masks it
- repo: SetADTBuildHealth (does not bump updated_at) writer
- admin Distribution tab: build-health Alert + "Check build" button
- pth adt build check + smoke dry-run probe; errors.md + cli.md + STATUS_M5

Fix: ChangeADTBuild silently dropped the build change. PgPlaytestStore.Update's
SET whitelist omits adt_game_id/adt_build_id, so routing ChangeADTBuild through
it accepted the change and no-oped at the DB (the in-UI recovery path was
broken). Add a dedicated UpdateADTBuild writer + a real-PgStore integration
regression test; the service-layer fake store had masked the bug.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@anggorodewanto
anggorodewanto merged commit 419f130 into main May 26, 2026
6 checks passed
@anggorodewanto
anggorodewanto deleted the feat/adt-build-health-surface branch May 26, 2026 02:30
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