2026.08.23 - DCP Reliability Troubleshooting - Phase 4: Message-ID Sanitization - #59
Merged
lanhhoang merged 4 commits intoAug 24, 2026
Conversation
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.
stripHallucinationsFromStringthat catch bounded DCP message-ID fragments before lone-tag cleanup runs: a suffix-or-pair rule (<dcp|dpc>-message-id(optional) +m\d{4,}+</dcp|dpc-message-id>) and an orphan-opening rule (<dcp|dpc>-message-id+m\d{4,}+ word boundary). Recognizes bothdcpand the observeddpctransposition; preservesm0001abc, prose after orphan references, and non-m####payloads (src/messages/strip.ts).m0112</dpc-message-id>suffix, bounded suffixes and transposed pairs, orphan references, prose preservation, ambiguous payloads (discussion,m0001abc), and idempotence for malformed references (tests/strip.test.ts).message_endhandler regression that drives the registered boundary through the actual handler insrc/index.ts(no duplicatemapText()case intests/message-end.test.ts) (tests/index.test.ts).m0112</dpc-message-id>suffix is sanitized before canonical injection, leaving exactly one<dcp-message-id>tag and the correctm0002ref (tests/pipeline.test.ts).Verified end-to-end with the previous committed changes via
pnpm check(471/471 tests) on commitda6ebbcc2557e6e07372dafc87dc6e7fe57a68c9.