oficina / equipo Public

S3: register the thin task routes; budget TestMain for schedule

The API route contract lists PUT /tasks/{id}/priority and POST
/tasks/{id}/run-now with the thin routes (contracted by wire fixtures),
and internal/schedule reports its test time like every package.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev 3f38c273fc45aefd1524124c6d56b80b6ac1ee19 parent e5c7a6d
2 files changed, +11 −1
  • internal/plan3test/person_api_contract_test.go +1 −1
  • internal/schedule/main_test.go +10 −0

CI passed — run details

diff --git a/internal/plan3test/person_api_contract_test.go b/internal/plan3test/person_api_contract_test.go
index 705cf298..629f1fdd 100644
--- a/internal/plan3test/person_api_contract_test.go
+++ b/internal/plan3test/person_api_contract_test.go
@@ -56,7 +56,7 @@ func personAPIContractCoverage(t *testing.T) {
f := newFixture(t)
registered := map[string]bool{}
// Thin v1 conversation routes are contracted by internal/wire fixtures.
- thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/kind": true, "POST /tasks/{id}/round": true, "POST /tasks/{id}/recover": true, "POST /tasks/{id}/merge": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/uncombine": true, "POST /tasks/{id}/undo-merge": true, "GET /projects/{id}/merge-policy": true, "PUT /projects/{id}/merge-policy": true, "GET /thinking": true, "PUT /thinking": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true, "POST /connections": true, "POST /connections/{id}/cancel": true, "POST /connections/{id}/secret": true, "POST /connections/{id}/forget": true, "POST /connections/{id}/check": true, "POST /connections/{id}/model": true, "PUT /connections/{id}/budget": true, "POST /connections/{id}/resume": true, "GET /connections/preference": true, "PUT /connections/preference": true, "GET /housekeeping": true, "PUT /housekeeping": true, "PUT /housekeeping/detectors/{id}": true, "GET /housekeeping/actions": true, "POST /housekeeping/actions/{id}/undo": true, "POST /attachments": true, "GET /attachments/{id}": true, "GET /attachments/{id}/preview": true, "POST /specialists/{id}/revoke": true, "GET /tasks/{id}/files/{file}": true}
+ thin := map[string]bool{"GET /messages": true, "POST /messages": true, "GET /turns/{id}": true, "POST /turns/{id}/cancel": true, "GET /snapshot": true, "GET /events": true, "DELETE /projects/{id}": true, "POST /cards/{id}/answer": true, "GET /notebook": true, "POST /notebook/reset": true, "POST /tasks/{id}/retry": true, "POST /tasks/{id}/kind": true, "POST /tasks/{id}/round": true, "POST /tasks/{id}/recover": true, "POST /tasks/{id}/merge": true, "POST /tasks/{id}/duplicate": true, "POST /tasks/{id}/uncombine": true, "POST /tasks/{id}/undo-merge": true, "PUT /tasks/{id}/priority": true, "POST /tasks/{id}/run-now": true, "GET /projects/{id}/merge-policy": true, "PUT /projects/{id}/merge-policy": true, "GET /thinking": true, "PUT /thinking": true, "POST /tasks/{id}/thread": true, "GET /steps/{id}/log": true, "POST /tasks/{id}/questions": true, "POST /questions/{id}/cancel": true, "POST /connections": true, "POST /connections/{id}/cancel": true, "POST /connections/{id}/secret": true, "POST /connections/{id}/forget": true, "POST /connections/{id}/check": true, "POST /connections/{id}/model": true, "PUT /connections/{id}/budget": true, "POST /connections/{id}/resume": true, "GET /connections/preference": true, "PUT /connections/preference": true, "GET /housekeeping": true, "PUT /housekeeping": true, "PUT /housekeeping/detectors/{id}": true, "GET /housekeeping/actions": true, "POST /housekeeping/actions/{id}/undo": true, "POST /attachments": true, "GET /attachments/{id}": true, "GET /attachments/{id}/preview": true, "POST /specialists/{id}/revoke": true, "GET /tasks/{id}/files/{file}": true}
must(t, chi.Walk(f.Store.PersonAPIHandler().(chi.Routes), func(method, path string, _ http.Handler, _ ...func(http.Handler) http.Handler) error {
if thin[method+" "+path] {
return nil
diff --git a/internal/schedule/main_test.go b/internal/schedule/main_test.go
new file mode 100644
index 00000000..849d86ef
--- /dev/null
+++ b/internal/schedule/main_test.go
@@ -0,0 +1,10 @@
+package schedule
+
+import (
+ "os"
+ "testing"
+
+ "amadan.net/rastrillo/rastrillo/budget"
+)
+
+func TestMain(m *testing.M) { os.Exit(budget.Main(m)) }