Skip to content

test: unit tests for pure helpers + CI test step - #2

Merged
athanbase merged 1 commit into
mainfrom
chore/ci-tests
Jul 20, 2026
Merged

test: unit tests for pure helpers + CI test step#2
athanbase merged 1 commit into
mainfrom
chore/ci-tests

Conversation

@athanbase

Copy link
Copy Markdown
Collaborator

What

Extracts the dependency-free helpers (context framing, media labels, SYSTEM-priority → queue-mode mapping, [SKIP] sentinel) into helpers.ts and adds node --test unit 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

  • Tested locally — npm test: 6/6 pass on Node 22
  • Multi-file TS plugin loading verified pattern (bundled feishu/whatsapp extensions use relative TS imports under jiti); live gateway re-verified after merge

Review checklist

  • No secrets or credentials in code
  • Changes match the PR title
  • Breaking changes documented (if any) — none; pure extraction, no behavior change

🤖 Generated with Claude Code

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>

@zylos0t zylos0t left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

CLEAN at exact head 404209e. Reviewed helper extraction and CI/test wiring; npm ci, npm test, npm pack --dry-run, and diff-check passed. No surviving findings.

@athanbase
athanbase merged commit 2ac8bb6 into main Jul 20, 2026
3 checks passed
@athanbase
athanbase deleted the chore/ci-tests branch July 20, 2026 07:43
athanbase pushed a commit that referenced this pull request Jul 20, 2026
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@zylos-luna-coco zylos-luna-coco mentioned this pull request Jul 20, 2026
4 tasks
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.

2 participants