Skip to content

Commit d94f88d

Browse files
committed
test: add Core 2.0 unsupported canonicalization profile conformance case
1 parent ad9e5d1 commit d94f88d

19 files changed

Lines changed: 91 additions & 38 deletions

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ jobs:
9090
9191
# Verify expected JSON fields
9292
grep '"status": "PASS"' conformance-report.json
93-
grep '"total": 10' conformance-report.json
94-
grep '"passed": 10' conformance-report.json
93+
grep '"total": 11' conformance-report.json
94+
grep '"passed": 11' conformance-report.json
9595
grep '"failed": 0' conformance-report.json
9696
9797
docker-conformance:
@@ -123,6 +123,6 @@ jobs:
123123
docker run --rm digiemu-core experimental conformance run /opt/testdata/core_2_conformance --json > docker-conformance.json
124124
cat docker-conformance.json
125125
grep '"status": "PASS"' docker-conformance.json
126-
grep '"total": 10' docker-conformance.json
127-
grep '"passed": 10' docker-conformance.json
126+
grep '"total": 11' docker-conformance.json
127+
grep '"passed": 11' docker-conformance.json
128128
grep '"failed": 0' docker-conformance.json

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ docker run --rm digiemu-core experimental conformance run /opt/testdata/core_2_c
271271
```
272272

273273
Expected output
274-
- `Conformance run summary: total=10 passed=10 failed=0`
274+
- `Conformance run summary: total=11 passed=11 failed=0`
275275

276276
Important notes
277277
- Core 2.0 remains draft unless explicitly marked stable.

cmd/digiemu/experimental_json_test.go

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,33 +42,34 @@ func TestExperimentalJSONOutput(t *testing.T) {
4242
if rep["status"] != "PASS" {
4343
t.Fatalf("expected status PASS, got %v", rep["status"])
4444
}
45-
if int(rep["total"].(float64)) != 10 {
46-
t.Fatalf("expected total 10, got %v", rep["total"])
45+
if int(rep["total"].(float64)) != 11 {
46+
t.Fatalf("expected total 11, got %v", rep["total"])
4747
}
48-
if int(rep["passed"].(float64)) != 10 {
49-
t.Fatalf("expected passed 10, got %v", rep["passed"])
48+
if int(rep["passed"].(float64)) != 11 {
49+
t.Fatalf("expected passed 11, got %v", rep["passed"])
5050
}
5151
if int(rep["failed"].(float64)) != 0 {
5252
t.Fatalf("expected failed 0, got %v", rep["failed"])
5353
}
5454
// cases array
5555
cases, ok := rep["cases"].([]any)
56-
if !ok || len(cases) != 10 {
57-
t.Fatalf("expected 10 cases, got %v", rep["cases"])
56+
if !ok || len(cases) != 11 {
57+
t.Fatalf("expected 11 cases, got %v", rep["cases"])
5858
}
5959

6060
// Optional: assert presence of known case names
6161
want := map[string]bool{
62-
"basic_pass": true,
63-
"hash_mismatch_fail": true,
64-
"invalid_schema_error": true,
65-
"missing_required_field_error": true,
66-
"malformed_json_error": true,
67-
"unknown_reason_code_error": true,
68-
"unsupported_hash_algorithm_error": true,
69-
"wrong_profile_fail": true,
70-
"inside_payload_mutation_detected": true,
71-
"outside_metadata_ignored": true,
62+
"basic_pass": true,
63+
"hash_mismatch_fail": true,
64+
"invalid_schema_error": true,
65+
"missing_required_field_error": true,
66+
"malformed_json_error": true,
67+
"unknown_reason_code_error": true,
68+
"unsupported_canonicalization_profile_error": true,
69+
"unsupported_hash_algorithm_error": true,
70+
"wrong_profile_fail": true,
71+
"inside_payload_mutation_detected": true,
72+
"outside_metadata_ignored": true,
7273
}
7374
for _, c := range cases {
7475
if m, ok := c.(map[string]any); ok {

docs/CORE_2_ACTUAL_EXPECTED_COMPARISON_DESIGN.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Current state
1919
- The runner reads and parses `input.json`.
2020
- Malformed input JSON is handled deterministically.
2121
- Missing conformance case files are covered by tests.
22-
- The official conformance pack reports total=10 passed=10 failed=0.
22+
- The official conformance pack reports total=11 passed=11 failed=0.
2323
- Full verify execution is not implemented yet.
2424

2525
Target state
@@ -101,7 +101,7 @@ Reason-code implications
101101
- Exact `reason_code` comparison will make reason code semantics stricter.
102102
- `INTERNAL_ERROR` boundaries may need refinement.
103103
- `INVALID_SNAPSHOT_SCHEMA` may later split into `INVALID_JSON` if partner feedback requires it.
104-
- `UNSUPPORTED_PROFILE` and `MISSING_REFERENCE` should become stronger candidates for representable execution cases.
104+
- `UNSUPPORTED_CANONICALIZATION_PROFILE` is represented by an official conformance case; unsupported reconstruction profile and missing-reference cases remain candidates for future coverage.
105105

106106
Non-goals
107107
---------
@@ -118,7 +118,7 @@ Recommended next PRs
118118

119119
- Expand observed-result comparison coverage where new observed results are introduced.
120120
- Keep public JSON report shape unchanged.
121-
- Add representable `UNSUPPORTED_PROFILE` and `MISSING_REFERENCE` cases after comparison helper exists.
121+
- Add representable unsupported reconstruction profile and missing-reference cases after comparison helper exists.
122122

123123
Change history
124124
--------------

docs/CORE_2_CONFORMANCE_QUICKSTART.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Expected output
1616
On a healthy checkout of the current draft conformance pack you should see a short summary like:
1717

1818
```
19-
Conformance run summary: total=10 passed=10 failed=0
19+
Conformance run summary: total=11 passed=11 failed=0
2020
```
2121

2222
Conformance case structure
@@ -106,7 +106,7 @@ Expected output
106106
On a healthy checkout of the current draft conformance pack you should see a short summary like:
107107

108108
```
109-
Conformance run summary: total=10 passed=10 failed=0
109+
Conformance run summary: total=11 passed=11 failed=0
110110
```
111111

112112
Optional JSON output

docs/CORE_2_CONFORMANCE_REPORT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ Human-readable summary (default):
3232

3333
```
3434
go run ./cmd/digiemu experimental conformance run testdata/core_2_conformance
35-
Conformance run summary: total=10 passed=10 failed=0
35+
Conformance run summary: total=11 passed=11 failed=0
3636
```
3737

3838
Machine-readable JSON output:

docs/CORE_2_DOCKER_USAGE.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ docker run --rm digiemu-core experimental conformance run /opt/testdata/core_2_c
3636

3737
Expected sample outputs
3838

39-
- Human summary: `Conformance run summary: total=10 passed=10 failed=0`
40-
- JSON report: top-level `status: PASS`, `total: 10`, `passed: 10`, `failed: 0`
39+
- Human summary: `Conformance run summary: total=11 passed=11 failed=0`
40+
- JSON report: top-level `status: PASS`, `total: 11`, `passed: 11`, `failed: 0`
4141

4242
Notes
4343

docs/CORE_2_DRAFT_2_REVIEW_SUMMARY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Recommended next PRs
5656
--------------------
5757

5858
High priority
59-
- Conformance pack expansion (more cases) — completed in this branch (added 7 edge/negative cases; total 10)
59+
- Conformance pack expansion (more cases) — completed in this branch (added 7 edge/negative cases; total 10; later expanded to 11)
6060
- Additional negative and edge-case test vectors
6161
- Reason code clarity and coverage review — documented in `docs/CORE_2_REASON_CODE_REVIEW.md`
6262
- Runner real execution design — documented in `docs/CORE_2_RUNNER_EXECUTION_DESIGN.md`

docs/CORE_2_PARTNER_HANDOFF.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ Expected results
5555
----------------
5656

5757
Human:
58-
- `Conformance run summary: total=10 passed=10 failed=0`
58+
- `Conformance run summary: total=11 passed=11 failed=0`
5959

6060
JSON:
6161
- `report_version: core-2-conformance-report-v1`

docs/CORE_2_PARTNER_INTEGRATION_NOTES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ go run ./cmd/digiemu experimental conformance run testdata/core_2_conformance
3737
Expected output:
3838

3939
```
40-
Conformance run summary: total=10 passed=10 failed=0
40+
Conformance run summary: total=11 passed=11 failed=0
4141
```
4242

4343
Using the experimental conformance CLI

0 commit comments

Comments
 (0)