Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions project/TICKETS.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
| **ticket-009** | [`README.md`](./ticket-009/README.md) | - | - | - | - | - |
| **ticket-010** | [`README.md`](./ticket-010/README.md) | - | - | - | - | - |
| **ticket-011** | [`README.md`](./ticket-011/README.md) | - | - | - | - | - |
| **ticket-012** | [`README.md`](./ticket-012/README.md) | - | - | - | - | - |
<!-- AUTO:TICKET_INDEX:END -->
37 changes: 37 additions & 0 deletions project/ticket-012/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Ticket 012: Expose input and blocked execution states in the Reflex queue report (PLF-25983)

- **ID**: ticket-012
- **Owner**: agent:codex
- **Status**: IN_PROGRESS
- **Workflow state**: EDIT
- **Created**: 2026-11-24

## Goal and scope

The user asked to detect the actual anomalies through Reflex. A canonical Planfile read-back of 67 repositories showed three execution input waits and one explicit execution block missing after PR 12.

## Acceptance criteria

- Cover all four weekly observations, keeping blocked execution distinct from a blocked label.
- Preserve deduplication and ignore normal queued, running and completed execution states.

## Tracking boundary

This directory contains the minimal reviewed intent. Optional participant prose
and raw command logs are not required delivery output.

<!-- ticket-radar:start -->
## Ticket Radar

Initial planned-scope estimate; advisory only, not execution or merge approval.

| Measure | Initial assessment |
| --- | --- |
| Impact score | 52/100 |
| Complexity | M |
| Estimated effort | 51 min |
| Planning budget | 30 min |
| Split recommended | yes |

Diagnostics: RADAR-ACCEPTANCE-MISSING, RADAR-BUDGET-EXCEEDED.
<!-- ticket-radar:end -->
25 changes: 25 additions & 0 deletions project/ticket-012/intent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"schema": "new-project.intent/v3",
"ticket": "ticket-012",
"summary": "Expose input and blocked execution states in the Reflex queue report (PLF-25983)",
"workstream": "application",
"classification": {
"kind": "BUG",
"priority": "P1",
"origin": "requested"
},
"allowedPaths": [
"project/ticket-012/**",
"TODO.md",
"project/TICKETS.md",
"src/bottlenecks/delivery.py",
"tests/test_delivery.py"
],
"forbiddenPaths": [
"project/ticket-*/user-*.md"
],
"stacks": [],
"dependsOn": [],
"conflictsWith": [],
"integrationTicket": null
}
14 changes: 12 additions & 2 deletions src/bottlenecks/delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ def _finding(report, repo, kind, ids, message, group="", *, target=None):
"status_blocked": "These tickets have explicit blocked status.",
"blocked": "Planfile excluded these tickets because they carry the blocked label.",
"waiting_dependency": "Execution is waiting for a dependency.",
"waiting_input": "Execution is waiting for input.",
"execution_blocked": "Planfile reports that execution is blocked.",
}


_EXECUTION_BLOCKERS = {
"exec_state:blocked": "execution_blocked",
"exec_state:waiting_input": "waiting_input",
"exec_state:waiting_dependency": "waiting_dependency",
}


Expand All @@ -127,8 +136,9 @@ def _queue_report(data):
groups = defaultdict(set)
for row in data["skipped"]:
kind = row["category"]
if kind == "exec_state" and row.get("reason") == "exec_state:waiting_dependency":
kind = "waiting_dependency"
reason = row.get("reason")
if kind == "exec_state" and isinstance(reason, str):
kind = _EXECUTION_BLOCKERS.get(reason, kind)
if kind in _QUEUE_REASONS:
ticket = row["id"]
if not isinstance(ticket, str) or not _ID.fullmatch(ticket):
Expand Down
7 changes: 7 additions & 0 deletions tests/test_delivery.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,12 @@ def test_queue_emits_reflex_observations_only_for_explicit_blockers(tmp_path):
{"id": "T-2", "category": "exec_state", "reason": "exec_state:waiting_dependency"},
{"id": "T-3", "category": "exec_state", "reason": "exec_state:queued"},
{"id": "T-4", "category": "exec_state"},
{"id": "T-5", "category": "exec_state", "reason": "exec_state:waiting_input"},
{"id": "T-6", "category": "exec_state", "reason": "exec_state:blocked"},
{"id": "T-7", "category": "exec_state", "reason": "exec_state:running"},
{"id": "T-8", "category": "exec_state", "reason": "exec_state:done"},
{"id": "T-9", "category": "exec_state", "reason": "exec_state:other"},
{"id": "T-10", "category": "exec_state", "reason": []},
]
data = {"schema": "planfile.executable-queue/v1", "repository": "org/repo",
"candidates": [], "skipped": skipped}
Expand All @@ -75,6 +81,7 @@ def test_queue_emits_reflex_observations_only_for_explicit_blockers(tmp_path):
found = {item.kind: item.metrics for item in result.report.items}
assert {kind: m["examples"] for kind, m in found.items()} == {
"blocked": ["T-1"], "waiting_dependency": ["T-2"],
"waiting_input": ["T-5"], "execution_blocked": ["T-6"],
}
for metrics in found.values():
assert metrics["reflex"]["status"] == "blocked"
Expand Down