)]}'
{
  "commit": "29242717a0ee3c8d46281111a964ae8ab114f181",
  "tree": "be311a2b9c993e3470ba6bb82d8132612e2e290f",
  "parents": [
    "e1effdf4c1568104a10f1f5d341749002b03f756"
  ],
  "author": {
    "name": "Don Jackson",
    "email": "dcj@clark-communications.com",
    "time": "Wed Aug 19 17:02:57 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Aug 20 00:02:57 2026 +0000"
  },
  "message": "[python_testing] Add TC-ELDIST-2.1 and run it against electrical-protection-app (#73463)\n\n* [python_testing] Add TC-ELDIST-2.1 and run it against electrical-protection-app\n\nSecond slice of the Electrical Protection example app sequence: wire the app\ninto the test harness and add the first Python test that exercises it.\n\n- Register the app as a test-harness target (scripts/tests/local.py) and build\n  it in the test job (tests.yaml), exporting ELECTRICAL_PROTECTION_APP.\n- Add TC_ELDIST_2_1.py, targeting ${ELECTRICAL_PROTECTION_APP} on endpoint 1.\n\nThis script was previously blocked: the Electrical Distribution cluster server\nwas not present in any example app, so it could not exercise a DUT and had to be\nlisted in test_metadata.yaml as excluded. The app added in #73462 resolves that,\nso the script runs in CI and no exclusion entry is needed.\n\nTesting: run against the app locally, commissioning on-network:\n\n  scripts/tests/run_python_test.py --factory-reset \\\n    --app out/epa-pr1/chip-electrical-protection-app \\\n    --app-args \"--discriminator 1234 --KVS kvs1\" \\\n    --script src/python_testing/TC_ELDIST_2_1.py \\\n    --script-args \"--storage-path admin_storage.json \\\n      --commissioning-method on-network --discriminator 1234 \\\n      --passcode 20202021 --endpoint 1\"\n\n  Summary for test class TC_ELDIST_2_1:\n  Error 0, Executed 1, Failed 0, Passed 1, Requested 1, Skipped 0\n\nDepends on #73462 (the app) and #73380 (the cluster server).\n\nCo-Authored-By: Claude Opus 5 (1M context) \u003cnoreply@anthropic.com\u003e\n\n* [python_testing] Use lazy % formatting in TC-ELDIST-2.1 logging\n\nruff G004 rejects f-strings in logging calls. The script predates that rule\nbeing enforced, so its five log.info() calls tripped Lint Code Base.\n\nTesting: ruff check passes; the test still passes against\nelectrical-protection-app (Executed 1, Failed 0, Passed 1) and the reformatted\nlines render correctly, e.g. \"MaxContinuousCurrent: 100000 mA\".\n\nCo-Authored-By: Claude Opus 5 (1M context) \u003cnoreply@anthropic.com\u003e\n\n* [python_testing] Copyright year 2026 in TC-ELDIST-2.1\n\nReview feedback from @jamesharrow on #73463. The script was drafted in 2025 but\nfirst lands in the repository in 2026.\n\nCo-Authored-By: Claude Opus 5 (1M context) \u003cnoreply@anthropic.com\u003e\n\n* [TC-ELDIST-2.1] Address review: align step text with the test plan\n\nStep descriptions and expectations now reproduce the test plan\u0027s wording\nwith macros expanded, using the expectation\u003d argument for the Expected\nOutcome column rather than folding it into the description.\n\nUse matter_asserts in place of hand-rolled checks: assert_valid_int64 for\nthe two int64 attributes, assert_int_in_range for NumberOfPoles,\nassert_valid_enum for EndOfLife, assert_valid_bool for\nServiceEntranceRated.\n\nDrop the assert_is_not_none calls. read_single_attribute_check_success\nalready asserts on a None result, so they could never fire.\n\nRemove the write-to-read-only step, which was removed from the test plan,\nand correct the docstring: X is Nullable, not Fixed.\n\n* [TC-ELDIST-2.1] Match the docstring to the test plan\u0027s Purpose\n\nUse the test plan\u0027s Purpose sentence verbatim with macros expanded,\nrather than a paraphrase plus an attribute list that would go stale.\n\n* [TC-ELDIST-2.1] Enforce the schema upper bounds\n\nMaxContinuousCurrent and MaxVoltage are capped at 0x3FFFFFFFFFFFFFFF by\nthe cluster XML, which assert_valid_int64 does not enforce. Use\nassert_int_in_range for both, which covers the integer type check and\neach bound in one call.\n\nEndOfLife values outside the enum decode to kUnknownEnumValue, still an\ninstance of the enum, so assert_valid_enum alone accepted them. Reject\nthat value explicitly.\n\n* Enable tracing support in the electrical-protection-app\n\nThe test harness starts every Linux example app with --trace-to, but that\noption is only registered when ENABLE_TRACING is set, which comes from\nmatter_enable_tracing_support in the app\u0027s own args.gni. Without it the app\nrejected the argument and exited before commissioning:\n\n  chip-electrical-protection-app: Unknown option: --trace-to\n  Failed to init Linux App: examples/platform/linux/Options.cpp:1051:\n      Error 0x0000002F\n\nTC-ELDIST-2.1 then failed while establishing PASE, never reaching a test\nstep. closure-app sets the same flag in its args.gni for the same reason.\n\n---------\n\nCo-authored-by: Claude Opus 5 (1M context) \u003cnoreply@anthropic.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "4e0598eba9358a9f5d6bc024a8ad6e5bda64010e",
      "old_mode": 33188,
      "old_path": ".github/workflows/tests.yaml",
      "new_id": "8d9876813588a582ed1586a9c53e8b2525170f5a",
      "new_mode": 33188,
      "new_path": ".github/workflows/tests.yaml"
    },
    {
      "type": "modify",
      "old_id": "aac18b394418d383806ae064dbf6289189b4f3fb",
      "old_mode": 33188,
      "old_path": "examples/electrical-protection-app/linux/args.gni",
      "new_id": "027a5b5f75bc27a4c47e274b4bf3e8db00e3050b",
      "new_mode": 33188,
      "new_path": "examples/electrical-protection-app/linux/args.gni"
    },
    {
      "type": "modify",
      "old_id": "d289d58e9ef26e13b10cd3716a47ac2d2646e674",
      "old_mode": 33261,
      "old_path": "scripts/tests/local.py",
      "new_id": "fd4126e8ff9d0ec7eb815501408accc8e683dceb",
      "new_mode": 33261,
      "new_path": "scripts/tests/local.py"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "f516f1f43f9c2590fe64de120ff897addfe520a8",
      "new_mode": 33188,
      "new_path": "src/python_testing/TC_ELDIST_2_1.py"
    }
  ]
}
