-
Notifications
You must be signed in to change notification settings - Fork 0
Conformance CLI
Complete reference for the @rdcp.dev/conformance CLI suite. These tools orchestrate discovery-driven test gating and produce CI-friendly artifacts (JUnit, badges).
- rdcp-conformance β Discover /.well-known/rdcp and write run config for tag gating
- rdcp-conformance-junit β Convert rdcp.results.json to JUnit XML
- rdcp-conformance-badges β Generate Shields JSON and minimal SVG badges
npx rdcp-conformance --base-url=http://localhost:3000
npx rdcp-conformance-junit
npx rdcp-conformance-badgesDiscovers the targetβs protocol capabilities and writes two files used by the test reporter and tag gating.
Outputs (default):
- reports/rdcp.discovery.json β discovery snapshot { baseUrl, endpoints, security.level, security.methods, capabilities, ts }
- reports/rdcp.run.json β run configuration { includeTags:[], excludeTags:[] }
Syntax
npx rdcp-conformance \
--base-url=http://host:3000 \
[--out=reports/rdcp.discovery.json] \
[--include-tags=standard,bearer] \
[--exclude-tags=jwks]Options
- --base-url URL (required unless RDCP_BASE_URL set)
- --out PATH (default: reports/rdcp.discovery.json)
- --include-tags CSV (optional) β restrict to tests that match at least one of these tags
- --exclude-tags CSV (optional) β skip tests that match any of these tags
Environment variables (alternatives)
- RDCP_BASE_URL β base URL
- RDCP_DISCOVERY_FILE β discovery out path
- RDCP_INCLUDE_TAGS, RDCP_EXCLUDE_TAGS β same semantics as flags
Exit codes
- 0 success
- 1 discovery failed (HTTP/parse/etc.)
- 2 missing --base-url
Examples
# Minimal
npx rdcp-conformance --base-url=http://localhost:3000
# Only run Standard/Bearer-tagged tests (others skipped by gating)
npx rdcp-conformance --base-url=http://svc:3000 --include-tags=standard,bearer
# Exclude JWKS-tagged tests
npx rdcp-conformance --base-url=http://svc:3000 --exclude-tags=jwks
# Custom output location
npx rdcp-conformance --base-url=http://svc:3000 --out=.artifacts/rdcp.discovery.jsonNote on execution vs gating
- The test suite uses discovery + run.json to decide which tagged blocks execute (gating).
- To run all tests locally, delete reports/rdcp.discovery.json (unknown env β allow all tags) and ensure run.json is empty or absent; then
npm test. - In CI (composite action), discovery runs by default; tags determine which tests execute and what gets counted.
Reads rdcp.results.json (emitted by the Jest reporter) and writes JUnit XML for CI.
Defaults
- Input: reports/rdcp.results.json (env: RDCP_RESULTS)
- Output: reports/rdcp.junit.xml (env: RDCP_JUNIT_OUT)
Usage
npx rdcp-conformance-junit
# or
RDCP_RESULTS=.artifacts/rdcp.results.json RDCP_JUNIT_OUT=.artifacts/rdcp.junit.xml \
npx rdcp-conformance-junitGenerates Shields-compatible JSON and minimal SVG badges from rdcp.results.json.
Defaults
- Input: reports/rdcp.results.json (env: RDCP_RESULTS)
- Output directory: reports/badges (env: RDCP_BADGES_OUT)
Generated files
- rdcp-summary.{json,svg} β overall passed/total
- profile-{basic|standard|enterprise}.{json,svg}
- cap-{control|jwks|keyring|jwt|admin|etag|util|otel|tenant|ttl|audit|rate-limit|client|integration|status|auth|headers|metrics|put|schema}.{json,svg}
Usage
npx rdcp-conformance-badges
RDCP_BADGES_OUT=public/badges npx rdcp-conformance-badgesA convenience Dockerfile is provided to run the suite with env-driven gating.
docker build -f Dockerfile.conformance -t rdcp-conformance .
# INCLUDE_TAGS / EXCLUDE_TAGS control gating; both optional
docker run --rm -e INCLUDE_TAGS=standard,bearer -p 3000:3000 rdcp-conformanceUse the composite action to run discovery β tests β JUnit β badges and expose outputs.
- uses: ./.github/actions/rdcp-conformance
with:
base-url: http://service:3000
include-tags: standard,bearer # optional
exclude-tags: jwks # optional
id: rdcp
# Gate on pass-rate
- if: ${{ steps.rdcp.outputs.pass-rate == '100' }}
run: echo "Conformance OK β proceed to deploy"
# Artifacts uploaded by the action:
# - reports/rdcp.results.json
# - reports/rdcp.report.md
# - reports/rdcp.junit.xml
# - reports/badges/*- Locally: ensure no discovery file exists (or delete reports/rdcp.discovery.json), then
npm testruns all tagged tests. - In CI: skip/omit the discovery step (or remove the file before
npm test) to execute the full suite regardless of target capabilities.
A future --allow-all flag may be added to bypass discovery gating explicitly.
Getting Started: Installation β’ Basic Usage β’ Authentication
Migration: From Manual Implementation β’ Framework Examples β’ Publishing Guide
Protocol: RDCP v1.0 Specification β’ Implementation Guide β’ API Reference
π Home | π¦ NPM Package | π GitHub | π Issues
RDCP SDK v1.0.0 - Runtime Debug Control Protocol implementation for JavaScript/Node.js applications
- Application-Control-Plane-Concepts
- rdcp-technical-analysis
- Migration-Guide
- Multi-Tenancy
- Audit-Trail
- Performance Metrics
- Implementation-Status
- JavaScript-vs-TypeScript-Boundaries
- Core-Package-Boundaries
- Publishing-Setup
- Contributing
- API-Reference
- Client-Fetch-API-Examples
- Tracing-Library-Integration-Examples
- Integration-Scenarios
- Trace-Propagation-Demo
- RDCP-Demo-App
- Conformance-Kit
- Conformance-Setup
- Conformance-Tags
- Conformance-Reports
- Conformance-Requirements
- Conformance-CLI
- Protocol Specification
- Implementation Guide
- RDCP-Primitive-Types
- Protocol-Schemas
- Protocol-Error-Codes
- API-Reference
Version: 1.0.0
Protocol: RDCP v1.0
License: Apache-2.0