Repository navigation
fix: bind queued GitHub publication to its requester - #154477
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: blocked before merge. Reviewed September 22, 2026, 12:29 AM ET / 04:29 UTC (Revision 19). ClawSweeper reviewWhat this changesThe PR preserves the original requester’s permissions across queued GitHub publication and restarts, adds durable identity metadata, and updates recovery, migrations, tests, and documentation. Warning SQLite table change This PR modifies persisted SQLite tables in Merge readiness⛔ Blocked before merge - 5 items remain This remains useful work absent from current main. No actionable correctness defect was found; the documented storage compatibility change still needs the repository-required design acceptance. Priority: P1 Review scores
Verification
How this fits togetherThe Gateway publishes session work through a shared GitHub account using either local Git worktrees or repository checkpoints. Requester authorization controls new writes, while execution ownership allows already-accepted results to be recorded safely. flowchart TD
A[Authenticated publication request] --> B[Capture requester and permission ceiling]
B --> C[Durable publication receipt]
C --> D[Queue or restart recovery]
D --> E{Original authority still current?}
E -->|Yes| F[Publish through selected GitHub account]
E -->|No| G[Observe existing effects only]
F --> H[Settle original receipt]
G --> H
Decision needed
Why: The implementation and upgrade evidence explain the tradeoff, but repository storage policy requires a linked acceptance that the inspected discussion does not provide. Before merge
Agent review detailsSecurityNone. PR surfacePR surface statistics unavailable: the file list is incomplete. Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep requester authorization with the existing publication owners and land the durable binding after recording acceptance of its documented upgrade and rollback contract. Do we have a high-confidence way to reproduce the issue? Yes, the current-main recovery path lacks durable requester binding, and the supplied evidence describes revoked-access reproductions through both backends. This read-only review verified the source mechanism without executing it. Is this the best way to solve the issue? Yes, retaining the original requester in existing receipts and separating write authorization from accepted-result settlement fits the existing owners; the schema compatibility decision remains distinct from correctness. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 58e27e0fedc4. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (18 earlier review cycles; latest 8 shown)
|
74b947d to
121ca22
Compare
bbb3877 to
e301e8c
Compare
09d10c0 to
82a1b0d
Compare
e301e8c to
e2696bf
Compare
|
Fixed: Queued GitHub publication now retains its original requester and access grant while preserving accepted results. |
Queued shared GitHub publication retains its original requester and access grant across deferral and restart. Accepted results remain recoverable after access ends.
What Problem This Solves
A shared GitHub publication can wait for a workspace checkpoint or survive a Gateway restart. Previously, that request retained its publishing account and workspace but could lose the person whose permission admitted it. Publication could continue after the original guest access expired or was revoked. A new invitation or promotion to staff could also make an old request appear authorized again.
User Impact
Queued publication keeps its original requester, accepted permission ceiling, and governing access grant across deferral and restart. Every new GitHub action checks that original authority. Reinviting the person, promoting them, or moving an original email alias away and back cannot revive the old request. Display changes and aliases added after admission preserve it. Independently authorized staff requests, saved work, existing PRs, publisher selection, and human credit retain their existing behavior.
Work GitHub already accepted remains recoverable. Recovery can observe a previous push or PR and settle its receipt without authorizing another write. An unresolved outcome stays pending when safe observation is unavailable. Accepted-result and Git-index settlement are supplied by #155321; this PR composes those semantics with the original requester's durable authority.
Implementation
The publication lifecycle owner records an immutable requester snapshot when accepting shared work in either local-worktree or repository-checkpoint storage. It retains the original scopes and plugin grant. Current profile, role, alias, session, and membership facts come from the existing worker-backed read owners. Canonical writers refresh retained facts before commit observers run. A synchronous boundary check reads current identity facts together, applies the session policy, resumes the original grant, and rechecks after plugin callbacks. Preparation requires an existing session generation and retains observations of every searched store, so a new conflicting row cannot appear unnoticed.
The original invocation's cancellation, client, session, and retained-source checks remain separate from the saved requester policy. Immediate idempotent retries combine those current invocation checks with the first accepted snapshot and digest. Unknown storage facts defer recovery; a definitively ended or replaced grant prevents further publication. Execution custody separately protects accepted-result bookkeeping.
The maintainer-approved storage contract uses state schema 18, refuses older readers, requires fresh admission for unfinished legacy shared publications, and restores a verified pre-migration backup for downgrade. State schema 18 adds nullable requester metadata to the two existing publication stores. The profile schema owner initializes an opaque binding ID on each email alias and changes it when the alias changes owners. Request snapshots contain those IDs, without credentials, email addresses, or profile display data. Historical completed receipts remain readable. Unfinished unbound shared work requires fresh authorized admission after existing effects are reconciled. Older readers reject schema 18; downgrade requires a verified pre-migration backup and does not undo GitHub effects. Canonical schema, SDK, Visitor Access, and user-model documentation are updated.
Evidence
Head
36f84f37db5cintegrates main485fa310fc91, including the accepted-result prerequisite and native scope adapter in #154922. The current profile mutation owner publishes changed alias-binding facts with its established native commit outcome, installs all retained facts before observers, and preserves newer facts when older receipts arrive late. Unsettled mutations keep accepted publication pending. The original invocation and grant checks remain separate.The integration passed 388 selected cases across 23 files and both native subprocess scenarios on Testbox. Both new ordering regressions fail against the original unpublished integration and pass on the correction. Real held-settlement cases in both publication backends preserve the original receipt and resume after settlement. Current-source independent reviews, complete scoped P2 review, formatting, typed lint and ratchets pass. The runtime-tested source differs only by a block-local variable rename required by lint; the declaration and both uses were verified equivalent. Core production types and all four affected test type graphs pass. Removing the specific unsettled-profile error mapping makes both local and repository recovery cases fail; the corrected source was restored and verified. ClawSweeper revision 19 rates this exact head Platinum, with Diamond proof confidence and no code findings.
The current full CI tests the composition with main
21cbb3cd7243. Its ten completed failing jobs reproduce pre-existing QA/MCP fixture or prepared-plugin disposal failures. The QA/MCP fixture repairs are delivered in54c312971a40, and44559eb315e0removes the three QA Slack suppressions. The prepared-plugin disposal failure remains with its shared owner. All CI jobs are complete, including passing Apple, Android and Windows lanes. The failed statuses remain recorded.The prospective composition with main
9455d642e8f3also passes both existing recovery-continuation authorization cases and the Gateway server type graph on Testbox. These checks preserve the original client and revocation guard when continuation targets a linked session. Later target changes leave all 138 W7 paths and this recovery owner unchanged.The earlier
39a47d707a96composition has green full CI, all 25 core test graphs, 259 selected cases, both native scenarios, and an exact-head Platinum review with no findings. Those results retain their original source identity; the profile-owner integration receives its own affected proof and final-head checks.The original revoked-access failure was reproduced through both publication backends. Source-bound regressions cover grant expiry/replacement, alias transfer and restoration, role changes, idempotent retries, requester loss during execution, worker unavailability, accepted results, and registered RPC handlers. The historical-recovery counterfactual terminalizes an uncertain prior attempt when its guard is removed; both corrected cases preserve that outcome while fresh credential and unsafe-Git failures still terminate normally.
The retained published-2026.9.5 populated-profile upgrade proof used the unmodified package built from
5a437dbc. It preserves every original profile and alias field, initializes four distinct binding IDs, preserves them through same-owner linking and Gateway reopen, admits schema 18, rejects an old reader, and restores the exact schema-17 backup. Earlier published-driver cells also preserve existing agent history and publication receipts through service replacement. These package receipts retain their actual source identities. The current agent-schema-23 owner supplied its own published-updater and backup-restoration evidence; the relevant Doctor/schema implementation is qualified separately.The native publication scenarios use isolated state, real Git and child processes, and controlled checkpoint/GitHub responses. They cover restart and in-flight revocation, join every child process, and permit only independently authorized staff publication. They make no live GitHub write or child-process cancellation claim.