Repository navigation
feat(github): surface team-session attribution - #129012
Conversation
Worked on by: - @steipete
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 1:20 AM ET / 05:20 UTC. ClawSweeper reviewWhat this changesThe PR records authenticated profile-prompt counts and uses verified opt-in identities to add ordered contributor credit and an optional team-session link to Gateway-created GitHub publications. Merge readinessKeep open for normal maintainer landing review. The prior PR-body content-loss finding is fixed at the current head, and the feature reuses the existing verified opt-in attribution boundary; its persisted-session upgrade surface remains intentionally maintainer-reviewed. Priority: P2 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherGateway publication turns a reconciled session workspace into commits and pull requests. Session participant records supply eligibility and ordering facts, which are rendered into Git metadata and the published PR body. flowchart LR
A[Authenticated session prompts] --> B[Session participant records]
B --> C[Verified opt-in attribution]
C --> D[Gateway publication]
D --> E[Commit trailers and credit]
D --> F[Pull request body and session link]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +121, Tests +292, Docs +3, Generated +1. Total +417 across 21 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Land the canonical owner-boundary implementation with its additive lazy schema ensure, verified opt-in resolver, and focused publication/upgrade coverage intact. Do we have a high-confidence way to reproduce the issue? Not applicable: this is a new publication capability, not a report of broken current behavior. The PR includes focused after-change tests for attribution ordering, legacy database rows, repair retry behavior, and generated PR bodies. Is this the best way to solve the issue? Yes. The feature records counts at the session-participant owner, reuses the existing verified opt-in identity resolver, and uses the canonical Control UI session URL helper rather than adding a parallel attribution or link source. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e9017714c2d6. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Worked on by: - @steipete
|
Addressed the latest ClawSweeper review on
Proof:
|
|
Merged via squash.
|
Related: #128944
What Problem This Solves
RoboClaw and other team-session publishers could put the automation account front and center while human contributors were visible only in commit trailers or by opening the pull request. Gateway-created pull requests could also omit the canonical session backlink, making it difficult to trace published work to the team session that produced it.
Why This Change Was Made
Session participant admission now records an additive, same-schema count of authenticated profile prompts. Public attribution keeps the existing verified-identity and opt-in consent boundary, orders eligible humans by contribution count with deterministic ties, and carries that canonical order into commit trailers, a visible
Worked on byblock, and Gateway-created pull requests. The publication broker also appends the exact externally configured team-session URL as the final PR footer when one is available.Cross-store doctor repair uses idempotent aggregate merging because the source remains available until archival; same-store alias repair can safely combine counts transactionally before deleting aliases. Existing databases lazily gain the nullable count column without a schema-version bump, and older rows count as one observed contribution.
Production LOC: +157/-38 (net +119) | Tests: +304/-12 (net +292)
User Impact
Commits and pull requests produced from shared team sessions now clearly show the consenting, verified humans who worked on them in contribution order. Reviewers can follow the final session link back to the originating team-server conversation when the Gateway exposes a public HTTPS session URL. Self-hosted publishers without an external session URL continue to publish normally without a footer.
Worked on by
Evidence
node scripts/run-vitest.mjs src/agents/git-coauthor-attribution.test.ts src/config/sessions/session-accessor.sqlite-participants.test.ts src/config/sessions/session-accessor.test.ts src/gateway/github-publication.test.ts src/gateway/github-publication-attribution.test.ts src/auto-reply/reply/session.test.ts— focused attribution, persistence, publication, and session projections passed.node scripts/run-vitest.mjs src/config/sessions/session-accessor.sqlite-participants.test.ts— cross-store retry regression passed after the idempotency tightening.node scripts/check-changed.mjs— formatting, SQLite schema baseline, production/test typechecks, core lint, dead exports, database-first, import-cycle, and repository guards passed.pnpm build— full build passed.git diff --check— passed.The current coding session does not expose a canonical OpenClaw
sessionUrl, so no session footer is fabricated on this maintainer-created PR. The shipped Gateway path is covered with an exact canonical-footer regression.