AIR-607: mandate PR details as context to TFA agent with contract validation - #373
Open
Dave3130 wants to merge 3 commits into
Open
AIR-607: mandate PR details as context to TFA agent with contract validation#373Dave3130 wants to merge 3 commits into
Dave3130 wants to merge 3 commits into
Conversation
…lidation AIR-607: incomplete/missing PR context was misleading the TFA agent. Introduce a typed PrDetail contract (title, author, link, number, tag=latent|regression) on the tfaRcaTurn tool; validate it when present (reject partial PR objects with a clear error rather than forwarding them); and always concatenate a stringified PR_DETAILS block onto the message sent to TFA (explicit 'none provided' when absent) so PR context is never silently dropped.
Add required repo (owner/name) field and enforce link is the canonical https://github.com/<repo>/pull/<number>. A bare PR number is unique only within its repo, so number-only identity let PRs from different repos collide into one card (AIR-607 report showed the same #861 across unrelated cases + a 404 link).
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.
AIR-607 — Github PR Details is incorrect
Problem: incomplete/missing PR context was being passed to the TFA agent, which misled root-cause attribution (wrong/irrelevant PRs). The earlier fix targeted the wrong layer.
Fix (mcp-server side): make PR context a validated, always-passed part of the
tfaRcaTurnpayload.Changes
PrDetailcontract (submit-turn.ts) — replaces the broken WIP type with a real one:title,author,link,number,tag(latent | regression). All fields required.prDetailsis optional, but any entry present must satisfy the contract; a partial PR object throws a clearTfaRcaTurnError(prDetails[i] missing required field(s): …) instead of being forwarded. Runs only on the submit path (skipped when resuming viaturnId).PR_DETAILS: <stringified list>when present, orPR_DETAILS: none providedwhen absent — so PR context is never silently dropped.constants.ts) —prDetailsadded toTFA_RCA_TURN_PARAMS(typed array,tagenum) for boundary validation on MCP clients.Notes
pr_detailscontract in the rca-build skill (change 1) is tracked separately.validatePrDetails/composeMessageWithPrDetailsto follow.tsc --noEmitandeslinton changed files pass.Targets
TRA_TFA.