Files
computer-playbook/utils/cache/users
kevinveenbirkenbachandClaude Opus 5 ffbd2ce0d3 fix(users): merge per-key so two roles can register tokens for one user
The merge across every meta/users.yml compared a field as a whole. For tokens that field is a mapping whose keys are per-app entries, so two roles registering a token for the same user hit the conflict check even though the entries never overlapped: the first role to declare it won and the second aborted the deploy. sys-token-store is the sanctioned way to persist a runtime secret per app on a user, which made it usable by exactly one role.

Dict-valued fields now merge key by key. A real collision, the same sub-key with two different values, still raises, and the message names field.sub_key so a token store holding a dozen apps says which one collided.

Tests cover both paths: two roles registering distinct token keys for one user, and the same key with conflicting values.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-29 14:51:05 +02:00
..