Skip to content

feat(ci): add agent tests validation gate to release process - #465

Open
8nevil8 wants to merge 4 commits into
mainfrom
EPMCDME-13925
Open

feat(ci): add agent tests validation gate to release process#465
8nevil8 wants to merge 4 commits into
mainfrom
EPMCDME-13925

Conversation

@8nevil8

@8nevil8 8nevil8 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds an unconditional agent test validation gate to scripts/release.sh that 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. Runs npm run test:integration:agent with --reporter=json --outputFile to capture structured results, parses numPassedTests via node -e, and branches on three outcomes:
    • exit non-zero → ❌ Agent tests FAILED + exit 1
    • exit 0 + numPassedTests > 0✅ Agent tests passed + continues
    • exit 0 + numPassedTests == 0 (SSO/JWT unavailable) → explanation block + read -p manual confirmation
  • mktemp guarded with || { echo "ERROR: mktemp failed"; exit 1; } to prevent silent misclassification if /tmp is unavailable
  • trap 'rm -f "$AGENT_TEST_JSON"' EXIT INT TERM added to clean up the temp file on signal kill during the multi-minute test run
  • Header comment updated to document the release flow

Testing

  • Tests added/updated — N/A (bash script; verified via plan's manual scenarios)
  • Manual testing done — three outcome branches reviewed in code review; all 6 acceptance criteria confirmed satisfied

Checklist

  • Code follows project standards
  • CI is green (npm run ci — 181 unit files, 30 integration files, lint, typecheck, build, commitlint all pass locally)
  • No merge conflicts with main

8nevil8 added 4 commits August 5, 2026 15:37
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.
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.

1 participant