Closed general

activity verbs: read the private commit feed, claim identities, admin repos and sync

Colby Knox · 1mo ago ·closed by Colby Knox

The wiki has a private, author-scoped commit activity feed (adom/wiki#207, on prod). Routes to wrap:

  • GET /api/users/:handle/activity?range=week|last-week|7d|30d|90d or since=YYYY-MM-DD&until=YYYY-MM-DD, &repo=owner/name, &format=md. :handle may be me. Owner or admin only (404 ACTIVITY_PRIVATE otherwise). JSON: { handle, range, total, repos[{repo,count,first,last,page}], commits[{repo,sha,short,branch,committed_at,title,message,files,url,page}], identities, ingest, markdown, hint? }.
  • GET|POST|DELETE /api/users/:handle/activity/identities body { kind: "github_login"|"email", value } (201 on add with backfilled; 409 IDENTITY_TAKEN; 400 on a malformed value).
  • Admin: GET /api/admin/activity, POST|DELETE /api/admin/activity/repos { repo, page?, enabled?, purge? }, POST /api/admin/activity/sync.

Asks:

  • adom-wiki activity [--range <key> | --since <day> --until <day>] [--repo <owner/name>] [--md] [--user <handle>]: default range last-week; table grouped by repo (date, short sha, title); --md prints the server's Markdown report verbatim (it is the weekly-report shape); --json passthrough.
  • adom-wiki activity claim <github-login> and adom-wiki activity claim --email <addr> (POST identities on me), activity identities (list), activity unclaim.
  • Admin: adom-wiki activity repos [--add owner/name [--page owner/slug]] [--remove owner/name [--purge]], adom-wiki activity sync.
  • Pass through the hints: ACTIVITY_INGEST_UNCONFIGURED, ACTIVITY_UNRESOLVED_AUTHORS (print the unattributed logins and the claim command), ACTIVITY_SOURCE_LINKED (already rides push/publish responses).

Docs: docs/activity-feed.md and the API reference "Commit activity" section in the git-wiki repo.

2 Replies

Colby Knox · 1mo ago

Correction: the feed does not touch GitHub at all (Colby's call). It is built from this wiki's own page repos: pushes are attributed to the pusher as they land, publish and merge commits likewise, and a sweep attributes older history by author email. So:

  • Drop the activity claim <github-login>, activity repos and activity sync asks.
  • Keep adom-wiki activity [--range <key> | --since <day> --until <day>] [--page <owner/slug>] [--md] [--user <handle>] (default last-week; grouped by PAGE, columns date, short sha, title; --md prints the server's report verbatim).
  • Identities are emails only: adom-wiki activity claim --email <addr>, activity identities, activity unclaim --email <addr> (POST|GET|DELETE /api/users/me/activity/identities { "kind": "email", "value" }).
  • Admin: adom-wiki activity sweep wraps POST /api/admin/activity/sweep; GET /api/admin/activity returns { totals, pages[], unresolved[] }.
  • Hints to pass through: ACTIVITY_PRIVATE (404), ACTIVITY_UNRESOLVED_AUTHORS (print the unattributed emails and the claim command), IDENTITY_TAKEN (409).

The JSON shape: { handle, range, total, pages[{page,title,count,first,last}], commits[{page,sha,short,branch,committed_at,title,message,files,url,source,author}], identities, markdown, hint? }.

Colby Knox · 1mo ago

Shipped in adom-wiki 1.7.44 (latest; all five platforms present, gate green), matching the corrected spec:

  • adom-wiki activity [--range week|last-week|7d|30d|90d | --since <day> --until <day>] [--page <owner/slug>] [--md] [--user <handle>]: default last-week, grouped by page with date / short sha / title; --md prints the server's text/markdown weekly report verbatim; --json passthrough of the envelope. The filter is page= (the server ignores repo=, checked).
  • Identities are emails: activity claim --email <addr>, activity identities, activity unclaim --email <addr>. Round-tripped live on prod with a throwaway address (201 with backfilled, listed, removed, list empty again). The unclaim hint echoes the server's semantics: future commits stop attributing, already-attributed ones stay.
  • Admin: activity overview renders totals, per-page counts and the unattributed author emails with the claim command as an ACTIVITY_UNRESOLVED_AUTHORS hint; activity sweep runs the attribution sweep now (synchronous; prints scanned/inserted).
  • ACTIVITY_PRIVATE (404, verified on a foreign handle) and IDENTITY_TAKEN (409) render through the coded passthrough. The bundled SKILL.md gained an Activity section.

Release note for the record: the self-hosted linux runners never picked up the v1.7.44 legs (offline on GitHub's side while connected on ours), so linux/arm64 was cross-built here at the tag with the same gcc-aarch64-linux-gnu toolchain CI uses, executed under qemu-user to prove it (reports 1.7.44 and completes a live authenticated call to prod), and uploaded under CI's asset name; the gate then mirrored and published normally. The other four platforms are CI-built as usual.

Log in to reply.