Skip to content

fix(parametergroups): row-delete attribute, null guard, public class - #776

Merged
prasad-albert merged 10 commits into
mainfrom
cakeagents/sdk-166
Sep 30, 2026
Merged

prasad-albert merged 10 commits into
mainfrom
cakeagents/sdk-166

Conversation

@lkubie

@lkubie lkubie commented Sep 24, 2026

Copy link
Copy Markdown
Collaborator

What

Four parameter_groups parity fixes from the backend audit (§5.21), verified against MoleculeEngineering/api-parametergroup:

  1. Row-delete attribute name (utils/_patch.py): generate_parameter_group_patches emitted attribute: "parameter" for parameter row deletes, but the API filters row deletes on attribute === "parameters" (patchParameterGroup.js via config.js PARAMETERS: 'parameters'), so any parameter removal 400ed the whole PATCH.
  2. get_by_ids null guard (collections/parameter_groups.py): the bulk ids endpoint pushes null entries for missing/inactive IDs (getBulkPRGByIds.js builds Items by indexing a found-map, so gaps serialize as null), which crashed ParameterGroup(**None). Nulls are now skipped, matching the documented "groups not found are omitted" behavior.
  3. SecurityClass.PUBLIC (core/shared/enums.py): the API's VALIDCLASS includes "public"; added to the shared enum so groups with that class validate.
  4. documents alias (resources/parameter_groups.py): the API returns associated documents under Documents (parameterGroup.Documents = ... in the service); the field had no alias and never deserialized. Also fixed a mangled "See Also" fragment in its docstring.

Why

SDK-166

How

  • _patch.py: single call-site change ("parameter" → "parameters"). The attribute name only feeds the row-delete datum, and the data-template caller of the same helper already passes "parameters", so no other path changes. Regression test added in tests/utils/test_patches.py.
  • get_by_ids: filters None items before model validation (one-line guard in the comprehension).
  • SecurityClass: additive enum member, backwards compatible.
  • documents: alias="Documents"; deserialization only, the field stays exclude=True on dump.

PR #771 overlap awareness: this branch is off current main and touches none of #771's files (exceptions.py, core/utils.py, core/pagination.py, collections/base.py, companies.py, workflows.py); the shared _patch.py hunk is kept to the one call-site line in the row-delete path.

Testing

  • uv run ruff format + uv run ruff check — clean (repo-wide).
  • uv run pytest tests/utils tests/unit -q — 45 passed, including the new test_parameter_group_row_delete_uses_parameters_attribute (verified it fails when the _patch.py fix is reverted).
  • uv run pytest tests/collections/test_parameter_groups.py --collect-only -q — 20 collected.
  • Sanity-checked SecurityClass("public") round-trip and Documents alias deserialization against payload shapes from the backend service.

Cake session: https://agents.ai.albertinventdev.com/sessions/910a4725-9404-4336-81dd-e30bfef0ce73

…letes

The row-delete op built by generate_parameter_group_patches emitted
attribute "parameter", but the API filters row deletes on
attribute == "parameters", so any parameter removal 400ed the whole
PATCH.
The bulk ids endpoint pushes null for missing or inactive IDs, which
crashed model validation. Filter nulls so not-found groups are omitted
as documented.
The parameter groups API accepts and returns class "public"; add it to
the shared SecurityClass enum so such groups validate.
The API returns associated documents under the Documents key; without
the alias the field never populated.
@claude

claude Bot commented Sep 24, 2026

Copy link
Copy Markdown

Looks good - no bugs or correctness issues found.

@prasad-albert prasad-albert left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Verified backend contract parity, backward compatibility, caller ergonomics, and SDK conventions. Ready to merge.

@claude

claude Bot commented Sep 25, 2026

Copy link
Copy Markdown

Looks good - no bugs or correctness issues found.

@claude

claude Bot commented Sep 25, 2026

Copy link
Copy Markdown

Code Review

Issues Found

  • tests/utils/test_patches.py:7,9 - Duplicate import: ParameterGroup is imported on line 7 (from albert.resources.parameter_groups import ParameterGroup, ParameterValue) and again on line 9 (from albert.resources.parameter_groups import ParameterGroup). This is an F811 redefinition and contradicts the PR's stated clean ruff run. Drop line 9.

Summary
1 issue found. Minor (test-only lint); the four functional changes are correct: the parameter to parameters row-delete fix matches the data-template caller and API contract, the get_by_ids null guard is sound, and SecurityClass.PUBLIC and the documents alias are correct additive/parity fixes appropriately labeled fix.

