Skip to content

fix(source-control): retry a failed owner-template read, then fall back to briefing - #18246

Merged
kyle-sexton merged 3 commits into
mainfrom
fix/owner-template-read-retry
Nov 22, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
fix/owner-template-read-retry

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 22, 2026 •

Copy link
Copy Markdown
Member

No related issue: follow-up to #18239; a stop on a transient read is a workflow gate the owner's Intent rule calls a defect

Summary

/source-control:pull-request create no longer stops when a read of the owner's default pull request template fails with anything other than a 404. It retries the read once, then falls back to the briefing sections and names the failed read, so a GitHub outage, rate limit or login problem cannot stall an unattended lane before its pull request opens.

Fix

  • create.md §2.4.1, level 2 of section resolution: a 404 moves to the next level, as before. Any other failed read is retried once; a second failure also moves to the next level. The body's verification section names the endpoint path and the HTTP status or failure kind (auth, network, rate limit, 5xx); the raw gh error goes only to the session's §2.6 report, so no local path, host or proxy detail reaches the public body (local security review finding, matching the scrub rule at create.md:386).
  • feat(source-control): take PR body sections from the repo's template and write them in glossary terms #18239 made that failure a stop, from a review finding that the fallback was silent. The fallback now stays and is no longer silent: the body names why it has the briefing sections, and this repository's check-contract flag on those sections is advisory (comment and needs-issue-linkage label), so the pull request still opens and a reader sees the cause.
  • Changelog fragment for source-control (patch).

Verification

  • Docs-only change to one skill reference paragraph plus a changelog fragment; pre-commit content scan and comment lint passed, pre-push content scan passed (0.14 s).
  • grep over plugins/source-control and docs/contracts/pr-body-convention for the old wording: only create.md:292 described the failure handling.
  • CI runs the rest; nothing it runs was re-run locally.

Related

🤖 Generated with Claude Code

https://claude.ai/code/session_01RAoAtUszvw6rUY9tpjLr2U

kyle-sexton and others added 2 commits November 22, 2026 16:32
…ck to briefing

A non-404 failure reading the owner's .github template stopped create before the pull request opened, so a GitHub outage, rate limit or login problem stalled every lane. create now retries the read once, then falls back to briefing and names the failed read in its report and the body.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAoAtUszvw6rUY9tpjLr2U
…ic PR body

The body names only the endpoint path and the HTTP status or failure kind; the raw gh error goes to the session report, so local paths, hosts or proxy details never publish.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAoAtUszvw6rUY9tpjLr2U
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 22, 2026 21:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T21:40:36.284647Z c8d6c6b Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 84974538f6bfcee608ffbb9067abd0fd4e5b1d7c: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #18246 (incremental, blocking only)

I found no security issues in the change since c8d6c6b7.

Scope. This review covered only the push since c8d6c6b78f5ab28e9afbcaae5a0cb8a5b1de5b1a. I read the whole change in .claude-lane/incremental.diff. It touches one file, plugins/source-control/skills/pull-request/reference/create.md, and that file matches no trusted-path glob. The push adds one example line to the shell comment block in §2.4.1 (line 338). The example shows the REQUIRED_SECTIONS_SOURCE value used when the owner-template read fails: plugin default, briefing (owner default template read failed: <endpoint> <status or kind>).

Data exposure. The new value carries only the endpoint path and the HTTP status or failure kind, never the raw gh error. That matches the scrub rule the previous head already set up, so no token, host, proxy or local-path detail is added. The value is echoed to stderr in the missing-section message at create.md:543. The endpoint path names only public owner and template-path data.

Trust controls and manifests. The push changes no trust control, merge hold, token scope, kill switch, plugin manifest or standing instruction, so no lens beyond the diff read applied.

Prior findings. Last round this lane posted a clean summary with nothing to carry forward. Because this lane already reviewed an earlier head, this review reported only blocking findings, and it found none.

PR context. The description matches the change. It holds no embedded instructions aimed at the review lane.

Spend. No new spend.

critical-findings: 0

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

claude-review: 1 inline finding(s) on c8d6c6b78f5ab28e9afbcaae5a0cb8a5b1de5b1a; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 84974538f6bfcee608ffbb9067abd0fd4e5b1d7c: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review: PR #18246 (incremental, blocking only)

This review covers only what changed since c8d6c6b7. That is one added comment line in plugins/source-control/skills/pull-request/reference/create.md, in the bash block's source examples. This lane already reviewed an earlier head (blocking only: yes), so I report only blocking findings.

What changed: the new example REQUIRED_SECTIONS_SOURCE="plugin default, briefing (owner default template read failed: <endpoint> <status or kind>)" (create.md:338) gives the failed-read fallback its own source string. When the §2.4.2 gate fails, it quotes this string, and the §2.6 report names it. Both now give the same cause as the body's verification note (create.md:292). This fixes this lane's earlier advisory finding, which the owner resolved and which is settled with no line changes since. The <status or kind> placeholder matches the "HTTP status or failure kind" wording on line 292, and the string leaves out the raw gh error, so it keeps the scrub rule.

I found nothing blocking.

Closing issue: none. The PR closes no issue (it follows up #18239), so there are no acceptance criteria to check.

Loosened checks: this criterion does not apply. The change is a documentation example for a source string, and no check's settings change. Loosened checks would be marked: fail (the prompt had no loosened_check_verdict: line, so I used the default); patterns: 0. The prompt had no loosened_check_decision_record: line, so I did not check the citation requirement.

Spend: none. This is a docs-only change.

I verified nothing by running it, because I had no shell.

Verifier dropped 0 of 0 candidates.

…ons source

The gate message and report now give the same cause as the body when the fallback follows a failed read, instead of the no-template default.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RAoAtUszvw6rUY9tpjLr2U
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 22, 2026
Merged via the queue into main with commit 357a0a6 Nov 22, 2026
51 checks passed
@kyle-sexton
kyle-sexton deleted the fix/owner-template-read-retry branch November 22, 2026 22:00
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant