Conversation
Extract duplicated test utilities into a reusable test_harness.mjs module to eliminate ~200-250 lines of boilerplate code across test files. Changes: - Create skills/clawsec-suite/test/lib/test_harness.mjs with: - Test reporting: pass(), fail(), report(), exitWithResults() - Crypto utilities: generateEd25519KeyPair(), signPayload() - Temp directory: createTempDir() with cleanup - Environment helpers: withEnv() for isolated env vars - Test runner factory: createTestRunner() for isolated counters - Refactor 9 test files to use shared harness: - feed_verification.test.mjs - guarded_install.test.mjs - skill_catalog_discovery.test.mjs - advisory_suppression.test.mjs - advisory_application_scope.test.mjs - path_resolution.test.mjs - fuzz_properties.test.mjs - suppression_config.test.mjs - render_report_suppression.test.mjs Benefits: - Single source of truth for test utilities - Consistent test reporting across all files - Easier to add new test files - Reduced maintenance burden Verification: - All 80 tests pass (15+8+3+15+4+6+1+17+11) - Zero ESLint warnings - No behavior changes - only code deduplication - Cross-skill module sharing works (openclaw-audit-watchdog → clawsec-suite) Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
…ct-shared-test-harness-module-from-9-test-fil
…ties Bump minimatch from 10.2.1 to 10.2.4 in overrides to fix 10 high-severity ReDoS vulnerabilities (GHSA-7r86-cg39-jmmj, GHSA-23c5-xmqv-rm74). Also add .venv/ to ESLint ignores to prevent linting Python venv files. Co-Authored-By: Claude Opus 4.6 <[email protected]>
davida-ps
added a commit
that referenced
this pull request
Feb 27, 2026
Merge origin/main into feature branch to incorporate latest changes: - Extract Shared Test Harness Module (#85) - Fix poll-nvd PR auth (#86) Resolved conflicts in .gitignore (Auto Claude entries). QA Fix Session: 0 Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
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.
User description
Opener Type
Summary
Extracted shared test harness module to eliminate code duplication across 9 test files. Created
skills/clawsec-suite/test/lib/test_harness.mjsproviding centralized pass()/fail() reporting, counter tracking, summary reporting with process.exit, Ed25519 key generation, and payload signing utilities.Changes Made
skills/clawsec-suite/test/lib/test_harness.mjs.gitkeepfile to establishtest/lib/directoryRelated Issues
Type of Change
Testing
Test harness module extracted from existing test implementations that are already in use. All 9 affected test files maintain identical test logic and reporting behavior through import of shared utilities.
Checklist
Generated description
Below is a concise technical summary of the changes proposed in this PR:
Refactor the test suite by centralizing common utilities into a new
test_harness.mjsmodule, eliminating code duplication across nine test files inclawsec-suiteandopenclaw-audit-watchdog. Additionally, update development environment configurations and dependencies to improve project maintainability and security.Modified files (4)
Latest Contributors(2)
clawsec-suiteandopenclaw-audit-watchdogby extracting common functions like test reporting, temporary directory management, cryptographic key generation, and environment variable isolation into a newtest_harness.mjsmodule, thereby eliminating code duplication and improving test suite maintainability.Modified files (11)
Latest Contributors(2)