feat(proxy): enforce canonical claim grammar in roles.add_claim #43

Merged
lee merged 2 commits from development_lee_claim_validator into development 2026-05-05 10:05:06 +00:00
Member

Adds claim_format::is_valid_claim — the canonical grammar checker
documented in docs/claims.md and the hero_claim_format skill (regex
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,62}(.[a-zA-Z0-9][a-zA-Z0-9_-]{0,62})*$,
total length <=255, segments <=8). Wired into roles.add_claim ahead of
the existing reserved-namespace check, so malformed strings can't
land in role_claims and lurk as dead rows. Updates docs/claims.md
to drop the "(planned)" marker.

11 unit tests cover happy path, every rejection branch, and the
boundary conditions (8 segments, 63-char segments, 255-char total).

Adds claim_format::is_valid_claim — the canonical grammar checker documented in docs/claims.md and the hero_claim_format skill (regex ^[a-zA-Z0-9][a-zA-Z0-9_-]{0,62}(\.[a-zA-Z0-9][a-zA-Z0-9_-]{0,62})*$, total length <=255, segments <=8). Wired into roles.add_claim ahead of the existing reserved-namespace check, so malformed strings can't land in role_claims and lurk as dead rows. Updates docs/claims.md to drop the "(planned)" marker. 11 unit tests cover happy path, every rejection branch, and the boundary conditions (8 segments, 63-char segments, 255-char total).
feat(proxy): enforce canonical claim grammar in roles.add_claim
All checks were successful
Build & Test / check (push) Successful in 1m46s
Build & Test / check (pull_request) Successful in 1m44s
b3fcacd695
Adds claim_format::is_valid_claim — the canonical grammar checker
documented in docs/claims.md and the hero_claim_format skill (regex
^[a-zA-Z0-9][a-zA-Z0-9_-]{0,62}(\.[a-zA-Z0-9][a-zA-Z0-9_-]{0,62})*$,
total length <=255, segments <=8). Wired into roles.add_claim ahead of
the existing reserved-namespace check, so malformed strings can't
land in role_claims and lurk as dead rows. Updates docs/claims.md
to drop the "(planned)" marker.

11 unit tests cover happy path, every rejection branch, and the
boundary conditions (8 segments, 63-char segments, 255-char total).
fix(proxy-tests): drop redundant as i64 cast on bob_id
All checks were successful
Build & Test / check (pull_request) Successful in 3m17s
Build & Test / check (push) Successful in 3m18s
e2bad93bba
Clippy 1.92 in CI flags this as unnecessary_cast (bob_id is already
i64); newer clippy in local toolchains skips it. Fix to satisfy both.
Pre-existing — not related to the claim validator change in this branch.
lee merged commit 27ec1e1a0a into development 2026-05-05 10:05:06 +00:00
lee deleted branch development_lee_claim_validator 2026-05-05 10:05:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_proxy!43
No description provided.