The pull request is the subject, not the input - #135
Merged
Conversation
czpython
force-pushed
the
eng-777-subject-is-a-class
branch
4 times, most recently
from
July 28, 2026 05:52
60e8fc6 to
764508d
Compare
Starting a review wrote the same two facts twice: once as the subject identity and once as run input. The subject class knows its own repo and number, so the input goes — `run()` takes only what the request itself knows, and `get_workspace_kwargs()`, `get_prompt_context()` and the reviewer's prompt read the pull request off `self.subject`. A review already queued carries the old pair in its durable payload; extra keys are ignored and the subject rides separately, so it replays through the declaration.
czpython
force-pushed
the
eng-778-pull-request-is-the-subject
branch
from
July 28, 2026 06:13
955cc8c to
58ef828
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Starting a review wrote the same facts twice:
repoandpr_numberwere both the subject and the run input. Now thatPullRequestis a subject class that knows its own repo and number, the input goes — there is no new SDK surface, no derived-subject mode, no way to omitsubject=.get_workspace_kwargs(),get_prompt_context()and the reviewer's prompt readself.subject.repoandself.subject.number. The body keepsrequested_by— that one is the request's own, not the pull request's.The launch contract is unchanged: every domain run passes
subject=, background work passessubject=None, and losing a timeline by accident still fails loudly.A review already queued carries the old pair in its durable payload. Extra keys are ignored on re-validation and the subject rides separately, so it replays through the declaration — pinned by a test that binds an old payload.
The argument against: future row-less workflows repeat a small dispatcher pattern. A generic hook is worse —
get_subject(**input)would receive every body field includingrequested_by, there is no bound workflow instance before enqueue, and it needs signature reflection for one consumer.