[Test failure] Archive tests expect an old 400 message that the archive change replaced (2 tests)
The test is wrong confidence high · medium priority · api-tests-master, last seen in build 597
The verdict
- Fix is in
- the automation suite (e2e): the test is wrong
- Issue
- ENG-8845 · Completed
- Owner
- [email protected] (author of 03f9c2d6b, the change that broke the test; the test agent opens the pull request once this is in Ready for Development)
- Filed in
- Backlog, Test Agent Automation
- Service
- authz
- History when filed
- new, this error since build 597
- Suspect commit
- 03f9c2d6b authz: organization archive (soft delete) and purge (ENG-7837) (#17340) (Shashank-Agrawal12)
- Branches
- fails on master only: production is unaffected (api-tests-production build 620). Fix it before master is released to production.
Both tests assert the old message `could not find organization "<alias>"` (test_archive_org.py:9, 49, 80).
The archive handler now answers 400 `no live organization has alias "<alias>"; to resume an archive that did not finish, pass its orgId` (authz/pkg/handlers/organization.go:453). This is the branch taken when no orgId is passed.
The old text is only returned when an orgId is passed and the org isn't found (organization.go:463).
Commit 03f9c2d6b (ENG-7837) added the soft-delete cascade and the resume path, and updated knowledge/organizations.md. It did not update this test.
The status code is still 400 and the first archive returned 200. The repeat call is still refused, so the product contract holds.
I did not run it. Line 50, `assert "not found" in message`, would also fail, because the new message doesn't contain "not found".
Proposed fix
In test_archive_org.py, replace NOT_FOUND with `NO_LIVE_ORG = 'no live organization has alias "{}"'` and use it at lines 49 and 80. Delete the `assert "not found" in message` at line 50, or assert on "pass its orgId" instead. Update knowledge/organizations.md line 52 to match the new message.
History of this root cause
- filed ENG-8845 · build 597 8d ago
The test is wrong, confidence high; 2 tests; to [email protected] in Backlog
- branches ENG-8845 7d ago
Tests 2
Oldest to newest, up to 30 runs. Green passed, red failed with this error, amber failed with another error. Skipped and collapsed runs are left out. Newest build: 599.
| Test | History | Newest run | Reading |
|---|---|---|---|
| test_archive_unknown_alias ArchiveOrg |
did not run | ||
| test_archive_lifecycle ArchiveOrg |
did not run |
How the agent decided
- Models
- claude-sonnet-5-5 ($0.10, 5 lookups)
- Settled by
- the investigating model
- Cost
- $0.10
What it looked up (5, in order)
1. commit_diff repo=main, sha=03f9c2d6b, path=e2e/automation · 4474 chars back
03f9c2d6b 2026-11-13T17:58 Shashank-Agrawal12: authz: organization archive (soft delete) and purge (ENG-7837) (#17340)
37 files changed: advpsvc/internal/pubsub.go, authz/main.go, authz/org-deletion_DESIGN.md, authz/pkg/handlers/organization.go, authz/pkg/handlers/scale_organization.go, authz/pkg/health/org_job.go, authz/pkg/health/org_job_test.go, authz/pkg/health/org_purge.go, authz/pkg/health/org_purge_test.go, authz/pkg/health/org_restore.go, authz/pkg/health/org_restore_test.go, authz/pkg/health/org_soft_delete.go, authz/pkg/health/org_soft_delete_catalog.go, authz/pkg/health/org_soft_delete_graph.go, authz/pkg/health/org_soft_delete_integration_test.go, authz/pkg/health/org_soft_delete_request_test.go, authz/pkg/health/org_soft_delete_resume_test.go, authz/pkg/health/org_soft_delete_test.go, authz/pkg/health/organization.go, authz/pkg/health/util.go, authz/pkg/pubsub/org_soft_delete.go, authz/pkg/pubsub/org_soft_delete_test.go, authz/pkg/pubsub/study.go, authz/pkg/repo/organization.go, docsvc/pkg/models/document/org_deletion_gcs_test.go …
--- e2e/automation/knowledge/organizations.md
@@ -2,7 +2,7 @@
> **Purpose:** Org create validation, archive, listing, Tilda Scale tiers, the support toggle, member labels, contact areas and the members export. Read by `tests/onboardingsvc/organization/`, `tests/onboardingsvc/test_organizations.py`, the `archive_org` row of `org_authz/`, `new_org` (`organization_fixtures.py`) and `models/organization.py`.
>
-> **Last updated:** 202
… (2974 more characters not kept)
2. search_code repo=main, text=no live organization has alias · 204 chars back
authz/pkg/handlers/organization.go
453: respondWithError(ctx, w, http.StatusBadRequest, fmt.Sprintf("no live organization has alias %q; to resume an archive that did not finish, pass its orgId", alias))
3. search_code repo=main, text=could not find organization · 1194 chars back
e2e/automation/knowledge/organizations.md
52: Once the first archive writes a non-zero `deltimestamp`, the org stops matching. The second call answers 400 `could not find organization "<alias>": ... not found`. `delpending` is not in that MATCH a
138: - **Unknown alias:** `health.UpdateSupport` fails with `could not find organization X: object Organization {...} not found`. The handler sends that as a 500, and the suffix remap turns it into **404**
authz/pkg/repo/organization.go
182: return nil, fmt.Errorf("could not find organization %v: %v", currentAlias, err)
authz/pkg/health/organization.go
632: return fmt.Errorf("could not find organization %v: %v", orgAlias, err)
925: return nil, fmt.Errorf("could not find organization %v: %v", orgAlias, err)
1060: return nil, fmt.Errorf("could not find organization %v: %v", orgAlias, err)
authz/pkg/handlers/organization.go
463: respondWithError(ctx, w, http.StatusBadRequest, fmt.Sprintf("could not find organization %q", alias))
patientsvc/internal/patient_representative.go
66: return "could not find organization", http.StatusBadRequest
data-science/virtual_assistant/src/models/db/work_order_repository/activity_update.py
4. read_file repo=main, path=authz/pkg/handlers/organization.go, start_line=415, end_line=490 · 3900 chars back
authz/pkg/handlers/organization.go (607 lines), lines 415-490:
415 // @Router /api/organizations/{alias} [Delete]
416 //
417 // @Security ApiKeyAuth
418 func DeleteOrganization(w http.ResponseWriter, r *http.Request) {
419 ctx := r.Context()
420 _, span := logger.Tracer().Start(ctx, "handlers.DeleteOrganization")
421 defer span.End()
422 db := tildadb.DBWithUserContext(r)
423 org, _, status, _, err := orgAuthz(ctx, r, db, authlib.DELETE_OPERATION, false)
424 if err != nil {
425 logger.WithContext(ctx).Debug("authz check failed for delete organization", zap.Error(err))
426 respondWithError(ctx, w, status, err.Error())
427 return
428 }
429 logger.WithContext(ctx).Debug("DeleteOrganization called", zap.String("org", org.Alias))
430 if err := health.DeleteOrganization(ctx, db, org); err != nil {
431 respondWithError(ctx, w, http.StatusInternalServerError, fmt.Sprintf("Could not delete organization: %v", err))
432 return
433 }
434 respondWithJSON(ctx, w, http.StatusOK, "organization deleted successfully")
435 }
436
437 func archiveOrganizationByAlias(ctx context.Context, w http.ResponseWriter, db tildadb.DBHandle, alias, orgId, requestedBy string) {
438 alias = strings.TrimSpace(alias)
439 if alias == "" {
440 respondWithError(ctx, w, http.StatusBadRequest, "missing 'alias' path parameter")
441 return
442 }
443 org, err := authlib.GetOrganizationByAliasWithCtx(ctx, db, alias)
444 if err != nil && !tildadb.DBErrIsNotFound(err) && !tildadb.DBE
… (2400 more characters not kept)
5. search_code repo=main, text=NOT_FOUND, path_prefix=e2e/automation · 340 chars back
e2e/automation/tests/onboardingsvc/organization/test_archive_org.py
9: NOT_FOUND = 'could not find organization "{}"'
49: assert NOT_FOUND.format(alias) in message
80: assert NOT_FOUND.format(bogus) in response.json()["message"]
e2e/automation/tests/execsvc/test_careplan_rows.py
e2e/automation/tests/virtualassistant/test_ai_inbox.py
What it was shown (build 597, 22.0 KB)
The run
{
"job": "api-tests-master",
"build": 597,
"kind": "api-tests",
"result": "SUCCESS",
"started": "2026-11-15T00:26:03Z",
"tests": 1024,
"failed": 40,
"test_commit": "03f9c2d6b",
"cluster_prepared": {
"mode": "prepare",
"result": "ready",
"product_commit": "f56eb0825"
}
}
services
[
"docsvc",
"execsvc",
"patientsvc",
"schedsvc",
"enrollsvc",
"studiosvc",
"finsvc",
"notifsvc",
"dslsvc",
"authz",
"dashQL",
"dashRsvc",
"regsvc",
"advpsvc",
"workplansvc",
"datasvc",
"payoutsvc",
"tusker",
"authsvc",
"eventsvc",
"ehrsvc",
"docproc",
"studioai",
"sense"
]
The cluster during the run
{
"findings_opened_around_the_run": [],
"long_standing_findings_left_out": 7,
"pods_in_trouble_during_the_run": [
{
"workload": "tilda/chat-agent",
"probe": 1.0,
"first_minutes_after_run_start": 8
}
],
"deploys_during_the_run": [
{
"app": "execsvc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "studioaisvc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "docproc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "docsvc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "exportsvc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "tusker",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "dashrsvc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "dashql",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "notifsvc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "chat-agent",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "virtual-assistant",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
},
{
"app": "onboardingsvc",
"minutes_after_run_start": 33,
"image": "",
"by": "automated"
}
]
}
The group
{
"tests": 2,
"suite": "ArchiveOrg",
"members": [
{
"test": "automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_lifecycle",
"pattern": "new",
"meaning": "failed 1 run after passing the 29 before",
"newest_first": "F P P P P P P P P P P P P P P P P P P P P P P P P P P P P P",
"failing_in_a_row": 1,
"this_error_in_a_row": 1,
"this_error_since_build": 597,
"build_before_this_error": 593,
"failing_since_build": 597,
"last_passed_build": 593
},
{
"test": "automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_unknown_alias",
"pattern": "new",
"meaning": "failed 1 run after passing the 29 before",
"newest_first": "F P P P P P P P P P P P P P P P P P P P P P P P P P P P P P",
"failing_in_a_row": 1,
"this_error_in_a_row": 1,
"this_error_since_build": 597,
"build_before_this_error": 593,
"failing_since_build": 597,
"last_passed_build": 593
}
]
}
The failure
{
"test": "automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_lifecycle",
"status": "failed",
"message": "assert 'could not find organization \"automationSmoBackend1794704312434\"' in 'no live organization has alias \"automationSmoBackend1794704312434\"; to resume an archive that did not finish, pass its orgId'\n + where 'could not find organization \"automationSmoBackend1794704312434\"' = <built-in method format of str object at 0x79cb793118e0>('automationSmoBackend1794704312434')\n + where <built-in method format of str object at 0x79cb793118e0> = 'could not find organization \"{}\"'.format",
"traceback_tail": "automation/tests/onboardingsvc/organization/test_archive_org.py:49: in test_archive_lifecycle\n assert NOT_FOUND.format(alias) in message\nE assert 'could not find organization \"automationSmoBackend1794704312434\"' in 'no live organization has alias \"automationSmoBackend1794704312434\"; to resume an archive that did not finish, pass its orgId'\nE + where 'could not find organization \"automationSmoBackend1794704312434\"' = <built-in method format of str object at 0x79cb793118e0>('automationSmoBackend1794704312434')\nE + where <built-in method format of str object at 0x79cb793118e0> = 'could not find organization \"{}\"'.format",
"requests": [
{
"trace_id": "a917e57adadeaac39b14729092ee9c09",
"method": "DELETE",
"path": "/api/scale/organizations/automationSmoBackend1794704312434/archive",
"status": "400",
"error": "None"
},
{
"trace_id": "a917e57adadeaac39b14729c7c0a1752",
"method": "POST",
"path": "/api/organizations",
"status": "200",
"error": "None"
},
{
"trace_id": "a917e57adadeaac39b147296d5ca86a1",
"method": "GET",
"path": "/api/organizations",
"status": "200",
"error": "None"
},
{
"trace_id": "a917e57adadeaac39b147297db8196ca",
"method": "DELETE",
"path": "/api/scale/organizations/automationSmoBackend1794704312434/archive",
"status": "200",
"error": "None"
},
{
"trace_id": "a917e57adadeaac39b147299e73febfc",
"method": "GET",
"path": "/api/organizations",
"status": "200",
"error": "None"
}
],
"errors_the_services_logged_for_these_requests": "none: no service logged an error under these requests' trace ids"
}
Console lines about this test
{
"from": "console.log",
"lines": [
"638: ERROR E AssertionError: Should find changelog for trial scope creation",
"639: ERROR E assert None is not None",
"640: INFO Validating Trial scope changelog...",
"641: ERROR ____________________ TestArchiveOrg.test_archive_lifecycle _____________________",
"642: INFO automation/tests/onboardingsvc/organization/test_archive_org.py:49: in test_archive_lifecycle",
"643: INFO assert NOT_FOUND.format(alias) in message",
"644: ERROR E assert 'could not find organization \"automationSmoBackend1794704312434\"' in 'no live organization has alias \"automationSmoBackend1794704312434\"; to resume an archive that did not finish, pass its orgId'",
"645: ERROR E + where 'could not find organization \"automationSmoBackend1794704312434\"' = <built-in method format of str object at 0x79cb793118e0>('automationSmoBackend1794704312434')",
"\u2026",
"745: INFO assert None is not None",
"746: ERROR FAILED automation/tests/docsvc/test_edl_crud.py::TestEDLCrud::test_34_validate_atomic_scope_creation_changelog - AssertionError: Should find changelog for trial scope creation",
"747: INFO assert None is not None",
"748: ERROR FAILED automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_lifecycle - assert 'could not find organization \"automationSmoBackend1794704312434\"' in 'no live organization has alias \"automationSmoBackend1794704312434\"; to resume an archive that did not fi",
"749: INFO + where 'could not find organization \"automationSmoBackend1794704312434\"' = <built-in method format of str object at 0x79cb793118e0>('automationSmoBackend1794704312434')",
"750: INFO + where <built-in method format of str object at 0x79cb793118e0> = 'could not find organization \"{}\"'.format",
"751: ERROR FAILED automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_unknown_alias - assert 'could not find organization \"no-such-org-1794704315749\"' in 'no live organization has alias \"no-such-org-1794704315749\"; to resume an archive that did not finish, pass i"
]
}
The test's history
{
"pattern": "new",
"meaning": "failed 1 run after passing the 29 before",
"newest_first": "F P P P P P P P P P P P P P P P P P P P P P P P P P P P P P",
"failing_in_a_row": 1,
"this_error_in_a_row": 1,
"this_error_since_build": 597,
"build_before_this_error": 593
}
The test's source
{
"repo": "tildabio/main",
"at": "03f9c2d6b",
"path": "e2e/automation/tests/onboardingsvc/organization/test_archive_org.py",
"from_line": 18,
"failing_line": 49,
"code": "18 def test_archive_lifecycle(self, test_headers, new_org):\n19 \"\"\"TC-ORG-062: an organization can be archived. TC-ORG-065: it stays out of the list.\"\"\"\n20 org = Organization(test_headers)\n21 alias = new_org[\"alias\"]\n22 # By name, not alias \u2014 only name narrows the list server-side.\n23 name = new_org[\"name\"]\n24 \n25 # Step 1 \u2014 the org starts live and listed. Load-bearing: without it the\n26 # post-archive absence below would pass even if it had never been listed.\n27 assert new_org.get(\"delpending\") is False\n28 assert org.find_by(\"name\", name) is not None\n29 \n30 # Step 2 (TC-ORG-062) \u2014 archiving returns the mutated org.\n31 response = org.archive(alias)\n32 \n33 assert response.status_code == 200, response.text\n34 body = response.json()\n35 assert body[\"tildaid\"] == new_org[\"tildaid\"]\n36 assert body[\"alias\"] == alias\n37 assert body[\"delpending\"] is True\n38 # Not compared against local wall-clock: runner/cluster skew would flake it.\n39 assert body[\"deltimestamp\"] > 0\n40 \n41 # Step 3 (TC-ORG-065) \u2014 it drops out of the organizations list.\n42 assert org.find_by(\"name\", name) is None\n43 \n44 # Step 4 \u2014 archiving again is a 400, not a no-op 200.\n45 repeat = org.archive(alias)\n46 \n47 assert repeat.status_code == 400\n48 message = repeat.json()[\"message\"]\n49> assert NOT_FOUND.format(alias) in message\n50 assert \"not found\" in message\n51 \n52 def test_get_archived_org_is_forbidden(self, test_headers, new_org):\n53 org = Organization(test_headers)\n54 alias = new_org[\"alias\"]\n55 assert org.archive(alias).status_code == 200\n56 \n57 response = org.get_details(alias)\n58 \n59 # 403, not 404 \u2014 the org-resolution middleware refuses before the handler runs.\n60 assert response.status_code == 403\n61 assert f\"cannot access organization with alias {alias}\" in response.json()[\"message\"]\n62 \n63 def test_non_scale_admin_cannot_archive(self, test_headers, get_token_user1, new_org):\n64 alias = new_org[\"alias\"]\n65 \n66 response = Organization(build_org_header(get_token_user1, alias)).archive(alias)\n67 \n68 assert response.status_code == 403\n69 # scaleAdminOnly answers in text/plain, not JSON.\n70 assert \"this endpoint is available to Tilda Scale admins only\" in response.text\n71 # The refused call must be a no-op, not a partial archive.\n72 assert Organization(test_headers).get_details(alias).status_code == 200\n73 \n74 def test_archive_unknown_alias(self, test_headers):\n75 bogus = f\"no-such-org-{int(time.time() * 1000)}\"\n76 \n77 response = Organization(test_headers).archive(bogus)\n78 \n79 assert response.status_code == 400\n80 assert NOT_FOUND.format(bogus) in response.json()[\"message\"]"
}
Commits in the window
{
"between": "build 593 (last pass, started 2026-11-12T00:21:19Z) and build 597 (first failure of the streak, started 2026-11-15T00:26:03Z)",
"test_repo": {
"repo": "tildabio/main",
"range": "b805e7b66..03f9c2d6b",
"href": "https://github.com/tildabio/main/compare/b805e7b66c8c01e711f0566189e109e1ecb6e150...03f9c2d6b8bcadfd46ddaf810027681ae8e40891",
"total": 49,
"commits": [
{
"sha": "03f9c2d6b",
"subject": "authz: organization archive (soft delete) and purge (ENG-7837) (#17340)",
"login": "Shashank-Agrawal12",
"name": "Shashank-Agrawal12",
"date": "2026-11-13T17:58",
"touches": [
"advpsvc/internal",
"authz/main.go",
"authz/org-deletion_DESIGN.md",
"authz/pkg",
"docsvc/pkg",
"e2e/automation",
"studiosvc/pkg",
"tildaobj/model.go",
"tildaobj/pubsub_defs.go",
"tusker/pubsub",
"util/gcs",
"util/pubsublib"
]
},
{
"sha": "1dd204c8f",
"subject": "fix(dashQL): processing heatmap groups by user id and counts the Docs Processed statuses (#17434)",
"login": "mrinalraj1",
"name": "Mrinal",
"date": "2026-11-13T17:41",
"touches": [
"dashQL/charts",
"dashQL/graph"
]
},
{
"sha": "b463423fe",
"subject": "tmfsync: Veeva always syncs in bulk, with intervals from 15 minutes (#17412)",
"login": "krishnaatluru-cpu",
"name": "Krishna Chaitanya",
"date": "2026-11-13T17:18",
"touches": [
"data-science/tmfsync"
]
},
{
"sha": "00fbe7774",
"subject": "[E2E]: bootstrap update (#17369)",
"login": "sbadiger",
"name": "Santosh Badiger",
"date": "2026-11-13T14:06",
"touches": [
"tctl/example"
]
},
{
"sha": "b709cd98e",
"subject": "[E2E]: update to user permission for bootstrap (#16732)",
"login": "sbadiger",
"name": "Santosh Badiger",
"date": "2026-11-13T14:03",
"touches": [
"tctl/example"
]
},
{
"sha": "d636ea6fa",
"subject": "Fix manual document sharing (#17427)",
"login": "pralim",
"name": "Prasad",
"date": "2026-11-13T12:55",
"touches": [
"docsvc/pkg"
]
},
{
"sha": "3103c65d7",
"subject": "Retire GET /api/documents/v2/{documentID} in favor of POST .../view (#17423)",
"login": "vishal23karedla",
"name": "Vishal Karedla",
"date": "2026-11-13T12:53",
"touches": [
"data-science/docproc",
"docsvc/pkg",
"docsvc/routes",
"e2e/automation",
"tctl/doc"
]
},
{
"sha": "e0e36707e",
"subject": "fix: removing a CC in AI chat reaches the work order's draft (ENG-8482) (#17366)",
"login": "TadasValaitiz",
"name": "Tadas Valaitis",
"date": "2026-11-13T12:46",
"touches": [
"data-science/chat-agent",
"data-science/packages",
"data-science/virtual_assistant"
]
},
{
"sha": "3e5ce671e",
"subject": "feat(studiosvc): add GET /api/studio/activities/{id}/objectCounts (ENG-4808) (#17428)",
"login": "poojalodhi",
"name": "Pooja Lodhi",
"date": "2026-11-13T12:32",
"touches": [
"studiosvc/pkg"
]
},
{
"sha": "862429c0a",
"subject": "studiosvc: flag rules whose compared choices no longer exist when a question's choices change (ENG-6755) (#17179)",
"login": "sanchitmishra08",
"name": "sanchitmishra08",
"date": "2026-11-13T11:57",
"touches": [
"common/graphlib",
"studiosvc/pkg",
"tildaobj/studio_obj_defs.go"
]
},
{
"sha": "4f8a585a2",
"subject": "Test visit activity notes, questions, visit summary and investigator select (execsvc v1) (ENG-8554) (#17281)",
"login": "tilda-gitbot[bot]",
"name": "tilda-gitbot[bot]",
"date": "2026-11-13T10:31"
},
{
"sha": "7e5e884ce",
"subject": "fix(doclib): publish the dashboards delete event from every hard delete (#17389)",
"login": "mrinalraj1",
"name": "Mrinal",
"date": "2026-11-13T08:49"
},
{
"sha": "49b945d98",
"subject": "Test the studies list: org admin vs member membership and per-status counts (TC-STD-006, TC-STD-101, TC-STD-10 (ENG-8641) (#17358)",
"login": "tilda-gitbot[bot]",
"name": "tilda-gitbot[bot]",
"date": "2026-11-13T06:37"
},
{
"sha": "83b37c21f",
"subject": "Studio API: cover study configuration drafts, completed-visit locks and canvas block edits (ENG-8648) (#17359)",
"login": "tilda-gitbot[bot]",
"name": "tilda-gitbot[bot]",
"date": "2026-11-13T06:10"
},
{
"sha": "e0b8dc44d",
"subject": "Add API tests for the 7 uncovered tusker task routes (inboxes, assignment, bulk/single update, categories, sta (ENG-8483) (#17220)",
"login": "tilda-gitbot[bot]",
"name": "tilda-gitbot[bot]",
"date": "2026-11-13T06:03"
},
{
"sha": "89e9249fc",
"subject": "studiosvc: show in-protocol and codelist edits in the Studio audit log (ENG-7019) (#17365)",
"login": "susheelkumar-cmyk",
"name": "susheelkumar-cmyk",
"date": "2026-11-13T05:38"
},
{
"sha": "b7b792509",
"subject": "fix(feedsvc): accept legacy time zone names like Asia/Calcutta (#17417)",
"login": "mvelamatt",
"name": "murali krishna velamati",
"date": "2026-11-13T05:02"
},
{
"sha": "7676bf4e2",
"subject": "feat(edl): EDL plans on sponsor roles; mapping changes move rows over Pub/Sub (ENG-8626) (#17415)",
"login": "mvelamatt",
"name": "murali krishna velamati",
"date": "2026-11-13T02:49"
},
{
"sha": "a005f890d",
"subject": "Cover the Tilda Scale admin routes: delegations, alias rename, platform capabilities, checkauth, user delete (ENG-8570) (#17319)",
"login": "tilda-gitbot[bot]",
"name": "tilda-gitbot[bot]",
"date": "2026-11-13T01:33"
},
{
"sha": "82c72484f",
"subject": "Study team and site training log populations (#17409)",
"login": "taylorfutral",
"name": "Taylor",
"date": "2026-11-13T00:38"
},
{
"sha": "ea8ac3400",
"subject": "feedsvc: EDL labels and scope rows, no empty scope approvals, documents card leads with QC (ENG-8627) (#17413)",
"login": "mvelamatt",
"name": "murali krishna velamati",
"date": "2026-11-13T00:36"
},
{
"sha": "f4cbcd9d2",
"subject": "fix(execsvc): status returns rows saved under hdmObjId and full document details (ENG-5239) (#17399)",
"login": "danherberttilda",
"name": "Dan Herbert",
"date": "2026-11-12T21:45"
},
{
"sha": "9976e91e8",
"subject": "fix(studiosvc): return the statement's variable name and state in the list API (ENG-7501) (#17411)",
"login": "danherberttilda",
"name": "Dan Herbert",
"date": "2026-11-12T21:44"
},
{
"sha": "a910115f9",
"subject": "tmfsync: separate Valkey queue and leader keys per environment (#17392)",
"login": "krishnaatluru-cpu",
"name": "Krishna Chaitanya",
"date": "2026-11-12T21:16"
},
{
"sha": "681f8cc47",
"subject": "studiosvc: import the protocol studioai extracts from a study's documents, on pub/sub (ENG-3080) (#17410)",
"login": "sureshboddapati",
"name": "Suresh Boddapati",
"date": "2026-11-12T21:14"
}
]
}
}
The issue as the agent wrote it
**Fix is in:** the automation suite (e2e): the test is wrong.
**What failed:** `assert 'could not find organization "automationSmoBackend1794704312434"' in 'no live organization has alias "automationSmoBackend1794704312434"; to resume an archive that did not finish, pass its orgId'`
**The test is wrong**, confidence high. Found in `api-tests-master` build 597: [run in X-ray](https://xray.tilda.pizza/tests/run/api-tests-master/597).
Both tests assert the old message `could not find organization "<alias>"` (test_archive_org.py:9, 49, 80).
The archive handler now answers 400 `no live organization has alias "<alias>"; to resume an archive that did not finish, pass its orgId` (authz/pkg/handlers/organization.go:453). This is the branch taken when no orgId is passed.
The old text is only returned when an orgId is passed and the org isn't found (organization.go:463).
Commit 03f9c2d6b (ENG-7837) added the soft-delete cascade and the resume path, and updated knowledge/organizations.md. It did not update this test.
The status code is still 400 and the first archive returned 200. The repeat call is still refused, so the product contract holds.
I did not run it. Line 50, `assert "not found" in message`, would also fail, because the new message doesn't contain "not found".
**Suspect commit:** [03f9c2d6b](https://github.com/tildabio/main/commit/03f9c2d6b8bcadfd46ddaf810027681ae8e40891) authz: organization archive (soft delete) and purge (ENG-7837) (#17340) (Shashank-Agrawal12)
**Service:** authz
**Assigned to:** [email protected] (author of 03f9c2d6b, the change that broke the test; the test agent opens the pull request once this is in Ready for Development).
**Proposed fix:**
In test_archive_org.py, replace NOT_FOUND with `NO_LIVE_ORG = 'no live organization has alias "{}"'` and use it at lines 49 and 80. Delete the `assert "not found" in message` at line 50, or assert on "pass its orgId" instead. Update knowledge/organizations.md line 52 to match the new message.
**Failing tests (2):**
- [automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_lifecycle](https://xray.tilda.pizza/tests/case/94c1f237cb232596) (new in this run)
- [automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_unknown_alias](https://xray.tilda.pizza/tests/case/18845230ac8343c1) (new in this run)
**Error:**
```
assert 'could not find organization "automationSmoBackend1794704312434"' in 'no live organization has alias "automationSmoBackend1794704312434"; to resume an archive that did not finish, pass its orgId'
+ where 'could not find organization "automationSmoBackend1794704312434"' = <built-in method format of str object at 0x79cb793118e0>('automationSmoBackend1794704312434')
+ where <built-in method format of str object at 0x79cb793118e0> = 'could not find organization "{}"'.format
```
The test agent picks this ticket up and opens the pull request.
```yaml
suite: api
feature: fix-test-archive-org
find: true
fix: true
target_file: e2e/automation/tests/onboardingsvc/organization/test_archive_org.py
failing_tests:
- automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_lifecycle
- automation/tests/onboardingsvc/organization/test_archive_org.py::TestArchiveOrg::test_archive_unknown_alias
acceptance:
- Each test in failing_tests passes on the automation cluster.
- 'No assertion is weakened to make a test pass: the test still checks the behaviour it was written for.'
request: "Fix existing tests that fail on master. Do not write new coverage.\nError: assert 'could not\
\ find organization \"automationSmoBackend1794704312434\"' in 'no live organization has alias \"automationSmoBackend1794704312434\"\
; to resume an archive that did not finish, pass its orgId'\n + where 'could not find organization\
\ \"automationSmoBackend1794704312434\"' = <built-in method format of str object at 0x79cb793118e0>('automationSmoBackend1794704312434')\n\
\ + where <built-in met\nDiagnosis: Both tests assert the old message `could not find organization\
\ \"<alias>\"` (test_archive_org.py:9, 49, 80).\nThe archive handler now answers 400 `no live organization\
\ has alias \"<alias>\"; to resume an archive that did not finish, pass its orgId` (authz/pkg/handlers/organization.go:453).\
\ This is the branch taken when no orgId is passed.\nThe old text is only returned when an orgId is\
\ passed and the org isn't found (organization.go:463).\nCommit 03f9c2d6b (ENG-7837) added the soft-delete\
\ cascade and the resume path, and updated knowledge/organizations.md. It did not update this test.\n\
The status code is still 400 and the first archive returned 200. The repeat call is still refused, so\
\ the product contract holds.\nI did not run it. Line 50, `assert \"not found\" in message`, would also\
\ fail, because the new message doesn't contain \"not found\".\nProposed change: In test_archive_org.py,\
\ replace NOT_FOUND with `NO_LIVE_ORG = 'no live organization has alias \"{}\"'` and use it at lines\
\ 49 and 80. Delete the `assert \"not found\" in message` at line 50, or assert on \"pass its orgId\"\
\ instead. Update knowledge/organizations.md line 52 to match the new message."
```
+++ Agent notes
Filed by X-ray's triage agent. Models asked: claude-sonnet-5-5; settled by deep; 5 lookups in the code and its history.
Group `triage:369943018404d1` (one issue per root cause).
A wrong verdict can be corrected on the run page in X-ray.
+++