Skip to content

Localize ID prefixes#26637

Closed
kitlangton wants to merge 1 commit into
devfrom
cleanup/localize-id-prefixes
Closed

Localize ID prefixes#26637
kitlangton wants to merge 1 commit into
devfrom
cleanup/localize-id-prefixes

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

@kitlangton kitlangton commented May 10, 2026

Summary

  • Move concrete ID prefixes to the ID type seams instead of passing logical names through Identifier.
  • Replace app Identifier.ascending(\"message\" | \"part\") calls with local MessageID / PartID constructors.
  • Leave Identifier as the low-level monotonic ID implementation that only accepts concrete prefixes.

Testing

  • bun test --timeout 5000 test/server/httpapi-query-schema-drift.test.ts test/cli/github-action.test.ts test/project/migrate-global.test.ts test/session/message-v2.test.ts
  • bun typecheck from packages/opencode
  • bun typecheck from packages/app
  • bunx prettier --check packages/opencode/src/id/id.ts packages/opencode/src/session/schema.ts packages/opencode/src/control-plane/schema.ts packages/opencode/src/permission/schema.ts packages/opencode/src/question/schema.ts packages/opencode/src/pty/schema.ts packages/opencode/src/tool/schema.ts packages/opencode/src/sync/schema.ts packages/app/src/utils/id.ts packages/app/src/components/prompt-input/submit.ts packages/app/src/components/prompt-input/build-request-parts.ts packages/app/src/pages/session.tsx
  • bunx oxlint ... (warnings only in existing app files, no errors)
  • pre-push bun turbo typecheck

Stack

@kitlangton kitlangton force-pushed the cleanup/localize-id-prefixes branch from cf67a3f to 075cbb9 Compare May 10, 2026 03:33
@kitlangton
Copy link
Copy Markdown
Contributor Author

Closing this for now. The local-prefix change is a design detour; we can revisit a cleaner shared @opencode-ai/core ID constructor seam in a separate follow-up.

@kitlangton kitlangton closed this May 10, 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