fix(orchestration): persist linked pull requests - #8689
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Warning Your free Security trial is over. An organization admin can activate Security or dismiss this notice. Comment |
Thread transfer impact
This comment will update automatically after the next completed run. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a narrowly scoped orchestration persistence fix: an existing linked pull request is now retained through event projection rebuilds, with explicit unlinking preserved. The production change is minimal and covered by an integration test for linking, rebuilding, and unlinking. No code changes detected at You can add or adjust custom eligibility rules. Learn more. |
Dismissing prior approval to re-evaluate daa8739
daa8739 to
ba621a1
Compare
Dismissing prior approval to re-evaluate ba621a1
|
Macroscope has since reviewed this pull request. An earlier review was skipped by a cost limit; a review has now completed, so that notice no longer applies. |
Dismissing prior approval to re-evaluate ba621a1
ba621a1 to
7bc232e
Compare
7bc232e to
1d9e754
Compare
Problem
The V2 metadata command accepts linked pull requests, but the decider drops that field, so links never reach the persisted event or projection.
Change
Apply
linkedPullRequestduring metadata updates while preserving absent-field compatibility. Focused runtime coverage proves link, shell projection, projection rebuild, and unlink behavior.Validation
vp test run apps/server/src/orchestration-v2/runtimeLayer.test.ts(14 tests)vp run --filter t3 typecheckDependency
Based directly on
agents/mcp-controls/base-490318aat the agreed490318aprerequisite snapshot. Native stack #8709: #8689 → #8690. The MCP metadata tool remains a separate dependent layer; no feature code changed when the rewritten live trunk was replaced as the review base.Implemented by GPT-5.6-Sol via Codex in T3 Code.
Note
Fix
Orchestrator.layer makeOrchestratorto persistlinkedPullRequestThe
makeOrchestratorfunction now includeslinkedPullRequestin the built object when the command supplies it, includingnullto represent unlinking. Whencommand.linkedPullRequestisundefined, the field is omitted from the payload. Adds a lifecycle test covering link, projection rebuild, and unlink flows in runtimeLayer.test.ts.Macroscope summarized 1d9e754.
Note
Low Risk
Small, targeted decider fix with regression tests; no auth or broad behavioral changes beyond persisting an already-defined metadata field.
Overview
Fixes a gap where
thread.metadata.updateacceptedlinkedPullRequestbut the V2 orchestrator decider never applied it, so links never made it into thread state, events, or projections.The
thread.metadata.updatehandler inOrchestrator.tsnow mergeslinkedPullRequestwhen the command sets it (includingnullto unlink), and omits the field when it isundefined, matching other optional metadata fields.A runtime-layer test covers linking a PR, reading it from the thread projection and shell, surviving a projection rebuild, and unlinking via
linkedPullRequest: null.Reviewed by Cursor Bugbot for commit 1d9e754. Bugbot is set up for automated code reviews on this repo. Configure here.