Skip to content

Archive inactive tribes#2799

Open
caydyan wants to merge 1 commit into
stakwork:masterfrom
caydyan:codex/archive-inactive-tribes
Open

Archive inactive tribes#2799
caydyan wants to merge 1 commit into
stakwork:masterfrom
caydyan:codex/archive-inactive-tribes

Conversation

@caydyan

@caydyan caydyan commented Jun 14, 2026

Copy link
Copy Markdown

Summary

  • add a daily inactive-tribe archive job that unlists tribes whose recorded last_active is older than the configured cutoff
  • default the cutoff to 30 days and allow TRIBE_ARCHIVE_AFTER_DAYS to override it, with non-positive values disabling the job
  • only archive listed, non-deleted tribes with last_active > 0 so legacy rows without activity data are not hidden blindly
  • add regression coverage for stale, recent, legacy, already-unlisted, and deleted tribes
  • update the generated database mock for existing GetBountyByUnlockCode interface compatibility so package tests compile

Fixes #292
Fixes #293

Validation

  • go test ./... -run '^$'
  • git diff --check
  • go test ./db -run TestArchiveInactiveTribes -count=1 could not run locally because the documented test Postgres at localhost:5532 was unavailable; attempts to start docker/testdb-docker-compose.yml failed because Docker could not start Postgres containers in this environment.

BTC payout address: bc1qev5ant33v5y89qqjvcf4mh9hlax5svqf5xd7gc

@caydyan

caydyan commented Jun 14, 2026

Copy link
Copy Markdown
Author

Current-head validation rerun on e95bfc8:

  • go test ./... -run '^$' passes across packages as a compile/no-test sweep
  • git diff --check origin/master...HEAD passes

I also attempted the focused DB regression test:

  • go test ./db -run TestArchiveInactiveTribes -count=1 -v

That test is still blocked locally because the documented test Postgres is not running on localhost:5532 (connect: connection refused). The repo README points this path at docker compose -f docker/testdb-docker-compose.yml -p test_db up -d; Docker is installed here, but the local Docker daemon API currently returns a 500 on docker ps, so I could not bring up the test DB in this environment. No touched-file compile diagnostic was reported by the passing package compile sweep.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tribe archive feature $@200,000 Tribe archive feature $@200,000

1 participant