Skip to content

fix(wrap): follow-ups after the one-call gather - #1267

Merged
tieubao merged 9 commits into
masterfrom
l312-wrap-followups
Dec 3, 2026
Merged

tieubao merged 9 commits into
masterfrom
l312-wrap-followups

Conversation

@tieubao

@tieubao tieubao commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

What

Follow-ups after PR 1257, plus two safety fixes found on the way.

  1. Usage text and docs cover wrap session --prs, --transcript, --summary and --mark-dir; the reference doc walks a real "Needs you" example instead of a bare NOTHING.
  2. The report states the planned writes (what wrap would merge, flip, carry or clean) from the gather, and report-lint --gather checks them.
  3. Four LOW findings fixed: leading-zero PR refs, per-PR GraphQL error attribution, the lost document-level GraphQL message, glob-expanded refs.
  4. Speed: open own PRs come from one gh pr list call (the PR read went from 17 s to 7 s on a 16-PR repo), with a fallback to per-PR reads when that call fails.
  5. The ship-gate push parser accepts parentheses inside a quoted argument; unquoted grouping and subshells stay refused, and a quoted title can no longer hide a second command behind a comment.
  6. wrap land waits for checks on the new head after it merges master into a conflicting branch, instead of merging at once.
  7. wrap session skips programs from repo config for transcript-only repos: filter, diff textconv or command, sshCommand, pager, credential helpers, gpg and log.showSignature, in local and worktree scope, and runs status with submodules ignored.

Closes #1258

Demo

A PR title with parentheses: refused before, pushed after; a title that hides a second push behind a comment: refused.

Proof

docs/verification/wrap-followups.md

  • Verdict: works: all seven follow-ups landed, and the review's three blockers are fixed with red tests first.
  • Proof: 11 ship-gate suites green on bash 3.2 and 5; 74 changed suites green on bash 5 and the changed-code suites on bash 3.2; negative controls red; a fresh review fuzzed the gate through the hook, stubbed gh for the land wait, and planted marker-writing drivers; pr-shape, owners and secret-scan clean.
  • Risk: the gate parser change could refuse an unusual quoted command it allowed before; undo with a revert.
  • Needs Han: nothing.

Bookkeeping

Closes #1258

Check literal parentheses against the quote-masked segment (segMask) while keeping raw text checks for command substitution and backticks. Unquoted parentheses, subshells, grouping, and process substitution stay refused.

Closes #1258
…ardening

Address wrap follow-ups:
- Document wrap session flags in usage text and replace bare NOTHING example in docs/reference/wrap.md with a walked example that passes report-lint.
- Compute planned_writes (merge, flip, carry, clean) in wrap session gather and add --gather check to report-lint.sh.
- Fix leading-zero PR refs, per-PR GraphQL error attribution, document-level GraphQL error fallback, and glob expansion in --prs.
- Fetch open own PR details in one gh pr list call and reuse gh api user login (cutting _session_prs_json from 17.2s to 6.8s on 13 open PRs).
- Wait for checks on newly pushed re-merge heads in wrap land when the repo has pull_request workflows.
- Skip transcript-derived repos whose local git config sets program-valued keys and pass --ignore-submodules=all to git status.
Close fix-round-1 review findings:
- Guard # comment detection in lib/gate/push-refs.sh with !inw so escaped characters before # cannot hide a trailing push to main.
- Read both local and worktree scopes via git config --includes --show-scope in _session_unsafe_local_config.
- Override log.showSignature=false in env and add gpg. to the unsafe-config deny pattern for transcript-derived repos.
- Fall back to _open_own_prs + per-PR _pr_detail when the heavy gh pr list call fails.
@tieubao
tieubao merged commit 767354b into master Dec 3, 2026
8 checks passed
@tieubao
tieubao deleted the l312-wrap-followups branch December 3, 2026 06:48
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.

push-refs: a quoted PR title with parentheses blocks the PR-create call

1 participant