Skip to content

Mint new hunt IDs in the legacy HNNN format (+ migrate 4 strays)#296

Merged
triw0lf merged 1 commit into
mainfrom
fix/hunt-id-old-format
Jun 25, 2026
Merged

Mint new hunt IDs in the legacy HNNN format (+ migrate 4 strays)#296
triw0lf merged 1 commit into
mainfrom
fix/hunt-id-old-format

Conversation

@triw0lf

@triw0lf triw0lf commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Problem

The auto-draft generators had started minting year-based IDs (H-2026-001, H-2026-002, …) that ignored the catalog's existing H001–H199 sequence. So new auto-intel and submission hunts looked nothing like the 200 hunts already in the repo, and the year-format allocator restarted at 001 each time.

Fix

New hunts now continue the legacy HNNN sequence (next is H204), matching the whole catalog:

  • generate_from_cti.py (auto-intel) and process_hunt_submission.py (form submissions): mint H{NNN} / B{NNN} / M{NNN}, and their allocators read old-format files (^H\d+$) instead of only the year format. Removed a duplicated, year-only number block in the CTI script.
  • Latent bug fixed: the submission script minted Alchemy as A###, but the catalog uses M###. Now M.
  • hunt_ids.py + reassign_hunt_id.py (collision tooling): switched to the HNNN format. check_hunt_id_collisions.py needed no change (format-agnostic).
  • Migrated the 4 strays: H-2026-001..004 → H200..H203 (rename + heading rewrite via the existing rewrite_hunt_id helper), and regenerated public/hunts-data.json, hunts-data.js, public/actor-mentions.json.

The 200 existing hunts are untouched.

Verification

  • Baseline audit: H001–H199 contiguous (no gaps/dups); no A### strays; no other H-2026 refs anywhere in tracked files.
  • pytest scripts/tests/test_hunt_ids.py9/9 (updated for the new format).
  • Allocators confirmed against the real tree → next IDs H204 / B027 / M023.
  • git grep H-2026 → clean. database/hunts.db (gitignored) regenerated locally to confirm: hunt_id rows now H200–H203, zero H-2026. The update-hunt-database workflow rebuilds it on merge.

🤖 Generated with Claude Code

…rays

The auto-draft generators (generate_from_cti.py, process_hunt_submission.py) had started minting year-based IDs (H-2026-001…) that ignored the existing H001–H199 sequence, so new auto-intel/submission hunts looked nothing like the catalog.

- Generators now continue the legacy sequence: Flames HNNN, Embers BNNN, Alchemy MNNN (next is H204). Their allocators read old-format files instead of only the year format.
- Fixed a latent bug: the submission script minted Alchemy as 'A' though the catalog uses 'M'.
- hunt_ids.py / reassign_hunt_id.py (collision tooling) switched to the HNNN format; tests updated (9 passing).
- Migrated the 4 existing strays: H-2026-001..004 -> H200..H203 (rename + heading), and regenerated hunts-data.json / hunts-data.js / actor-mentions.json. The 200 existing hunts are untouched.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@triw0lf triw0lf merged commit 54c3b88 into main Jun 25, 2026
2 checks passed
@triw0lf triw0lf deleted the fix/hunt-id-old-format branch June 25, 2026 00:26
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.

1 participant