From d1c916d0e6235df1f84d134386bc8f74701a251f Mon Sep 17 00:00:00 2001 From: "Flemming N. Larsen" Date: Mon, 31 Aug 2026 19:40:42 +0200 Subject: [PATCH] fix: read Rumble issue submitter account --- .github/workflows/ingest.yml | 4 ++-- tests/test_rumble_data.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ingest.yml b/.github/workflows/ingest.yml index 4eab50d..0318cb1 100644 --- a/.github/workflows/ingest.yml +++ b/.github/workflows/ingest.yml @@ -29,12 +29,12 @@ jobs: GH_TOKEN: ${{ github.token }} run: | mkdir -p .inbox - gh api --paginate "repos/$GITHUB_REPOSITORY/issues?labels=result-submission&state=open&per_page=100" --jq '.[] | select(.pull_request == null) | {number,author,body} | @base64' > .inbox/issues + gh api --paginate "repos/$GITHUB_REPOSITORY/issues?labels=result-submission&state=open&per_page=100" --jq '.[] | select(.pull_request == null) | {number,user,body} | @base64' > .inbox/issues while read -r encoded; do [ -z "$encoded" ] && continue printf '%s' "$encoded" | base64 --decode > .inbox/issue.json number=$(jq -r .number .inbox/issue.json) - account=$(jq -r .author.login .inbox/issue.json) + account=$(jq -r .user.login .inbox/issue.json) jq -r .body .inbox/issue.json > .inbox/body.md : > .inbox/outcome.txt if python scripts/extract_envelope.py --body .inbox/body.md --output .inbox/envelope.json >> .inbox/outcome.txt 2>&1 && python scripts/ingest.py --root . --account "$account" --input .inbox/envelope.json >> .inbox/outcome.txt 2>&1; then diff --git a/tests/test_rumble_data.py b/tests/test_rumble_data.py index b590e2a..788c602 100644 --- a/tests/test_rumble_data.py +++ b/tests/test_rumble_data.py @@ -65,6 +65,13 @@ def testRDA001_IntegrationPositive_valid_batch_becomes_immutable_fact_and_projec needed = json.loads((self.root / "matchmaking/matches_needed-1v1.json").read_text(encoding="utf-8")) self.assertIn(["Alpha 1.0", "Charlie 1.0"], [pair["bots"] for pair in needed["priorityPairs"]]) + def testRDA001_IntegrationPositive_issue_inbox_uses_GitHub_submitter_account(self) -> None: + workflow = (ROOT / ".github" / "workflows" / "ingest.yml").read_text(encoding="utf-8") + + self.assertIn("{number,user,body}", workflow) + self.assertIn("account=$(jq -r .user.login .inbox/issue.json)", workflow) + self.assertNotIn(".author.login", workflow) + def testUnitPositive_engine_pin_accepts_optional_immutable_client_image(self) -> None: configured = json.loads((self.root / "engine.json").read_text(encoding="utf-8")) configured["clientImage"] = "ghcr.io/robocode-dev/rumble-client@sha256:" + "a" * 64