test: add tests for strategy, validationReport, and envFingerprint#139
Closed
voidborne-d wants to merge 1 commit intoEvoMap:mainfrom
Closed
test: add tests for strategy, validationReport, and envFingerprint#139voidborne-d wants to merge 1 commit intoEvoMap:mainfrom
voidborne-d wants to merge 1 commit intoEvoMap:mainfrom
Conversation
Add 45 new tests covering three previously untested modules: strategy.js (15 tests): - All preset definitions and required fields - Ratio sum validation (repair + optimize + innovate = 1.0) - EVOLVE_STRATEGY env var handling - FORCE_INNOVATION backward compatibility - Auto-detection and signal-based strategy switching - Unknown strategy fallback validationReport.js (20 tests): - Report construction with minimal and full inputs - overall_ok logic (all pass, any fail, empty results) - Duration computation from timestamps - Output truncation at 4000 chars - Field name compatibility (out/stdout, err/stderr) - Command inference from results - Custom environment fingerprint injection - isValidValidationReport validation envFingerprint.js (10 tests): - Fingerprint structure and field types - Hostname and cwd hashing (12-char SHA256 prefix) - Consistency across calls - Key generation (16-char hex) - Null/invalid input handling - Same environment class comparison All 158 tests pass (113 existing + 45 new).
Collaborator
|
Thank you for this contribution! 45 well-structured tests covering three previously untested modules is a significant improvement to the project's test coverage (113 -> 158 tests). Your changes have been merged into the main codebase with full author credit preserved. They will appear in the public repo with the next release. |
fmw666
pushed a commit
that referenced
this pull request
Mar 11, 2026
…om PR #139) - strategy.js: 15 tests covering presets, ratios, env var handling, signal routing - validationReport.js: 20 tests covering report construction, overall_ok logic, truncation - envFingerprint.js: 10 tests covering fingerprint structure, hashing, key generation Co-authored-by: voidborne-d <d.oracle@agentmail.to>
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.
Summary
Adds 45 new tests covering three previously untested GEP modules. Test count goes from 113 to 158.
Modules Covered
strategy.js (15 tests)
EVOLVE_STRATEGYenv var handling +FORCE_INNOVATIONbackward compatvalidationReport.js (20 tests)
buildValidationReportwith minimal/full inputsoverall_oklogic (all pass, any fail, empty results)out/stdout,err/stderr), command inferenceisValidValidationReportvalidation for all edge casesenvFingerprint.js (10 tests)
isSameEnvClasscomparisonVerification
Follows existing test patterns (node:test, node:assert/strict). No new dependencies.