bruno: regenerate collection from canonical docs + permanent docs↔Bruno parity gate

WO4. The old collection was the drifted artifact AGENTS.md warned about:
bodies pre-truncated at their first {{var}}, routes renamed server-side
but not here (/api/notes/:media_id, /api/book-matching/search,
/api/collections/:id/rules/test), an orphan universal-progress suite for
routes that no longer exist.

scripts/gen_bruno_from_docs.py emits one OpenCollection request per
frontmatter'd endpoint doc (191 requests): gate-verified example-request
JSON as body, {{env}} params per the environment file, device-token
routes get an explicit Bearer {{device_token}} header, login/register/
refresh keep the token-capture after-response scripts that chain the
collection. Old 1:1 mirrors deleted (128); hand-authored NewDevDBSetup,
environments, and edge-case suites kept. 30 scenario files with
truncated bodies (the documented corruption) deleted — they could not
run.

internal/docs/drift_test.go gains TestBrunoMirrorsDocs: every
frontmatter'd doc must have a Bruno request with matching method+URL
shape — the collection can never silently drift from the docs again.
opencollection.yml README block replaced with the real run instructions.

make test green (9 pkgs, parity test included in internal/docs).
This commit is contained in:
John O'Keefe committed 2026-10-24 18:35:51 -04:00
1 parent 6fc501b35a
commit acd82fff0a
353 files changed
+5165 -5293

No files matched your search

