feat(ci): add agent tests validation gate to release process - #465
Open
8nevil8 wants to merge 4 commits into
Open
feat(ci): add agent tests validation gate to release process#4658nevil8 wants to merge 4 commits into
8nevil8 wants to merge 4 commits into
Conversation
Block the release if agent tests fail. When tests cannot run automatically (missing SSO credentials or network), require explicit user confirmation before proceeding. Closes EPMCDME-13925
CR-001: add trap to clean up temp file on signal kill (SIGINT/SIGTERM) CR-002: guard mktemp with exit 1 on failure to prevent silent misclassification
Plan, technical analysis, code review verdicts, QA report, actual complexity (XS / 8 of 36), and run state for the agent tests gate task.
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 an unconditional agent test validation gate to
scripts/release.shthat runs before tagging. The gate blocks the release if agent tests fail, continues automatically if they pass, and requires explicit manual confirmation if tests cannot run due to missing SSO/JWT credentials — the release never silently skips test validation.Closes EPMCDME-13925
Changes
scripts/release.sh: 48-line gate block added between the version-bump commit and tag creation. Runsnpm run test:integration:agentwith--reporter=json --outputFileto capture structured results, parsesnumPassedTestsvianode -e, and branches on three outcomes:❌ Agent tests FAILED+exit 1numPassedTests > 0→✅ Agent tests passed+ continuesnumPassedTests == 0(SSO/JWT unavailable) → explanation block +read -pmanual confirmationmktempguarded with|| { echo "ERROR: mktemp failed"; exit 1; }to prevent silent misclassification if/tmpis unavailabletrap 'rm -f "$AGENT_TEST_JSON"' EXIT INT TERMadded to clean up the temp file on signal kill during the multi-minute test runTesting
Checklist
npm run ci— 181 unit files, 30 integration files, lint, typecheck, build, commitlint all pass locally)main