chore(review): flag new tuple[...] returns in kbagent-pr-reviewer#400
Merged
Conversation
CONTRIBUTING.md requires semantically-distinct multi-value returns to use a @DataClass, not a bare tuple. That rule is subjective ('semantically distinct'), so unlike the deterministic error_code check it cannot be a CI gate -- it slipped past CI to an LLM/human review on #387 (the FlowSchemaFetch finding). Adds to the reviewer's Step 3.8 a grep that surfaces '-> tuple[...]' return annotations added in the diff (skipping variadic 'tuple[X, ...]'), plus a judging rubric: ignore the ~63 grandfathered returns and the BaseService parallel-result shape; flag a newly-added heterogeneous tuple of semantically-distinct values as NON-BLOCKING with a @DataClass recommendation.
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.
What
Teaches the
kbagent-pr-reviewersubagent to surface newly-addedtuple[...]return annotations during review (Step 3.8 — Convention compliance).Why
CONTRIBUTING.mdrequires semantically-distinct multi-value returns to use a@dataclass, never a bare tuple. Unlike theerror_codeenum rule, "semantically distinct" is subjective, so it can't be a deterministic CI gate the wayscripts/check_error_codes.pyis. It therefore slipped past CI to an LLM/human review on #387 — the_fetch_flow_schema/fetch_flow_schematuple[dict | None, str | None]that became theFlowSchemaFetchdataclass.This closes the loop: the reviewer now has a concrete, reproducible step instead of relying on remembering the rule.
How
In Step 3.8, adds a grep over the PR diff that finds added
-> tuple[...]annotations (skipping variadictuple[X, ...]), plus a judging rubric so the reviewer:BaseServiceparallel-result shape and worker callbacks;@dataclassrecommendation.Scope / notes
plugins/kbagent/agents/kbagent-pr-reviewer.md— internal review tooling, not in the Plugin synchronization map, no CLI surface, no version bump, no changelog entry needed.kbagent-pr-reviewer.mdis 23 KB, well under the agent-prompt budget (and it has no byte-budget test — onlykeboola-expert.mddoes).make checkis unaffected (no.pychange).