Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- Documented legacy `id` removal in 1.0.0 and version-based migration while retaining current acceptance and optional `testId`.

- Clarified durable attachment references, optional producer-local paths and producer-defined digest metadata.

- Added coordinated cross-process retry examples and clarified logical-run correlation and final-attempt duration.
Expand Down
2 changes: 1 addition & 1 deletion schema/ctrf.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
"required": [ "name", "status", "duration" ],
"properties": {
"id": {
"description": "Legacy identifier for the test case (UUID). New producers should prefer testId",
"description": "Deprecated test-case identifier (UUID), scheduled for removal in CTRF 1.0.0. Still accepted in this version; prefer optional testId when providing case identity",
"type": "string",
"format": "uuid",
"minLength": 1
Expand Down
8 changes: 5 additions & 3 deletions spec/ctrf.md
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,7 @@ Each field within the test object is described in the subsections below.

### 9.1. `id`

> **Legacy.** `id` is retained for backward compatibility. New producers SHOULD prefer `testId` (Section 9.2).
> **Deprecated.** `id` is retained for backward compatibility and is scheduled for removal in CTRF 1.0.0. Producers SHOULD use `testId` (Section 9.2) instead when providing test-case identity; `testId` remains OPTIONAL.

**Description:**
A unique, stable identifier for the test case.
Expand All @@ -895,7 +895,9 @@ A unique, stable identifier for the test case.
If present, it MUST be a valid UUID as defined in [RFC9562].
Producers SHOULD prefer `testId` for new implementations.
When both `id` and `testId` are present, consumers SHOULD use `testId`.
Consumers SHOULD treat `id` as legacy unless a producer documents stronger semantics.
Consumers SHOULD treat `id` as legacy.

Migration follows the document's declared specification version. Reports declaring CTRF 1.0.0 will be required to omit `id`; producers emitting earlier specification versions can continue to follow those versions' contracts. Consumers reading those earlier reports SHOULD use `testId` in preference to `id` when both are present. This deprecation notice does not remove `id` from the current schema or require producers to supply `testId`.

### 9.2. `testId`

Expand Down Expand Up @@ -2252,7 +2254,7 @@ to this specification.
"required": [ "name", "status", "duration" ],
"properties": {
"id": {
"description": "Legacy identifier for the test case (UUID). New producers should prefer testId",
"description": "Deprecated test-case identifier (UUID), scheduled for removal in CTRF 1.0.0. Still accepted in this version; prefer optional testId when providing case identity",
"type": "string",
"format": "uuid",
"minLength": 1
Expand Down
32 changes: 32 additions & 0 deletions tests/normative/valid-documents.test.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,38 @@
"description": "Merged coordinated retry report",
"valid": true,
"dataPath": "../../examples/coordinated-retry-merged.json"
},
{
"description": "Legacy id remains accepted alongside optional testId before 1.0.0",
"valid": true,
"data": {
"reportFormat": "CTRF",
"specVersion": "0.2.0",
"results": {
"tool": {
"name": "example-runner"
},
"summary": {
"tests": 1,
"passed": 1,
"failed": 0,
"pending": 0,
"skipped": 0,
"other": 0,
"start": 1609459200000,
"stop": 1609459201000
},
"tests": [
{
"name": "should pass",
"status": "passed",
"duration": 100,
"id": "12345678-1234-4234-8234-123456789abc",
"testId": "preferred-case-key"
}
]
}
}
}
]
}
Loading