Skip to content

fix: accept software-only platform at Level 0, reject with clear message at Level 1+ (#16)#17

Merged
imran-siddique merged 1 commit into
mainfrom
fix/software-only-platform
Jun 13, 2026
Merged

fix: accept software-only platform at Level 0, reject with clear message at Level 1+ (#16)#17
imran-siddique merged 1 commit into
mainfrom
fix/software-only-platform

Conversation

@imran-siddique

Copy link
Copy Markdown
Contributor

Summary

  • schemas/trace-claim.json: adds software-only to the platform enum so the JSON Schema no longer rejects it.
  • src/trace_tests/modules/tr_rte.py: introduces _DEV_PLATFORMS; check() gains an optional level parameter (default 0, same pattern as TR-SIG). software-only passes TR-RTE-001 at Level 0 and fails with a clear "development-mode and not acceptable for hardware-attested levels" message at Level 1+.
  • src/trace_tests/runner.py: forwards level to tr_rte.check().
  • tests/test_software_only_platform.py: 7 new tests covering Level 0 pass, Level 1/2 fail, message content, schema acceptance, and default-level behavior.

All 105 existing tests continue to pass (112 total with the 7 new ones).

Closes #16.

Test plan

  • python -m pytest passes locally (112 passed, 5 xpassed)
  • software-only at Level 0 passes TR-RTE-001
  • software-only at Level 1 fails TR-RTE-001 with "development-mode" in the message
  • software-only at Level 2 fails TR-RTE-001 with "development-mode" in the message
  • software-only accepted by JSON Schema
  • All 105 pre-existing tests still pass

Generated with Claude Code

…age at Level 1+ (#16)

- schemas/trace-claim.json: add "software-only" to the platform enum so
  the JSON Schema validator no longer rejects it outright.
- tr_rte.py: introduce _DEV_PLATFORMS set; check() now accepts an optional
  level parameter (default 0, matching the TR-SIG pattern). software-only
  passes TR-RTE-001 at Level 0 and fails with a "development-mode" message
  at Level 1+, replacing the misleading "unknown platform" error.
- runner.py: pass level to tr_rte.check() so the runner propagates the
  conformance level correctly.
- tests/test_software_only_platform.py: 7 new tests covering Level 0 pass,
  Level 1 and 2 fail, message content, schema acceptance, and default-level
  behavior.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@imran-siddique imran-siddique merged commit 773e2ae into main Jun 13, 2026
5 checks passed
@imran-siddique imran-siddique deleted the fix/software-only-platform branch June 13, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

trace-tests rejects software-only runtime platform despite trace-spec allowing it

1 participant