-39
View File
@@ -1,39 +0,0 @@
info:
name: Clear Device Queue
type: http
seq: 6
http:
method: DELETE
url: '{{base_url}}/api/queue/devices/{{device_id}}/clear'
auth: inherit
body:
type: none
docs: |-
## Clear Device Queue
Clears all queue items for a specific device.
**Method:** DELETE
**Endpoint:** /api/queue/devices/:device_id/clear
**Authentication:** Bearer token
**Path Parameters:**
- `device_id` (string): Device UUID
**Response:**
- Success message with count of cleared items
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 404: Device not found
**Example Response:**
```json
{
"message": "Queue cleared",
"device_id": "uuid",
"cleared_count": 10
-38
View File
@@ -1,38 +0,0 @@
info:
name: Delete Queue Item
type: http
seq: 5
http:
method: DELETE
url: '{{base_url}}/api/queue/items/{{item_id}}'
auth: inherit
body:
type: none
docs: |-
## Delete Queue Item
Deletes a queue item from the sync queue.
**Method:** DELETE
**Endpoint:** /api/queue/items/:item_id
**Authentication:** Bearer token
**Path Parameters:**
- `item_id` (string): Queue item UUID
**Response:**
- Success message confirming deletion
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 404: Queue item not found
**Example Response:**
```json
{
"message": "Queue item deleted",
"item_id": "uuid"
@@ -1,39 +0,0 @@
info:
name: List All Queue Items (Admin)
type: http
seq: 1
http:
method: GET
url: '{{base_url}}/api/queue/items'
auth: inherit
body:
type: none
docs: |-
## List All Queue Items (Admin)
Retrieves all queue items across all devices (admin only).
**Method:** GET
**Endpoint:** /api/queue/items
**Authentication:** Bearer token (admin role required)
**Response:**
- Array of queue items with device and status information
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 403: Forbidden - admin role required
**Example Response:**
```json
[
{
"id": "uuid",
"device_id": "uuid",
"item_type": "progress",
"status": "pending",
"created_at": "2024-01-01T00:00:00Z"
-42
View File
@@ -1,42 +0,0 @@
info:
name: List Device Queue Items
type: http
seq: 3
http:
method: GET
url: '{{base_url}}/api/queue/devices/{{device_id}}/items'
auth: inherit
body:
type: none
docs: |-
## List Device Queue Items
Retrieves all queue items for a specific device.
**Method:** GET
**Endpoint:** /api/queue/devices/:device_id/items
**Authentication:** Bearer token
**Path Parameters:**
- `device_id` (string): Device UUID
**Response:**
- Array of queue items for the specified device
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 404: Device not found
**Example Response:**
```json
[
{
"id": "uuid",
"device_id": "uuid",
"item_type": "progress",
"status": "pending",
"data": {
@@ -1,53 +0,0 @@
info:
name: List Queue Items (With Pagination)
type: http
seq: 2
http:
method: GET
url: '{{base_url}}/api/queue/items?limit=50&offset=0'
auth: inherit
body:
type: none
runtime:
scripts:
- type: tests
code: "test(\"status must be 200\", function() {\n expect(res.status).to.eql(200);"
docs: |-
List items in the sync queue with pagination.
**Endpoint**: GET /queue/items
**Auth**: Required (Bearer token)
## Query Parameters
| Parameter | Type | Required | Description |
|-----------|------|-----------|-------------|
| limit | int | No | Items per page |
| offset | int | No | Pagination offset |
## Response Fields
| Field | Type | Description |
|-------|------|-------------|
| items | array | List of queue items |
| total | int | Total number of items |
| page | int | Current page number |
| per_page | int | Items per page |
## Example Request
```
GET /queue/items?limit=50&offset=0
```
## Error Responses
| Code | Description |
|------|-------------|
| 401 | Unauthorized |
| 500 | Internal server error |
## Notes
- Supports pagination for large queue lists
-39
View File
@@ -1,39 +0,0 @@
info:
name: Retry Queue Item
type: http
seq: 4
http:
method: POST
url: '{{base_url}}/api/queue/items/{{item_id}}/retry'
auth: inherit
body:
type: none
docs: |-
## Retry Queue Item
Retries a failed queue item.
**Method:** POST
**Endpoint:** /api/queue/items/:item_id/retry
**Authentication:** Bearer token
**Path Parameters:**
- `item_id` (string): Queue item UUID
**Response:**
- Success message indicating retry initiated
**Status Codes:**
- 200: Success
- 401: Unauthorized
- 404: Queue item not found
- 400: Invalid item status
**Example Response:**
```json
{
"message": "Queue item retry initiated",
"item_id": "uuid"
+21
View File
@@ -0,0 +1,21 @@
info:
name: Clear Device Queue
type: http
seq: 1
http:
method: DELETE
url: '{{base_url}}/api/queue/devices/{{device_id}}/clear'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Clear Device Queue
`DELETE /api/queue/devices/:device_id/clear` — auth: jwt.
Canonical reference: `docs/developer/api/queue/clear_device_queue.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+21
View File
@@ -0,0 +1,21 @@
info:
name: Delete Queue Item
type: http
seq: 2
http:
method: DELETE
url: '{{base_url}}/api/queue/items/{{item_id}}'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Delete Queue Item
`DELETE /api/queue/items/:item_id` — auth: jwt.
Canonical reference: `docs/developer/api/queue/delete_queue_item.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+21
View File
@@ -0,0 +1,21 @@
info:
name: Get Device Queue Statistics
type: http
seq: 3
http:
method: GET
url: '{{base_url}}/api/queue/devices/{{device_id}}/stats'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Get Device Queue Statistics
`GET /api/queue/devices/:device_id/stats` — auth: jwt.
Canonical reference: `docs/developer/api/queue/get_device_queue_stats.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+21
View File
@@ -0,0 +1,21 @@
info:
name: List All Queue Items (Admin)
type: http
seq: 4
http:
method: GET
url: '{{base_url}}/api/queue/items'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# List All Queue Items (Admin)
`GET /api/queue/items` — auth: jwt+admin.
Canonical reference: `docs/developer/api/queue/list_all_queue_items.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+21
View File
@@ -0,0 +1,21 @@
info:
name: List Device Queue Items
type: http
seq: 5
http:
method: GET
url: '{{base_url}}/api/queue/devices/{{device_id}}/items'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# List Device Queue Items
`GET /api/queue/devices/:device_id/items` — auth: jwt.
Canonical reference: `docs/developer/api/queue/list_device_queue_items.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.
+21
View File
@@ -0,0 +1,21 @@
info:
name: Retry Queue Item
type: http
seq: 6
http:
method: POST
url: '{{base_url}}/api/queue/items/{{item_id}}/retry'
auth: inherit
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5
docs: |-
# Retry Queue Item
`POST /api/queue/items/:item_id/retry` — auth: jwt.
Canonical reference: `docs/developer/api/queue/retry_queue_item.md` (docs site → Developer → API). This request is GENERATED from that doc; edit the doc, not this file.