From 2a1397d41538202f9f37aac532b1dce73e8bee0a Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Mon, 23 Feb 2026 11:19:24 -0800 Subject: [PATCH 1/7] lt: all a55 alpha devices to a55-perf --- config/lambdatest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/lambdatest.yml b/config/lambdatest.yml index dbd8548..5b8e808 100644 --- a/config/lambdatest.yml +++ b/config/lambdatest.yml @@ -92,9 +92,9 @@ device_groups: R5CXC1AHXYD: # 10/20/25: tested by joel, power meter good R5CXC1ARZDN: # 10/20/25: tested by joel, power meter good R5CXC1HZA6V: # 10/20/25: tested by joel, power meter good + RZCY10LGB6W: # 2/23/26: had bad rotation, rotation code landed on master + RZCY2011M7N: # 2/23/26: had bad rotation, rotation code landed on master a55-alpha: - RZCY2011M7N: # 11/6/25: bad rotation, testing in alpha - RZCY10LGB6W: # 11/6/25: bad rotation, testing in alpha a55-android16: R5CXC1ASA0L: # 12/1/25: lt is attempting to upgrade to android 16, had bad power meter RZCY203N75Z: # 12/1/25: lt is attempting to upgrade to android 16, had bad power meter From 14b560895ea78de549c4b7a1be0f8a975b6dced2 Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Wed, 25 Feb 2026 14:14:25 -0800 Subject: [PATCH 2/7] btibar service: retry forever on failure systemd's default rate limiter (5 starts within 10s) would put the service into a failed state and stop retrying, despite Restart=always. Once failed, the service required manual intervention to recover. Fix by setting StartLimitBurst=0 to disable the rate limiter, and RestartSec=30s to add a delay between restart attempts. --- service/bitbar.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/bitbar.service b/service/bitbar.service index 62e14dd..c2cdbc5 100644 --- a/service/bitbar.service +++ b/service/bitbar.service @@ -1,5 +1,7 @@ [Unit] Description=Bitbar Testrun manager service +# retry forever, no rate limiting +StartLimitBurst=0 [Service] Type=simple @@ -7,6 +9,7 @@ ExecStart=/bin/bash /home/bitbar/mozilla-bitbar-devicepool/bin/start_android_har # disable execstop, let systemd track the pid and manage shutdown #ExecStop=/bin/bash /home/bitbar/mozilla-bitbar-devicepool/bin/stop_android_hardware_testing.sh Restart=always +RestartSec=30s # address intermittent hangs by restarting hourly (mega-punt), haven't been able to find deadlocks/source. RuntimeMaxSec=1h WorkingDirectory=/home/bitbar/mozilla-bitbar-devicepool From 7d5754e83f6e8facdbba355d6625d3a2e64f293a Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Wed, 25 Feb 2026 14:15:28 -0800 Subject: [PATCH 3/7] lt service: retry forever on failure (lambdatest) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Same fix as bitbar.service — disable the rate limiter with StartLimitBurst=0 and add RestartSec=30s between restart attempts. --- service/lambdatest.service | 3 +++ 1 file changed, 3 insertions(+) diff --git a/service/lambdatest.service b/service/lambdatest.service index 8a7fb33..aa0c87a 100644 --- a/service/lambdatest.service +++ b/service/lambdatest.service @@ -1,5 +1,7 @@ [Unit] Description=Lambdatest Testrun manager service +# retry forever, no rate limiting +StartLimitBurst=0 [Service] Type=simple @@ -7,6 +9,7 @@ ExecStart=/bin/bash /home/bitbar/mozilla-bitbar-devicepool/bin/start_ltdp.sh # disable execstop, let systemd track the pid and manage shutdown #ExecStop=/bin/bash /home/bitbar/mozilla-bitbar-devicepool/bin/stop_ltdp.sh Restart=always +RestartSec=30s # restart process 24 hours to avoid any funk building up # - disabled to find long-term bugs #RuntimeMaxSec=24h From 4d045e220bc81a4cb5547b88486ba2860555633e Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Fri, 27 Feb 2026 13:37:21 -0800 Subject: [PATCH 4/7] config_device_mover: use CommentedMap instead of plain dict for empty device groups --- mozilla_bitbar_devicepool/configuration_device_mover.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mozilla_bitbar_devicepool/configuration_device_mover.py b/mozilla_bitbar_devicepool/configuration_device_mover.py index 6f75994..a5ef6ec 100644 --- a/mozilla_bitbar_devicepool/configuration_device_mover.py +++ b/mozilla_bitbar_devicepool/configuration_device_mover.py @@ -162,7 +162,7 @@ def move_devices_from_any_pool( # Initialize target group if it's None/empty if device_groups[target_group] is None: - device_groups[target_group] = {} + device_groups[target_group] = CommentedMap() # Track results results = {"moved": [], "not_found": [], "already_in_target": [], "errors": []} From 1eff8f1b25a6f2f4c110201bc9956c1cd9e913b6 Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Fri, 27 Feb 2026 13:37:47 -0800 Subject: [PATCH 5/7] move android 15 device to alpha --- config/lambdatest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/lambdatest.yml b/config/lambdatest.yml index 5b8e808..15b6b56 100644 --- a/config/lambdatest.yml +++ b/config/lambdatest.yml @@ -48,7 +48,6 @@ device_groups: R5CXC1AHV4M: # 9/10/25: recabled and verified by jmaher R5CXC1ASA3P: # 9/11/25: recabled and verified by jmaher R5CXC1AP2KT: # 9/11/25: recabled and verified by jmaher - R5CXC1HZK0W: # 9/11/25: recabled and verified by jmaher R5CXC1ASA2E: # 9/11/25: recabled and verified by jmaher R5CXC1ARM0A: # 9/11/25: recabled and verified by jmaher R5CXC1AMNFY: # 9/15/25: recabled and verified by jmaher @@ -95,6 +94,7 @@ device_groups: RZCY10LGB6W: # 2/23/26: had bad rotation, rotation code landed on master RZCY2011M7N: # 2/23/26: had bad rotation, rotation code landed on master a55-alpha: + R5CXC1HZK0W: # now on android 15, move to alpha for testing a55-android16: R5CXC1ASA0L: # 12/1/25: lt is attempting to upgrade to android 16, had bad power meter RZCY203N75Z: # 12/1/25: lt is attempting to upgrade to android 16, had bad power meter From 52140ca786ed68f6b9fbd38d24334c1a91a04017 Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Fri, 27 Feb 2026 13:38:19 -0800 Subject: [PATCH 6/7] add agents.md --- AGENTS.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 AGENTS.md diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..0e2f86e --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,16 @@ +# Repository Guidelines + +## Project Structure & Module Organization +The core Python package lives in `mozilla_bitbar_devicepool/`, with vendor-specific logic in `bitbar/` and `lambdatest/`. Supporting CLI entry points are defined in `pyproject.toml` and mirrored as helper scripts in `bin/`. Shared utils and report generators sit under `util/` and `device_group_report*.py`, while environment and service configuration lives in `config/` and `service/`. Tests reside in `mozilla_bitbar_devicepool/test/`, alongside fixture data in `test_data/`. + +## Build, Test, and Development Commands +Run `poetry install --with=dev` to sync dependencies, then `poetry shell` for an interactive environment. Use `pre-commit install` once per clone to enable formatting and lint hooks. Execute unit tests with `pytest` or the coverage variant `pytest --cov --cov-report=term`. CLI entry points run via `poetry run`, e.g., `poetry run mld` for LambdaTest device runs or `poetry run dgr` for Bitbar reports. + +## Coding Style & Naming Conventions +Stick to Python 3.9+ with 4-space indentation and descriptive, snake_case names for modules, functions, and variables. Formatting and imports are enforced by `ruff-format` with a 120-character line limit; structural linting runs via `ruff check --select I --fix` and `pylint` in CI/pre-commit. Configuration files use YAML or TOML—mirror existing key naming and comment styles. + +## Testing Guidelines +Place new tests in `mozilla_bitbar_devicepool/test/` following the `_test.py` pattern and reuse helpers in `util_test.py`. Prefer `pytest` fixtures over ad-hoc setup; store serialized inputs in `test_data/`. Validate coverage locally with `pytest --cov --cov-report=html` and ensure critical branches that touch vendor APIs are exercised via mocks. + +## Commit & Pull Request Guidelines +Commit messages are short (≤72 characters), lowercase, and often scoped (`lt status: refresh cache`). Group related edits per commit and reference Bugzilla or GitHub IDs when applicable. Pull requests should describe vendor impact, outline testing (`pytest`, manual device run), and include screenshots or log snippets when UI or report output changes. Link configuration updates to rollout plans so reviewers can validate credentials and scheduling. From 6faf444b826b0fd0dc7150709a361a7eb0a8557b Mon Sep 17 00:00:00 2001 From: Andrew Erickson Date: Mon, 2 Mar 2026 14:09:23 -0800 Subject: [PATCH 7/7] improve start script --- bin/start_mbd_new_server.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/start_mbd_new_server.sh b/bin/start_mbd_new_server.sh index cd026cf..3547829 100755 --- a/bin/start_mbd_new_server.sh +++ b/bin/start_mbd_new_server.sh @@ -4,4 +4,4 @@ set -e set -x . ./bitbar_env-v3-server.sh -mbd start-test-run-manager -b config/config-v3-server.yml --update-bitbar +poetry run mbd start-test-run-manager -b config/config-v3-server.yml --update-bitbar