feat(metering): count module users per tenant and month (t81, part 1) #136

Merged
sharang merged 4 commits from feat/module-user-count into main 2026-11-17 09:01:55 +00:00
4 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 9af0d9f8e1 test(metering): low-entropy token sentinel for gitleaks
ci / shared (pull_request) Successful in 14s
ci / test (pull_request) Successful in 7m23s
ci / image (pull_request) Skipped
The first sentinel looked like an API key to gitleaks' generic rule. It
is a test value; its fingerprint goes into .gitleaksignore since the
commit is already pushed.

Refs: t81

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:32:59 +01:00
Sharang ParnerkarandClaude Opus 5.5 692a9dd378 feat(metering): count module users per tenant and month
ci / test (pull_request) Failing after 26s
ci / image (pull_request) Skipped
ci / shared (pull_request) Failing after 3s
Daily Europe/Berlin job: Managed Git = members signed in to the tenant's
active instances; Werkpilot/Firmwerk = people with their own licence in
use in the month. Staff PUT for the Gitea admin token, staff and tenant
reads of the month's counts, POST /v1/internal/module-users/count on
demand (route group module-users). No invoicing yet (t72).

Refs: t81

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:28:20 +01:00
Sharang ParnerkarandClaude Opus 5.5 f9ada789ea feat(gitea): list the users of a managed git instance
GET /api/v1/admin/users with a read:admin token in the Authorization
header, paged until an empty page. Errors carry no body, URL or token.

Refs: t81

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:28:20 +01:00
Sharang ParnerkarandClaude Opus 5.5 7b9ae37be7 feat(store): module user counts and sealed git admin token (0031)
Migration 0031 adds managed_services.admin_token_enc (sealed, write-only),
module_user_days (Managed Git daily counts, month = peak day) and
module_users_seen (Werkpilot/Firmwerk people per month). Postgres and
Memory stores implement both.

Refs: t81

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 09:28:20 +01:00