feat: expand message ref format from 4-digit to 5-digit (9999→99999)#1
Merged
Conversation
- MESSAGE_REF_WIDTH: 4 → 5
- MESSAGE_REF_MAX_INDEX: 9999 → 99999
- MESSAGE_REF_REGEX: /^m(\d{4})$/ → /^m(\d{4,5})$/ (backward compat)
- All test files updated to 5-digit format (m00001, m00002, etc.)
- Added boundary tests for 99999 and 100000
- Kept 4-digit backward compat parse tests (m0001 still resolves)
Critical fixes: - state.ts: migrate 4-digit refs (m0001) to 5-digit (m00001) during state loading Fixes lookup failure when parseBoundaryId normalizes old refs - compress-message.ts: restore XML tag template (accidentally destroyed in prior edit) - prompts/tool descriptions: mNNNN → mNNNNN in all LLM-visible text - Error messages: mNNNN → mNNNNN in search.ts and message-utils.ts - message-ids.ts: error message range 0-99999 → 1-99999 - AGENTS.md: fix duplicate section 5.3 numbering, mNNNN → mNNNNN Tests: +4 backward compat tests (350 total, 0 failures)
33bc110 to
5e54496
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
m0001(4-digit, max 9,999) tom00001(5-digit, max 99,999)/^m(\d{4,5})$/accepts both old 4-digit and new 5-digit refsChanges
lib/message-ids.ts:MESSAGE_REF_WIDTH4→5,MESSAGE_REF_MAX_INDEX9999→99999, regex accepts 4-5 digitsm0001→m00001format referencesAGENTS.md: added mandatory dual-agent review for code + tests, PR workflowTest Results
346/346 tests pass, typecheck clean
Review Checklist
as anyor type suppression