Repository navigation
feat: edit session PR details without publishing source - #174945
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
|
Codex review: needs maintainer review before merge. What this changesAdds a session-bound action for editing an existing PR’s title or description without publishing workspace files. Example: A guest corrects the closing reference in an existing draft while unfinished workspace changes remain.
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review This maintainer-authored PR fills a useful session capability gap. The prior finding is fixed, supplied authority evidence addresses the previous review, and no actionable code findings remain. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe agent tool sends metadata intent to the existing Gateway publication owner, which resolves the session’s saved PR, checks current authority, and sends a title/body-only GitHub PATCH. flowchart LR
A[Guest request] --> B[GitHub publish tool]
B --> C[Gateway action owner]
C --> D[Current requester authority]
C --> E[Saved publication receipt]
D --> F[GitHub metadata PATCH]
E --> F
F --> G[Observed PR result]
Technical reviewBest possible solution: Land metadata editing through the existing Gateway action owner while preserving source-publication and lifecycle authorization contracts. Do we have a high-confidence way to reproduce the issue? Current-main source lacks a metadata-edit action, and ordinary publication retains existing PR text; no target code was executed during this read-only review. Is this the best way to solve the issue? Extending the existing publication owner avoids credentials in the sandbox, arbitrary PR targeting, and a competing publication path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9434e82117c8. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +145, Tests +279, Docs +16. Total +440 across 14 files. Added test files: 0. View PR surface stats
LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 16, 2026, 11:35 PM ET / October 17, 2026, 03:35 UTC (Revision 2). |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
|
Added: Session users can edit their associated pull request title or description without publishing workspace changes. |
What Problem This Solves
Changing an existing session PR's title or description currently requires a capability the publication tool does not expose. Passing a new body to ordinary publication republishes workspace changes while retaining the existing PR description. That can unintentionally include unfinished or untracked files in a request intended only to correct PR text.
User Impact
github_publishgainsaction: "edit"for the current session's existing open shared PR, including guest-created PRs. It resolves the latest completed publication within the current saved workspace binding, so a later failed source publication does not hide the existing PR. Closed PRs remain read-only. Call it without changes to read metadata, then supply only the fields to change with their observed values, publication request ID, and expected head. Omitted fields and the existing attribution/footer remain unchanged. Editing does not capture or publish workspace source and cannot change PR lifecycle state.Why This Change Was Made
The existing Gateway action owner already binds the caller to the saved publication and rechecks current actor and publisher authority. This change adds metadata editing there and sends only title/body fields to GitHub. Stale observed values are rejected, and a lost write response is reconciled by reading the same PR. These are stale-input checks, not atomic GitHub compare-and-swap guarantees against simultaneous external edits.
Ordinary source publication keeps its existing semantics. Its tool help now explicitly says that title/body are creation-only, while guest landing and closure restrictions remain unchanged. No storage, configuration, or dependency migration is required.
Evidence
The registered tool/Gateway regression fails on the baseline with
missing scope: operator.write. It uses the existing publication coordinator and a real dirty Git workspace; only remote GitHub transport is simulated. Candidate checks cover body-only and title-only edits, preserved HEAD/index/diff/untracked bytes, unchanged attribution, stale inputs, revoked authority, rejected writes, and a lost response followed by a repeat request.Remote formatting/lint, protocol generation, and selected consumer type checks pass. The initial 42-file related batch passed 516 tests; unchanged results are retained. The review correction passed every selected compiler graph and 128 tests across the action suite and six related reader/registration files. It reproduces the pre-fix two-edit attribution bypass and metadata lookup failure after a rejected source publication on both workspace backends, then verifies the corrections.
pnpm test src/gateway/github-publication-actions.test.ts --maxWorkers=1passed all 26 cases in 92.20 seconds wall time on the qualified remote runner. The six other related files passed 102 tests in 163.74 seconds through the native runner. These totals include setup and existing controls; the new cases reuse the persisted actor/session and real-Git fixture without timers or Gateway boots.An additional temporary scenario exercised the metadata handler with a different durable guest profile, session read/write scopes, and explicit conversation membership. It passed ordinary chat admission and the registered shared-receipt read, then rejected a valid metadata edit before transport. The scenario was loaded into the existing action harness against the unchanged production tree and restored the test file afterward. The existing creator-policy regressions remain in
github-publication-session-access.test.ts.{ "ordinaryChatAdmitted": true, "sharedReceiptReadable": true, "metadataEditAccepted": false, "error": "The original GitHub publication requester is no longer authorized.", "gitHubCommands": 0, "metadataWrites": 0, "titleAndBodyUnchanged": true }Independent engineering and adversarial review is clean. Final-head CI completed with 57 successful jobs and the updater mock-export ratchet plus its derived gate failing. Main subsequently repaired that factory in #174947. The actual checker passes on the repaired target, with all 13 causal inputs identical in the prospective merge result; the native landing record retains the failed statuses and their repaired-baseline qualification.
The original guest completed the live edit from an ordinary request, choosing
github_publishwithaction: "edit". Only the first-lineRelated: #168896becameFixes #168896; the remaining body, title, head, changed-file data, and open draft state stayed unchanged. The retained consumer uses the exact changed source/test blobs, its frozen dependencies, and original native build stamps. The public recording shows the update and reload; the private conversation is excluded.Visual evidence
Actual public PR update and reload; idle time shortened
proof.mp4
Visual verification
df21e9266e226784f5f999ea43704945495334b7