Skip to content

Conversation

@jdoucett
Copy link
Contributor

Fix: verify_target tiers typed holds (composition bug from merging #21 + #22)

Merging slice-3 (#21, verify_target) and typed holds (#22) composed a latent bug:
#22 makes load_holds return typed dict entries, but verify_target still did inline
string matching (h in source_folder), which raises TypeError on a dict hold. So
verify_target would crash on any routed target the moment a reclaim_holds.json is used.
Legacy .txt (string) holds are unaffected, which is why the merged 235-test suite stayed
green and it went unseen.

Fix: route verify_target through the same hold_entry_for + classify_hold helpers
verify() uses, so routed targets get the full business / promote-pending / superseded
tiering (HOLD / AWAITING-APPROVAL) instead of a flat, crash-prone string match.

Tests (+3): verify_target under a business dict hold → HOLD; promote-pending no-receipt →
HOLD; promote-pending valid-receipt → AWAITING-APPROVAL. Suite 235 → 238.

Base main, not stacked. This is the "apply tiering to verify_target once #21 lands"
follow-up I flagged — closing it now so main is correct before anyone deploys JSON holds.

🤖 Generated with Claude Code

…holds)

Merging slice-3 (#21, verify_target) and typed holds (#22) composed a latent bug: #22 makes
load_holds return typed dict entries, but verify_target still did inline string matching
(h in source_folder), which raises TypeError on a dict hold — i.e. verify_target would crash
on any routed target the moment a reclaim_holds.json is used. Legacy .txt (string) holds were
unaffected, so the merged suite stayed green and it went unseen.

Route verify_target through the same hold_entry_for + classify_hold helpers verify() uses, so
routed targets get the full business/promote-pending/superseded tiering (HOLD / AWAITING-
APPROVAL) instead of a flat crash-prone string match. Tests: verify_target under a business
dict hold -> HOLD, promote-pending no-receipt -> HOLD, promote-pending valid-receipt ->
AWAITING-APPROVAL. Suite 235 -> 238.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jdoucett Jarrod S Doucette (jdoucett) deleted the fix/verify-target-typed-holds branch July 10, 2026 02:25
Sign in to join this conversation on GitHub.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant