)]}'
{"neutron_lib/db/utils.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"511eba6f581d40deba0e16b3f2dba63479d4b64b","unresolved":true,"context_lines":[{"line_number":200,"context_line":"    :param model: The model to query for."},{"line_number":201,"context_line":"    :returns: A query from the said context for the said model."},{"line_number":202,"context_line":"    \"\"\""},{"line_number":203,"context_line":"    stmt \u003d select(model)"},{"line_number":204,"context_line":"    # define basic filter condition for model query"},{"line_number":205,"context_line":"    if model_query_scope_is_project(context, model):"},{"line_number":206,"context_line":"        stmt \u003d stmt.where(model.project_id \u003d\u003d context.project_id)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3ed466e1_4e5c8be7","line":203,"range":{"start_line":203,"start_character":11,"end_line":203,"end_character":24},"updated":"2026-06-22 11:23:47.000000000","message":"From Claude:\n\n```\nPremature execution loses lazy query semantics\nThe old code returned a Query that hadn\u0027t hit the database yet -- callers could stack additional filters before execution. The new code calls session.execute(stmt) immediately, meaning:\n\nCallers can no longer compose additional filters\nPotentially fetches far more rows than needed (all rows matching the project scope, rather than the narrower filter the caller would have applied)\n```","commit_id":"62aa78b2001a82b72d572ed565eae56e1feb5b03"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"511eba6f581d40deba0e16b3f2dba63479d4b64b","unresolved":true,"context_lines":[{"line_number":205,"context_line":"    if model_query_scope_is_project(context, model):"},{"line_number":206,"context_line":"        stmt \u003d stmt.where(model.project_id \u003d\u003d context.project_id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    return context.session.execute(stmt).scalars()"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":3,"id":"20e53d20_0ab01da2","line":208,"range":{"start_line":208,"start_character":40,"end_line":208,"end_character":50},"updated":"2026-06-22 11:23:47.000000000","message":"This is changing the type returned. Instead of a query, now we have a `ScalarResult`. A `ScalarResult` does not have `.filter()`, `.filter_by()`, `.one()` or `.with_entities()`. There are several examples in the Neutron code expecting that.","commit_id":"62aa78b2001a82b72d572ed565eae56e1feb5b03"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"032e4c80d1de16161174a5100ed5db3d23bc7c2d","unresolved":true,"context_lines":[{"line_number":205,"context_line":"    if model_query_scope_is_project(context, model):"},{"line_number":206,"context_line":"        stmt \u003d stmt.where(model.project_id \u003d\u003d context.project_id)"},{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    return context.session.execute(stmt).scalars()"},{"line_number":209,"context_line":""},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"@contextlib.contextmanager"}],"source_content_type":"text/x-python","patch_set":3,"id":"85d54e66_754dc97d","line":208,"range":{"start_line":208,"start_character":40,"end_line":208,"end_character":50},"in_reply_to":"20e53d20_0ab01da2","updated":"2026-06-22 14:46:53.000000000","message":"So much for trusting Claude, I should have created a neutron depends-on patch to double check this. For now I\u0027ll just abandon as this will require more work.","commit_id":"62aa78b2001a82b72d572ed565eae56e1feb5b03"}]}