@claude

claude Bot commented Sep 25, 2026

Copy link
Copy Markdown

Looks good - no bugs or correctness issues found.

# Conflicts:
#	tests/utils/test_patches.py
@claude

claude Bot commented Sep 25, 2026

Copy link
Copy Markdown

Looks good - no bugs or correctness issues found.

@lkubie

lkubie commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

CircleCI Integration Tests failed

Branch: cakeagents/sdk-166 (658b0c7)
Build: https://circleci.com/gh/albert-labs/albert-python/8615

=========================== short test summary info ============================
FAILED tests/integration/collections/test_inventory.py::test_inventory_search_with_name_only_storage_location_filter@inventory - AssertionError: assert {'INVB658159'} == {'INVA658153', 'INVB658159'}
  
  Extra items in the right set:
  'INVA658153'
  
  Full diff:
    {
  -     'INVA658153',
        'INVB658159',
    }
SKIPPED [10] tests/integration/collections/test_cas.py: CAS collection is deprecated in favor of Substance v4; the testing tenant has migrated to substance_v4.
SKIPPED [1] tests/integration/collections/test_data_templates.py:193: No eligible user returned by users.search() for ACL update.
SKIPPED [1] tests/integration/collections/test_inventory.py:197: LLM search is currently not working as expected.
SKIPPED [1] tests/integration/collections/test_data_templates.py:731: No extensions configured in tenant
SKIPPED [1] tests/integration/collections/test_lots.py:91: No second active user available for team tests
SKIPPED [1] tests/integration/collections/test_btdataset.py:23: created_by=USR226595 returned no datasets on this tenant (seeded DST1523)
SKIPPED [1] tests/integration/collections/test_reports.py:48: Report Queries not loaded into testing environment yet
SKIPPED [1] tests/integration/collections/test_sds.py:105: Tenant cannot generate SDS for seeded formula: POST 'https://staging.albertinventdev.com/api/v2/documentgenerator/sds' failed with status code 422 (Unprocessable Entity). Errors: [{'msg': 'ERROR_MISSING_INFO_CAS', 'casIDs': ['SDK-Test-d2e70708-660c-4f18-877c-1d0dda537959-64-17-5']}]
SKIPPED [1] tests/integration/collections/test_teams.py:90: No second active user available for team tests
SKIPPED [1] tests/integration/collections/test_teams.py:116: No second active user available for team tests
SKIPPED [15] tests/integration/collections/test_chats.py: Chats API is not yet available in the test environment.
SKIPPED [1] tests/integration/collections/test_files.py:33: Breakthrough file namespace not available or upload not visible
SKIPPED [1] tests/integration/collections/test_users.py:92: No search hits could be hydrated (stale index IDs)
SKIPPED [1] tests/integration/resources/test_sheets.py:221: Seeded Process Design has no rows to reference
XFAIL tests/integration/collections/test_design_runs.py::test_create_optimization_returns_generate_insight@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_create_doe_returns_smart_doe_insight@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_returns_response@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_doe_returns_response@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_create_optimization_accepts_weighted_objectives@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_accepts_weighted_objectives@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_accepts_plain_criterion@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_treats_a_null_weight_as_unweighted@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_smart_datasets.py::test_smart_dataset_get_data@datatemplates - No DWH available in TEN0 test environment.
XFAIL tests/integration/collections/test_smart_datasets.py::test_smart_dataset_get_data_with_filters@datatemplates - No DWH available in TEN0 test environment.
XFAIL tests/integration/collections/test_tasks.py::test_get_and_set_block_rules@tasks - increased intervals is not live on ten0 test env
XFAIL tests/integration/collections/test_tasks.py::test_create_with_combinations_integration@tasks - increased intervals is not live on ten0 test env
XFAIL tests/integration/collections/test_activities.py::test_activity_search - GET /api/v3/activities/search 500 OpenSearch on TEN0 staging: https://linear.app/albert-invent/issue/SEA-221
XPASS tests/integration/collections/test_smart_datasets.py::test_smart_dataset_create_with_build@datatemplates - No DWH available in TEN0 test environment.
XPASS tests/integration/collections/test_targets.py::test_target_create_with_between_parameter_filter@datatemplates - Requires api-targets backend to accept operator/value-pair TargetParameter.value (ML-1207). Remove decorator once deployed.
XPASS tests/integration/collections/test_batch_data.py::test_create_batch_data@tasks - Batch data creation is currently not idempotent, so this test may fail if batch data already exists for the task.
XPASS tests/integration/collections/test_tasks.py::test_generate_block_combinations_integration@tasks - increased intervals is not live on ten0 test env
XPASS tests/integration/collections/test_substance_v4.py::test_search_pagination@projects - api-substance-v4 search pagination intermittently returns duplicate items across pages (MoleculeEngineering/api-substance-v4#57).
= 1 failed, 353 passed, 37 skipped, 13 xfailed, 5 xpassed, 36 warnings in 520.68s (0:08:40) =

@lkubie

lkubie commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

CircleCI Integration Tests failed

Branch: cakeagents/sdk-166 (658b0c7)
Build: https://circleci.com/gh/albert-labs/albert-python/8641

=========================== short test summary info ============================
FAILED tests/integration/collections/test_property_data.py::test_task_property_calculation_evaluation@tasks - albert.exceptions.InternalServerError: POST 'https://staging.albertinventdev.com/api/v3/datatemplates' failed with status code 500 (Internal Server Error). Errors: [{'msg': "Cannot read properties of undefined (reading 'x-amz-version-id')"}]
FAILED tests/integration/collections/test_substance_v4.py::test_update_metadata_multiselect_list_field@projects - albert.exceptions.AlbertServerError: PATCH 'https://staging.albertinventdev.com/api/v4/substances/metadata/SUB1f1b915a-1599-6350-9b9b-e02ed2eef41a' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: QizmV6eF8SsRIF7BifGuuKoMqWoJlYIb9odYcHbZ6WtMtbn7B906xA&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/collections/test_product_design.py::test_search@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/collections/test_product_design.py::test_get_unpacked@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/collections/test_sds.py::test_generate_sds_unpacks_formula@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/collections/test_worksheet.py::test_worksheet_search@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/resources/test_sheets.py::test_update_cells_updates_inventory_values@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/resources/test_sheets.py::test_formulation_column_names_use_display_name@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/resources/test_sheets.py::test_add_formulation_lifecycle@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
ERROR tests/integration/resources/test_sheets.py::test_add_task_row@sheets - albert.exceptions.AlbertServerError: POST 'https://staging.albertinventdev.com/api/v3/cas' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: Wb5vSL0Gct4ez_3C6D5lO8QZP86CnZYFZz_UI9y_r82boV3flPDt0A&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
SKIPPED [10] tests/integration/collections/test_cas.py: CAS collection is deprecated in favor of Substance v4; the testing tenant has migrated to substance_v4.
SKIPPED [1] tests/integration/collections/test_data_templates.py:193: No eligible user returned by users.search() for ACL update.
SKIPPED [1] tests/integration/collections/test_inventory.py:197: LLM search is currently not working as expected.
SKIPPED [1] tests/integration/collections/test_data_templates.py:731: No extensions configured in tenant
SKIPPED [1] tests/integration/collections/test_lots.py:91: No second active user available for team tests
SKIPPED [1] tests/integration/collections/test_btdataset.py:23: created_by=USR226595 returned no datasets on this tenant (seeded DST1536)
SKIPPED [1] tests/integration/collections/test_reports.py:48: Report Queries not loaded into testing environment yet
SKIPPED [1] tests/integration/collections/test_teams.py:90: No second active user available for team tests
SKIPPED [1] tests/integration/collections/test_teams.py:116: No second active user available for team tests
SKIPPED [1] tests/integration/resources/test_sheets.py:221: Seeded Process Design has no rows to reference
SKIPPED [15] tests/integration/collections/test_chats.py: Chats API is not yet available in the test environment.
SKIPPED [1] tests/integration/collections/test_files.py:33: Breakthrough file namespace not available or upload not visible
SKIPPED [1] tests/integration/collections/test_users.py:92: No search hits could be hydrated (stale index IDs)
XFAIL tests/integration/collections/test_design_runs.py::test_create_optimization_returns_generate_insight@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_create_doe_returns_smart_doe_insight@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_returns_response@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_doe_returns_response@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_create_optimization_accepts_weighted_objectives@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_accepts_weighted_objectives@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_accepts_plain_criterion@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_treats_a_null_weight_as_unweighted@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_smart_datasets.py::test_smart_dataset_get_data@datatemplates - No DWH available in TEN0 test environment.
XFAIL tests/integration/collections/test_smart_datasets.py::test_smart_dataset_get_data_with_filters@datatemplates - No DWH available in TEN0 test environment.
XFAIL tests/integration/collections/test_tasks.py::test_get_and_set_block_rules@tasks - increased intervals is not live on ten0 test env
XFAIL tests/integration/collections/test_tasks.py::test_create_with_combinations_integration@tasks - increased intervals is not live on ten0 test env
XFAIL tests/integration/collections/test_activities.py::test_activity_search - GET /api/v3/activities/search 500 OpenSearch on TEN0 staging: https://linear.app/albert-invent/issue/SEA-221
XPASS tests/integration/collections/test_smart_datasets.py::test_smart_dataset_create_with_build@datatemplates - No DWH available in TEN0 test environment.
XPASS tests/integration/collections/test_targets.py::test_target_create_with_between_parameter_filter@datatemplates - Requires api-targets backend to accept operator/value-pair TargetParameter.value (ML-1207). Remove decorator once deployed.
XPASS tests/integration/collections/test_batch_data.py::test_create_batch_data@tasks - Batch data creation is currently not idempotent, so this test may fail if batch data already exists for the task.
XPASS tests/integration/collections/test_tasks.py::test_generate_block_combinations_integration@tasks - increased intervals is not live on ten0 test env
XPASS tests/integration/collections/test_substance_v4.py::test_search_pagination@projects - api-substance-v4 search pagination intermittently returns duplicate items across pages (MoleculeEngineering/api-substance-v4#57).
= 2 failed, 345 passed, 36 skipped, 13 xfailed, 5 xpassed, 31 warnings, 8 errors in 657.24s (0:10:57) =

lkubie commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator Author

Failure triage: (1) 8 errors + substance 504s = staging CAS service down (POST /api/v3/cas 504 Gateway Timeout across sheets/sds/product_design fixtures; substance metadata PATCH 504 is the same outage). (2) test_inventory_search_with_name_only_storage_location_filter = known partial-index poll flake, fixed by #798 predicate (pending merge). (3) test_task_property_calculation_evaluation = backend bug in api-datatemplate: datatemplate.service.js:783 reads uploadedFile.headers['x-amz-version-id'] unguarded, so a failed S3 upload surfaces as 500 'Cannot read properties of undefined'. Latent backend error-handling gap, not this diff (parameter_groups patch code only; failing call is a datatemplate create). Flagging the backend bug to the datatemplates owners.

@lkubie
lkubie requested review from albert-tb and anubhavd-albert and removed request for albert-tb and anubhavd-albert September 28, 2026 15:53
@claude

claude Bot commented Sep 28, 2026

Copy link
Copy Markdown

Code Review

Issues Found

  • [src/albert/resources/parameter_groups.py:348] Minor: the documents attribute docstring ("Deserialized from Documents.") leaks wire-format/implementation detail. Per the repo docstring rules, describe the caller-facing contract (it is already covered by "Read-only"); drop the "Deserialized from Documents" clause.

Summary
1 minor issue found. The four core fixes are correct: the parameter -> parameters row-delete attribute fix matches the API contract and the data-template caller, the get_by_ids null guard correctly skips null Items entries, SecurityClass.PUBLIC is an additive backwards-compatible enum member, and the documents alias="Documents" deserializes correctly (populate_by_name=True on the base keeps by-name construction working). PR title follows conventional commits, no version bump, no breaking marker.

@lkubie

lkubie commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

CircleCI Integration Tests failed

Branch: cakeagents/sdk-166 (6db3875)
Build: https://circleci.com/gh/albert-labs/albert-python/8716

=========================== short test summary info ============================
FAILED tests/integration/collections/test_substance_v4.py::test_update_metadata_multiselect_list_field@projects - albert.exceptions.AlbertServerError: PATCH 'https://staging.albertinventdev.com/api/v4/substances/metadata/SUB1f1bb552-e493-6540-a277-5864565cb7d3' failed with status code 504 (Gateway Timeout). Errors: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML><HEAD><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>ERROR: The request could not be satisfied</TITLE>
</HEAD><BODY>
<H1>504 Gateway Timeout ERROR</H1>
<H2>The request could not be satisfied.</H2>
<HR noshade size="1px">
We can't connect to the server for this app or website at this time. There might be too much traffic or a configuration error. Try again later, or contact the app or website owner.
<BR clear="all">
If you provide content to customers through CloudFront, you can find steps to troubleshoot and help prevent this error by reviewing the CloudFront documentation.
<BR clear="all">
<HR noshade size="1px">
<PRE>
Generated by cloudfront (CloudFront) HTTP3 Server
Request ID: 6aokTVYW8qVy3J3tAdtTiceNcChYDaA6KSjoaFVNb677dy11aF2mPg&#x3D;&#x3D;
</PRE>
<ADDRESS>
</ADDRESS>
</BODY></HTML>
SKIPPED [10] tests/integration/collections/test_cas.py: CAS collection is deprecated in favor of Substance v4; the testing tenant has migrated to substance_v4.
SKIPPED [1] tests/integration/collections/test_data_templates.py:193: No eligible user returned by users.search() for ACL update.
SKIPPED [1] tests/integration/collections/test_inventory.py:210: LLM search is currently not working as expected.
SKIPPED [1] tests/integration/collections/test_data_templates.py:731: No extensions configured in tenant
SKIPPED [1] tests/integration/collections/test_lots.py:91: No second active user available for team tests
SKIPPED [1] tests/integration/collections/test_btdataset.py:23: created_by=USR226595 returned no datasets on this tenant (seeded DST1569)
SKIPPED [1] tests/integration/collections/test_reports.py:46: Report Queries not loaded into testing environment yet
SKIPPED [1] tests/integration/collections/test_teams.py:90: No second active user available for team tests
SKIPPED [1] tests/integration/collections/test_teams.py:116: No second active user available for team tests
SKIPPED [15] tests/integration/collections/test_chats.py: Chats API is not yet available in the test environment.
SKIPPED [1] tests/integration/collections/test_users.py:92: No search hits could be hydrated (stale index IDs)
SKIPPED [1] tests/integration/collections/test_files.py:33: Breakthrough file namespace not available or upload not visible
SKIPPED [1] tests/integration/collections/test_sds.py:105: Tenant cannot generate SDS for seeded formula: POST 'https://staging.albertinventdev.com/api/v2/documentgenerator/sds' failed with status code 422 (Unprocessable Entity). Errors: [{'msg': 'ERROR_MISSING_INFO_CAS', 'casIDs': ['SDK-Test-5be318e5-d2b1-4b99-bc75-3dab85322f52-64-17-5']}]
SKIPPED [1] tests/integration/resources/test_sheets.py:221: Seeded Process Design has no rows to reference
XFAIL tests/integration/collections/test_design_runs.py::test_create_optimization_returns_generate_insight@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_create_doe_returns_smart_doe_insight@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_returns_response@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_doe_returns_response@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_create_optimization_accepts_weighted_objectives@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_accepts_weighted_objectives@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_accepts_plain_criterion@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_design_runs.py::test_validate_optimization_treats_a_null_weight_as_unweighted@datatemplates - api-designruns is not live in the TEN0 test environment.
XFAIL tests/integration/collections/test_smart_datasets.py::test_smart_dataset_get_data@datatemplates - No DWH available in TEN0 test environment.
XFAIL tests/integration/collections/test_smart_datasets.py::test_smart_dataset_get_data_with_filters@datatemplates - No DWH available in TEN0 test environment.
XFAIL tests/integration/collections/test_tasks.py::test_get_and_set_block_rules@tasks - increased intervals is not live on ten0 test env
XFAIL tests/integration/collections/test_tasks.py::test_create_with_combinations_integration@tasks - increased intervals is not live on ten0 test env
XFAIL tests/integration/collections/test_activities.py::test_activity_search - GET /api/v3/activities/search 500 OpenSearch on TEN0 staging: https://linear.app/albert-invent/issue/SEA-221
XPASS tests/integration/collections/test_batch_data.py::test_create_batch_data@tasks - Batch data creation is currently not idempotent, so this test may fail if batch data already exists for the task.
XPASS tests/integration/collections/test_smart_datasets.py::test_smart_dataset_create_with_build@datatemplates - No DWH available in TEN0 test environment.
XPASS tests/integration/collections/test_targets.py::test_target_create_with_between_parameter_filter@datatemplates - Requires api-targets backend to accept operator/value-pair TargetParameter.value (ML-1207). Remove decorator once deployed.
XPASS tests/integration/collections/test_tasks.py::test_generate_block_combinations_integration@tasks - increased intervals is not live on ten0 test env
XPASS tests/integration/collections/test_substance_v4.py::test_search_pagination@projects - api-substance-v4 search pagination intermittently returns duplicate items across pages (MoleculeEngineering/api-substance-v4#57).
= 1 failed, 354 passed, 37 skipped, 13 xfailed, 5 xpassed, 36 warnings in 667.72s (0:11:07) =

@claude

claude Bot commented Sep 30, 2026

Copy link
Copy Markdown

Looks good - no bugs or correctness issues found.

@prasad-albert
prasad-albert merged commit 0f496dd into main Sep 30, 2026
5 checks passed
@prasad-albert
prasad-albert deleted the cakeagents/sdk-166 branch September 30, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants