Repository navigation
feat(identity): support configurable GitHub Enterprise coauthor credit - #173513
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 real behavior proof before merge. What this changesThis PR adds host-scoped Enterprise GitHub identities and verified commit addresses to shared-session coauthor credit. Example: Account 101 on ghe.example.test signs in as enterprise-ada with verified address [email protected].
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep open: this maintainer-directed feature remains absent from main, and the prior reader/catalog finding is resolved, but existing plugin consumers still conflate enterprise and public GitHub usernames. Priority: P2 Before merge
Findings
Tests
Agent review detailsHow this fits togetherTrusted-proxy sign-in supplies identity metadata to the canonical profile worker; attribution combines persisted identity, session participation, and consent to produce host-selected publication credit. flowchart LR
A[Trusted sign-in proxy] --> B[Gateway admission]
B --> C[Canonical profile worker]
C --> D[Profile identity store]
D --> E[Host and consent selection]
F[Session participants] --> E
E --> G[GitHub publication]
D --> H[Profile and roster responses]
Technical reviewBest possible solution: Complete host-aware identity consumption across bundled plugins while retaining the canonical profile worker and publication attribution owner. Do we have a high-confidence way to reproduce the issue? Source establishes both the missing main capability and the introduced collision path: an enterprise profile named alice is returned to consumers that compare it directly with public GitHub alice; no target code was executed. Is this the best way to solve the issue? The canonical profile-worker and host-selected attribution approach fits the existing architecture, but widening the identity response also requires migrating consumers that currently discard the issuer. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against efbe024a9aa3. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: Enterprise identity persistence and email publication require proof of trusted metadata admission and final-effect invalidation. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +521, Tests +378, Docs +4, Other +1. Total +904 across 34 files. Added test files: 1. View PR surface stats
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
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 15, 2026, 9:53 PM ET / October 16, 2026, 01:53 UTC (Revision 2). |
Co-authored-by: galiniliev <[email protected]>
Keep enterprise credit preferences through chained profile merges, explain host-selected credit independently of the displayed primary account, and separate worker writes from identity readers. Co-authored-by: galiniliev <[email protected]>
Rename the feature, internal types, worker operations and source files to Enterprise GitHub while retaining the deployed proxy header names. Carry enterprise identities through the resident profile catalog introduced on main, using the same identity projection as direct reads. Co-authored-by: galiniliev <[email protected]>
fcf9427 to
7780f92
Compare
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: galiniliev <[email protected]>
Integrate the exact failing CI base and regenerate canonical schema artifacts. This restores SQLite catalog fingerprints and PostgreSQL port offsets after the Enterprise identity schema insertion. Co-authored-by: galiniliev <[email protected]>
|
Merged via squash.
|
The dependency check found three exports without production importers. All three implementations still have same-module production callers: Enterprise identity validation was added with its current sign-in caller in 23a5696 (#173513), and the MCP merge remains used by catalog loading and peeking after b646675 (#174347) removed its test facade. No trust decision or caller was lost. Keep the live helpers private and exercise catalog merging through the combined runtime, preserving every existing test assertion. Do not remove the Enterprise proxy, issuer or account-id checks. Proof: 97 focused tests passed with --maxWorkers=1 (138.97s), dependency scans, core and owning test types, lint/format, and clean P2 review. The stricter full-tree exports audit still reports two unrelated Discord namespace members in unchanged owners; production/script scans pass.
openclaw#173513) * feat(identity): support configurable Enterprise GitHub coauthor credit Co-authored-by: galiniliev <[email protected]> * fix(identity): preserve enterprise credit consent across profile merges Keep enterprise credit preferences through chained profile merges, explain host-selected credit independently of the displayed primary account, and separate worker writes from identity readers. Co-authored-by: galiniliev <[email protected]> * refactor(identity): name Enterprise GitHub coauthor support consistently Rename the feature, internal types, worker operations and source files to Enterprise GitHub while retaining the deployed proxy header names. Carry enterprise identities through the resident profile catalog introduced on main, using the same identity projection as direct reads. Co-authored-by: galiniliev <[email protected]> * fix(identity): preserve issuer scope and editable coauthor consent Co-authored-by: galiniliev <[email protected]> --------- Co-authored-by: galiniliev <[email protected]>
The dependency check found three exports without production importers. All three implementations still have same-module production callers: Enterprise identity validation was added with its current sign-in caller in b985092 (openclaw#173513), and the MCP merge remains used by catalog loading and peeking after d3c8c52 (openclaw#174347) removed its test facade. No trust decision or caller was lost. Keep the live helpers private and exercise catalog merging through the combined runtime, preserving every existing test assertion. Do not remove the Enterprise proxy, issuer or account-id checks. Proof: 97 focused tests passed with --maxWorkers=1 (138.97s), dependency scans, core and owning test types, lint/format, and clean P2 review. The stricter full-tree exports audit still reports two unrelated Discord namespace members in unchanged owners; production/script scans pass.
Closes #173512
What Problem This Solves
GitHub Enterprise users need Git coauthor credit tied to their verified enterprise account and commit address.
User Impact
Operators configure the enterprise hostname through the existing
gateway.github.hostsetting. Users retain their saved coauthor preference through consecutive profile merges and refreshed sign-in; eligible commits use the broker-verified enterprise address, and the Profile page explains that this address becomes visible in commit history. Missing addresses and stale principal bindings withhold credit until refreshed sign-in. Enterprise accounts do not match public-GitHub role rules.Why This Change Was Made
Trusted GitHub Enterprise metadata flows through the existing canonical profile worker and attribution owner. Identity keys include the host, and publication selects contributors for its selected GitHub host, preventing equal numeric IDs on different hosts from sharing credit. No tenant hostname is hardcoded, no enterprise noreply address is synthesized, and verified addresses stay out of profile responses and sign-in aliases.
The smallest coherent scope includes sign-in, persisted identity, attribution, publication, and profile disclosure together. It reuses the existing host configuration, profile consent and authority invalidation; one additive nullable identity field retains the verified binding. Simplification retained one principal parser and one attribution path. GitHub Enterprise writes settle in the existing profile worker transaction, independently of the identity reader; the credit disclosure covers both host-selected address forms even when the displayed primary account is public GitHub.
Evidence
Review repairs — 2026-10-16
Public-GitHub consumers now retain issuer scope, so an Enterprise login collision cannot block public visitor revocation or misattribute a team report. Coauthor consent remains editable when multiple Enterprise hosts leave no single display-primary account; the existing profile-wide preference remains the owner.
63 focused identity/consumer tests and 33 Profile unit tests pass. The actual Profile browser scenario fails with the old disabled control and passes after repair, including saving opt-out.
Before — merged Enterprise identities disable the consent control
After — profile-wide consent remains editable
The composed repair stack passes 191 focused tests plus Profile browser proof, core/UI/plugin types, touched lint/format, mock-export ratchet, documentation checks, architecture and build. Independent review found no actionable P0–P2 issues. This is isolated synthetic boundary proof, not live broker or deployment qualification.
Earlier evidence
Rebased onto
a9e86934eb289bd0e90bd15834f8a337826bb704(main). Feature naming, internal types/operations and filenames now use GitHub Enterprise. Existing trusted-proxy header names remain unchanged. Enterprise identity projection also follows main's resident profile catalog; the retired full-profile reader was not restored.Rebased-source validation: 66 selected backend tests pass across Gateway identity and profile/multi-account suites, including two enterprise hosts, public-ID collisions, missing addresses, opt-out, consecutive merges without intervening sign-in, and host-selected credit after linking public and enterprise profiles. The 6-test GitHub Enterprise suite includes a new
users.listcatalog regression that fails before the rebase integration and passes afterward.Prior repair evidence (
fcf942776e4): 3 focused Profile browser scenarios and the UI typecheck pass, including public and enterprise identity disclosures. The rendered UI code is unchanged by this naming/rebase update. Before/after screenshots below are from the actual mocked-Gateway UI and were inspected.Rebased-source core typecheck, touched lint, formatting, and
git diff --checkpass. Prior UI/i18n proof is retained for unchanged UI source. Both import-cycle checks report zero cycles; the database-worker ratchet reports no T1 growth (222 → 222).Independent source review and the publication Codex autoreview found no actionable P0/P1 findings in the repair.
Backend proof ran on an isolated, credential-free AWS lease. The rebased backend invocation took 55 seconds wall time including compilation/worker setup. The prior browser invocation took 27 seconds. These tests exercise the durable profile/merge/attribution boundary and real UI controls; they do not validate a live GitHub Enterprise broker or deployment. Broad CI for the pushed head is separate evidence.
Before — public primary described only noreply credit
After — disclosure covers the address selected for publication
CI integration repair
The first root-PR CI run exposed stale generated database artifacts when GitHub integrated this branch with main. The Enterprise schema insertion changed SQLite catalog fingerprints and shifted the PostgreSQL state-port SQL ranges. Integrated that exact CI base (
c070b119aa11) and regenerated the canonical outputs withpnpm db:postgres:gen; no SQL translator or schema semantics changed.Secretless AWS proof reproduced the catalog failure before regeneration. After regeneration,
pnpm db:postgres:check, 13 identity/schema tests, and all 5 focused PostgreSQL 17 backup/update-recovery conformance tests passed. The local complete source delta matches the tested tree. Current-head GitHub CI is still required before landing.Contributor: @galiniliev. Review repairs requested and credited to @galiniliev.
Work sessions