Skip to content

2026.08.23 - DCP Reliability Troubleshooting - Phase 4: Message-ID Sanitization - #59

Merged
lanhhoang merged 4 commits into
masterfrom
20260823-dcp-reliability-troubleshooting-phase-04-message-id-sanitization
Aug 24, 2026
Merged

2026.08.23 - DCP Reliability Troubleshooting - Phase 4: Message-ID Sanitization#59
lanhhoang merged 4 commits into
masterfrom
20260823-dcp-reliability-troubleshooting-phase-04-message-id-sanitization

Conversation

@lanhhoang

Copy link
Copy Markdown
Contributor
  • Add two narrow, ordered rules to stripHallucinationsFromString that 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 both dcp and the observed dpc transposition; preserves m0001abc, prose after orphan references, and non-m#### payloads (src/messages/strip.ts).
  • Add focused regressions covering the observed 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).
  • Add a message_end handler regression that drives the registered boundary through the actual handler in src/index.ts (no duplicate mapText() case in tests/message-end.test.ts) (tests/index.test.ts).
  • Replace the prior pipeline hallucination test with one that asserts the persisted m0112</dpc-message-id> suffix is sanitized before canonical injection, leaving exactly one <dcp-message-id> tag and the correct m0002 ref (tests/pipeline.test.ts).

Verified end-to-end with the previous committed changes via pnpm check (471/471 tests) on commit da6ebbcc2557e6e07372dafc87dc6e7fe57a68c9.

@lanhhoang
lanhhoang merged commit 1986425 into master Aug 24, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant