Skip to content

fix: resolve short board IDs, 24-char list names, and unhandled FileNotFoundError#1

Open
alexprivalov wants to merge 2 commits into
OG-Drizzles:mainfrom
alexprivalov:main
Open

fix: resolve short board IDs, 24-char list names, and unhandled FileNotFoundError#1
alexprivalov wants to merge 2 commits into
OG-Drizzles:mainfrom
alexprivalov:main

Conversation

@alexprivalov
Copy link
Copy Markdown

Summary

  • init now canonicalizes board IDs: when a Trello short link (e.g. 6WMY6Kls) is passed via --board-id, init resolves it to the full 24-char hex ID via the API. Previously, the short link was stored verbatim, causing all write operations (POST/PUT) to fail with 400 Bad Request since Trello only accepts full IDs for mutations.

  • resolve_list_id / resolve_card_id now validate hex format: both functions assumed any 24-character string was a Trello ID, but a list name that happens to be exactly 24 characters (e.g. "Phase 6: Build in Public") would bypass the DB lookup and be used as a raw ID. Cards created in such lists got the list name stored as their list_id, causing push to fail with 400.

  • handle_resolve_errors now catches FileNotFoundError: sub-commands (card, checklist, comment, list) would dump a full traceback when no active board was set. Now they print a clean error message and exit with code 1.

Test plan

  • All 337 existing tests pass
  • Verified trache list create works after board ID canonicalization
  • Verified cards in a 24-char-named list push successfully after hex validation fix

alexprivalov and others added 2 commits May 18, 2026 00:02
Two bugs fixed:

1. handle_resolve_errors decorator didn't catch FileNotFoundError, so
   commands like `card list` would dump a full traceback when no active
   board was set instead of printing a clean error message.

2. `trache init --board-id` accepted Trello short links (e.g. 6WMY6Kls)
   but stored them verbatim. Trello GET endpoints accept short links but
   POST/PUT require the full 24-char ID, causing all write operations to
   fail with 400 Bad Request. Now init canonicalizes to the full ID via
   the API response.
Both functions assumed any 24-character string was a Trello ID, but
Trello IDs are specifically 24-char lowercase hex strings. A list name
that happened to be exactly 24 characters (e.g. "Phase 6: Build in
Public") would be returned as-is instead of being looked up, causing
cards to be stored with the list name as their list_id. This made all
writes to that list fail with 400 Bad Request from the Trello API.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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