Skip to content

slot: reviews and rework work for every target repo - #1215

Open
fizzy-publish[bot] wants to merge 1 commit into
mainfrom
slot/any-repo-review
Open

fizzy-publish[bot] wants to merge 1 commit into
mainfrom
slot/any-repo-review

Conversation

@fizzy-publish

@fizzy-publish fizzy-publish Bot commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

In plain words

Fizzy's automated agents write and review changes for several repositories, not only fizzy itself. For the other repositories, the request that should start a review was sent under a name nothing listens for, so those changes were never reviewed. Review notes for a change in another repository could also land on the wrong discussion thread. This change makes reviews and follow-up fixes work for every repository the agents serve.

What changes

  • After an agent opens or updates a change in another repository, the publisher sends the review request that the review job actually listens for, with the exact version of the change to review and which review round it is.
  • Each change's discussion thread now has a name that includes the repository, so two changes numbered 9 in two repositories get two threads. If the thread does not exist yet, the publisher creates it once.
  • When an agent pushes fixes after a review, the change is sent for review again (fizzy itself already has its own way of doing this, so it gets nothing extra).
  • A file an agent wrote with an invisible marker at its start (some Windows editors add one) is copied without it.
def thread_title(repo, number):
    """The title prefix of a PR's pr-thread issue in work: the one key from a PR to its thread."""
    name = '' if repo == 'fizzyedit/fizzy' else repo.removeprefix('fizzyedit/')
    return f'PR {name}#{number}:'

What you will notice

Nothing visible: internal. Changes the agents make to the other fizzyedit repositories now get reviewed and reworked the same way fizzy's own changes do.

How we know it works

New tests run the publisher against a fake GitHub: they check that the right review request is sent exactly once over two runs, that each repository's change gets its own thread (created once when missing), that fixes in another repository trigger a second-round review while fizzy's do not, and that the invisible marker is removed from a copied review file. They fail without this change.

How this serves fizzy

It makes the agent pipeline serve the whole set of repositories fizzy is built on, part of fizzy as a platform.

Part of fizzyedit/work#1193

For agents: technical summary

Goal

dispatch_review sent repository_dispatch review, which no workflow listens for; review.yml listens for pr with {pr, sha, repo, round}. Review threads were keyed PR #N: regardless of target repo, so a heronin PR #9 collided with fizzy PR #9.

What changed and why

  • common.thread_title(repo, number): PR #N: for fizzyedit/fizzy, PR <name>#N: otherwise.
  • publish.py review branch: search "<title>" in:title, keep titles starting with it; none → gh issue create a pr-thread issue (title + PR title[:90], body linking PR and work issue) and use it; more than one → refuse as before.
  • dispatch_review(pr, round): event pr, payload {pr, sha (head of repos/<target>/pulls/<pr>), author_kind, repo, round}; write and resume send round 1. Rework branch: after the push, when destination['gate'], dispatches with the rework round under its own receipt marker (slot-rework-review); the early return became a guard so a rerun can resume the dispatch. fizzy (gate False) sends nothing.
  • slot_run.py: agent outputs copied into out/agent with a leading UTF-8 BOM dropped. read_agent still reads utf-8-sig.
  • PROTOCOL.md: write/rework/review rows and the review.yml line.
  • Budget: non-test added lines 34 (PROTOCOL.md 4, common.py 6, publish.py 23, slot_run.py 1); added+deleted over all files 152.

How it was verified

New tests: test_heronin_write_dispatches_pr_once, test_heronin_review_comments_on_its_own_thread, test_missing_heronin_thread_is_created_once, test_dvui_rework_dispatches_review_round_once, test_fizzy_rework_dispatches_nothing (test_publish), test_bom_led_review_json_is_copied_without_bom (test_slot_run). Updated: test_dvui_write_dispatches_review_once, test_dvui_existing_pr_resumes_review_dispatch (to the pr payload); test_dvui_clean_review_never_auto_merges and test_dvui_changes_dispatch_carries_repo now seed a PR dvui#9: thread. The agent session could not execute Python (sandbox approval), so the gate python3 -m unittest discover -s scripts/slot/tests -t scripts is left to the slot's own gate run.

Not done / follow-ups

  • The fake gh (scripts/slot/fakes/gh.py) has no issue create; the thread-creation test answers it in-process by patching slot.publish.gh. Teaching the fake issue create would be cleaner but was out of the editable paths.
  • CI-red rework for non-fizzy repos still needs a bridge workflow in each repo (out of scope).

Part of fizzyedit/work#1193

Signed-off-by: fizzy pop-os-claude-1 <slot+pop-os-claude-1@fizzy.invalid>
@fizzy-publish fizzy-publish Bot added area:slot area lock for the new write workflow kind:claude agent kind that wrote the PR (new workflow) gate:yes risky path: PM or maintainer looks labels Nov 11, 2026
@fizzy-windows
fizzy-windows Bot enabled auto-merge November 11, 2026 20:03
@fizzy-pm

fizzy-pm Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

Where this PR stands

Stage: PM's turn
Next: PM should read the diff and the CI result, then approve

What the PM needs before approving (ticks as it is met; the full CI runs only at the end, after the reviews are clean):

  • The body names its basis (Part of fizzyedit/work#N or a plan step)
  • Within the size limit: 44 of 800 lines outside tests and docs
  • The body shows which gates the author ran
  • No open findings at this commit
  • Every earlier finding was answered in a FIXES comment
  • Clean reviews at this commit from 1 kind: slot/codex (has 1)
  • Marked ready, which starts the full CI (the PM does this the moment the items above are met)
  • The full CI passes at this commit (CI is green)
  • The PM's final okay (pm-approval)

Reviews at the current commit (6ef0ce2):

Reviewer Verdict Findings
slot/codex clean none

Updated 2026-11-11 20:19 UTC by the PM. This comment is edited in place.

@fizzy-pm fizzy-pm Bot added pm:review one assigned reviewer reviews reviewer:linux-codex the PM assigned linux/codex to review this PR labels Nov 11, 2026

This branch was successfully deployed

1 active deployment
bridge — 6ef0ce24 Deployed Nov 11, 2026 by fizzy-publish[bot] via bridge #4870
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:slot area lock for the new write workflow gate:yes risky path: PM or maintainer looks kind:claude agent kind that wrote the PR (new workflow) pm:review one assigned reviewer reviews reviewer:linux-codex the PM assigned linux/codex to review this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants