summaryrefslogtreecommitdiff
path: root/SESSION_STATE.md
blob: 6d599f1964e77d6daad972da54b331a17aa24b15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# SESSION_STATE.md

## Current Task Goal
Add `project` field to tasks — allow tasks to carry a project label displayed in the UI.

## Status: COMPLETED

---

## Completed Items

| Step | Description | Test / Verification |
|------|-------------|---------------------|
| 1 | Add `Project` field to `Task` struct and YAML parsing (`internal/task/task.go:77`) | `TestTask_ParseFile` (existing, passing) |
| 2 | Add `project` column to SQLite schema and all CRUD queries (`internal/storage/db.go`) | `TestDB_*` suite in `internal/storage` — all passing |
| 3 | Expose `project` in REST API create/list/get endpoints (`internal/api/`) | `internal/api` suite — all passing |
| 4 | Expose `project` in CLI (`internal/cli/`) | `internal/cli` suite — all passing |
| 5 | Display `project` badge on task cards in web UI (`web/app.js:159-163`) | Visual; `grep -n project web/app.js` confirms presence |

### Commits
```
054ec8b feat: add Project field to Task struct and YAML parsing
072652f feat: add project column to storage
26dc313 feat: expose project field in API and CLI
b838150 feat: display project field in web UI
```

---

## Test Suite Results (2026-03-16)

```
ok   internal/api       5.664s
ok   internal/cli       6.136s
ok   internal/config    1.023s
ok   internal/notify    1.024s
ok   internal/reporter  1.017s
ok   internal/storage   1.421s
ok   internal/task      1.022s
FAIL internal/executor  1.391s  ← PRE-EXISTING failures (unrelated)
```

### Pre-existing failures in `internal/executor` (not caused by this feature)

- `TestTeardownSandbox_AutocommitsChanges` — `git log in bare repo: exit status 128`
- `TestTeardownSandbox_BuildSuccess_ProceedsToAutocommit` — `git log in bare repo: exit status 128`
- `TestPool_RecoverStaleRunning` — `execution status: want FAILED, got [...]`

These fail on commits predating the project field feature (verified by running tests against `local/master`).

---

## Next Steps
None — feature is complete. Pre-existing executor failures are tracked separately.

---

## Process Notes
- Schema migration uses `ALTER TABLE tasks ADD COLUMN project TEXT` (idempotent via existing migration guard).
- `scanTask` uses `sql.NullString` for backward compatibility with existing rows that have no project value.