Skip to content

test(forge): cover PR-create and comment response decode (RIG-3925) - #1330

Draft
rigel-mintaka wants to merge 2 commits into
mainfrom
compass-forge/rig-3925-forge-decode-test
Draft

rigel-mintaka wants to merge 2 commits into
mainfrom
compass-forge/rig-3925-forge-decode-test

Conversation

@rigel-mintaka

Copy link
Copy Markdown
Contributor

Adds TestForgeStubDecodesCreateResponses next to TestForgeStubProviderClient. It drives CreatePullRequest and CommentOnPullRequest against the loopback forge stub and compares the full decoded forge.PullRequest and forge.Comment values. The tier-2 agent-loop leg never renders these fields, so nothing asserted them before. The frozen six-turn leg is unchanged.

The comment request body differs from the stub's fixed response body, so the Body assertion proves the value came from the response. Each of the 14 decoded fields was checked by zeroing it in ghPull.toPullRequest / ghComment.toComment; every mutation fails the test.

Provider setup moves into a shared newForgeStubProvider helper, and both tests root their context in t.Context().

Spec-impact: none. Refs RIG-3925

Co-authored-by: Matt Wilkinson matt@rigel.build

Adds TestForgeStubDecodesCreateResponses next to TestForgeStubProviderClient. It drives CreatePullRequest and CommentOnPullRequest against the loopback forge stub and compares the full decoded forge.PullRequest and forge.Comment values. The tier-2 agent-loop leg never renders these fields, so nothing asserted them before. The frozen six-turn leg is unchanged.

The comment request body differs from the stub's fixed response body, so the Body assertion proves the value came from the response. Each of the 14 decoded fields was checked by zeroing it in ghPull.toPullRequest / ghComment.toComment; every mutation fails the test.

Provider setup moves into a shared newForgeStubProvider helper, and both tests root their context in t.Context().

Spec-impact: none. Refs RIG-3925

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@trunk-io

trunk-io Bot commented Sep 25, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here

@linear-code

linear-code Bot commented Sep 25, 2026

Copy link
Copy Markdown

RIG-3925

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-forge-rig-3925-forge.compass-eng-docs.pages.dev

Deployed from compass-forge/rig-3925-forge-decode-test at 2596c4c.

The leg renders the decoded PR number and URL, so the comment no longer claims it renders none of these fields.

Refs RIG-3925

Co-authored-by: Matt Wilkinson <matt@rigel.build>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant