Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

Record the REST ticket list and ticket body as R1 baseline

Guido Boyked65653e2f2f9
diff --git a/spec/contracts/mcp_contract_recorder.rb b/spec/contracts/mcp_contract_recorder.rb
index e878264..a799709 100644
--- a/spec/contracts/mcp_contract_recorder.rb
+++ b/spec/contracts/mcp_contract_recorder.rb
@@ -467,7 +467,19 @@ module McpContract
# answer per error code, then a write with an Idempotency-Key, its replay
# and the key reused with another body.
'errors' => rest_error_calls,
- 'idempotency' => rest_idempotency_calls
+ 'idempotency' => rest_idempotency_calls,
+ # REST R1 (cli_rest_plan), appended last: the ticket view without MCP.
+ 'ticket_view' => rest_ticket_view_calls
+ }
+ end
+
+ # Each request from its own line (Prosopite). `show` is the ticket without
+ # paging parameters: its body must stay what gboyke/lalabase-mcp reads.
+ def rest_ticket_view_calls
+ login = "/api/v1/tickets/#{id(:login_ticket)}"
+ {
+ 'list' => rest_get(:read, "/api/v1/projects/#{id(:website)}/tickets"),
+ 'show' => rest_get(:read, login)
}
end
diff --git a/spec/fixtures/mcp_contract.json b/spec/fixtures/mcp_contract.json
index c46a8d5..9c7fb5d 100644
--- a/spec/fixtures/mcp_contract.json
+++ b/spec/fixtures/mcp_contract.json
@@ -1,9 +1,9 @@
{
"header": {
"regenerate": "RAILS_ENV=test bin/rails mcp:contract",
- "core_commit": "5efde7ed1c730d059eb559e15fab95ef35ccf129",
+ "core_commit": "2600e2edcf8a5ed972e35fa0e623ccad47912b8a",
"core_dirty": true,
- "contract_sha256": "3fcc755d77e87d2762e975e0d111d8d5065f461277229f1a83d7bac370a672fb"
+ "contract_sha256": "105ebdc25cb8a00cc75223833128be305a8b309da1ae4277a7e10333ae426cf3"
},
"contract": {
"mcp": {
@@ -3591,6 +3591,254 @@
}
}
}
+ },
+ "ticket_view": {
+ "list": {
+ "token": "read",
+ "request": {
+ "path": "/api/v1/projects/00000000-0000-4000-8000-000000000031/tickets"
+ },
+ "response": {
+ "status": 200,
+ "body": {
+ "data": [
+ {
+ "id": "00000000-0000-4000-8000-000000000041",
+ "number": 1,
+ "title": "Login bricht ab",
+ "status": "in_progress",
+ "status_functions": [
+ "is_in_progress"
+ ],
+ "ticket_type": "support",
+ "parent_id": null,
+ "assignees": [
+ {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ {
+ "id": "00000000-0000-4000-8000-000000000012",
+ "name": "Ben Berger"
+ },
+ {
+ "id": "00000000-0000-4000-8000-000000000013",
+ "name": "Carla Conrad"
+ }
+ ],
+ "creator": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "created_at": "2026-01-05T09:21:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ },
+ {
+ "id": "00000000-0000-4000-8000-000000000042",
+ "number": 2,
+ "title": "Export als CSV und XLSX",
+ "status": "in_progress",
+ "status_functions": [
+ "is_in_progress"
+ ],
+ "ticket_type": "support",
+ "parent_id": null,
+ "assignees": [
+ {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ }
+ ],
+ "creator": {
+ "id": "00000000-0000-4000-8000-000000000012",
+ "name": "Ben Berger"
+ },
+ "created_at": "2026-01-05T09:22:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ }
+ ],
+ "meta": {
+ "page": 1,
+ "per_page": 25,
+ "total": 2
+ }
+ }
+ }
+ },
+ "show": {
+ "token": "read",
+ "request": {
+ "path": "/api/v1/tickets/00000000-0000-4000-8000-000000000041"
+ },
+ "response": {
+ "status": 200,
+ "body": {
+ "data": {
+ "id": "00000000-0000-4000-8000-000000000041",
+ "number": 1,
+ "title": "Login bricht ab",
+ "status": "in_progress",
+ "status_functions": [
+ "is_in_progress"
+ ],
+ "ticket_type": "support",
+ "parent_id": null,
+ "assignees": [
+ {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ {
+ "id": "00000000-0000-4000-8000-000000000012",
+ "name": "Ben Berger"
+ },
+ {
+ "id": "00000000-0000-4000-8000-000000000013",
+ "name": "Carla Conrad"
+ }
+ ],
+ "creator": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "created_at": "2026-01-05T09:21:00Z",
+ "updated_at": "2026-01-05T09:36:00Z",
+ "summary": null,
+ "description_html": "Nach dem Absenden bleibt die Seite weiß.",
+ "description_text": "Nach dem Absenden bleibt die Seite weiß.",
+ "custom_attributes": {
+ "status": "in_progress",
+ "priority": "high"
+ },
+ "project": {
+ "id": "00000000-0000-4000-8000-000000000031",
+ "name": "Website-Relaunch"
+ },
+ "posts": [
+ {
+ "id": "00000000-0000-4000-8000-000000000051",
+ "author": {
+ "id": "00000000-0000-4000-8000-000000000012",
+ "name": "Ben Berger"
+ },
+ "body_html": "Tritt nur in Safari auf.",
+ "body_text": "Tritt nur in Safari auf.",
+ "is_private": false,
+ "attachments_count": 1,
+ "created_at": "2026-01-05T09:25:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ },
+ {
+ "id": "00000000-0000-4000-8000-000000000052",
+ "author": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "body_html": "Ich schaue es mir an.",
+ "body_text": "Ich schaue es mir an.",
+ "is_private": false,
+ "attachments_count": 0,
+ "created_at": "2026-01-05T09:26:00Z",
+ "updated_at": "2026-01-05T09:26:00Z"
+ },
+ {
+ "id": "<generated-id-1>",
+ "author": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "body_html": "Behoben in 2.4.1.",
+ "body_text": "Behoben in 2.4.1.",
+ "is_private": false,
+ "attachments_count": 0,
+ "created_at": "2026-01-05T09:36:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ },
+ {
+ "id": "<generated-id-2>",
+ "author": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "body_html": "<p>line one<br>line two</p><p>see &lt;file.txt&gt; &amp;lt;tag&amp;gt;</p>",
+ "body_text": "line one\nline two\n\nsee <file.txt> &lt;tag&gt;",
+ "is_private": false,
+ "attachments_count": 0,
+ "created_at": "2026-01-05T09:36:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ },
+ {
+ "id": "<generated-id-3>",
+ "author": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "body_html": "<p><b>bold</b></p>",
+ "body_text": "bold",
+ "is_private": false,
+ "attachments_count": 0,
+ "created_at": "2026-01-05T09:36:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ },
+ {
+ "id": "<generated-id-4>",
+ "author": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "body_html": "<p>&lt;private&gt;</p>",
+ "body_text": "<private>",
+ "is_private": true,
+ "attachments_count": 0,
+ "created_at": "2026-01-05T09:36:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ },
+ {
+ "id": "<generated-id-7>",
+ "author": {
+ "id": "00000000-0000-4000-8000-000000000011",
+ "name": "Anna Albers"
+ },
+ "body_html": "Per REST, einmal.",
+ "body_text": "Per REST, einmal.",
+ "is_private": false,
+ "attachments_count": 0,
+ "created_at": "2026-01-05T09:36:00Z",
+ "updated_at": "2026-01-05T09:36:00Z"
+ }
+ ]
+ },
+ "permissions": {
+ "is_account_admin": false,
+ "tickets": {
+ "read": true,
+ "write": true
+ },
+ "documents": {
+ "read": false,
+ "write": false
+ },
+ "posts": {
+ "can_create": true,
+ "can_update_own": true,
+ "can_destroy_own": true
+ },
+ "time_sessions": {
+ "can_view_own": true,
+ "can_view_all": false,
+ "can_create_own": true,
+ "can_edit_own": true,
+ "can_edit_all": false,
+ "can_delete_own": true,
+ "can_delete_all": false
+ },
+ "activities": {
+ "read": true
+ }
+ }
+ }
+ }
+ }
}
}
}