Skip to content

Expose stored social verification evidence in the admin CLI - #214

Merged
gianfrancopiana merged 3 commits into
mainfrom
feat/admin-social-connections
Sep 8, 2026
Merged

Expose stored social verification evidence in the admin CLI#214
gianfrancopiana merged 3 commits into
mainfrom
feat/admin-social-connections

Conversation

@gumclaw

@gumclaw gumclaw commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

What

Adds gumroad admin users social-connections, a read-only view of the existing internal admin endpoint. Shows whether each connection is currently linked, when it was verified, account/post history, and shared-identity count. Unknown audience counts stay distinct from zero. JSON/JQ preserve the full server response; plain output has a documented column order.

This is one reviewer-tooling slice of https://github.com/antiwork/gumroad-private/issues/2371, not completion of that tracker. It does not add onboarding prompts, expose shadow scores, refresh providers, change eligibility, or release payouts.

Why

Social verification is already collected and exposed by the Rails API, but the CLI had no command to read it. Reusing the existing admin client avoids a parallel authorization or scoring implementation. Disconnected historical evidence is explicitly not presented as a current connection or payout approval.

Before/After

Recorded real main/branch binaries against a local API fixture matching the Rails serializer; no production accounts or writes. Main rejects the command; the branch renders disconnected evidence, unknown followers, zero posts, and shared identity. The recording was inspected by frame extraction and OCR. This is a CLI flow, not a hosted web UI.

gp2371-demo.mp4

Test Results

  • make test-cover GOFLAGS=-p=1 — full suite and all coverage gates pass; admin users coverage 86.4%.
  • CI-pinned golangci-lint v1.64.8, gofmt and diff checks pass.
  • New command tested through all three lookup flags, JSON/JQ/plain/quiet output, unknown versus zero counts, empty results, target validation, server errors, and control-character escaping.
  • Mutation proof: forcing a disconnected identity to render as linked fails all three lookup cases; source restored byte-for-byte.
  • Development review and final Astra+Fable code/specs/comments/evidence audit completed. Earlier coverage findings and the redundant comment were fixed.
  • Current-head build/test CI: five successful checks, none pending or failed; Tastelint passes. A fresh Greptile pass is pending after the final push.
  • Gianfranco: review the risk-evidence presentation and merge/release decision. Auto-merge is off because this output informs payout-hold reviews.

The initial parallel suite hit timeout-sensitive media-upload tests; the same failure reproduced on unchanged main. Serial package execution passed the complete suite without changing those tests. The command recording remains current: later commits only strengthen tests and remove a comment.

QA steps

Run gumroad admin users social-connections --help, then use an authorized existing admin lookup with --json to inspect stored evidence. Compare currently_linked, verification timestamps, nullable counts and shared identities against the same server response in human/plain modes. This does not fetch fresh provider data, expose shadow scores, approve sellers or release payouts.

Premerge review: clean @ a5cd844


AI-assisted with OpenAI GPT-6 Astra via Hermes. Instructions: drain qualifying backlog, make verified social evidence available to risk reviewers through the CLI, preserve read-only scope and unknown/current-link distinctions, add tests and real command evidence. No automatic payout release or rollout changes.

gp2371-tests

Co-authored-by: Sahil Lavingia <sahil@gumroad.com>
@gumclaw gumclaw self-assigned this Sep 8, 2026
@greptile-apps

greptile-apps Bot commented Sep 8, 2026

Copy link
Copy Markdown

Greptile Summary

This PR adds a read-only administrative command for inspecting stored social-verification evidence while preserving the API response for structured consumers.

  • Registers admin users social-connections with email, user-ID, and username lookup support.
  • Distinguishes unknown audience counts from zero and clearly separates historical evidence from current linkage or payout approval.
  • Supports human, plain, quiet, JSON, and JQ output modes with control-character-safe rendering.
  • Documents the command for agent-driven use and adds coverage for lookup, output, validation, and server-error behavior.

Confidence Score: 5/5

The PR appears safe to merge; no actionable correctness, security, or repository-rule violations remain.

The new command stays on the shared authenticated admin read path, preserves raw JSON and JQ responses, safely renders plain and human output, and maintains the distinctions between unknown counts, zero counts, historical evidence, and current linkage. The previous explanatory-comment finding was manually resolved and the comment is absent from the current code.

Important Files Changed

Filename Overview
internal/cmd/admin/users/social_connections.go Implements the read-only social-evidence request and safe rendering across supported output modes.
internal/cmd/admin/users/social_connections_test.go Covers all lookup forms, structured and human output, nullable counts, escaping, empty results, and failures.
internal/cmd/admin/users/users.go Registers the new command in the administrative users command group.
skills/gumroad/SKILL.md Documents the response path, safety boundaries, nullable values, and plain-output column order.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Operator[Admin operator] --> Command[admin users social-connections]
  Command --> Lookup[Validate user lookup]
  Lookup --> Runner[Shared admin read runner]
  Runner --> API[Internal admin API]
  API --> Response[Stored social evidence]
  Response --> Structured[JSON or JQ response]
  Response --> Plain[Escaped tab-separated row]
  Response --> Human[Labeled evidence view]
Loading

Reviews (2): Last reviewed commit: "Remove redundant renderer comment" | Re-trigger Greptile

Comment thread internal/cmd/admin/users/social_connections.go Outdated
@gumclaw
gumclaw marked this pull request as ready for review September 8, 2026 00:56
@gumclaw gumclaw added the awaiting-human Waiting on a human response/decision; assignee is that human label Sep 8, 2026
@gumclaw gumclaw assigned gianfrancopiana and unassigned gumclaw Sep 8, 2026
@tastelint

tastelint Bot commented Sep 8, 2026

Copy link
Copy Markdown

Tastelint

The only screenshot is terminal test-runner output, not a user interface, so there is nothing here for me to review visually.

@gianfrancopiana
gianfrancopiana merged commit ea126f7 into main Sep 8, 2026
7 checks passed
@gianfrancopiana
gianfrancopiana deleted the feat/admin-social-connections branch September 8, 2026 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting-human Waiting on a human response/decision; assignee is that human

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants