Skip to content

refactor: share runtime id generation#173

Open
Genmin wants to merge 1 commit into
lorenzh:mainfrom
Genmin:refactor/runtime-generate-id
Open

refactor: share runtime id generation#173
Genmin wants to merge 1 commit into
lorenzh:mainfrom
Genmin:refactor/runtime-generate-id

Conversation

@Genmin
Copy link
Copy Markdown

@Genmin Genmin commented Apr 29, 2026

Summary

  • add a shared runtime generateId() helper
  • use it for message IDs and crash-record filename suffixes
  • export the helper from the runtime package
  • add focused coverage for the 16-character lowercase hex contract

Closes #61

Validation

  • temp-installed TypeScript/Bun types: tsc -p packages/runtime/tsconfig.json --noEmit
  • temp-installed Biome: biome check packages/runtime/src/id.ts packages/runtime/src/id.test.ts packages/runtime/src/message.ts packages/runtime/src/crash.ts packages/runtime/src/index.ts
  • git diff --check

Note

  • Bun is not installed in this local environment, so I could not run bun test; the added test follows the existing bun:test style and is covered by typecheck.

@Hilo-re Hilo-re added enhancement New feature or request scope:runtime packages/runtime priority:low Nice to have, can be deferred labels Apr 29, 2026
Copy link
Copy Markdown
Collaborator

@Hilo-re Hilo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean extraction. Same logic, zero duplication — exactly what the issue asked for. We'll confirm bun test passes on our end before merging.

Copy link
Copy Markdown
Collaborator

@Hilo-re Hilo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks right — clean extraction, test follows the existing pattern, export placed correctly in index.ts. One thing before I merge: can you confirm bun test passes locally? The CI doesn't gate on it, but the project relies on Bun for testing and it's worth verifying the new test actually runs.

@Hilo-re
Copy link
Copy Markdown
Collaborator

Hilo-re commented May 9, 2026

Missed that you already noted Bun isn't available locally — that's fine. We'll run the tests on our end before merging. Should be quick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority:low Nice to have, can be deferred scope:runtime packages/runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: extract shared generateId() utility

2 participants