Skip to content

CI: add stable versioned JSON plus JUnit/SARIF output for validate, test, contract, policy, and review #312

Description

@LouisDeconinck

Problem

Duckle has strong CLI validation, tests, review, contracts, and policy findings.

CI systems and coding agents benefit when results use standard formats rather than requiring custom parsing of console text.

Proposed solution

For relevant commands, support:

--format json
--format junit
--format sarif

Commands:

duckle validate
duckle test
duckle contracts check
duckle policy check
duckle review

Stable JSON

Version the machine-readable schema:

{
  "schema_version": 1,
  "command": "validate",
  "findings": []
}

Document stable exit codes for:

success
validation/test failure
configuration/tool failure
policy refusal

JUnit

Represent tests/checks as test cases with:

pipeline
node/assertion
duration
failure message
captured safe diagnostics

SARIF

Use SARIF for file/node-level findings such as:

unknown property
invalid SQL
contract break
policy violation
unsafe component
schema drift

Map to pipeline/workspace file and node/property where possible.

GitHub annotations

SARIF is sufficient for GitHub Code Scanning; optional concise workflow annotations can be generated without embedding GitHub-specific behavior into the core engine.

Security

Generated reports must use the same secret/sensitive-value redaction as logs and API results.

Acceptance criteria

  1. CI can display failed Duckle tests as native test results;
  2. policy/validation findings point to the relevant file/node/property;
  3. JSON schemas and exit codes are documented/versioned;
  4. reports never expose secrets;
  5. output remains consistent across platforms.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions