Skip to content

feat(id): brand PermissionID, PtyID, QuestionID, and ToolID#17042

Merged
kitlangton merged 6 commits intodevfrom
feat/branded-remaining-ids
Mar 12, 2026
Merged

feat(id): brand PermissionID, PtyID, QuestionID, and ToolID#17042
kitlangton merged 6 commits intodevfrom
feat/branded-remaining-ids

Conversation

@kitlangton
Copy link
Contributor

@kitlangton kitlangton commented Mar 11, 2026

Stacked on #16966 (PartID).

Summary

  • Introduce Effect branded PermissionID, PtyID, QuestionID, and ToolID types with schema helpers
  • Replace all remaining Identifier.schema() and Identifier.ascending() usages with branded equivalents
  • Update route validators and tests to use branded IDs end-to-end

Test plan

  • bun turbo typecheck passes
  • bun test passes

@kitlangton kitlangton force-pushed the feat/branded-part-id branch from 6e18851 to aba9bb0 Compare March 11, 2026 13:55
@kitlangton kitlangton force-pushed the feat/branded-remaining-ids branch from 05e0e5b to 42df6d3 Compare March 11, 2026 14:01
@kitlangton kitlangton changed the title feat(id): brand remaining permission, pty, question, and tool IDs feat(id): brand PermissionID, PtyID, QuestionID, and ToolID Mar 11, 2026
@kitlangton kitlangton force-pushed the feat/branded-part-id branch from aba9bb0 to 484a3c7 Compare March 11, 2026 23:08
@kitlangton kitlangton force-pushed the feat/branded-remaining-ids branch from 42df6d3 to 9b7a3f0 Compare March 11, 2026 23:08
@kitlangton kitlangton force-pushed the feat/branded-part-id branch from 484a3c7 to 7476637 Compare March 11, 2026 23:21
@kitlangton kitlangton force-pushed the feat/branded-remaining-ids branch from 9b7a3f0 to 6d948bf Compare March 11, 2026 23:21
@kitlangton kitlangton force-pushed the feat/branded-part-id branch from 7476637 to 0cdc6f0 Compare March 11, 2026 23:31
@kitlangton kitlangton force-pushed the feat/branded-remaining-ids branch from 6d948bf to 753f330 Compare March 11, 2026 23:31
Base automatically changed from feat/branded-part-id to dev March 11, 2026 23:40
@kitlangton kitlangton enabled auto-merge (squash) March 11, 2026 23:43
@kitlangton kitlangton disabled auto-merge March 11, 2026 23:50
@kitlangton kitlangton enabled auto-merge (squash) March 12, 2026 00:34
@kitlangton kitlangton disabled auto-merge March 12, 2026 00:53
… IDs

The branded-remaining-ids PR changed these prefixes from their original
values (per, que, tool) to shortened versions (prm, qst, tol). This
would break validation of any existing IDs already persisted in the
database, since the Zod .startsWith() validators would reject them.
The glob was changed from "tool_*" to "tol_*" alongside the prefix
typo, causing cleanup to silently skip all truncated output files.
…refixes

All branded ID schemas now derive their .startsWith() validation from
Identifier.schema(key) instead of hardcoding prefix strings. This
makes it impossible for schema validation to drift from the canonical
prefix definitions in id.ts.
Schema.brand("SessionId") → Schema.brand("SessionID"), etc.
Brand tags now match their export names consistently.
@kitlangton kitlangton force-pushed the feat/branded-remaining-ids branch from 19452df to 562689c Compare March 12, 2026 00:59
@kitlangton kitlangton enabled auto-merge (squash) March 12, 2026 01:49
@kitlangton kitlangton merged commit 2a4dedc into dev Mar 12, 2026
14 of 16 checks passed
@kitlangton kitlangton deleted the feat/branded-remaining-ids branch March 12, 2026 01:49
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 19, 2026
demostanis pushed a commit to demostanis/opencode that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant