[Test failure] Work plan config took 273 s: flex LLM calls refused after 2 min each, then ran on standard (3 tests)
Cluster or environment confidence low · medium priority · api-tests-production, last seen in build 621 · corrected from “Cause not clear” by satish (via Claude Code)
The verdict
- Fix is in
- neither the tests nor the product: the cluster or environment
- Issue
- ENG-8911 · Completed
- Owner
- Satish Ashok (code owner of workplansvc)
- Filed in
- Ready for Development, product project, in the current cycle
- Service
- workplansvc
- History when filed
- new, this error since build 621
- Branches
- fails on production only: the same tests pass on master (api-tests-master build 597). A fix that is on master has not reached production.
Changed in Linear since X-ray filed it. The issue is the current word on this failure: ENG-8911 ›
Filed as: [Test failure] Work plan config generation never finished on production run 621 (stuck resolving) (3 tests)
X-ray's verdict as filed:
All three failures look like one cause: the agent's plan generation for new work plan configs did not finish during this run.
1) A new config was still not idle after the 180 s SSE wait plus 10 s of polling (models/work_plan_config.py:58-102). 2) The fixture's draft config produced no workorder items. 3) The instructions PUT got 409 'a plan generation is already in progress' (ErrWorkplanCfgResolutionInProgress, workplan_cfg.go:59). The suite notes call that 409 transient.
Nothing in the changes explains it. Every product commit in a654678c2..0407066eb touches only CI or docs. The only master-only test commit, b1080c587, changes the llm-probe test, not these. These tests passed on master build 597 and in the 29 production runs before this one, and workplansvc logged no error for these traces.
Next: read the workplansvc and studioai INFO logs for config 209078e4 to see what waitingOn (workplan_agent_config / va_work_order_configs) was stuck on, then check build 622.
Steps to reproduce
- Sign in as a CRO user in an organisation that has a work plan type and template with milestones.
- Use a study with at least one site attached.
- POST /api/workplan/configs with the study id, the plan type id, the template id, the milestones with instructions and the site ids; expect 202 with a tildaid and a jobId.
- Watch GET /api/workplan/events for ConfigurationResolved for that jobId.
- Poll GET /api/workplan/configs/{tildaid} every 2 s.
- Expected: within about 3 minutes waitingOn is empty and the config has one milestone per template milestone; actual: waitingOn never cleared within 190 s, and a PUT to /instructions answers 409 'a plan generation is already in progress for this workplan config'.
History of this root cause
- filed ENG-8911 · build 621 6d ago
Cause not clear, confidence low; 3 tests; to [email protected] in Ready for Development
- corrected 6d ago
to Cluster or environment by satish (via Claude Code)
Tests 3
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: 621.
| Test | History | Newest run | Reading |
|---|---|---|---|
| test_create_config_async_returns_milestones_when_ready WorkPlanConfig |
did not run | ||
| test_work_order_config_reads_back_over_v2_with_its_draft WorkPlanConfig |
did not run | ||
| test_patch_config_then_update_instructions_then_add_user_task_item WorkPlanConfig |
did not run |
How the agent decided
- Models
- claude-sonnet-5-5 ($0.13, 6 lookups), then claude-opus-5-5 ($0.33, 8 lookups)
- Settled by
- the escalation model, because the first was unsure
- Cost
- $0.46
What it looked up (14, in order)
1. read_file repo=main, path=e2e/automation/models/work_plan_config.py, start_line=60, end_line=125 · 2147 chars back
e2e/automation/models/work_plan_config.py (102 lines), lines 60-102:
60 logger.info(f"Waiting for config {cfg_id} via SSE — jobId={job_id}")
61 try:
62 sse_listener.wait_until_payload_idle(
63 job_id=job_id,
64 types=("ConfigurationResolved", "InstancesResolved", "InstanceChanged"),
65 timeout=timeout,
66 )
67 except TimeoutError as exc:
68 max_retries = min(max_retries, 5)
69 logger.info(f"SSE wait timed out for config {cfg_id} ({exc}) — brief polling backstop")
70 cfg = self.get(cfg_id).json()
71 if cfg.get("waitingOn", "") == "":
72 return cfg
73 logger.info(
74 f"SSE idle reached but config {cfg_id} still waitingOn={cfg.get('waitingOn')!r} — "
75 "falling through to polling"
76 )
77
78 def check():
79 resp = self.get(cfg_id)
80 if resp.status_code != 200:
81 logger.info(f"wait_until_ready: GET returned {resp.status_code} — {resp.text[:200]}")
82 return {}
83 body = resp.json()
84 pending_instances = [
85 {"id": i.get("tildaid"), "state": i.get("state"), "waitingOn": i.get("waitingOn")}
86 for i in body.get("instances", [])
87 if i.get("waitingOn")
88 ]
89 logger.
… (647 more characters not kept)
2. commit_diff repo=main, sha=b1080c587, path=e2e/automation/tests/workplansvc/test_work_plan_config.py · 1764 chars back
b1080c587 2026-10-30T12:47 Harsh-Tilda: api tests fixes as per recent changes (#17013)
22 files changed: e2e/.gitignore, e2e/automation/knowledge/crosite.md, e2e/automation/knowledge/document-access.md, e2e/automation/knowledge/document-review.md, e2e/automation/knowledge/documents.md, e2e/automation/knowledge/shared-fixtures.md, e2e/automation/knowledge/workplan-async-and-activation.md, e2e/automation/knowledge/workplans.md, e2e/automation/models/study_actor.py, e2e/automation/tests/docsvc/document_review/test_document_review.py, e2e/automation/tests/docsvc/test_doc_policy_access.py, e2e/automation/tests/docsvc/test_two_step_upload.py, e2e/automation/tests/docsvc/test_upload_document.py, e2e/automation/tests/fixtures/cro_site_fixtures.py, e2e/automation/tests/fixtures/document_fixtures.py, e2e/automation/tests/fixtures/study_actor_authz_fixtures.py, e2e/automation/tests/onboardingsvc/cro_site/test_cro_site_staff.py, e2e/automation/tests/onboardingsvc/cro_site/test_cro_site_study.py, e2e/automation/tests/virtualassistant/test_event_work_order.py, e2e/automation/tests/workplansvc/test_work_plan_config.py, e2e/automation/tests/workplansvc/test_work_plan_instance.py, e2e/automation/utils/helpers/doc_helper.py
--- e2e/automation/tests/workplansvc/test_work_plan_config.py
@@ -314,7 +314,8 @@ def test_workplan_agent_llm_probe_responds(self, setup_work_plan_seed_template):
cfg_client = WorkPlanConfig(headers)
test_id = f"llm-probe-{unique_suffix()}"
- wai
… (264 more characters not kept)
3. service_errors service=workplansvc · 1428 chars back
+48m workplansvc observability/middleware.go:281: Request completed — 500 · could not create work plan type:work plan type name cannot be empty
+48m workplansvc handlers/respond.go:45: could not create work plan type:work plan type name cannot be empty
+54m workplansvc workplan/workplan_cfg.go:174: Failed to create workplan config — milestone with id 5177b812-0c77-4084-9b8a-eb2dca9da831 not found in plan type
+54m workplansvc observability/middleware.go:281: Request completed — 500 · milestone with id 5177b812-0c77-4084-9b8a-eb2dca9da831 not found in plan type
+54m workplansvc handlers/respond.go:45: milestone with id 5177b812-0c77-4084-9b8a-eb2dca9da831 not found in plan type
+54m workplansvc observability/middleware.go:281: Request completed — 500 · at least one site is required (siteIds or non-empty siteRecipientList)
+54m workplansvc handlers/respond.go:45: at least one site is required (siteIds or non-empty siteRecipientList)
+54m workplansvc workplan/workplan_cfg.go:174: Failed to create workplan config — at least one site is required (siteIds or non-empty siteRecipientList)
+54m workplansvc workplan/workplan_cfg.go:174: Failed to create workplan config — site 30e18594-d927-4bae-83f2-146ccbe873c1 not found
+66m workplansvc observability/middleware.go:281: Request completed — 500 · work plan template name cannot be empty
+66m workplansvc handlers/respond.go:45: work plan template name cannot be empty
4. service_errors text=Neo4j · 3939 chars back
+-2m onboardingsvc observability/middleware.go:281: Request completed — 500 · failed to add user: could not add staff [email protected]: Neo4jError: Neo.ClientError.Schema.ConstraintValidationFailed (Node(1821) already exists wit
+-2m onboardingsvc handlers/profile.go:1085: could not register user via token — failed to add user: could not add staff [email protected]: Neo4jError: Neo.ClientError.Schema.ConstraintValidationFailed (Node(1821) already exists wit
+-2m onboardingsvc tildadb/api.go:1221: failed to create node — Neo4jError: Neo.ClientError.Schema.ConstraintValidationFailed (Node(1821) already exists with label `Staff` and properties `email` = '[email protected]
+-2m onboardingsvc tildadb/util.go:993: failed to process db result — Neo4jError: Neo.ClientError.Schema.ConstraintValidationFailed (Node(1821) already exists with label `Staff` and properties `email` = '[email protected]
+0m docproc tilda_neo4j/client.py:224: NEO4J EXECUTE_READ [FAILED] 0.08s — {code: Neo.ClientError.Statement.SyntaxError} {message: Invalid input 'UNION': expected an expression, ',', 'AS', 'ORDER BY', 'LIMIT', 'OFFSET', 'SHOW', 'SKIP',
+9m docsvc tildadb/util.go:993: failed to process db result — Neo4jError: Neo.TransientError.Transaction.DeadlockDetected (ForsetiClient[transactionId=8300, clientId=710] can't acquire ExclusiveLock{owner=ForsetiClient[tra
+12m docsvc tildadb/util.go:993: failed to process db result — Neo4jError: Neo.TransientError.Transactio
… (2439 more characters not kept)
5. service_errors text=transaction · 2464 chars back
+9m docsvc tildadb/util.go:993: failed to process db result — Neo4jError: Neo.TransientError.Transaction.DeadlockDetected (ForsetiClient[transactionId=8300, clientId=710] can't acquire ExclusiveLock{owner=ForsetiClient[tra
+10m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+10m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+10m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+10m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+11m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+11m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+11m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+11m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+11m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+11m docsvc pubsublib/pubsub.go:131: message was never published because transaction was never committed
+12m docsvc tildadb/util.go:993: failed to process db result — Neo4jError: Neo.TransientError.Transaction.DeadlockDetected (ForsetiClient[transactionId=9445, clientId=805] can't acquire ExclusiveLock{owner=ForsetiClient[tra
+12
… (964 more characters not kept)
6. read_file repo=main, path=e2e/automation/models/work_plan_config.py, start_line=38, end_line=62 · 1373 chars back
e2e/automation/models/work_plan_config.py (102 lines), lines 38-62:
38
39 def get_history(self, cfg_id, params=None):
40 logger.info(f"Fetching history for config {cfg_id}")
41 return self.get(endpoint=f"{self._endpoint}/{cfg_id}/history", params=params)
42
43 def add_milestone_items(self, cfg_id, milestone_id, payload):
44 logger.info(f"Adding milestone items to config {cfg_id}, milestone {milestone_id}")
45 return self.post(
46 payload,
47 endpoint=f"{self._endpoint}/{cfg_id}/milestones/{milestone_id}/milestone-items",
48 )
49
50 def bulk_actions(self, cfg_id, payload):
51 logger.info(f"Running bulk actions on config {cfg_id} ({len(payload.get('actions', []))} actions)")
52 return self.post(payload, endpoint=f"{self._endpoint}/{cfg_id}/instances/bulk-actions")
53
54 def llm_probe(self, payload):
55 logger.info("Running llm-probe")
56 return self.post(payload, endpoint=f"{self._endpoint}/llm-probe")
57
58 def wait_until_ready(self, cfg_id, max_retries=60, interval=2, sse_listener=None, job_id=None, timeout=180):
59 if sse_listener is not None and job_id is not None:
60 logger.info(f"Waiting for config {cfg_id} via SSE — jobId={job_id}")
61 try:
62 sse_listener.wait_until_payload_idle(
7. read_file repo=main, path=e2e/automation/models/work_plan_config.py, start_line=60, end_line=130 · 2147 chars back
e2e/automation/models/work_plan_config.py (102 lines), lines 60-102:
60 logger.info(f"Waiting for config {cfg_id} via SSE — jobId={job_id}")
61 try:
62 sse_listener.wait_until_payload_idle(
63 job_id=job_id,
64 types=("ConfigurationResolved", "InstancesResolved", "InstanceChanged"),
65 timeout=timeout,
66 )
67 except TimeoutError as exc:
68 max_retries = min(max_retries, 5)
69 logger.info(f"SSE wait timed out for config {cfg_id} ({exc}) — brief polling backstop")
70 cfg = self.get(cfg_id).json()
71 if cfg.get("waitingOn", "") == "":
72 return cfg
73 logger.info(
74 f"SSE idle reached but config {cfg_id} still waitingOn={cfg.get('waitingOn')!r} — "
75 "falling through to polling"
76 )
77
78 def check():
79 resp = self.get(cfg_id)
80 if resp.status_code != 200:
81 logger.info(f"wait_until_ready: GET returned {resp.status_code} — {resp.text[:200]}")
82 return {}
83 body = resp.json()
84 pending_instances = [
85 {"id": i.get("tildaid"), "state": i.get("state"), "waitingOn": i.get("waitingOn")}
86 for i in body.get("instances", [])
87 if i.get("waitingOn")
88 ]
89 logger.
… (647 more characters not kept)
8. commit_diff repo=main, sha=b1080c587, path=e2e/automation/tests/workplansvc/test_work_plan_config.py · 1764 chars back
b1080c587 2026-10-30T12:47 Harsh-Tilda: api tests fixes as per recent changes (#17013)
22 files changed: e2e/.gitignore, e2e/automation/knowledge/crosite.md, e2e/automation/knowledge/document-access.md, e2e/automation/knowledge/document-review.md, e2e/automation/knowledge/documents.md, e2e/automation/knowledge/shared-fixtures.md, e2e/automation/knowledge/workplan-async-and-activation.md, e2e/automation/knowledge/workplans.md, e2e/automation/models/study_actor.py, e2e/automation/tests/docsvc/document_review/test_document_review.py, e2e/automation/tests/docsvc/test_doc_policy_access.py, e2e/automation/tests/docsvc/test_two_step_upload.py, e2e/automation/tests/docsvc/test_upload_document.py, e2e/automation/tests/fixtures/cro_site_fixtures.py, e2e/automation/tests/fixtures/document_fixtures.py, e2e/automation/tests/fixtures/study_actor_authz_fixtures.py, e2e/automation/tests/onboardingsvc/cro_site/test_cro_site_staff.py, e2e/automation/tests/onboardingsvc/cro_site/test_cro_site_study.py, e2e/automation/tests/virtualassistant/test_event_work_order.py, e2e/automation/tests/workplansvc/test_work_plan_config.py, e2e/automation/tests/workplansvc/test_work_plan_instance.py, e2e/automation/utils/helpers/doc_helper.py
--- e2e/automation/tests/workplansvc/test_work_plan_config.py
@@ -314,7 +314,8 @@ def test_workplan_agent_llm_probe_responds(self, setup_work_plan_seed_template):
cfg_client = WorkPlanConfig(headers)
test_id = f"llm-probe-{unique_suffix()}"
- wai
… (264 more characters not kept)
9. service_errors service=workplansvc · 1428 chars back
+48m workplansvc observability/middleware.go:281: Request completed — 500 · could not create work plan type:work plan type name cannot be empty
+48m workplansvc handlers/respond.go:45: could not create work plan type:work plan type name cannot be empty
+54m workplansvc workplan/workplan_cfg.go:174: Failed to create workplan config — milestone with id 5177b812-0c77-4084-9b8a-eb2dca9da831 not found in plan type
+54m workplansvc observability/middleware.go:281: Request completed — 500 · milestone with id 5177b812-0c77-4084-9b8a-eb2dca9da831 not found in plan type
+54m workplansvc handlers/respond.go:45: milestone with id 5177b812-0c77-4084-9b8a-eb2dca9da831 not found in plan type
+54m workplansvc observability/middleware.go:281: Request completed — 500 · at least one site is required (siteIds or non-empty siteRecipientList)
+54m workplansvc handlers/respond.go:45: at least one site is required (siteIds or non-empty siteRecipientList)
+54m workplansvc workplan/workplan_cfg.go:174: Failed to create workplan config — at least one site is required (siteIds or non-empty siteRecipientList)
+54m workplansvc workplan/workplan_cfg.go:174: Failed to create workplan config — site 30e18594-d927-4bae-83f2-146ccbe873c1 not found
+66m workplansvc observability/middleware.go:281: Request completed — 500 · work plan template name cannot be empty
+66m workplansvc handlers/respond.go:45: work plan template name cannot be empty
10. read_file repo=main, path=e2e/automation/models/work_plan_config.py, start_line=40, end_line=60 · 1241 chars back
e2e/automation/models/work_plan_config.py (102 lines), lines 40-60:
40 logger.info(f"Fetching history for config {cfg_id}")
41 return self.get(endpoint=f"{self._endpoint}/{cfg_id}/history", params=params)
42
43 def add_milestone_items(self, cfg_id, milestone_id, payload):
44 logger.info(f"Adding milestone items to config {cfg_id}, milestone {milestone_id}")
45 return self.post(
46 payload,
47 endpoint=f"{self._endpoint}/{cfg_id}/milestones/{milestone_id}/milestone-items",
48 )
49
50 def bulk_actions(self, cfg_id, payload):
51 logger.info(f"Running bulk actions on config {cfg_id} ({len(payload.get('actions', []))} actions)")
52 return self.post(payload, endpoint=f"{self._endpoint}/{cfg_id}/instances/bulk-actions")
53
54 def llm_probe(self, payload):
55 logger.info("Running llm-probe")
56 return self.post(payload, endpoint=f"{self._endpoint}/llm-probe")
57
58 def wait_until_ready(self, cfg_id, max_retries=60, interval=2, sse_listener=None, job_id=None, timeout=180):
59 if sse_listener is not None and job_id is not None:
60 logger.info(f"Waiting for config {cfg_id} via SSE — jobId={job_id}")
11. search_code repo=main, text=plan generation is already in progress · 395 chars back
e2e/automation/knowledge/workplan-async-and-activation.md
22: 1. `resolutionStatus` claim held → `cannot start: a plan generation is already in progress ...` — **transient**.
workplansvc/pkg/workplan/workplan_cfg.go
59: var ErrWorkplanCfgResolutionInProgress = errors.New("cannot start: a plan generation is already in progress for this workplan config. Wait for it to finish and try again")
12. read_file repo=main, path=e2e/automation/knowledge/workplan-async-and-activation.md, start_line=1, end_line=80 · 7683 chars back
e2e/automation/knowledge/workplan-async-and-activation.md (71 lines), lines 1-71:
1 # Work Plans — Async Resolution, Publish, Work-Order Activation and SSE
2
3 > **Purpose:** how a work plan config resolves, publishes into instances and activates its work orders through the VA, and how the suite waits for it — read by every `tests/workplansvc/` test that publishes or waits, the
4 >
5 > **Last updated:** 2026-10-06 | publish authorization verified against `8acf42fb43` by code read; rest against `d41cef16cb`; ENG-6253 state from Linear
6
7 ---
8
9 ## The three 202s
10
11 `POST /configs`, `PUT /configs/{id}/instructions` and `POST /configs/{id}/publish` return **202** `{"tildaid", "jobId"}`. Create and PUT start an agent resolution pass; publish starts async instantiation (the sweep in `p
12
13 - **Publish reuses the config's latest job** (`PublishWorkplanCfg`: "Do not create a new job on publish"), so the publish `jobId` is normally the *create* `jobId`. A job-id filter alone does not separate create-time from
14 - **Seed a config with one POST, not POST + PUT.** `POST /configs` already takes `milestones[].instructions` keyed by *template* milestone id and one resolution produces the full plan; the UI's "Generate Plan" is exactly
15
16 ## When is a config "ready"?
17
18 - **`waitingOn`** (config): `workplan_agent_config`, `va_work_order_configs`, `docsvc_edl_event_provision`, `va_instance_creation`; `""`/absent = the agent has stopped. **Instance** values: `va_work_order
… (6183 more characters not kept)
13. service_errors text=209078e4-b2d4-450d-b0c0-c53f3b2693e1 · 88 chars back
no error line matches during the run (X-ray keeps ERROR lines; an INFO line is not here)
14. service_errors text=empty response · 88 chars back
no error line matches during the run (X-ray keeps ERROR lines; an INFO line is not here)
What it was shown (build 621, 32.1 KB)
The run
{
"job": "api-tests-production",
"build": 621,
"kind": "api-tests",
"result": "SUCCESS",
"started": "2026-11-16T19:21:25Z",
"tests": 780,
"failed": 3,
"test_commit": "ec77587e2",
"branch": "production",
"cluster_prepared": {
"mode": "prepare",
"result": "ready",
"product_commit": "0407066eb"
}
}
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
{
"cluster": "automation",
"findings_opened_around_the_run": [
{
"kind": "error.novel",
"severity": "critical",
"subject": "onboardingsvc",
"title": "onboardingsvc: a new error shape, 5\u00d7 in the last hour, never seen in 90 days (Could not begin transaction \u2014 Neo4jError: Neo.ClientError.Database.Dat)",
"opened_minutes_after_run_start": -6
}
],
"long_standing_findings_left_out": 20,
"pods_in_trouble_during_the_run": [
{
"workload": "tilda/data-monitor",
"restarts": 3.0,
"crash": 5.0,
"first_minutes_after_run_start": -11
},
{
"workload": "tilda/ontologysvc",
"probe": 2.0,
"first_minutes_after_run_start": -11
},
{
"workload": "tilda/rag-agent",
"probe": 3.0,
"first_minutes_after_run_start": -11
}
],
"deploys_during_the_run": []
}
The group
{
"tests": 3,
"suite": "WorkPlanConfig",
"members": [
{
"test": "automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_create_config_async_returns_milestones_when_ready",
"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": 621,
"build_before_this_error": 620,
"failing_since_build": 621,
"last_passed_build": 620
},
{
"test": "automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_work_order_config_reads_back_over_v2_with_its_draft",
"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": 621,
"build_before_this_error": 620,
"failing_since_build": 621,
"last_passed_build": 620
},
{
"test": "automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_patch_config_then_update_instructions_then_add_user_task_item",
"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": 621,
"build_before_this_error": 620,
"failing_since_build": 621,
"last_passed_build": 620
}
]
}
The failure
{
"test": "automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_create_config_async_returns_milestones_when_ready",
"status": "failed",
"message": "TimeoutError: Timed out waiting for config 209078e4-b2d4-450d-b0c0-c53f3b2693e1 to become ready (waitingOn empty) after 10s",
"traceback_tail": "automation/tests/workplansvc/test_work_plan_config.py:48: in test_create_config_async_returns_milestones_when_ready\n config = cfg_client.wait_until_ready(cfg_id, sse_listener=setup_work_plan_sse_listener, job_id=job_id)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nautomation/models/work_plan_config.py:96: in wait_until_ready\n return wait_for_condition(\nautomation/utils/helpers/wait_helper.py:27: in wait_for_condition\n raise TimeoutError(f\"Timed out waiting for {description} after {max_retries * interval}s\")\nE TimeoutError: Timed out waiting for config 209078e4-b2d4-450d-b0c0-c53f3b2693e1 to become ready (waitingOn empty) after 10s",
"requests": [
{
"trace_id": "a917e5733d23a34d50fdda1acfe1d24a",
"method": "GET",
"path": "/api/workplan/configs/209078e4-b2d4-450d-b0c0-c53f3b2693e1",
"status": "200",
"error": "None"
},
{
"trace_id": "a917e5733d23a34d50fdda19445a1a40",
"method": "GET",
"path": "/api/workplan/configs/209078e4-b2d4-450d-b0c0-c53f3b2693e1",
"status": "200",
"error": "None"
},
{
"trace_id": "a917e5733d23a34d50fdda153bd73f49",
"method": "GET",
"path": "/api/workplan/configs/209078e4-b2d4-450d-b0c0-c53f3b2693e1",
"status": "200",
"error": "None"
},
{
"trace_id": "a917e5733d23a34d50fdda1aa40874cc",
"method": "GET",
"path": "/api/workplan/configs/209078e4-b2d4-450d-b0c0-c53f3b2693e1",
"status": "200",
"error": "None"
},
{
"trace_id": "a917e5733d23a34d50fdda15e06828d0",
"method": "GET",
"path": "/api/workplan/configs/209078e4-b2d4-450d-b0c0-c53f3b2693e1",
"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": [
"417: ERROR FAILED",
"418: ERROR FAILED",
"419: ERROR FAILED",
"420: ERROR __ TestWorkPlanConfig.test_create_config_async_returns_milestones_when_ready ___",
"421: INFO automation/tests/workplansvc/test_work_plan_config.py:48: in test_create_config_async_returns_milestones_when_ready",
"422: INFO config = cfg_client.wait_until_ready(cfg_id, sse_listener=setup_work_plan_sse_listener, job_id=job_id)",
"423: INFO automation/models/work_plan_config.py:96: in wait_until_ready",
"424: INFO return wait_for_condition(",
"\u2026",
"440: INFO /automation/.venv/lib/python3.12/site-packages/_pytest/config/__init__.py:858: PytestAssertRewriteWarning: Module already imported so cannot be rewritten; automation.tests.fixtures.organization_fixtures",
"441: INFO self.import_plugin(import_spec)",
"442: INFO -------------- generated xml file: /automation/reports/junit.xml ---------------",
"443: ERROR FAILED automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_create_config_async_returns_milestones_when_ready - TimeoutError: Timed out waiting for config 209078e4-b2d4-450d-b0c0-c53f3b2693e1 to become ready (waitingOn empty) after 10s",
"444: ERROR FAILED automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_work_order_config_reads_back_over_v2_with_its_draft - AssertionError: config 8f1bda72-7513-49c5-b1a9-d9c762d8ba2d resolved no workorder item carrying a workOrderConfigId",
"445: INFO assert []",
"446: ERROR FAILED automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_patch_config_then_update_instructions_then_add_user_task_item - AssertionError: Instructions PUT failed: 409 \u2014 {\"message\":\"cannot start: a plan generation is already in progress for this workplan config. Wai"
]
}
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": 621,
"build_before_this_error": 620
}
other_branch
{
"branch": "master",
"job": "api-tests-master",
"build": 597,
"these_tests_there": {
"passing": 3
},
"reading": "fails on production only: the same tests pass on master (`api-tests-master` build 597). A fix that is on master has not reached production.",
"only_on_master": {
"path": "e2e/automation/tests/workplansvc/test_work_plan_config.py",
"commits": [
{
"sha": "b1080c587",
"subject": "api tests fixes as per recent changes (#17013)",
"login": "Harsh-Tilda",
"date": "2026-10-30T12:47"
}
]
}
}
The test's source
{
"repo": "tildabio/main",
"at": "ec77587e2",
"path": "e2e/automation/tests/workplansvc/test_work_plan_config.py",
"from_line": 18,
"failing_line": 48,
"code": "18 def test_create_config_async_returns_milestones_when_ready(\n19 self, setup_work_plan_seed_template, setup_aiteammates_study, setup_work_plan_site, setup_work_plan_sse_listener\n20 ):\n21 headers = setup_work_plan_seed_template[\"cro_test_headers\"]\n22 plan_type_id = setup_work_plan_seed_template[\"plan_type_id\"]\n23 template_id = setup_work_plan_seed_template[\"template_id\"]\n24 template_milestone_ids = setup_work_plan_seed_template[\"template_milestone_ids\"]\n25 study_id = setup_aiteammates_study[\"study_id\"]\n26 site_ids = setup_work_plan_site[\"site_ids\"]\n27 cfg_client = WorkPlanConfig(headers)\n28 \n29 name = f\"CFG-API-01-{unique_suffix()}\"\n30 payload = build_draft_config_payload(\n31 headers, study_id, plan_type_id, template_id, template_milestone_ids, site_ids, name\n32 )\n33 \n34 create_resp = cfg_client.post(payload)\n35 assert (\n36 create_resp.status_code == 202\n37 ), f\"POST /configs expected 202, got {create_resp.status_code} \u2014 {create_resp.text}\"\n38 create_body = create_resp.json()\n39 assert (\n40 isinstance(create_body.get(\"tildaid\"), str) and len(create_body[\"tildaid\"]) > 0\n41 ), f\"Create response missing tildaid: {create_body}\"\n42 assert (\n43 isinstance(create_body.get(\"jobId\"), str) and len(create_body[\"jobId\"]) > 0\n44 ), f\"Create response missing jobId: {create_body}\"\n45 cfg_id = create_body[\"tildaid\"]\n46 job_id = create_body[\"jobId\"]\n47 \n48> config = cfg_client.wait_until_ready(cfg_id, sse_listener=setup_work_plan_sse_listener, job_id=job_id)\n49 \n50 assert config[\"tildaid\"] == cfg_id\n51 assert config[\"state\"] in (\n52 WorkplanCfgState.DRAFT.value,\n53 WorkplanCfgState.PUBLISHED.value,\n54 ), f\"Unexpected state: {config['state']}\"\n55 assert config.get(\"waitingOn\", \"\") == \"\", f\"Config not idle: waitingOn={config.get('waitingOn')}\"\n56 assert config[\"studyId\"] == study_id\n57 assert config[\"planTypeId\"] == plan_type_id\n58 assert config[\"templateId\"] == template_id\n59 milestones = config.get(\"milestones\", [])\n60 assert len(milestones) == len(\n61 template_milestone_ids\n62 ), f\"Expected {len(template_milestone_ids)} milestones on config, got {len(milestones)}\"\n63 \n64 def test_work_order_config_reads_back_over_v2_with_its_draft(self, setup_work_plan_draft_config):\n65 headers = setup_work_plan_draft_config[\"cro_test_headers\"]\n66 cfg_id = setup_work_plan_draft_config[\"cfg_id\"]\n67 \n68 items_resp = WorkPlanConfig(headers).get_milestone_items_all(cfg_id)\n69 assert (\n70 items_resp.status_code == 200\n71 ), f\"GET milestone-items/all failed: {items_resp.status_code} \u2014 {items_resp.text}\"\n72 workorder_items = [\n73 item\n74 for milestone_items in items_resp.json()[\"itemsByMilestoneId\"].values()\n75 for item in milestone_items\n76 if item.get(\"itemType\") == MilestoneItemType.WORKORDER.value and item.get(\"workOrderConfigId\")\n77 ]\n78 assert workorder_items, f\"config {cfg_id} resolved no workorder item carrying a workOrderConfigId\"\n79 wo_config_id = workorder_items[0][\"workOrderConfigId\"]\n80 logger.info(f\"Work plan config {cfg_id} item {workorder_items[0]['tildaid']} -> WO config {wo_config_id}\")\n81 \n82 response = WorkOrderConfig(headers).get(wo_config_id)\n83 assert (\n84 response.status_code == 200\n85 ), f\"v2 GET of the work-plan work order config failed: {response.status_code} \u2014 {response.text}\"\n86 wo_config = response.json()\n87 assert wo_config[\"work_order_config_type\"] == \"Standard\", f\"unexpected config type: {wo_config}\"\n88 assert wo_config[\"status\"] == \"Preview\", f\"a work-plan config is drafted before publish: {wo_config['status']}\""
}
Commits in the window
{
"between": "build 620 (last pass, started 2026-11-15T19:21:55Z) and build 621 (first failure of the streak, started 2026-11-16T19:21:25Z)",
"test_repo": {
"repo": "tildabio/main",
"note": "same commit on both sides",
"commits": []
},
"product": {
"repo": "tildabio/main",
"range": "a654678c2..0407066eb",
"href": "https://github.com/tildabio/main/compare/a654678c2edfcc92b6b494101e96a20c3e8add72...0407066ebadca7068b2578aac2bdbfc936f5587f",
"total": 4,
"commits": [
{
"sha": "0407066eb",
"subject": "fix(ci): stop logging into Auth0 for [email protected] in CI (#17482)",
"login": "ojasgo",
"name": "ojasgo",
"date": "2026-11-16T11:00",
"touches": [
".github/workflows"
]
},
{
"sha": "122e5fbad",
"subject": "build: move every other CI workflow onto the ci-exp-builder self-hosted VM (#17424)",
"login": "ojasgo",
"name": "ojasgo",
"date": "2026-11-16T06:33",
"touches": [
".github/workflows"
]
},
{
"sha": "5821e43d1",
"subject": "docs(claude): never test as the tildasense bot account (#17473) (#17474)",
"login": "tilda-gitbot[bot]",
"name": "tilda-gitbot[bot]",
"date": "2026-11-16T02:05",
"touches": [
"CLAUDE.md"
]
},
{
"sha": "e73e5941c",
"subject": "docproc: keep letter-prefixed version values (A2, vA2) in TMF metadata (#17468)",
"login": "tilda-gitbot[bot]",
"name": "tilda-gitbot[bot]",
"date": "2026-11-16T02:05",
"touches": [
"data-science/docproc"
]
}
]
}
}
The issue as the agent wrote it
**Fix is in:** not known yet.
**What failed:** `TimeoutError: Timed out waiting for config 209078e4-b2d4-450d-b0c0-c53f3b2693e1 to become ready (waitingOn empty) after 10s`
**Cause not clear**, confidence low. Found in `api-tests-production` build 621: [run in X-ray](https://xray.tilda.pizza/tests/run/api-tests-production/621).
**Root cause in X-ray:** [the verdict, each test's history and the evidence the agent read](https://xray.tilda.pizza/test-triage/312161877ba77e)
**Branches:** fails on production only: the same tests pass on master (`api-tests-master` build 597). A fix that is on master has not reached production.
All three failures look like one cause: the agent's plan generation for new work plan configs did not finish during this run.
1) A new config was still not idle after the 180 s SSE wait plus 10 s of polling (models/work_plan_config.py:58-102). 2) The fixture's draft config produced no workorder items. 3) The instructions PUT got 409 'a plan generation is already in progress' (ErrWorkplanCfgResolutionInProgress, workplan_cfg.go:59). The suite notes call that 409 transient.
Nothing in the changes explains it. Every product commit in a654678c2..0407066eb touches only CI or docs. The only master-only test commit, b1080c587, changes the llm-probe test, not these. These tests passed on master build 597 and in the 29 production runs before this one, and workplansvc logged no error for these traces.
Next: read the workplansvc and studioai INFO logs for config 209078e4 to see what waitingOn (workplan_agent_config / va_work_order_configs) was stuck on, then check build 622.
**Service:** workplansvc
**Assigned to:** [email protected] (code owner of workplansvc).
### Steps to reproduce
1. Sign in as a CRO user in an organisation that has a work plan type and template with milestones.
2. Use a study with at least one site attached.
3. POST /api/workplan/configs with the study id, the plan type id, the template id, the milestones with instructions and the site ids; expect 202 with a tildaid and a jobId.
4. Watch GET /api/workplan/events for ConfigurationResolved for that jobId.
5. Poll GET /api/workplan/configs/{tildaid} every 2 s.
6. Expected: within about 3 minutes waitingOn is empty and the config has one milestone per template milestone; actual: waitingOn never cleared within 190 s, and a PUT to /instructions answers 409 'a plan generation is already in progress for this workplan config'.
**Failing tests (3):**
- [automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_create_config_async_returns_milestones_when_ready](https://xray.tilda.pizza/tests/case/093e45f3856f16fe) (new in this run)
- [automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_work_order_config_reads_back_over_v2_with_its_draft](https://xray.tilda.pizza/tests/case/1fb804f7fe2a2706) (new in this run)
- [automation/tests/workplansvc/test_work_plan_config.py::TestWorkPlanConfig::test_patch_config_then_update_instructions_then_add_user_task_item](https://xray.tilda.pizza/tests/case/93142c4d76b50a46) (new in this run)
**Error:**
```
TimeoutError: Timed out waiting for config 209078e4-b2d4-450d-b0c0-c53f3b2693e1 to become ready (waitingOn empty) after 10s
```
+++ Agent notes
Filed by X-ray's triage agent. Models asked: claude-sonnet-5-5, claude-opus-5-5; settled by escalate; 14 lookups in the code and its history.
Group `triage:312161877ba77e` (one issue per root cause).
A wrong verdict can be corrected on the run page in X-ray.
+++