)]}'
{"cyborg/tests/unit/db/test_migrations.py":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"8939a2dcde507bf17614da1b7a9dd8f0e6b5c151","unresolved":false,"context_lines":[{"line_number":126,"context_line":"        type_enum \u003d devices.c.type.type"},{"line_number":127,"context_line":"        self.assertIn(\u0027NVME\u0027, type_enum.enums)"},{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _check_b47c8f2d1e3a(self, engine, data):"},{"line_number":130,"context_line":"        devices \u003d db_utils.get_table(engine, \u0027devices\u0027)"},{"line_number":131,"context_line":"        col_names \u003d [column.name for column in devices.c]"},{"line_number":132,"context_line":"        self.assertIn(\u0027device_state\u0027, col_names)"}],"source_content_type":"text/x-python","patch_set":8,"id":"0b9a75c8_acb36870","line":129,"updated":"2026-08-12 07:46:51.000000000","message":"The _check_b47c8f2d1e3a migration test checks column existence and Enum type but does not verify the specific enum values (available, allocated, pending_cleaning, cleaning, error), unlike the immediately preceding _check_a35b4295a0e5 test which verifies \u0027NVME\u0027 is in the type enum.\n\n**Severity**: SUGGESTION | **Confidence**: 0.9\n\n**Benefit**: If a typo or missing enum value is introduced in the Alembic migration, the test would still pass because it only verifies the column is an Enum type, not that the correct values are defined. This reduces the effectiveness of migration testing as a safety net.\n\n**Recommendation**:\nAdd assertions to verify the enum values match the expected set, similar to _check_a35b4295a0e5. For example: `enum_type \u003d devices.c.device_state.type; self.assertIn(\u0027available\u0027, enum_type.enums); self.assertIn(\u0027error\u0027, enum_type.enums)` or assert the full list of expected values.","commit_id":"c0d3840583b88aba82dbf2b72aa5e30c8f29ff37"}],"cyborg/tests/unit/objects/test_device.py":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"2eab6a3e48012f7bd0545f75c3c53582b99fceeb","unresolved":false,"context_lines":[{"line_number":167,"context_line":"            ValueError, objects.Device, self.context, type\u003d\u0027OTHER_TYPE\u0027"},{"line_number":168,"context_line":"        )"},{"line_number":169,"context_line":""},{"line_number":170,"context_line":"    def test_supports_cleaning_nvme(self):"},{"line_number":171,"context_line":"        device \u003d objects.Device(self.context, type\u003d\u0027NVME\u0027)"},{"line_number":172,"context_line":"        self.assertTrue(device.supports_cleaning)"},{"line_number":173,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"757e71d4_661f4e95","line":170,"updated":"2026-08-06 16:03:33.000000000","message":"The existing test_device_type method verifies that constructing a Device with an invalid type raises ValueError. There is no equivalent test verifying that an invalid device_state value is rejected by the EnumField. Adding this test would close a testing gap consistent with the existing pattern.\n\n**Severity**: SUGGESTION | **Confidence**: 0.8\n\n**Benefit**: Without this test, a future change that accidentally weakens the device_state EnumField validation could go unnoticed.\n\n**Recommendation**:\nAdd a test that constructs a Device with an invalid device_state (e.g., device_state\u003d\u0027invalid\u0027) and asserts ValueError is raised, mirroring the test_device_type pattern.","commit_id":"06cec519c1232c437994fb75670d52bc7060fa64"}],"releasenotes/notes/add-device-state-column-1a2b3c4d5e6f.yaml":[{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"8c9dc404b4f92364397f5a8dd06fe455d35946a5","unresolved":false,"context_lines":[{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The ``devices`` table has a new ``device_state`` column (nullable"},{"line_number":5,"context_line":"    VARCHAR) that tracks the lifecycle state of devices that support"},{"line_number":6,"context_line":"    secure cleanup. Valid states are ``available``, ``allocated``,"},{"line_number":7,"context_line":"    ``pending_cleaning``, ``cleaning``, and ``error``. The column is"},{"line_number":8,"context_line":"    populated automatically when a device transitions through the cleanup"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"6cc29049_68f5a66f","line":5,"updated":"2026-08-07 06:07:17.000000000","message":"The release note states the new device_state column is a \"nullable VARCHAR\" but the Alembic migration and SQLAlchemy model both define it as a SQL Enum type with five valid values. This factual error could mislead operators performing schema introspection, writing manual queries, or planning data...\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: Operators reading the release note may expect a VARCHAR column and write application code or SQL queries assuming string storage, when the actual column is an Enum. On PostgreSQL this means a dedicated enum type; on MySQL it is a native ENUM. Schema introspection tools will report different types...\n\n**Suggestion**:\nReplace \u0027nullable VARCHAR\u0027 with \u0027nullable Enum\u0027 or \u0027nullable ENUM with values available, allocated, pending_cleaning, cleaning, and error\u0027 in the release note to accurately reflect the SQL type created by the migration.","commit_id":"b41d5805ad5e093019659dd3cc14d4c754787759"},{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"ff9b5933aa5773b2a474617507e60557d4a8e3c3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The ``devices`` table has a new ``device_state`` column (nullable"},{"line_number":5,"context_line":"    VARCHAR) that tracks the lifecycle state of devices that support"},{"line_number":6,"context_line":"    secure cleanup. Valid states are ``available``, ``allocated``,"},{"line_number":7,"context_line":"    ``pending_cleaning``, ``cleaning``, and ``error``. The column is"}],"source_content_type":"text/x-yaml","patch_set":6,"id":"76fe7004_4cfa03e8","line":4,"updated":"2026-08-09 04:28:38.000000000","message":"The release note states the device_state column is a \u0027nullable VARCHAR\u0027, but the Alembic migration and SQLAlchemy model both define it as a sa.Enum type. This factual error could mislead operators about the column\u0027s constraints.\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: Operators reading the release note would expect a free-form VARCHAR column and may attempt to insert arbitrary string values, which would fail against the Enum constraint. This could cause confusion during upgrade planning and testing.\n\n**Suggestion**:\nReplace \u0027nullable VARCHAR\u0027 with \u0027nullable ENUM\u0027 in the release note so the column type description matches the actual database schema.","commit_id":"701b1fb1d1bd45ba25f9e78435c34bdf701aef25"},{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"7a80868f2f390fc77445882e033fd9d95a14fc1b","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The ``devices`` table has a new ``device_state`` column (nullable"},{"line_number":5,"context_line":"    ENUM) that tracks the lifecycle state of devices that support"},{"line_number":6,"context_line":"    secure cleanup. Valid states are ``available``, ``allocated``,"},{"line_number":7,"context_line":"    ``pending_cleaning``, ``cleaning``, and ``error``. The column is"},{"line_number":8,"context_line":"    populated automatically when a device transitions through the cleanup"},{"line_number":9,"context_line":"    workflow; existing rows default to ``NULL`` (treated as available)."},{"line_number":10,"context_line":"    Run ``cyborg-dbsync upgrade`` to apply the schema change."}],"source_content_type":"text/x-yaml","patch_set":7,"id":"47f97358_1d1ae5aa","line":7,"updated":"2026-08-11 08:46:53.000000000","message":"The release note states that device_state is \u0027populated automatically when a device transitions through the cleanup workflow\u0027 and that NULL is \u0027treated as available\u0027. No code in this patch implements a cleanup workflow, automatically populates the column, or interprets NULL as available. This is...\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: Operators reading the release note will expect an automated cleanup workflow and NULL-as-available semantics after running cyborg-dbsync upgrade, but no such behavior exists. This could lead to confusion during deployment planning or incorrect assumptions about operational state.\n\n**Suggestion**:\nRevise the release note to describe only what this patch delivers: a nullable ENUM column and a versioned-object field. Either remove the claims about automatic population and NULL semantics, or rephrase them as forward-looking statements (e.g., \u0027Future patches will implement the cleanup workflow that populates this column\u0027).","commit_id":"7671436166f0cc2a243b71b06f7507c2d69b090b"},{"author":{"_account_id":28006,"name":"teim-ci","display_name":"teim-ci","email":"ci@seanmooney.info","username":"ci-sean-mooney","status":"this is a third-party ci account run by sean-k-mooney on irc\nhosted at zuul.teim.app"},"tag":"autogenerated:zuul:automatic-ci","change_message_id":"e26abfed4aa68f0f9d5dffeecdb59c469440bd98","unresolved":false,"context_lines":[{"line_number":4,"context_line":"    The ``devices`` table has a new ``device_state`` column (nullable"},{"line_number":5,"context_line":"    ENUM) that tracks the lifecycle state of devices that support"},{"line_number":6,"context_line":"    secure cleanup. Valid states are ``available``, ``allocated``,"},{"line_number":7,"context_line":"    ``pending_cleaning``, ``cleaning``, and ``error``. The column is"},{"line_number":8,"context_line":"    populated automatically when a device transitions through the cleanup"},{"line_number":9,"context_line":"    workflow; existing rows default to ``NULL`` (treated as available)."},{"line_number":10,"context_line":"    Run ``cyborg-dbsync upgrade`` to apply the schema change."}],"source_content_type":"text/x-yaml","patch_set":9,"id":"756c18f3_391dd9b3","line":7,"updated":"2026-08-13 04:02:03.000000000","message":"The release note states \u0027The column is populated automatically when a device transitions through the cleanup workflow.\u0027 However, no cleanup workflow code exists anywhere in the codebase that sets or transitions device_state. This is misleading for operators upgrading to this release, as the colum...\n\n**Severity**: WARNING | **Confidence**: 0.9\n\n**Impact**: Operators reading the release note will expect automatic state management that does not exist. This could lead to confusion during upgrades and operational planning.\n\n**Suggestion**:\nEither revise the release note to state that the column is added as infrastructure for a future cleanup workflow, or include the code that implements the cleanup workflow transitions in this patch.","commit_id":"f400e864aaba9408fa97cacb0f7c740934ebb51b"}]}
