Skip to content

fix(pr-blog): the dispatch REPO constant follows the org rename (refs #1746) - #1754

Merged
gHashTag merged 5 commits into
mainfrom
lane/fix-dispatch-repo
Oct 25, 2026
Merged

gHashTag merged 5 commits into
mainfrom
lane/fix-dispatch-repo

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 25, 2026 •

Copy link
Copy Markdown
Collaborator

What broke

Every run of the "PR work report and blog" workflow dies at its last step:

PR blog dispatch: Unexpected source repository

Cause: scripts/pr_blog_dispatch.py still said REPO = "gHashTag/trinity" -- the organization was renamed to Trinity-S-AI-DNA after the script last changed (2026-10-02, #1261), so pr.base.repo.full_name no longer matches. The check runs before the unmerged early-return (Draft saved; unmerged PR is not sent), so every PR's report job goes red -- #1751 and #1753 included.

The fix -- the whole rename class, five files

  1. pr_blog_dispatch.py: the constant follows the rename.
  2. pr_blog_author_guard.py: the same hardcoded repo in the author-side guard of the same pipeline.
  3. Three test files: sixteen fixture values follow the rename (renaming the constant alone fails 18 of 74 tests). The two bare gHashTag user-login fixtures are names, not repositories, and stay.

Verified with the exact CI command -- python3 -m unittest discover -s scripts -p 'test_pr_blog*.py': 74 tests, OK (18 errors before the fixture and guard renames).

Note: this PR's own report check stays red until this lands (the workflow runs the script from main). That red is the bug itself.

Left for its own regeneration: scripts/ci-gate.generated.json (TRAINING_REPO, a different pipeline's generated artifact).

Refs #1746. Unblocks the report chain for #1751 and #1753.

Foreign-code note

Five existing foreign files under scripts/. Under the Only-t27 law this needs the owner-approved-foreign label, which this PR carries. Owner approval: given 2026-10-25 in the t27 session -- the instruction to run the night queue's fixes autonomously.

{
  "version": 1,
  "head_sha": "2938dd75ef0382b0d9f330cbe2f6b83e129416f4",
  "summary": "The PR blog pipeline still names the pre-rename organization in its dispatch and author-guard constants and in three test fixtures, so every work-report run dies at the dispatch step; the whole rename class is followed here.",
  "changes": [
    "scripts/pr_blog_dispatch.py: REPO constant updated from gHashTag/trinity to Trinity-S-AI-DNA/trinity -- the stale line behind 'Unexpected source repository', hit by every PR including unmerged ones because the check precedes the Draft-saved early-return.",
    "scripts/pr_blog_author_guard.py: the same hardcoded repo value follows the rename -- the author-side guard of the same pipeline carried the identical bug.",
    "scripts/test_pr_blog_report.py, scripts/test_pr_blog_dispatch.py, scripts/test_pr_blog_author_guard.py: the sixteen gHashTag/trinity fixture values follow the rename; the bare gHashTag user-login fixtures are deliberately untouched."
  ],
  "tests": [
    {
      "command": "python3 -m unittest discover -s scripts -p 'test_pr_blog*.py' (the exact CI command)",
      "result": "Ran 74 tests, OK -- the same discovery failed 18 errors before the fixture and author-guard renames",
      "status": "passed",
      "evidence": "Run locally on this branch head with apps/website/specs/policy/course_post.t27 present, 2026-10-25."
    },
    {
      "command": "grep -rn 'gHashTag/trinity' scripts/pr_blog_dispatch.py scripts/pr_blog_author_guard.py scripts/test_pr_blog*.py",
      "result": "0 remaining repository-name references; the two bare gHashTag login fixtures in test_pr_blog_report.py are user names and stay",
      "status": "passed",
      "evidence": "Grep before and after the edits in the fix session on 2026-10-25."
    },
    {
      "command": "gh run view --job 121204703214 (run 40205258022, PR #1753)",
      "result": "the failing step is the dispatch repo check, which runs before the unmerged early-return; the edit addresses exactly that comparison",
      "status": "passed",
      "evidence": "Read the job log via gh in the fix session on 2026-10-25."
    }
  ],
  "limitations": [
    "This PR's own report job runs the pre-fix script from main (pull_request_target checks out the base), so it stays red until this lands -- that red check is the bug itself, not a regression.",
    "scripts/ci-gate.generated.json still carries TRAINING_REPO gHashTag/trinity-training; it is a generated artifact of a different pipeline and is left for its own regeneration."
  ],
  "tags": [
    "Ci",
    "Blog",
    "Rename"
  ],
  "blog": {
    "title": "The blog pipeline died on the old organization name",
    "summary": "Two constants and sixteen test fixtures kept the pre-rename organization after the rename to Trinity-S-AI-DNA, killing every work-report run at the dispatch step; this PR follows the rename across the whole class.",
    "outline": [
      "What broke and when: the dispatch script last changed on 2026-10-02, the organization was renamed afterwards, and every report run since then failed the source check.",
      "Why the whole class had to move together: renaming the constant alone failed eighteen fixture-driven tests, and the author guard of the same pipeline carried the identical bug.",
      "What is deliberately not here: the generated ci-gate artifact with the training-repo name stays for its own regeneration, and the bare user-login fixtures are names, not repositories."
    ]
  }
}

…d dying on 'Unexpected source repository' (refs #1746)
@gHashTag gHashTag added the owner-approved-foreign Owner approved hand-written non-t27 code in this PR label Oct 25, 2026
@github-actions github-actions Bot added the status:in-progress 🔵 Agent working label Oct 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

@tri-claw

tri-claw Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Summary by t27-bees

This PR updates hardcoded repository references from the old organization name gHashTag/trinity to the new Trinity-S-AI-DNA/trinity across the PR blog pipeline (dispatch, author guard, and their tests). The rename was already done organization-wide but these scripts and fixtures were missed, causing every workflow run to fail at the dispatch step with "Unexpected source repository".

Worth a look

  • scripts/pr_blog_dispatch.py:9 — The REPO constant is the gate that rejects every PR; if this value ever diverges from the actual pr.base.repo.full_name seen at runtime, the workflow will fail silently at dispatch.
  • scripts/pr_blog_author_guard.py:12 — Mirrors the same constant for the author-side guard; a mismatch here would block the downstream workflow even if dispatch succeeds.
  • scripts/test_pr_blog_dispatch.py:46, 52, 59, 72, 133, 270, 278, 286, 294 — Nine fixture URLs and API paths embed the repo name; any missed occurrence would make tests pass against stale mocks while production fails.
  • scripts/test_pr_blog_author_guard.py:13, 36, 46, 65 — Four fixture values (repo full_name, workflow dispatch URL, issue PR URL) must stay in lockstep with the guard's constant.
  • scripts/test_pr_blog_report.py:43, 54, 55, 360 — Event fixtures used by the report generator; the head.repo.full_name in the dependabot fixture (line 360) is easy to overlook because it's nested under head.

Read: 5 files, +22 -22, the whole diff. Head 2938dd7. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Brain Stress Test Results

Tests: 261/261 passed, 0 leaked
Status: 🟢 PASS
Gate: every test in zig build test-brain-stress passes and none leaks

@gHashTag
gHashTag merged commit 8d32325 into main Oct 25, 2026
27 of 28 checks passed
@github-actions github-actions Bot added status:completed Done and removed status:in-progress 🔵 Agent working labels Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

owner-approved-foreign Owner approved hand-written non-t27 code in this PR status:completed Done

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant