test: unit tests for pure helpers + CI test step - #2
Merged
Conversation
Per repo policy every codebase needs an automated-test workflow; the Quality Gate previously only built. Context framing, media labels, priority→queue-mode mapping, and the [SKIP] sentinel move to a dependency-free helpers.ts (multi-file TS plugins are supported — the bundled feishu/whatsapp extensions do the same) so they run under node --test without the OpenClaw host, covering: structural-breakout escaping (incl. double-escape idempotence), group/quote/smart-hint framing, file-name label escaping, the SYSTEM-priority mapping table, and [SKIP] matching. CI Quality Gate now runs npm test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
athanbase
pushed a commit
that referenced
this pull request
Jul 20, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What
Extracts the dependency-free helpers (context framing, media labels, SYSTEM-priority → queue-mode mapping,
[SKIP]sentinel) intohelpers.tsand addsnode --testunit tests (6 cases) wired into the Quality Gate.Why
Repo policy requires an automated-test workflow in CI; the Quality Gate previously only ran a build. The extracted functions are the security/behavior-critical pure logic (structural-breakout escaping, priority forgery mapping bounds).
Test
npm test: 6/6 pass on Node 22Review checklist
🤖 Generated with Claude Code