Skip to content

feat(review-dispatch): extend fetch_pr_review_context and add PR-repair fetch tools - #874

Merged
jflowers merged 22 commits into
unbound-force:mainfrom
jflowers:opsx/extend-fetch-pr-review-context
Oct 30, 2026
Merged

jflowers merged 22 commits into
unbound-force:mainfrom
jflowers:opsx/extend-fetch-pr-review-context

Conversation

@jflowers

Copy link
Copy Markdown
Contributor

Summary

Closes #861

Implements the extend-fetch-pr-review-context OpenSpec change (artifacts under openspec/changes/extend-fetch-pr-review-context/): the review-dispatch plugin's intent-level PR-fetch path gains PR-repair fields, check-suite and failed-run-log fetches move behind intent-level tools, and /uf.fix-ci Phase 1/2.1 re-route through them — retiring the documented raw-gh Constitution VI deviation.

What Was Built

Implemented the extend-fetch-pr-review-context OpenSpec change (issue #861) — extending the review-dispatch plugin's intent-level PR-fetch path and retiring /uf.fix-ci's raw-gh deviation records:

  1. PR-repair fields on fetch_pr_review_context: state, mergeable, merge_state_status, head_repository, and base_repository (derived from the PR url, since gh pr view --json rejects baseRepository as an unknown field) — passed through as gh returns them, driving PR-repair eligibility (open vs CLOSED/MERGED, conflicted/behind detection, fork orientation).
  2. Optional pr_number on fetch_pr_review_context: when omitted, the tool resolves the current branch's open PR and reports the resolved number.
  3. New fetch_pr_checks tool: gh pr checks --json name,state,bucket,link with exit-code-tolerant parsing (non-zero exit encodes check status; JSON stdout stays authoritative) and a derived eligibility classification (failing / pending / passing) that collapses uf-fix-ci's bucket-keyed routing.
  4. New fetch_failed_run_logs tool: gh run view --log-failed anchored with --repo, persisted to a 0o600 O_EXCL temp file under a 0o700 parent, returned as a path plus byte/line counts — never inline.
  5. /uf.fix-ci Phase 1 and Phase 2.1 re-routed through the tools (canonical command + byte-identical scaffold mirror): Phase 1.0 availability prose collapsed, 1.1 auto-detect calls the tool without pr_number, 1.2's raw fetches become fetch_pr_review_context + fetch_pr_checks, 2.1's mktemp + gh run view becomes fetch_failed_run_logs; the uf-fix-ci raw-gh deviation records retired (design D1 fetch-class inventory, FR-001/FR-002/FR-003/FR-010 reworded with scenario intent preserved).
  6. Tests and governance: new fetch-pr-checks and fetch-failed-run-logs suites, shared gh-spawn-mock harness, extended fetch-pr-review-context suite, tool-list pins, contract-test updates, CHANGELOG entry, documentation issue filed (docs: fetch_pr_checks/fetch_failed_run_logs plugin tools and /uf.fix-ci re-route (extend-fetch-pr-review-context) #873), 8 retrospective learnings captured. Observable /uf.fix-ci behavior (STOP messages, gates, eligibility outcomes, never-merge rule) is unchanged — only the fetch mechanics moved from re-reasoned prose into tested tools.

How to Verify

From the acceptance scenarios in openspec/changes/extend-fetch-pr-review-context/tasks.md (all 22 tasks [x]):

  1. Plugin suite: make plugin-test — all suites pass with the coverage floors holding unchanged (94% statements, 85% branches; measured 95.46% / 88.22%).
  2. Full CI parity: make check — lint (go vet + golangci-lint), go test -race -count=1, build, scope-based coverage gate, TypeScript plugin suite.
  3. Dual-copy byte identity: cmp .opencode/plugins/review-dispatch/index.ts internal/scaffold/assets/opencode/plugins/review-dispatch/index.ts and cmp .opencode/commands/uf.fix-ci.md internal/scaffold/assets/opencode/commands/uf.fix-ci.md — both exit 0.
  4. Scaffold contract pins: go test ./internal/scaffold/... — drift, manifest, and TestCommandContracts_FixCiCommandStructure (tool-routed assertions: fetch_pr_review_context / fetch_pr_checks / fetch_failed_run_logs present, raw gh fetch invocations absent) pass.
  5. OpenSpec validation: openspec validate extend-fetch-pr-review-context --type change --strict (zero-ERROR benign profile) and openspec validate uf-fix-ci --type change (warnings-only after the deviation retirement).
  6. Tool behavior spot-checks (FR scenarios): fetch_pr_review_context returns state/mergeable/merge_state_status/head_repository/base_repository with base_repository derived from the PR url; fetch_pr_checks classifies eligibility failing/pending/passing including the zero-checks shape; fetch_failed_run_logs persists a 0o600 O_EXCL temp file and returns log_path/log_bytes/log_lines — never inline text.

Test Results

From the most recent build/test checkpoint (Step 6 pre-flight soft gate, 2026-10-29, head 661a7ef):

  • lint (go vet + golangci-lint): PASS
  • build (go build ./...): PASS
  • coverage-gate (scope-based, 1 changed package): PASS
  • plugin-test (TypeScript suite): PASS — 95.46% statements (floor 94%), 88.22% branches (floor 85%)
  • council-review-action pipeline test: PASS — 91/91 assertions
  • go test (make check test target): 1 failure — TestRunInit_FreshDir (cmd/unbound-force), classified pre-existing: fails identically on the origin/main baseline worktree (8ca8f89) and upstream CI Build and Test is green on main; non-blocking, branch-caused count 0
  • Gaze quality analysis (informational): PASS — crapload 23<=30, gaze_crapload 9<=12, contract_coverage 60.29%>=55; worst function (scaffold.Run, CRAP 64.7) is pre-existing and untouched by this branch
  • Review council: APPROVE WITH ADVISORIES — 4/5 reviewers succeeded (adversary run failed with a retryable provider error, non-voting), 13 advisories (4 MEDIUM, 9 LOW), 0 blocking findings

Review Verdicts

Gate Verdict Iterations
Spec review (uf.review-council, specs mode) APPROVE WITH ADVISORIES 2
Code review (uf.review-council, code mode) APPROVE WITH ADVISORIES 1

Code-review advisories (13 total — 4 MEDIUM, 9 LOW) are non-blocking and recorded in the dispatch artifact (.uf/artifacts/dispatch/f6a17ba3-bf66-45c7-8b2f-9b45af944ddd.json); canonical council decision: ESCALATED (advisory-level, resolves at this PR's review).

Notes

…ir fetch tools

Tasks 1.1-2.1 of openspec/changes/extend-fetch-pr-review-context
(issue unbound-force#861):

- fetch_pr_review_context gains the five PR-repair fields (state,
  mergeable, merge_state_status, head_repository, base_repository
  derived from the PR url — gh pr view --json rejects baseRepository)
  and optional pr_number with current-branch resolution (design D2/D3)
- new fetch_pr_checks tool: exit-code-tolerant gh pr checks fetch with
  eligibility derivation from observed buckets, fail-closed on unknown
  buckets (design D4)
- new fetch_failed_run_logs tool: gh run view --log-failed fetch
  persisted to a 0o600 O_EXCL temp file, never returned inline
  (design D5)
- scaffold mirror synced byte-identical (cmp-verified)
Task 3.1 of openspec/changes/extend-fetch-pr-review-context/
(design D7): extract the Bun.spawn mock harness — text streams,
routed mock responses with exit-code-tolerant shapes, Bun global
patching, and the setupTool scratch-project pattern — from
fetch-pr-review-context.test.ts into
.opencode/test/helpers/gh-spawn-mock.ts. The existing suite's
local copy migrates opportunistically (53/53 green).
Task 3.2 of openspec/changes/extend-fetch-pr-review-context/
(modified FR-002/FR-003, design D2/D3/D7): five new fields
passed through with fork orientation, base_repository derived
from the PR url (unparseable url degrades with a warning),
omitted pr_number current-branch resolution and pr_not_found,
explicit-path and schema-strictness pins retained. 61/61 green.
Task 3.3 of openspec/changes/extend-fetch-pr-review-context/
(FR-013, design D4): full suite through the shared gh-spawn-mock
harness — four-field happy path; exit-code-tolerant matrix (exit 0
green, gh exit 8 pending, non-zero failing, each returning data);
eligibility derivation matrix (failing / pending / cancel /
passing / fail-dominates / unknown-bucket fail-closed with a
warning naming the value); verified zero-checks gh shape (exit 1,
empty stdout, no-checks-reported marker gating the data path);
unparseable stdout on any exit code including 0 → structured
api_error; all six error codes; input validation (non-integer,
zero, negative, above 999999, string injection, extra fields,
omitted); pinned argument vector and discrete array elements.
35/35 green.
…lidation

Task 3.4 of openspec/changes/extend-fetch-pr-review-context/
(FR-014, design D5): full suite through the shared gh-spawn-mock
harness — happy path with log_path/log_bytes/log_lines and the
write-to-read round-trip (content, byte size vs multi-byte
fixtures, split-formula line counts); 0o600 log file under a
0o700 parent (TMPDIR sandboxed per test — the real
$TMPDIR/opencode pre-exists at 0755 where the opencode app
runs, so the mode assertion points the tool at a fresh scratch
dir where its own mkdir mode applies); unlink-then-O_EXCL
stale-file replacement; EISDIR write failure → api_error;
pinned argv with --repo as discrete elements when provided and
absent when not; run_not_found for the verified HTTP 404, HTTP
410 expired, and could-not-find shapes plus the HTTP 403
boundary that stays api_error; zero-line fetch succeeds with
warning; gh_not_found/gh_auth_failed/timeout/rate_limited; and
input validation (run_id pattern with injection payloads,
non-string type confusion, repo pattern, .strict()) rejected
before any gh invocation. Log text never returned inline.
31/31 green; 127/127 across the three fetch suites.

Also flips the task 3.3 checkbox (landed in e2bff99).
Task 3.5 of openspec/changes/extend-fetch-pr-review-context/
(FR-013/FR-014 registration surface): add fetch_failed_run_logs
and fetch_pr_checks to the two hand-maintained tool-list pins —
the sorted Object.keys(dispatchHooks.tool) enumerations in
scratch-smoke.test.ts and plugin-integration.test.ts — turning
the two pin tests the d75549d registration broke back green.
registration-surface.test.ts enumerates dynamically and needed
no edit. 30/30 across the three suites.
Task 3.7 of openspec/changes/extend-fetch-pr-review-context/
(determinism pack DE-007): the three seam layers verified green
in this increment —

- Registration surface: registration-surface.test.ts enumerates
  all registered tools dynamically (args/description/execute,
  20/20) and the scratch-smoke + plugin-integration tool-list
  pins enumerate fetch_pr_review_context, fetch_pr_checks, and
  fetch_failed_run_logs (30/30); input-schema parity held by
  the per-tool validation suites (FR-002 optional pr_number
  with .strict(), FR-013 required 1-999999, FR-014 run_id/repo
  patterns, all rejected pre-spawn).
- Documented output shape: FR-003's 24-field contract matches
  FetchPrReviewContextOutput field-for-field; FR-013's checks/
  eligibility output and FR-014's exact key set
  {run_id, repo, log_path, log_bytes, log_lines, warnings}
  asserted by their suites, log text never inline.
- Write-to-read round-trips: persisted 0o600 log files re-read
  asserting content, byte size, and line counts against the
  reported values; diff_path content re-read.

make plugin-test: 1337/1337, statements 95.41%, branches 88%
(floors 94/85 unchanged).
Collapse Phase 1.0/1.1/1.2 of uf.fix-ci.md onto the review-dispatch
plugin tools per extend-fetch-pr-review-context task 4.1 (FR-015,
design D6/D2/D3):

- 1.0: availability prose collapses — the tools validate gh/auth;
  gh_not_found/gh_auth_failed structured errors map to the existing
  STOP messages
- 1.1: auto-detect calls fetch_pr_review_context without pr_number
  (argument-supplied invocations call it with the number in 1.2);
  pr_not_found maps to the no-open-PR STOP
- 1.2: both raw fetches replaced with fetch_pr_review_context +
  fetch_pr_checks; STATE/HEAD_REF/BASE_BRANCH/MERGEABLE/MERGE_STATE/
  HEAD_REPOSITORY/BASE_REPOSITORY recorded from tool fields with
  IS_FORK derived from the repository comparison (design D2); the
  eligibility gate keys on the derived eligibility with identical
  STOP outcomes; raw bash blocks, the non-zero-exit caveat, and the
  bucket-categorization table removed

Phase 1.3/1.4 and Phase 2 onward untouched (tasks 4.2/4.3 own them).
Scaffold mirror sync and contract-test re-pinning follow in task 4.3.
…d_run_logs

Collapse Phase 2.1 of uf.fix-ci.md onto the review-dispatch plugin
tool per extend-fetch-pr-review-context task 4.2 (FR-015, design
D5/D6):

- 2.1: the mktemp block and the raw gh run view invocation are
  replaced by one fetch_failed_run_logs call with the 2.0-validated
  run_id and repo: <BASE_REPOSITORY>; run_not_found and the
  zero-line result (log_lines: 0) map to the existing STOP wording
  (structured error's message or zero-line warning verbatim, check
  names, run link); other structured errors STOP with the envelope
  surfaced verbatim
- the untrusted-text hygiene and remove-on-completion-and-STOP
  cleanup rules retarget from <LOG_FILE> to the tool-reported
  log_path, with 2.2's slice-reading reference renamed to match
- the Phase 2 intro's now-false raw-bash claim is corrected to the
  tool route (the 4.1 Phase 1 intro precedent); Phase 2.0's run-id
  derivation prose and the Phase 5 gh run rerun pin are untouched
  (design D6 non-goals)

The fr-002 contract pin this drops extends the known 4.1
intermediate state; scaffold mirror sync and contract-test
re-pinning follow in task 4.3.
Retire the deviation records that justified /uf.fix-ci's raw-gh
fetch prose per extend-fetch-pr-review-context task 4.4 (FR-015,
design D6), addressing the MEDIUM spec-review advisory in the
same task:

- uf-fix-ci design D1: closed-with-reference notes on all three
  inventory entries the re-route retires - the three-raw-gh-
  fetch-classes entry, the Phase 1.0 gh availability checks, and
  the Phase 1.2 bucket-keyed eligibility routing - each pointing
  at openspec/changes/extend-fetch-pr-review-context/ (issue
  unbound-force#861) (advisory part a; the task text named only the
  fetch-classes entry)
- uf-fix-ci spec FR-001: the 'before any other step' gh
  availability verification becomes the Phase 1 fetch tools'
  own validation with the gh_not_found/gh_auth_failed mapping;
  the matching scenario's WHEN clause follows the tool mechanism
- FR-002: the pinned gh pr view / gh pr checks invocations become
  the fetch_pr_review_context + fetch_pr_checks tool calls, with
  the derived eligibility keying the gate
- FR-003: the gh run view --log-failed pin becomes the
  fetch_failed_run_logs tool call (log_path returned, never the
  log text inline)
- FR-010: the raw-bash reservation list loses the three fetch
  classes; the remaining gh reservation narrows to
  gh run rerun --failed, the only raw gh invocation left
- this change's design R3: FR-001 added to the enumeration of
  retirement-affected requirements (advisory part b) and the D1
  fragment reference pluralized to match the three closures

Scenario Given/When/Then structure and verification intent are
preserved throughout; no other fragment of the completed change
is touched (its proposal's Dependencies already threads unbound-force#861 as
the retirement carrier). Task 4.4 is marked complete in the same
commit. openspec validate uf-fix-ci --type change holds the
warnings-only profile unchanged: valid, 2 WARNINGs (FR-002 long
requirement text, originating_issue unrecognized key), 0 errors.
Add the Unreleased/Added CHANGELOG entry per task 5.2 of
extend-fetch-pr-review-context (issue unbound-force#861): the extended
fetch_pr_review_context tool (five PR-repair fields, optional
pr_number), the fetch_pr_checks and fetch_failed_run_logs
tools, the behavior-preserving /uf.fix-ci re-route with the
uf-fix-ci deviation retirement, and the measured instruction-
text delta (design D8: 106 lines of raw-gh fetch prose
replaced by 100 lines of tool-call instructions, the command
file 1262 -> 1256 lines), with the Spec footer and the Docs
dual-footer carrying documentation issue unbound-force#873 plus the
consolidated website trackers unbound-force/website#342 and
unbound-force/website#310.

Task 5.1 (the documentation issue itself) is external to the
repo: unbound-force#873 was filed against unbound-force/unbound-force with
the website-target resolution and the content-pipeline
dispositions worded against the curator's significance
thresholds. Both 5.1 and 5.2 checkboxes flip in this commit.
Task 5.3 (documentation-impact assessment) is external to the
repo: the no-change disposition covering the full documentation
surface (root AGENTS.md/README.md/QUICKSTART.md plus the entire
docs/ tree, addressing the LOW spec-review advisory about the
task text's incomplete five-file list) is recorded as the
follow-up comment on documentation issue unbound-force#873
(unbound-force/unbound-force#issuecomment-6510669928).
Ship the /uf.unleash retrospective learnings with the feature PR
per the Commit scope rule. Captures patterns and gotchas from the
extend-fetch-pr-review-context workflow: intent-level command
design, gh-cli PR fetch paths, openspec deviation retirement,
plugin tool registration, review-tool seam verification, and the
shared gh-spawn-mock test harness.

Assisted-by: glm-5
Generated with AI assistance (glm-5)
@jflowers
jflowers requested a review from a team as a code owner October 30, 2026 01:11
@jflowers jflowers self-assigned this Oct 30, 2026

@jflowers jflowers left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Council Verdict: APPROVE WITH ADVISORIES

The review council (4 of 5 dispatched reviewers completed; all approving — APPROVE WITH ADVISORIES x3, APPROVE x1) found no blocking issues in this change. 19 advisory findings (12 MEDIUM, 7 LOW) are summarized below and as inline comments; several are corroborated independently by multiple reviewers.

Context: CI is fully green (17 checks: 11 pass, 2 neutral, 4 skipped). Linked issue #861 is fully covered (3/3 criteria). The fifth reviewer (divisor-adversary, heavy tier) failed to dispatch for an environmental model-resolution reason unrelated to this PR's changes.

Advisory highlights (cross-persona corroborated):

  • FR-013 zero-checks carve-out (architect, guard, testing): the fetch_pr_checks behavior that treats empty stdout + "no checks reported" as passing-with-empty-checks is implemented but not stated in the spec delta — spec and implementation now disagree on the zero-checks outcome.
  • IS_FORK degradation path (architect, guard, testing): an empty (degraded) BASE_REPOSITORY classifies a forked PR as same-repo in /uf.fix-ci, weakening the never-push-to-parent guardrail; no regression test pins this path.
  • Auth-catch classification (architect, testing): the which-gh/auth prologue catch block maps transient spawn timeouts to gh_auth_failed, steering /uf.fix-ci toward re-auth instead of retry.
  • Test DRY (architect, testing): findGhArgv is triplicated across the three new suites instead of living in the new gh-spawn-mock helper; TMPDIR restore can stringify undefined.
  • Proposal/docs consistency (architect, curator, guard): proposal.md both declines and mandates blog/content follow-ups; the tasks.md 5.3 documentation list is narrower than the change's documentation footprint.

Remaining findings not attached inline:

  • LOW (architect): runGhCommandTolerant parallels the throwing runGhCommand; a shared core with a tolerance flag would collapse the duplication — .opencode/plugins/review-dispatch/index.ts:7236.
  • LOW (testing): the auth-catch error-contract finding pairs with the architect's MEDIUM above — .opencode/plugins/review-dispatch/index.ts:7344.
  • LOW (curator): the proposal contradiction finding corroborates the architect's, without a distinct line anchor.
  • LOW (curator): tasks.md 5.3's five-file documentation-gate list should widen to the full documentation footprint of this change.

Canonical dispatch artifact: .uf/artifacts/dispatch/d506f9a5-aefa-4f00-b8ce-40400f032d85.json. Two retrospective learnings were stored from this review.

This review was generated by /uf.review-pr (AI-assisted).

* @returns Structured output with derived eligibility, or structured error.
*/
async function fetchPrChecks(prNumber: number): Promise<FetchPrChecksOutput | FetchContextError> {
// ── Validate gh CLI availability and auth ──────────────────

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] (divisor-architect) The which-gh/auth prologue now appears three times across the fetch handlers instead of once behind a shared helper. This triplication (default pack DR-002) triples the surface every future auth or pathing change must touch, and the scaffold mirror doubles it again. Extracting a resolveGh() helper that returns the resolved binary and auth state — or throws the already-classified error — keeps the three entry points behavior-identical.

with an empty checks array). If the call returns a structured error:
**STOP** with the error surfaced verbatim and the PR number named —
no check status was read.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] (divisor-guard) The IS_FORK derivation treats an empty BASE_REPOSITORY as "not a fork." When fetch_pr_review_context degrades base_repository to "" (unparseable PR url, e.g. GHES), a forked PR classifies as same-repo and the never-push-to-parent guardrail weakens downstream. Treating a degraded base repository as unknown (fail-closed) preserves the intent of that rule.

restore()
}
} finally {
process.env.TMPDIR = originalTmpdir

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] (divisor-testing) The TMPDIR restore can assign String(undefined) — the literal string "undefined" — instead of restoring the prior environment. On Linux CI, where TMPDIR is always set, subsequent tests in the same worker inherit a bogus path. Branching on the saved value (delete process.env.TMPDIR when it was undefined, otherwise restore) restores the true prior state.

@@ -0,0 +1,320 @@
## ADDED Requirements

### Requirement: FR-013 fetch_pr_checks tool

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] (divisor-architect) The implemented fetch_pr_checks behavior carves out empty stdout plus the "no checks reported" stderr marker as passing-with-empty-checks, but the spec delta does not state that carve-out. The implementation and spec now disagree on the zero-checks outcome, so a future re-implementation from the spec alone would regress it. Amending the FR-013 requirement text to name the carve-out closes the gap.

validated `pr_number`. A non-zero `gh pr checks` exit whose stdout
parses as a JSON array MUST be treated as check-status data, not a
fetch failure. Conversely, stdout that does not parse as a JSON
array MUST be treated as a fetch failure classified through the

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] (divisor-guard) The eligibility requirement lists failing/pending/passing but omits the empty-checks=>passing branch the code implements. The spec is the durable record of intent; when the code and spec disagree, later readers cannot tell which is authoritative. This finding corroborates the architect's spec-consistency flag on the same root cause.

* (e.g. group "pr", verb "checks"), or undefined when the tool never
* issued that call.
*/
function findGhArgv(mockSpawn: MockSpawnFn, group: string, verb: string): string[] | undefined {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] (divisor-architect) This suite carries the third copy of findGhArgv. Same root cause as the testing persona's flag: the helper belongs in .opencode/test/helpers/gh-spawn-mock.ts, which this PR adds precisely to centralize gh spawn mocking.

process.env.TMPDIR = originalTmpdir
}
})

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[MEDIUM] (divisor-architect) The TMPDIR save/restore here shares the isolation defect flagged at line 199 — the restored value can be the string "undefined" when the variable was absent. Both restoration sites need the undefined-versus-value branch.

### V. Security by Default

**Assessment**: PASS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] (divisor-architect) The proposal's non-goals section declines blog/content follow-ups while a later section mandates proposing them. Curator and guard corroborate the contradiction. One of the two sections yields; future readers then get a single consistent answer.


### III. Observable Quality

**Assessment**: PASS

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] (divisor-guard) The retrofit paragraph covers only the spec/proposal edits, while the documentation-gate retro and the combined doc retrofit are described inconsistently across sections. A single retro list naming every touched document resolves the ambiguity.

* fatal-loss for PR repair. This tool treats gh pr checks stdout JSON
* as check-status data on ANY exit code and derives the eligibility
* classification from the observed buckets (design D4).
*

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LOW] (divisor-testing) The checks parser has no test fixture for malformed check entries (non-string name/state, missing fields). The defensive ?? "" mapping handles them, but no test pins that behavior. A fixture asserting graceful degradation on malformed entries locks the contract.

@jflowers
jflowers merged commit e217e15 into unbound-force:main Oct 30, 2026
17 checks passed
@jflowers
jflowers deleted the opsx/extend-fetch-pr-review-context branch November 15, 2026 21:36
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.

Extend fetch_pr_review_context with PR-repair fields and an intent-level PR-state/checks/log path

1 participant