Skip to content

fix(triage): never lose Play review feedback to a missing label - #217

Open
louiscalata wants to merge 2 commits into
dzianisv:mainfrom
louiscalata:fix/triage-feedback-label
Open

louiscalata wants to merge 2 commits into
dzianisv:mainfrom
louiscalata:fix/triage-feedback-label

Conversation

@louiscalata

Copy link
Copy Markdown

Summary

The scheduled Play Store Review Triage workflow has been crashing whenever it finds actionable (≤3★) reviews — the issue it creates (gh issue create --label user-feedback) fails because this repo never had a user-feedback label, so real user review feedback has been silently dropped (observed on 2026-10-13 and 2026-10-15; runs 38416717810 and 38734963328 both died at issue creation right after reporting Actionable (≤3★): 1).

Root cause

From the failed run logs:

could not add label: 'user-feedback' not found
subprocess.CalledProcessError: Command '['gh', 'issue', 'create', ..., '--label', 'user-feedback']' returned non-zero exit status 1.

The label was never created in this repo (gh label list shows no user-feedback).

Fix

  • ensure_label() — best-effort gh label create user-feedback (treats "already exists" as success; any other failure prints a warning and continues).
  • create_issue() — tries the labeled create; if the failure is about the label, retries once unlabeled, so a label/permission problem can never drop feedback again. A genuine gh failure (auth/network/validation — stderr not about the label) still raises CalledProcessError, keeping the project convention that real failures turn the run red (issue chore(metrics): repair Play review triage and acquisition reporting #61 done-criteria).
  • Also adds roadmap.md (canonical project roadmap) and a .agents/retro.md entry recording the lesson.

Note: the diff includes a whole-file format normalization applied by the edit toolchain — semantically identical, pure reflowing; every check below ran against these exact bytes.

Verification (already run)

  • python3 -m py_compile scripts/triage-reviews.py — clean.
  • Deterministic stubbed-gh scenario suite — 18/18 pass: healthy path (label ensured, labeled create), label-already-exists tolerance, label-forbidden → unlabeled fallback, feedback kept, unrelated 401 → still raises red with exactly one create attempt, edit-existing path unchanged.
  • ast-grep rules gate — PASS, zero findings.

After merge — verify the live path

gh label create user-feedback --color d4c5f9 --description "Play Store review feedback"   # optional; the script now does this best-effort in CI
gh workflow run "Play Store Review Triage"
gh run watch --exit-status "$(gh run list --workflow=triage-reviews.yml --limit 1 --json databaseId --jq '.[0].databaseId')"
gh issue list --search "Play Store Review Triage" --state open   # the triage issue should appear (or update in place)

The daily 07:00 UTC schedule also picks the fix up automatically after merge. Merging any commit additionally resets GitHub's 60-day scheduled-workflow inactivity clock (the last push before this branch was 2026-08-18).

Related

Owner gates are tracked in roadmap.md §P2: Play package-registration deadline (issue #162 — deadline passed 2026-09-30, needs a Play Console confirmation that both packages show Registered) and the stale SENTRY_ORG Actions secret (AGE-497, needs secrets-write to update).

The triage workflow crashed on gh issue create --label user-feedback
(the repo had no such label), dropping the actionable low-rated reviews
found on 2026-10-13/15 (runs 38416717810, 38734963328). ensure_label()
now creates the label best-effort and create_issue() falls back to an
unlabeled issue, so label/permission problems can never drop feedback;
genuine gh failures still fail the run red.

Also includes a whole-file format normalization applied by the local
write hook (semantically identical; py_compile, an 18/18 stubbed-gh
scenario suite, and the ast-grep rules gate all pass on these bytes).

This branch has not been deployed

No deployments
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