# Defect Report

**Project:** qaagent-functional-pm-qa-ui-create-test
**Run ID:** qa-20260523-213013
**Date:** 2026-05-23T22:00:00Z

---

## DEF-001 — Newly created QA run stays stuck in "queued" status; Report and Logs links never appear

**Severity:** Critical
**Category:** Functional
**Requirement:** REQ-001
**Test Case:** TC-005
**Environment:** Production (qa.winds-os.com)
**Evidence:** screenshots/TC-005-fail-report-log-links.png

### Description
After a user submits the Create QA Run form, the new run appears in the Test run history table with status "queued". The run never transitions to "running" or "completed", and the Report and Logs links never appear in the row — even after waiting 75 seconds. This means the core create-run flow is broken end-to-end: the user can submit, but the run is never processed.

Two runs are affected:
- qa-20260523-215803 (created by this QA session) — status "queued", no links
- qa-20260523-213013 (created by prior run) — status "running" (stuck), no completion

The last successfully completed run was qa-20260523-212527. All runs created after that time remain unprocessed.

### Steps to Reproduce
1. Log into https://qa.winds-os.com with admin password.
2. Fill in the New Test Run form with a target URL, project name, scope, and requirements file.
3. Click "Create QA Run".
4. Observe the new row in Test run history.
5. Refresh the page and wait at least 75 seconds.
6. Observe that the status remains "queued" and no Report/Logs links appear.

### Expected
Within a reasonable time (~30-75s), the run should be picked up by a worker, transition to "running" and eventually "completed", and expose clickable Report and Logs links in the history table row.

### Actual
The run stays "queued" indefinitely. Only the Target URL appears as a hyperlink. The Report and Logs columns show em-dashes (—) with no links.

### Recommendation
Investigate the run worker/processing loop. It appears to have stopped processing new runs around the time qa-20260523-213013 was created. Check whether:
- The worker thread/process crashed or is blocked on the stuck "running" run.
- The worker loop needs a restart.
- There is a deadlock or queue-full condition preventing new runs from being dequeued.

---

## Summary

| Severity | Count |
|----------|-------|
| Critical | 1 |
| High     | 0 |
| Medium   | 0 |
| Low      | 0 |
| **Total** | **1** |
