Skip to content

refactor(proto): standardize the PR-number wire field on pr_number (RIG-3561) - #1037

Open
rigel-mintaka wants to merge 1 commit into
compass-forge/rig-3299-mint-scopefrom
compass-forge/rig-3561-pr-number
Open

refactor(proto): standardize the PR-number wire field on pr_number (RIG-3561)#1037
rigel-mintaka wants to merge 1 commit into
compass-forge/rig-3299-mint-scopefrom
compass-forge/rig-3561-pr-number

Conversation

@rigel-mintaka

@rigel-mintaka rigel-mintaka commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

This PR is part of a stack containing 6 PRs:

  1. main
  2. feat(forge): forge state-transition wire arms and provider methods (RIG-3331) #1017
  3. feat(server): forge state-transition arms and actor memo (RIG-3331) #1018
  4. feat(agent): forge state-transition tools (RIG-3331) #1019
  5. feat(forge): carry the owner-qualified actor handle on the wire (RIG-3326) #1020
  6. feat(tools): mint the live-oracle Linear token with app:assignable (RIG-3299) #1021
  7. "refactor(proto): standardize the PR-number wire field on pr_number (RIG-3561)" (this PR)

agent_gateway.proto spelled the PR-addressing field two ways: the three
pre-existing PR requests used pull_number while RIG-3331's transition
request used pr_number. Converge on pr_number, which names the concept
the forge actually uses.

The split had already leaked past the wire: the agent tool took a
pull_number parameter and mapped it onto the prNumber wire field, so a
reader held two names for one value. That mapping is gone.

Field numbers are unchanged, so the encoding is identical and nothing
has shipped on this wire. The ingest PullNumberResolver seam is a
separate internal concept and keeps its name.

RIG-3561

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

Review round

One review agent, all lenses: high 0 / medium 1 / low 1. It verified the field numbers are preserved, proved the generated bindings byte-identical to a fresh regen of both lanes, confirmed all four PR-taking tools converged on one name, and found no weakened test and no code survivor of the old spelling.

The medium corrected a call I had made wrong. I had dismissed all three unamended design records as frozen history. Two are: compass-forge-write-path and compass-server-ownership-layer show the field inside an illustrative "proto to add" block, with the authoritative .proto one hop away. compass-agent-forge-tools is not — it is Status: Active with T1/T2 unchecked, and its T2 prescribes "the ten tools (exact schemas above)", where those schemas are the arktype keys an agent must literally emit. Nothing reconciles a reader of that record against forge.ts: no compiler, no drift gate.

Matt ruled: record it as a ledger row rather than rewrite a frozen record in place. DL-350 appended, gate reads 309 rows. Numbered clear of the DL-344..347 range that open PRs #984, #1001, #1029 and #1040 already claim: every open PR reads the same DL-343 max off main independently, so the next id is contended, and #984 claimed DL-344 first.

The low is a pre-existing Go coverage gap this diff surfaces but does not widen: no Go test builds a GetPullRequestRequest, so that one renamed accessor has compile-time proof only. The TS side does cover the field on the wire. Not folded in.

Verification

  • moon ci with explicit MOON_BASE/MOON_HEAD70 actions completed, 0 failed, including compass-proto:drift, which is what proves the regenerated bindings match the .proto.
  • go build -tags unix ./... and go vet -tags 'pgtest unix' clean; go test -tags unix ./server/... ./internal/forge/... pass.
  • compass-agent: 686 pass / 0 fail, typecheck clean.
  • design-ledger-gate OK (309 rows, 130 record headers valid); markdownlint 0 errors.
  • Zero pull_number in prompts or any agent-facing tool description.

Scope note

ingest.PullNumberResolver / PullNumberForSHA / CachedPullNumberResolver keep their names. They resolve a check_suite head SHA to its PR number (RIG-2869) — a different concept from the PR-addressing wire field. That accounts for every surviving PullNumber in the tree.

Ledger-impact: DL-350 (new row; no existing row flipped)

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown

RIG-3561

@rigel-mintaka
rigel-mintaka added this pull request to stack #1022 September 9, 2026 01:54
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown

Compass engineering docs preview: https://compass-forge-rig-3561-pr-nu.compass-eng-docs.pages.dev

Deployed from compass-forge/rig-3561-pr-number at ecddb3e.

Changed pages:

@rigel-mintaka
rigel-mintaka force-pushed the compass-forge/rig-3561-pr-number branch from 4c886d0 to 02bfbc3 Compare September 9, 2026 03:35
@rigel-mintaka
rigel-mintaka marked this pull request as ready for review September 9, 2026 03:59
…IG-3561)

agent_gateway.proto spelled the PR-addressing field two ways: the three
pre-existing PR requests used pull_number while RIG-3331's transition
request used pr_number. Converge on pr_number, which names the concept
the forge actually uses.

The split had already leaked past the wire: the agent tool took a
pull_number parameter and mapped it onto the prNumber wire field, so a
reader held two names for one value. That mapping is gone.

Field numbers are unchanged, so the encoding is identical and nothing
has shipped on this wire. The ingest PullNumberResolver seam is a
separate internal concept and keeps its name.

RIG-3561

Co-authored-by: Matt Wilkinson <matt@rigel.build>
@rigel-mintaka
rigel-mintaka force-pushed the compass-forge/rig-3561-pr-number branch from 02bfbc3 to ecddb3e Compare September 9, 2026 05:32
@trunk-io

trunk-io Bot commented Sep 9, 2026

Copy link
Copy Markdown

❌ This stack could not start testing because there was a merge conflict. See more details here.

  • 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

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.

2 participants