uart_board_sram_receipt.schema.json 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. {
  2. "$schema": "https://json-schema.org/draft/2020-12/schema",
  3. "$id": "uart_board_sram_receipt.schema.json",
  4. "title": "UART board SRAM receipt",
  5. "type": "object",
  6. "required": ["schema", "status", "counterparty", "programming", "serial", "transcript", "debug_evidence", "safety"],
  7. "properties": {
  8. "schema": { "const": "uart-board-sram-receipt-v1" },
  9. "status": { "type": "string" },
  10. "counterparty": { "enum": ["pc_emulator", "real_bmc"] },
  11. "programming": {
  12. "type": "object",
  13. "required": ["mode", "bitstream"],
  14. "properties": {
  15. "mode": { "const": "PROGRAM_SRAM" },
  16. "bitstream": { "$ref": "#/$defs/artifact" }
  17. },
  18. "additionalProperties": true
  19. },
  20. "serial": { "$ref": "#/$defs/serial" },
  21. "transcript": { "$ref": "#/$defs/artifact" },
  22. "debug_evidence": {
  23. "type": "object",
  24. "required": ["event_stream", "register_dump"],
  25. "properties": {
  26. "event_stream": { "type": "string" },
  27. "register_dump": { "type": "string" }
  28. },
  29. "additionalProperties": true
  30. },
  31. "safety": { "$ref": "#/$defs/safety" },
  32. "authority_boundary": { "type": "string" }
  33. },
  34. "additionalProperties": true,
  35. "$defs": {
  36. "serial": {
  37. "type": "object",
  38. "required": ["port", "baud", "format", "allowlisted"],
  39. "properties": {
  40. "port": { "type": "string" },
  41. "baud": { "const": 115200 },
  42. "format": { "const": "8N1" },
  43. "allowlisted": { "const": true },
  44. "dtr": { "type": "boolean" },
  45. "rts": { "type": "boolean" }
  46. },
  47. "additionalProperties": true
  48. },
  49. "artifact": {
  50. "type": "object",
  51. "required": ["path", "sha256"],
  52. "properties": {
  53. "path": { "type": "string" },
  54. "sha256": { "type": "string", "pattern": "^[0-9a-fA-F]{64}$" }
  55. },
  56. "additionalProperties": true
  57. },
  58. "safety": {
  59. "type": "object",
  60. "required": ["flash_attempted", "real_ptc_fan_bmc_action_attempted", "driver_install_attempted"],
  61. "properties": {
  62. "flash_attempted": { "const": false },
  63. "real_ptc_fan_bmc_action_attempted": { "const": false },
  64. "driver_install_attempted": { "const": false }
  65. },
  66. "additionalProperties": true
  67. }
  68. }
  69. }