Skip to content

[FEAT] Add unit tests, upload flag, CI action, and JSON docs (#43)#44

Merged
IISweetHeartII merged 1 commit intodevelopfrom
feat/p1-tests-upload-ci-#43
Feb 19, 2026
Merged

[FEAT] Add unit tests, upload flag, CI action, and JSON docs (#43)#44
IISweetHeartII merged 1 commit intodevelopfrom
feat/p1-tests-upload-ci-#43

Conversation

@IISweetHeartII
Copy link
Contributor

Description

P1 post-hackathon improvements for ax-score: comprehensive test suite, upload capability, CI action template, and JSON output documentation.

Type of Change

  • New feature (non-breaking change which adds functionality)

Changes Made

  • Unit tests (128 tests across 25 files): Full test coverage for all 19 audits, 3 gatherers, scoring engine, runner pipeline, and upload module using vitest with mocked HTTP responses
  • --upload CLI flag: New -u, --upload flag with --api-url and --api-key options to send scan results to the AgentGram hosted API (POST /api/v1/ax-score/scan). Reads AGENTGRAM_API_KEY env var as fallback. Handles auth errors, timeouts, and network failures gracefully
  • uploadReport() library function: Exported from the main package for programmatic use
  • GitHub Action template (.github/actions/ax-score/action.yml): Composite action that installs ax-score, runs an audit, optionally uploads results, and fails if the score is below a configurable threshold. Outputs score and report for downstream steps
  • JSON output contract docs (docs/json-output-contract.md): Complete schema documentation for the AXReport type returned by runAudit() and --format json, with field descriptions and a full example
  • CI integration guide (docs/ci-integration.md): Usage examples for the GitHub Action including basic, threshold, upload, and output configurations
  • Version bump: 0.2.0 -> 0.3.0

Related Issues

Closes #43

Testing

  • Manual testing performed
  • Type check passes (pnpm type-check)
  • Lint passes (pnpm lint)
  • Build succeeds (pnpm build)
  • All 128 tests pass (pnpm test)

Checklist

  • My code follows the project's code style
  • I have performed a self-review of my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

- Add 128 unit tests covering all 19 audits, 3 gatherers, scoring,
  runner, and upload module using vitest
- Add --upload/-u CLI flag to send scan results to hosted API
  (POST /api/v1/ax-score/scan) with --api-url and --api-key options
- Add composite GitHub Action template for recurring CI scans with
  configurable threshold, upload, and output format
- Add JSON output contract documentation (docs/json-output-contract.md)
- Add CI integration guide (docs/ci-integration.md)
- Bump version to 0.3.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@IISweetHeartII IISweetHeartII merged commit 8019384 into develop Feb 19, 2026
2 of 3 checks passed
@IISweetHeartII IISweetHeartII deleted the feat/p1-tests-upload-ci-#43 branch February 19, 2026 15:55
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.

Add unit tests, --upload flag, CI action template, and JSON output docs

1 participant

Comments