)]}'
{
  "commit": "f1af3af290b6604f0ee098d9cd83be980f06112d",
  "tree": "b4fe5973755aae51d5a0dc0e20ac2f1d982823a8",
  "parents": [
    "991d4e409f1434f38b05e218dc4fb2ae53548530"
  ],
  "author": {
    "name": "chrisdecenzo",
    "email": "61757564+chrisdecenzo@users.noreply.github.com",
    "time": "Thu Jul 23 09:56:46 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jul 23 09:56:46 2026 -0700"
  },
  "message": "feat(tv-app): Integrate Media File Management cluster with file-backed delegate (#73198)\n\n* feat(tv-app): Integrate Media File Management cluster with file-backed delegate\n\nWire the code-driven Media File Management cluster (0x0511) into the Linux\ntv-app, mirroring the earlier ContentLauncher / MediaPlayback integrations.\n\nUnlike those legacy Ember clusters (registered via SetDefaultDelegate in\nZCLCallbacks.cpp), MediaFileManagement is code-driven, so the application owns\nthe delegate and the cluster registration lifecycle. The cluster was already\nenabled in tv-app.zap (#72946), so no ZAP regen is required.\n\n- Add MediaFileManagementManager, a file-backed Delegate implementation that\n  persists file metadata and blobs under /tmp/chip-media-files (similar to how\n  the example KVS store keeps artifacts under /tmp). It tracks storage usage\n  against a 1 GiB capacity, assigns monotonic file IDs, rejects over-capacity\n  AddFile requests, and reloads its index on construction so state survives\n  restarts.\n- Instantiate MediaFileManagementServer and call Init()/Shutdown() from the\n  tv-app ApplicationInit()/ApplicationShutdown() on endpoint 1.\n- Add 9 unit tests for the manager (add/delete, ID assignment, storage\n  accounting, capacity rejection, cross-instance persistence, MIME enumeration,\n  index sanitization) and register them in the example_tests group for\n  linux/darwin.\n\nVerified: unit tests pass (9/9) and the Darwin tv-app builds and links.\n\n* [pre-commit.ci] auto fixes from pre-commit.com hooks\n\nfor more information, see https://pre-commit.ci\n\n* fix(tv-app): address MFM review comments\n\n- Wrap Media File Management manager/server in std::optional and construct\n  them in ApplicationInit() rather than as eagerly-constructed globals, so\n  the delegate\u0027s filesystem I/O and logging do not run during static init.\n- Guard Sanitize() against an empty CharSpan: constructing std::string from\n  a (nullptr, 0) pair is undefined behavior.\n- Remove the unused FindEntry() declaration and definition.\n\n---------\n\nCo-authored-by: pre-commit-ci[bot] \u003c66853113+pre-commit-ci[bot]@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f49e76e10589d916796e7106383ad5e3cb15b105",
      "old_mode": 33188,
      "old_path": "examples/tv-app/linux/main.cpp",
      "new_id": "9f5fa0308e409e1934cbc8064e95cab88c38c537",
      "new_mode": 33188,
      "new_path": "examples/tv-app/linux/main.cpp"
    },
    {
      "type": "modify",
      "old_id": "c253459d177caa4062756e59d7ee52067c72daf3",
      "old_mode": 33188,
      "old_path": "examples/tv-app/tv-common/BUILD.gn",
      "new_id": "f08572d16e87b1a17be6f03469f6777e65764c02",
      "new_mode": 33188,
      "new_path": "examples/tv-app/tv-common/BUILD.gn"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "60e7a74f1a0c49f7dbc0ffd7f85cc456a6a26640",
      "new_mode": 33188,
      "new_path": "examples/tv-app/tv-common/clusters/media-file-management/MediaFileManagementManager.cpp"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "ada6d974e39a6744768699553033042a5b4e40d4",
      "new_mode": 33188,
      "new_path": "examples/tv-app/tv-common/clusters/media-file-management/MediaFileManagementManager.h"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "3d8e990b45cd7b576b6a651b490abb3d299c5077",
      "new_mode": 33188,
      "new_path": "examples/tv-app/tv-common/clusters/media-file-management/tests/BUILD.gn"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "2f2a47db14b9a2a623d672eafbbc6bff37c79520",
      "new_mode": 33188,
      "new_path": "examples/tv-app/tv-common/clusters/media-file-management/tests/TestMediaFileManagementManager.cpp"
    },
    {
      "type": "modify",
      "old_id": "1bc9b59926ed25ebbb93e4728160ab67fd584796",
      "old_mode": 33188,
      "old_path": "src/BUILD.gn",
      "new_id": "8e2a7c65a7c999996526983d67cdc15a807d5cdc",
      "new_mode": 33188,
      "new_path": "src/BUILD.gn"
    }
  ]
}
