docs: add inbox markdown test plans
This commit is contained in:
+93
-135
@@ -25,14 +25,14 @@ Current state:
|
||||
- `inbox` CLI is implemented end-to-end
|
||||
- automated Go integration tests already exist for the main lifecycle, wait flows, unread behavior, artifacts, and JSON error contracts
|
||||
- this roadmap now exists under `docs/tests/inbox/ROADMAP.md`
|
||||
- the command, workflow, and shared Markdown test-plan documents have not been authored yet
|
||||
- all planned global, shared, workflow, and command-level Markdown test-plan documents have been authored
|
||||
|
||||
Progress summary for planned test-plan documents, excluding `ROADMAP.md`:
|
||||
|
||||
- planned document files: `16`
|
||||
- authored document files: `0`
|
||||
- planned document files: `17`
|
||||
- authored document files: `17`
|
||||
- planned case slugs in this roadmap: `61`
|
||||
- authored case slugs in this roadmap: `0`
|
||||
- authored case slugs in this roadmap: `61`
|
||||
|
||||
## Scope
|
||||
|
||||
@@ -105,12 +105,12 @@ Allowed status values in this roadmap:
|
||||
|
||||
The Markdown test-plan set starts at zero, but these automated tests already exist and should be used as source material when writing the docs:
|
||||
|
||||
- [integration_test.go](/home/kurihada/project/ai-workflow-skill/internal/cli/inbox/integration_test.go#L12) `TestInboxLifecycle`
|
||||
- [integration_test.go](/home/kurihada/project/ai-workflow-skill/internal/cli/inbox/integration_test.go#L176) `TestInboxFailLifecycle`
|
||||
- [integration_test.go](/home/kurihada/project/ai-workflow-skill/internal/cli/inbox/integration_test.go#L243) `TestInboxRenewWaitReplyAndCancel`
|
||||
- [integration_test.go](/home/kurihada/project/ai-workflow-skill/internal/cli/inbox/integration_test.go#L392) `TestInboxWatchListUnreadAndAppend`
|
||||
- [integration_test.go](/home/kurihada/project/ai-workflow-skill/internal/cli/inbox/integration_test.go#L549) `TestInboxUnreadReadCursor`
|
||||
- [integration_test.go](/home/kurihada/project/ai-workflow-skill/internal/cli/inbox/integration_test.go#L639) `TestInboxJSONErrorsAndExitCodes`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L12) `TestInboxLifecycle`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L176) `TestInboxFailLifecycle`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L243) `TestInboxRenewWaitReplyAndCancel`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L392) `TestInboxWatchListUnreadAndAppend`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L549) `TestInboxUnreadReadCursor`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L639) `TestInboxJSONErrorsAndExitCodes`
|
||||
|
||||
These tests do not remove the need for the Markdown plan. They only reduce discovery work.
|
||||
|
||||
@@ -158,23 +158,23 @@ docs/tests/inbox/
|
||||
|
||||
| Path | Purpose | Planned Cases | Authored Cases | Status |
|
||||
| --- | --- | ---: | ---: | --- |
|
||||
| `docs/tests/inbox/README.md` | Global testing conventions and glossary | 0 | 0 | pending |
|
||||
| `docs/tests/inbox/_shared/README.md` | Shared fixtures, JSON assertions, exit-code rules | 0 | 0 | pending |
|
||||
| `docs/tests/inbox/workflows/README.md` | Cross-command scenarios | 8 | 0 | pending |
|
||||
| `docs/tests/inbox/init/README.md` | `init` command cases | 2 | 0 | pending |
|
||||
| `docs/tests/inbox/send/README.md` | `send` command cases | 6 | 0 | pending |
|
||||
| `docs/tests/inbox/fetch/README.md` | `fetch` command cases | 4 | 0 | pending |
|
||||
| `docs/tests/inbox/claim/README.md` | `claim` command cases | 4 | 0 | pending |
|
||||
| `docs/tests/inbox/renew/README.md` | `renew` command cases | 3 | 0 | pending |
|
||||
| `docs/tests/inbox/update/README.md` | `update` command cases | 5 | 0 | pending |
|
||||
| `docs/tests/inbox/reply/README.md` | `reply` command cases | 4 | 0 | pending |
|
||||
| `docs/tests/inbox/done/README.md` | `done` command cases | 4 | 0 | pending |
|
||||
| `docs/tests/inbox/fail/README.md` | `fail` command cases | 4 | 0 | pending |
|
||||
| `docs/tests/inbox/cancel/README.md` | `cancel` command cases | 3 | 0 | pending |
|
||||
| `docs/tests/inbox/list/README.md` | `list` command cases | 4 | 0 | pending |
|
||||
| `docs/tests/inbox/show/README.md` | `show` command cases | 4 | 0 | pending |
|
||||
| `docs/tests/inbox/watch/README.md` | `watch` command cases | 3 | 0 | pending |
|
||||
| `docs/tests/inbox/wait-reply/README.md` | `wait-reply` command cases | 3 | 0 | pending |
|
||||
| `docs/tests/inbox/README.md` | Global testing conventions and glossary | 0 | 0 | done |
|
||||
| `docs/tests/inbox/_shared/README.md` | Shared fixtures, JSON assertions, exit-code rules | 0 | 0 | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | Cross-command scenarios | 8 | 8 | done |
|
||||
| `docs/tests/inbox/init/README.md` | `init` command cases | 2 | 2 | done |
|
||||
| `docs/tests/inbox/send/README.md` | `send` command cases | 6 | 6 | done |
|
||||
| `docs/tests/inbox/fetch/README.md` | `fetch` command cases | 4 | 4 | done |
|
||||
| `docs/tests/inbox/claim/README.md` | `claim` command cases | 4 | 4 | done |
|
||||
| `docs/tests/inbox/renew/README.md` | `renew` command cases | 3 | 3 | done |
|
||||
| `docs/tests/inbox/update/README.md` | `update` command cases | 5 | 5 | done |
|
||||
| `docs/tests/inbox/reply/README.md` | `reply` command cases | 4 | 4 | done |
|
||||
| `docs/tests/inbox/done/README.md` | `done` command cases | 4 | 4 | done |
|
||||
| `docs/tests/inbox/fail/README.md` | `fail` command cases | 4 | 4 | done |
|
||||
| `docs/tests/inbox/cancel/README.md` | `cancel` command cases | 3 | 3 | done |
|
||||
| `docs/tests/inbox/list/README.md` | `list` command cases | 4 | 4 | done |
|
||||
| `docs/tests/inbox/show/README.md` | `show` command cases | 4 | 4 | done |
|
||||
| `docs/tests/inbox/watch/README.md` | `watch` command cases | 3 | 3 | done |
|
||||
| `docs/tests/inbox/wait-reply/README.md` | `wait-reply` command cases | 3 | 3 | done |
|
||||
|
||||
## Authoring Order
|
||||
|
||||
@@ -198,121 +198,79 @@ Reason:
|
||||
|
||||
## Authored Case Register
|
||||
|
||||
No Markdown test cases have been authored yet.
|
||||
|
||||
When the first case is written, add rows in this format:
|
||||
|
||||
| Path | Case Slug | Coverage Note | Status |
|
||||
| --- | --- | --- | --- |
|
||||
| `docs/tests/inbox/send/README.md` | `send-creates-new-thread` | minimal happy path for new thread creation | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `thread-lifecycle-happy-path` | end-to-end happy path from send to show after done | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `blocked-question-reply-resume-to-done` | blocked thread receives answer and resumes to done | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `fail-lifecycle-from-claim-to-terminal` | claimed thread transitions to failed terminal state | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `cancel-lifecycle-after-worker-claim` | claimed thread can be cancelled by initiator | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `watch-wakes-then-fetch-sees-new-thread` | watch wake-up remains consistent with unread fetch visibility | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `artifact-visible-through-send-and-show` | body-file and artifact data survive send and show | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `unread-clears-after-mark-read-and-reappears-on-new-message` | read cursor clears unread and new message restores it | done |
|
||||
| `docs/tests/inbox/workflows/README.md` | `wait-reply-clears-blocked-unread-for-agent` | wait-reply consumes reply and clears blocked unread view | done |
|
||||
| `docs/tests/inbox/init/README.md` | `init-creates-schema-on-empty-db` | initializes an empty database path and returns initialized status | done |
|
||||
| `docs/tests/inbox/init/README.md` | `init-is-idempotent-on-existing-db` | repeated init succeeds on the same database path | done |
|
||||
| `docs/tests/inbox/send/README.md` | `send-creates-new-thread` | creates a pending thread with an initial task message | done |
|
||||
| `docs/tests/inbox/send/README.md` | `send-appends-message-to-existing-thread` | appends a message to an existing non-terminal thread | done |
|
||||
| `docs/tests/inbox/send/README.md` | `send-reads-body-from-body-file` | reads message body from a file path | done |
|
||||
| `docs/tests/inbox/send/README.md` | `send-attaches-artifact-with-metadata` | persists artifact path, kind, and metadata on send | done |
|
||||
| `docs/tests/inbox/send/README.md` | `send-rejects-invalid-payload-json` | rejects malformed payload JSON with invalid_input | done |
|
||||
| `docs/tests/inbox/send/README.md` | `send-rejects-invalid-artifact-metadata-json` | rejects malformed artifact metadata JSON | done |
|
||||
| `docs/tests/inbox/fetch/README.md` | `fetch-returns-pending-thread-for-target-agent` | returns pending candidate work for the target agent | done |
|
||||
| `docs/tests/inbox/fetch/README.md` | `fetch-respects-status-and-limit-filters` | enforces status filtering and max row count | done |
|
||||
| `docs/tests/inbox/fetch/README.md` | `fetch-unread-uses-read-cursor` | unread filtering depends on per-agent read cursor state | done |
|
||||
| `docs/tests/inbox/fetch/README.md` | `fetch-returns-no-matching-work-when-empty` | empty fetch result returns no_matching_work | done |
|
||||
| `docs/tests/inbox/claim/README.md` | `claim-acquires-thread-lease` | claims a pending thread and records a claim event message | done |
|
||||
| `docs/tests/inbox/claim/README.md` | `claim-rejects-when-thread-missing` | missing thread returns not_found | done |
|
||||
| `docs/tests/inbox/claim/README.md` | `claim-rejects-when-thread-already-claimed` | active lease conflict returns lease_conflict | done |
|
||||
| `docs/tests/inbox/claim/README.md` | `claim-records-requested-lease-duration` | claim event payload records requested lease duration | done |
|
||||
| `docs/tests/inbox/renew/README.md` | `renew-extends-active-lease` | owner renews an active lease and gets a renewal event | done |
|
||||
| `docs/tests/inbox/renew/README.md` | `renew-rejects-non-owner` | non-owner renew attempt returns lease_conflict | done |
|
||||
| `docs/tests/inbox/renew/README.md` | `renew-rejects-without-active-lease` | missing active lease returns invalid_state | done |
|
||||
| `docs/tests/inbox/update/README.md` | `update-moves-thread-to-in-progress` | owner moves a thread into in_progress with a progress message | done |
|
||||
| `docs/tests/inbox/update/README.md` | `update-moves-thread-to-blocked-with-payload` | blocked update writes a question message and payload JSON | done |
|
||||
| `docs/tests/inbox/update/README.md` | `update-accepts-body-file-and-artifact` | update supports body-file input and artifact attachments | done |
|
||||
| `docs/tests/inbox/update/README.md` | `update-rejects-invalid-payload-json` | malformed update payload returns invalid_input | done |
|
||||
| `docs/tests/inbox/update/README.md` | `update-rejects-non-owner` | non-owner update attempt returns lease_conflict | done |
|
||||
| `docs/tests/inbox/reply/README.md` | `reply-adds-answer-message` | default reply kind is answer and thread stays non-terminal | done |
|
||||
| `docs/tests/inbox/reply/README.md` | `reply-supports-control-kind` | reply can explicitly send control messages | done |
|
||||
| `docs/tests/inbox/reply/README.md` | `reply-attaches-artifact` | reply persists artifact data on the message | done |
|
||||
| `docs/tests/inbox/reply/README.md` | `reply-rejects-invalid-payload-json` | malformed reply payload returns invalid_input | done |
|
||||
| `docs/tests/inbox/done/README.md` | `done-marks-thread-terminal` | owner completes a thread into done terminal state | done |
|
||||
| `docs/tests/inbox/done/README.md` | `done-persists-result-body-and-artifact` | result body and artifacts remain visible after done | done |
|
||||
| `docs/tests/inbox/done/README.md` | `done-rejects-non-owner` | non-owner done attempt returns lease_conflict | done |
|
||||
| `docs/tests/inbox/done/README.md` | `done-rejects-on-terminal-thread` | terminal threads reject repeated done calls | done |
|
||||
| `docs/tests/inbox/fail/README.md` | `fail-marks-thread-failed` | owner completes a thread into failed terminal state | done |
|
||||
| `docs/tests/inbox/fail/README.md` | `fail-persists-failure-body-and-artifact` | failure body and artifacts remain visible after fail | done |
|
||||
| `docs/tests/inbox/fail/README.md` | `fail-rejects-non-owner` | non-owner fail attempt returns lease_conflict | done |
|
||||
| `docs/tests/inbox/fail/README.md` | `fail-rejects-on-terminal-thread` | terminal threads reject repeated fail calls | done |
|
||||
| `docs/tests/inbox/cancel/README.md` | `cancel-marks-thread-cancelled` | cancel moves a non-terminal thread to cancelled | done |
|
||||
| `docs/tests/inbox/cancel/README.md` | `cancel-persists-reason-and-artifact` | cancel records its reason text and attachments | done |
|
||||
| `docs/tests/inbox/cancel/README.md` | `cancel-rejects-when-thread-missing` | missing thread returns not_found on cancel | done |
|
||||
| `docs/tests/inbox/list/README.md` | `list-filters-by-status` | status filter limits listed threads | done |
|
||||
| `docs/tests/inbox/list/README.md` | `list-filters-by-created-by` | created-by filter limits listed threads | done |
|
||||
| `docs/tests/inbox/list/README.md` | `list-filters-by-assigned-to` | assigned-to filter limits listed threads | done |
|
||||
| `docs/tests/inbox/list/README.md` | `list-respects-limit` | list returns at most the requested number of rows | done |
|
||||
| `docs/tests/inbox/show/README.md` | `show-returns-thread-and-message-history` | show returns thread metadata and ordered history | done |
|
||||
| `docs/tests/inbox/show/README.md` | `show-includes-artifacts-per-message` | show expands message artifacts in detail view | done |
|
||||
| `docs/tests/inbox/show/README.md` | `show-mark-read-advances-read-cursor` | mark-read changes subsequent unread visibility | done |
|
||||
| `docs/tests/inbox/show/README.md` | `show-rejects-when-thread-missing` | missing thread returns not_found on show | done |
|
||||
| `docs/tests/inbox/watch/README.md` | `watch-wakes-on-matching-thread` | watch wakes on a new matching thread event | done |
|
||||
| `docs/tests/inbox/watch/README.md` | `watch-respects-status-filter` | watch only wakes on events whose resulting thread status matches | done |
|
||||
| `docs/tests/inbox/watch/README.md` | `watch-times-out-with-no-activity` | watch timeout returns no_matching_work | done |
|
||||
| `docs/tests/inbox/wait-reply/README.md` | `wait-reply-wakes-on-answer-after-message` | wait-reply resumes from a known message boundary | done |
|
||||
| `docs/tests/inbox/wait-reply/README.md` | `wait-reply-can-start-from-after-event` | wait-reply resumes from a known event cursor | done |
|
||||
| `docs/tests/inbox/wait-reply/README.md` | `wait-reply-times-out-when-no-reply` | wait-reply timeout returns no_matching_work | done |
|
||||
|
||||
## Pending Case Backlog
|
||||
|
||||
### `docs/tests/inbox/workflows/README.md`
|
||||
No pending case slugs remain in the current plan.
|
||||
|
||||
- `pending` `thread-lifecycle-happy-path`
|
||||
- `pending` `blocked-question-reply-resume-to-done`
|
||||
- `pending` `fail-lifecycle-from-claim-to-terminal`
|
||||
- `pending` `cancel-lifecycle-after-worker-claim`
|
||||
- `pending` `watch-wakes-then-fetch-sees-new-thread`
|
||||
- `pending` `artifact-visible-through-send-and-show`
|
||||
- `pending` `unread-clears-after-mark-read-and-reappears-on-new-message`
|
||||
- `pending` `wait-reply-clears-blocked-unread-for-agent`
|
||||
When a new CLI contract or workflow needs coverage:
|
||||
|
||||
### `docs/tests/inbox/init/README.md`
|
||||
|
||||
- `pending` `init-creates-schema-on-empty-db`
|
||||
- `pending` `init-is-idempotent-on-existing-db`
|
||||
|
||||
### `docs/tests/inbox/send/README.md`
|
||||
|
||||
- `pending` `send-creates-new-thread`
|
||||
- `pending` `send-appends-message-to-existing-thread`
|
||||
- `pending` `send-reads-body-from-body-file`
|
||||
- `pending` `send-attaches-artifact-with-metadata`
|
||||
- `pending` `send-rejects-invalid-payload-json`
|
||||
- `pending` `send-rejects-invalid-artifact-metadata-json`
|
||||
|
||||
### `docs/tests/inbox/fetch/README.md`
|
||||
|
||||
- `pending` `fetch-returns-pending-thread-for-target-agent`
|
||||
- `pending` `fetch-respects-status-and-limit-filters`
|
||||
- `pending` `fetch-unread-uses-read-cursor`
|
||||
- `pending` `fetch-returns-no-matching-work-when-empty`
|
||||
|
||||
### `docs/tests/inbox/claim/README.md`
|
||||
|
||||
- `pending` `claim-acquires-thread-lease`
|
||||
- `pending` `claim-rejects-when-thread-missing`
|
||||
- `pending` `claim-rejects-when-thread-already-claimed`
|
||||
- `pending` `claim-records-requested-lease-duration`
|
||||
|
||||
### `docs/tests/inbox/renew/README.md`
|
||||
|
||||
- `pending` `renew-extends-active-lease`
|
||||
- `pending` `renew-rejects-non-owner`
|
||||
- `pending` `renew-rejects-without-active-lease`
|
||||
|
||||
### `docs/tests/inbox/update/README.md`
|
||||
|
||||
- `pending` `update-moves-thread-to-in-progress`
|
||||
- `pending` `update-moves-thread-to-blocked-with-payload`
|
||||
- `pending` `update-accepts-body-file-and-artifact`
|
||||
- `pending` `update-rejects-invalid-payload-json`
|
||||
- `pending` `update-rejects-non-owner`
|
||||
|
||||
### `docs/tests/inbox/reply/README.md`
|
||||
|
||||
- `pending` `reply-adds-answer-message`
|
||||
- `pending` `reply-supports-control-kind`
|
||||
- `pending` `reply-attaches-artifact`
|
||||
- `pending` `reply-rejects-invalid-payload-json`
|
||||
|
||||
### `docs/tests/inbox/done/README.md`
|
||||
|
||||
- `pending` `done-marks-thread-terminal`
|
||||
- `pending` `done-persists-result-body-and-artifact`
|
||||
- `pending` `done-rejects-non-owner`
|
||||
- `pending` `done-rejects-on-terminal-thread`
|
||||
|
||||
### `docs/tests/inbox/fail/README.md`
|
||||
|
||||
- `pending` `fail-marks-thread-failed`
|
||||
- `pending` `fail-persists-failure-body-and-artifact`
|
||||
- `pending` `fail-rejects-non-owner`
|
||||
- `pending` `fail-rejects-on-terminal-thread`
|
||||
|
||||
### `docs/tests/inbox/cancel/README.md`
|
||||
|
||||
- `pending` `cancel-marks-thread-cancelled`
|
||||
- `pending` `cancel-persists-reason-and-artifact`
|
||||
- `pending` `cancel-rejects-when-thread-missing`
|
||||
|
||||
### `docs/tests/inbox/list/README.md`
|
||||
|
||||
- `pending` `list-filters-by-status`
|
||||
- `pending` `list-filters-by-created-by`
|
||||
- `pending` `list-filters-by-assigned-to`
|
||||
- `pending` `list-respects-limit`
|
||||
|
||||
### `docs/tests/inbox/show/README.md`
|
||||
|
||||
- `pending` `show-returns-thread-and-message-history`
|
||||
- `pending` `show-includes-artifacts-per-message`
|
||||
- `pending` `show-mark-read-advances-read-cursor`
|
||||
- `pending` `show-rejects-when-thread-missing`
|
||||
|
||||
### `docs/tests/inbox/watch/README.md`
|
||||
|
||||
- `pending` `watch-wakes-on-matching-thread`
|
||||
- `pending` `watch-respects-status-filter`
|
||||
- `pending` `watch-times-out-with-no-activity`
|
||||
|
||||
### `docs/tests/inbox/wait-reply/README.md`
|
||||
|
||||
- `pending` `wait-reply-wakes-on-answer-after-message`
|
||||
- `pending` `wait-reply-can-start-from-after-event`
|
||||
- `pending` `wait-reply-times-out-when-no-reply`
|
||||
1. add the new case to the relevant `README.md`
|
||||
2. add the new slug to `Authored Case Register`
|
||||
3. update `Current Snapshot` and `Document Progress`
|
||||
|
||||
## Definition Of Done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user