Skip to main content

Overview

@grantex/conformance is a black-box test suite that validates any Grantex protocol server implementation. It makes real HTTP requests against a live endpoint and checks that responses match the protocol specification.

Latest Production Results

63 passed, 2 skipped, 0 failed — 65 total tests. See the full breakdown.
Use it to:
  • Verify your self-hosted deployment after setup or upgrades
  • Validate custom implementations of the Grantex protocol
  • Run in CI/CD to catch regressions before they reach production
  • Certify compliance with the Grantex spec

Install

Or run directly with npx:

Configure

The suite requires two parameters:

Usage

Run all core suites

Run a single suite

Include optional extensions

JSON output (for CI pipelines)

Stop on first failure

CLI Reference

Core Suites

The suite ships with 40 tests across 10 core suites. These cover every MUST requirement in the specification.

Optional Extensions

Enable these with --include to test optional protocol features:

Automation

Invoke the CLI from CI and consume its JSON output:
The package also exports supported programmatic entry points:
The report contains suite results and a summary with total, passed, failed, skipped, and duration fields.

Server Requirements

Your server must meet these requirements to pass the conformance suite:
  1. Implement all core Grantex protocol endpoints (/v1/agents, /v1/authorize, /v1/token, /v1/tokens/verify, /v1/tokens/revoke, /v1/grants, /v1/grants/delegate, /v1/audit/log, /v1/audit/entries)
  2. Serve a JWKS at /.well-known/jwks.json with RS256 keys
  3. Return proper HTTP status codes (201 for creation, 204 for deletion, 400 for validation errors, 401 for auth failures)
  4. Support the authorization code flow (sandbox auto-code or /v1/consent/:id/approve)
  5. Enforce delegation scope constraints and depth limits

CI/CD Integration

Add conformance tests to your deployment pipeline:

Exit Codes

Requirements

  • Node.js 18+
Last modified on July 11, 2026