Fix review findings on the device API document
Runner.role takes "" (a snapshot before a primary runner reports), held by probes of a new instance's first reads and query bounds. Enums are checked against their families of wire constants, event schemas against the pairs the engine appends, and Ops against the handlers' source. The earlier operations under x-earlierPersonAPI get the person API checks again. Request bodies require nothing and take the suffix Input when the type is also an answer's. The generator refuses what it cannot describe. The orphan ProjectPage schema is gone, and no schema may be orphaned.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
7 files changed,
+816
−154
docs/api/equipo-v1.md+2 −2docs/api/equipo-v1.openapi.json+82 −125docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md+1 −1internal/plan3test/person_api_contract_test.go+27 −8internal/plan3test/person_api_device_contract_test.go+125 −1internal/wire/wireschema/wireschema.go+97 −16internal/wire/wireschema/wireschema_test.go+482 −1
CI passed — run details
CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/docs__device-api: Type Size Avail | ext4 96G 87G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type Size Avail | ext4 96G 87G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.7s
ci-box: codex: fetched and verified in 3.4s
ci-box: codex-code-mode-host: fetched and verified in 1.3s
ci-box: libwrap: fetched and verified in 0.3s
ci-box: socat: fetched and verified in 0.3s
npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead
ci-box: image pulled in 9.7s
ci-box: pi: installed and verified in 7.4s
ci-box: opencode: installed and verified in 1.8s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.7s
ci-box: clone deepened in 4.9s
ci-box: file times set from content: 2669 files, 173 directories
ci-box: ready in 17.9s
=== copy ===
EQUIPO_RELEASE_COPY_CHECK=1 CGO_ENABLED=0 go test ./internal/equipotest -run '^TestReleaseCopyReviewed$' -count=1
ok amadan.net/oficina/equipo/internal/equipotest 0.243s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
1.0s
+ go list -export -test -tags testbuild -f ./...
1.4s
+ go list -export -test -tags browser,testbuild -f ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
1.1s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC
go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== check ===
--- shard 0 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-work: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m19.005s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.495s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m17.49s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 33.20, cpu waiting 21.88%, memory waiting 0.00%, io waiting 0.59%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m20.864s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m19.262s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.26s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 33.20, cpu waiting 21.66%, memory waiting 0.00%, io waiting 0.57%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m22.555s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m20.417s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m10.09s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 5.64s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 4.69s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 33.20, cpu waiting 21.66%, memory waiting 0.00%, io waiting 0.57%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m17.83s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m16.244s amadan.net/oficina/equipo/internal/headless
receipt: slow test 36.97s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 19.96s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 9.95s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.36s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 34.09, cpu waiting 22.22%, memory waiting 0.00%, io waiting 0.61%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m35.312s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m33.637s amadan.net/oficina/equipo/internal/headless
receipt: slow test 58.78s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.04s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 9.59s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.53s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.7s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 29.06, cpu waiting 17.59%, memory waiting 0.00%, io waiting 0.45%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 3m2.329s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 3m0.295s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m43.79s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 23.3s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.12s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 7.89s amadan.net/oficina/equipo/internal/headless TestHeadlessClaudeSignIn
receipt: slow test 7.21s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
machine: 32 CPUs, load 8.30, cpu waiting 4.21%, memory waiting 0.00%, io waiting 0.10%
--- shard 6 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
receipt: test step 366ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m51.043s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.56s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.7s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 3.71s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 3.37s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 2.4s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 8.40, cpu waiting 0.00%, memory waiting 0.00%, io waiting 2.13%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest
receipt: test step 337ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m8.073s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 6.8s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 3.81s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.32s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.08s amadan.net/oficina/equipo/internal/thintest TestContractHostedBindingRules
receipt: slow test 1.76s amadan.net/oficina/equipo/internal/thintest TestContractTokenConnection
machine: 32 CPUs, load 8.40, cpu waiting 0.88%, memory waiting 0.00%, io waiting 2.19%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
cache miss: amadan.net/oficina/equipo/internal/runner/thin: its inputs changed
budget note: internal/runner/thin took 4m14.843s, over the 45s its record on line 44 allows; reported only, timing fails on CI
receipt: test step 4m27.323s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 4m14.843s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.76s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.71s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.6s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.35s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.7s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 2.47, cpu waiting 1.00%, memory waiting 0.00%, io waiting 0.01%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed
receipt: test step 47.085s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 45.936s amadan.net/oficina/equipo/internal/runner
receipt: slow test 25.91s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 36.28, cpu waiting 21.18%, memory waiting 0.00%, io waiting 1.01%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed
receipt: test step 47.751s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 45.875s amadan.net/oficina/equipo/internal/runner
receipt: slow test 35.8s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 31.02s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.42s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.64s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 36.28, cpu waiting 21.18%, memory waiting 0.00%, io waiting 1.01%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed
receipt: test step 35.049s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 34.123s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.53s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.11s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.14s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.6s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 24.11, cpu waiting 14.98%, memory waiting 0.00%, io waiting 1.24%
--- shard 12 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-a started 30s late; cpu waiting 26.4%, load 20.46
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed
receipt: test step 1m2.814s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m0.978s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.29s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 25.23s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 23.27s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 21.03s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 20.88s amadan.net/oficina/equipo/internal/equipotest TestAuthorityRejectsMismatchedTarget
machine: 32 CPUs, load 30.19, cpu waiting 18.15%, memory waiting 0.00%, io waiting 0.47%
--- shard 13 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-e started 30s late; cpu waiting 26.4%, load 20.46
test lane equipotest-e: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[E-P]' ./internal/equipotest
receipt: test step 1.087s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m12.08s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 19s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
receipt: slow test 18.98s amadan.net/oficina/equipo/internal/equipotest TestProjectsSharedAndGrouped
receipt: slow test 18.92s amadan.net/oficina/equipo/internal/equipotest TestProjectWritesRequireCurrentOwner
receipt: slow test 18.86s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 18.85s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
machine: 32 CPUs, load 20.46, cpu waiting 11.67%, memory waiting 0.00%, io waiting 1.33%
--- shard 14 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-r started 30s late; cpu waiting 26.4%, load 18.93
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed
receipt: test step 1m13.834s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m2.874s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.99s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.44s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.44s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 9.39s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 6.35s amadan.net/oficina/equipo/internal/equipotest TestRosterBootstrapOnce
machine: 32 CPUs, load 27.05, cpu waiting 15.39%, memory waiting 0.00%, io waiting 0.39%
--- shard 15 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: equipotest-rest started 30s late; cpu waiting 26.4%, load 20.46
test lane equipotest-rest: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test[A-D]|^TestQ|^Test[E-P]|^TestR' ./internal/equipotest
receipt: test step 1.025s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m4.547s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 23.06s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 23.03s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 23s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 21.31s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
receipt: slow test 21.22s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 20.46, cpu waiting 11.67%, memory waiting 0.00%, io waiting 1.33%
--- shard 16 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: plan3test started 30s late; cpu waiting 26.4%, load 20.46
test lane plan3test: ./internal/plan3test
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/plan3test
receipt: test step 48.313s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 46.581s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.41s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 3.4s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 1.45s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.35s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.14s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 34.09, cpu waiting 22.22%, memory waiting 0.00%, io waiting 0.61%
--- shard 17 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: rest started 30s late; cpu waiting 26.4%, load 20.46
test lane rest: ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/housekeeping ./internal/equipo/icons ./internal/equipo/identity ./internal/equipo/kernel ./internal/equipo/library ./internal/equipo/mergegate ./internal/equipo/notifications ./internal/equipo/oficina ./internal/equipo/oficina/oficinatest ./internal/equipo/oficinaid ./internal/equipo/ownermode ./internal/equipo/personapi ./internal/equipo/planning ./internal/equipo/setup ./internal/equipo/team ./internal/equipo/teamcontract ./internal/equipo/triage ./internal/fakeclaude ./internal/fakecodex ./internal/fakeopencode ./internal/fakepi ./internal/idtest ./internal/ownermodetest ./internal/release ./internal/runner/checks ./internal/runner/connect ./internal/runner/containment ./internal/runner/containment/sysunix ./internal/runner/egress ./internal/runner/forge ./internal/runner/forge/forgetest ./internal/runner/heartbeat ./internal/runner/mac ./internal/runner/mcpresource ./internal/runner/metered ./internal/runner/planflow ./internal/runner/provider ./internal/runner/provider/claude ./internal/runner/provider/codex ./internal/runner/provider/gotoolchain ./internal/runner/provider/opencode ./internal/runner/provider/pi ./internal/runner/setup ./internal/runner/transporttest ./internal/runner/webread ./internal/runner/workspace ./internal/runnerproto ./internal/schedule ./internal/sealbox ./internal/specialist ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/codex: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 24.227s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 11.886s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 42.05s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 39.369s, over the 15s its record on line 40 allows; reported only, timing fails on CI
receipt: test step 2m17.231s against a 60s target (the gate's other steps are not in this figure)
receipt: 12 packages ran, 47 cached, 18 without tests, 0 failed
receipt: slow package 53.225s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 51.594s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 42.05s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 39.369s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow package 37.252s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow test 21.61s amadan.net/oficina/equipo/internal/runner/provider/opencode TestOpenCodeAcceptanceHostileRepository
receipt: slow test 15.64s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringOfflineGo
receipt: slow test 11.57s amadan.net/oficina/equipo/internal/idtest TestIDCallbackGuardAndPendingNonce
receipt: slow test 9.26s amadan.net/oficina/equipo/internal/runner/containment TestEngineeringMissingModuleCache
receipt: slow test 8.15s amadan.net/oficina/equipo/internal/runner/checks TestCheckNamespaceGoRootInsideModuleCache
machine: 32 CPUs, load 10.46, cpu waiting 5.32%, memory waiting 0.00%, io waiting 0.13%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m22.058s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m20.664s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.51s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 15.02s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 10.36s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.57s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.93s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 33.20, cpu waiting 21.11%, memory waiting 0.00%, io waiting 0.55%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m30.317s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m28.73s amadan.net/oficina/equipo/internal/headless
receipt: slow test 25.7s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 22.14s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 13.79s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 9.83s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 7.79s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 30.19, cpu waiting 18.73%, memory waiting 0.00%, io waiting 0.48%
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed
receipt: test step 1m39.249s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m37.623s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.86s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 12.76s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 12.75s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 10.23s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.11s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 27.05, cpu waiting 16.45%, memory waiting 0.00%, io waiting 0.42%
--- shard 21 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-rest: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN TestBrowserCopyContinue
time=2026-11-19T07:50:01.641Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T07:50:01.641Z level=INFO msg="startup phase done" phase=state_lock took=239µs
time=2026-11-19T07:50:01.641Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T07:50:01.641Z level=INFO msg="startup phase done" phase=claim_roots took=102µs
time=2026-11-19T07:50:01.641Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T07:50:01.671Z level=INFO msg="startup phase done" phase=sweep took=29.552ms
time=2026-11-19T07:50:01.671Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T07:50:01.671Z level=INFO msg="startup phase done" phase=credentials took=189µs
time=2026-11-19T07:50:01.671Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T07:50:01.717Z level=INFO msg="startup phase done" phase=open_state took=45.602ms
time=2026-11-19T07:50:01.718Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T07:50:01.718Z level=INFO msg=connecting host=127.0.0.1:46519 protocol=26
time=2026-11-19T07:50:01.721Z level=INFO msg=connected host=127.0.0.1:46519 took=2.394ms
time=2026-11-19T07:50:01.721Z level=INFO msg="capabilities gathering"
time=2026-11-19T07:50:01.722Z level=INFO msg="capabilities gathered" took=607µs tags=linux,claude,go
time=2026-11-19T07:50:01.724Z level=INFO msg="hello sent" protocol=26
time=2026-11-19T07:50:01.729Z level=INFO msg=welcome protocol=26 role=primary generation=1
browser_copy_test.go:93: continue did not reach Checks: 0 <nil>
--- FAIL: TestBrowserCopyContinue (1.84s)
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN TestBrowserEmptyExplore
time=2026-11-19T07:50:32.485Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T07:50:32.485Z level=INFO msg="startup phase done" phase=state_lock took=148µs
time=2026-11-19T07:50:32.485Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T07:50:32.485Z level=INFO msg="startup phase done" phase=claim_roots took=128µs
time=2026-11-19T07:50:32.485Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T07:50:32.517Z level=INFO msg="startup phase done" phase=sweep took=32.415ms
time=2026-11-19T07:50:32.517Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T07:50:32.518Z level=INFO msg="startup phase done" phase=credentials took=147µs
time=2026-11-19T07:50:32.518Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T07:50:32.558Z level=INFO msg="startup phase done" phase=open_state took=40.737ms
time=2026-11-19T07:50:32.559Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T07:50:32.560Z level=INFO msg=connecting host=127.0.0.1:36027 protocol=26
time=2026-11-19T07:50:32.562Z level=INFO msg=connected host=127.0.0.1:36027 took=1.001ms
time=2026-11-19T07:50:32.562Z level=INFO msg="capabilities gathering"
time=2026-11-19T07:50:32.562Z level=INFO msg="capabilities gathered" took=493µs tags=linux,claude,go
time=2026-11-19T07:50:32.563Z level=INFO msg="hello sent" protocol=26
time=2026-11-19T07:50:32.567Z level=INFO msg=welcome protocol=26 role=primary generation=1
time=2026-11-19T07:50:33.608Z level=INFO msg="connection checked" connection=claude-1 state=healthy
browser_receipts_test.go:169: waiting for [...document.querySelectorAll('[equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes("I'm your coordinator")): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserEmptyExplore (5.86s)
--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m26.53s
FAIL amadan.net/oficina/equipo/internal/headless 86.787s
receipt: test step 1m27.733s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 0 cached, 0 without tests, 1 failed
receipt: slow package 1m26.53s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.88s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 11.49s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 10.38s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.27s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.85s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
rastrillo: budget test: go test failed
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAskAfterMerge|TestBrowserChat|TestBrowserChatSendStaysOnPage|TestBrowserComposer|TestBrowserComposerDock|TestBrowserComposerFocus|TestBrowserComposerReconcile|TestBrowserConnectionsAdd|TestBrowserConnectionsAddPage|TestBrowserConnectionsConversation|TestBrowserConnectionsCopyLink|TestBrowserConnectionsEndedNote|TestBrowserConnectionsMeteredLimitRequired|TestBrowserConnectionsOpenCodeGoLimitRequired|TestBrowserConnectionsSignIn|TestBrowserConnectionsSignInSwitch|TestBrowserConnectionsToken|TestBrowserCopyContinue|TestBrowserCopySettingAndFlag|TestBrowserDraftIsTheMessage|TestBrowserDraftStreamsFormatted|TestBrowserEmptyExplore|TestBrowserMoveIn|TestBrowserNotebook|TestBrowserNotebookLook|TestBrowserPasteBox|TestBrowserPasteBoxLook|TestBrowserPasteCopiesItsBox|TestBrowserRailFollowsWork|TestBrowserReceiptFollowsReview|TestBrowserReceiptsDesktop|TestBrowserReceiptsTouch|TestBrowserRefreshRace|TestBrowserStalePageReloads|TestBrowserTaskCard|TestBrowserTaskThread|TestBrowserThinkingAndCards|TestBrowserUsageAndAdvice|TestBrowserWaitingTurns|TestNotebookScreenshots)$' -skip '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$|^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$|^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' -v -run '^TestBrowserCopyContinue$|^TestBrowserEmptyExplore$' -count=1 ./internal/headless (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest ea5598550f1436ae82171c56c59ca25362058b6e 1.84s 31.34
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest ea5598550f1436ae82171c56c59ca25362058b6e 5.86s 31.34
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 27.05, cpu waiting 16.45%, memory waiting 0.00%, io waiting 0.42%
--- shard 22 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-rest: ./internal/idtest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserOficinaIDDoor)$' ./internal/idtest
receipt: test step 1.039s against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1.679s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.68s amadan.net/oficina/equipo/internal/idtest TestBrowserOficinaIDDoor
browser lane browser-rest: ./internal/plan3test
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestTeamsHierarchyBrowser)$' ./internal/plan3test
receipt: test step 2.939s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1.827s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.83s amadan.net/oficina/equipo/internal/plan3test TestTeamsHierarchyBrowser
browser lane browser-rest: ./internal/thintest
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserAccessEmojiByline|TestBrowserAccessFinalOutcomes|TestBrowserAccessRequest|TestBrowserAccessReview|TestBrowserActivitySubjects|TestBrowserCoordinatorQueue|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackStarCentre)$' ./internal/thintest
receipt: test step 331ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2m51.872s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 17.02s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.33s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 10.79s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 7.64s amadan.net/oficina/equipo/internal/thintest TestBrowserInnerScreens
machine: 32 CPUs, load 13.33, cpu waiting 2.21%, memory waiting 0.00%, io waiting 2.05%
--- shard 23 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 23: make test-quarantine
python3 scripts/ci-test.py quarantine
quarantine: 12 tests from scripts/ci-quarantine.txt; a failure is retried once, and a pass on the retry is reported as a flake
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^A5_cancel_and_sign_out$|^TestHeadlessConnections$/^C4_claude_sign_in$|^TestHeadlessConnections$/^C5_engineering_failover$|^TestHeadlessConnections$/^C5_engineering_to_codex$|^TestHeadlessConnections$/^C5_engineering_waits$' ./internal/headless (51s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.10s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.37s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 8.86s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 9.47s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.62s
+ go test -tags testbuild -timeout 15m -v -run '^TestHeadlessConnections$/^C5_review_auth$|^TestHeadlessConnections$/^C5_review_failover$|^TestHeadlessConnections$/^C5_review_on_codex$|^TestHeadlessConnections$/^C5_review_other_family_first$' ./internal/headless (62s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 13.09s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 13.52s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 20.13s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 12.91s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless (21s)
ok ./internal/headless TestMixedVersions 19.28s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks (1s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.76s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin (0s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 37.56, cpu waiting 22.44%, memory waiting 0.00%, io waiting 0.80%
--- shard 24 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
shard 24: make runner-host
python3 scripts/runner-prerequisites.py
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run 'TestDirect|TestProvider|TestCheckSandbox' -count=1 ./internal/runner/provider/... ./internal/runner/checks
receipt: test step 9.019s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 3 without tests, 0 failed
receipt: slow package 7.935s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 181ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 81ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 1ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/gotoolchain
receipt: slow test 4.89s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 2.65s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 310ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 80ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment
receipt: test step 3.048s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 2.74s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 270ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 120ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryMalformedRecord
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
machine: 32 CPUs, load 14.67, cpu waiting 4.39%, memory waiting 0.00%, io waiting 1.86%
--- shard 25 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: runner-dead-references started 30s late; cpu waiting 26.4%, load 20.46
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2383 text files, 2744 matches, 0 failures
python3 scripts/ci-test.py check
lanes: 18 lanes and 5 browser lanes run every test once; 20-check@29
CGO_ENABLED=0 go build ./...
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o /dev/null ./cmd/equipo-runner
go vet ./...
go vet -tags testbuild ./internal/runner/thin ./internal/headless
GOOS=darwin GOARCH=arm64 go vet ./cmd/equipo-runner/... ./internal/runner/... ./internal/wire/... ./internal/release/...
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 86 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok amadan.net/oficina/equipo/internal/equipo 2.384s
machine: 32 CPUs, load 36.28, cpu waiting 20.72%, memory waiting 0.00%, io waiting 1.05%
--- shard 26 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: staticcheck started 30s late; cpu waiting 26.4%, load 20.46
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 20.46, cpu waiting 11.67%, memory waiting 0.00%, io waiting 1.33%
--- shard 27 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: govulncheck started 30s late; cpu waiting 26.4%, load 20.46
shard 27: make govulncheck
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 ./...
=== Symbol Results ===
No vulnerabilities found.
Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 5
vulnerabilities in modules you require, but your code doesn't appear to call
these vulnerabilities.
Use '-show verbose' for more details.
machine: 32 CPUs, load 24.11, cpu waiting 16.09%, memory waiting 0.00%, io waiting 1.20%
--- shard 28 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
stagger: gitleaks started 30s late; cpu waiting 26.4%, load 20.46
shard 28: make gitleaks
[90m7:49AM[0m [32mINF[0m [1mUnknown SCM platform. Use --platform to include links in findings.[0m [36mhost=[0mamadan.net
[90m7:50AM[0m [32mINF[0m [1m985 commits scanned.[0m
[90m7:50AM[0m [32mINF[0m [1mscanned ~59426789 bytes (59.43 MB) in 13.7s[0m
[90m7:50AM[0m [32mINF[0m [1mno leaks found[0m
machine: 32 CPUs, load 31.87, cpu waiting 20.00%, memory waiting 0.00%, io waiting 1.08%
=== perf ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
perf: GET /: median 1.061ms, worst 1.167ms, budget 150ms
perf: GET /api/runner/protocol: median 73µs, worst 113µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 585µs, worst 630µs, budget 150ms
perf: GET /api/v1/accounts: median 418µs, worst 442µs, budget 150ms
perf: GET /api/v1/auth/devices: median 453µs, worst 462µs, budget 150ms
perf: GET /api/v1/budgets: median 467µs, worst 514µs, budget 150ms
perf: GET /api/v1/capabilities: median 236µs, worst 264µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.229ms, worst 1.251ms, budget 150ms
perf: GET /api/v1/connections: median 567µs, worst 597µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 525µs, worst 552µs, budget 150ms
perf: GET /api/v1/conversation: median 904µs, worst 962µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.435ms, worst 1.565ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.91ms, worst 1.977ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 448µs, worst 481µs, budget 150ms
perf: GET /api/v1/journey: median 7.808ms, worst 8.155ms, budget 150ms
perf: GET /api/v1/me: median 484µs, worst 859µs, budget 150ms
perf: GET /api/v1/me/settings: median 524µs, worst 620µs, budget 150ms
perf: GET /api/v1/needs-you: median 7.261ms, worst 7.743ms, budget 150ms
perf: GET /api/v1/notifications: median 1.641ms, worst 1.679ms, budget 150ms
perf: GET /api/v1/onboarding: median 385µs, worst 403µs, budget 150ms
perf: GET /api/v1/people: median 411µs, worst 443µs, budget 150ms
perf: GET /api/v1/playbooks: median 565µs, worst 593µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 512µs, worst 539µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 809µs, worst 836µs, budget 150ms
perf: GET /api/v1/preferences: median 713µs, worst 758µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 465µs, worst 509µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 570µs, worst 602µs, budget 150ms
perf: GET /api/v1/roster: median 452µs, worst 486µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 406µs, worst 415µs, budget 150ms
perf: GET /api/v1/specialists: median 7.975ms, worst 8.142ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 7.751ms, worst 7.912ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 760µs, worst 846µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.095ms, worst 1.148ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 685µs, worst 744µs, budget 150ms
perf: GET /api/v1/teams: median 403µs, worst 482µs, budget 150ms
perf: GET /api/v1/templates: median 587µs, worst 604µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 429µs, worst 475µs, budget 150ms
perf: GET /auth/callback: median 74µs, worst 97µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.038ms, worst 3.133ms, budget 150ms
perf: GET /auth/verify: median 70µs, worst 115µs, budget 150ms
perf: GET /connections: median 3.39ms, worst 3.426ms, budget 150ms
perf: GET /conversation: median 6.954ms, worst 7.156ms, budget 150ms
perf: GET /conversation/connections: median 243µs, worst 261µs, budget 150ms
perf: GET /conversation/notebook: median 225µs, worst 258µs, budget 150ms
perf: GET /conversation/settings: median 3.867ms, worst 6.081ms, budget 150ms
perf: GET /conversation/settings/connections: median 5.96ms, worst 6.05ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 5.961ms, worst 6.152ms, budget 150ms
perf: GET /conversation/settings/copy: median 3.238ms, worst 3.319ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 3.744ms, worst 3.893ms, budget 150ms
perf: GET /conversation/settings/machines: median 4.001ms, worst 4.151ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 4.088ms, worst 4.13ms, budget 150ms
perf: GET /conversation/settings/notebook: median 2.985ms, worst 3.186ms, budget 150ms
perf: GET /conversation/settings/thinking: median 3.639ms, worst 3.814ms, budget 150ms
perf: GET /housekeeping: median 3.662ms, worst 6.085ms, budget 150ms
perf: GET /invites/new: median 606µs, worst 619µs, budget 150ms
perf: GET /invites/{id}: median 601µs, worst 695µs, budget 150ms
perf: GET /jobs: median 3.09ms, worst 3.129ms, budget 150ms
perf: GET /jobs/{id}: median 4.171ms, worst 4.294ms, budget 150ms
perf: GET /journey: median 10.029ms, worst 10.239ms, budget 150ms
perf: GET /nav/rail: median 2.678ms, worst 2.731ms, budget 150ms
perf: GET /needs-you: median 9.571ms, worst 9.715ms, budget 150ms
perf: GET /onboarding: median 3.639ms, worst 3.788ms, budget 150ms
perf: GET /people: median 3.079ms, worst 3.138ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 4.393ms, worst 7.353ms, budget 150ms
perf: GET /playbooks: median 3.828ms, worst 3.906ms, budget 150ms
perf: GET /playbooks/new: median 3.929ms, worst 4.001ms, budget 150ms
perf: GET /playbooks/{id}: median 4.285ms, worst 4.414ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 4.247ms, worst 4.313ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 3.46ms, worst 3.537ms, budget 150ms
perf: GET /preferences: median 3.905ms, worst 4.012ms, budget 150ms
perf: GET /preferences/sources/{source}: median 3.74ms, worst 3.817ms, budget 150ms
perf: GET /projects: median 4.679ms, worst 4.712ms, budget 150ms
perf: GET /projects/accounts: median 3.287ms, worst 3.33ms, budget 150ms
perf: GET /projects/new: median 3.316ms, worst 3.473ms, budget 150ms
perf: GET /projects/{id}: median 11.571ms, worst 11.798ms, budget 150ms
perf: GET /projects/{id}/edit: median 3.588ms, worst 3.743ms, budget 150ms
perf: GET /runners/enrol: median 4.201ms, worst 4.266ms, budget 150ms
perf: GET /settings: median 3.18ms, worst 3.262ms, budget 150ms
perf: GET /settings/coordinator: median 5.203ms, worst 5.658ms, budget 150ms
perf: GET /settings/devices: median 3.002ms, worst 3.097ms, budget 150ms
perf: GET /settings/recovery: median 3.159ms, worst 3.222ms, budget 150ms
perf: GET /settings/recovery/release: median 3.136ms, worst 3.23ms, budget 150ms
perf: GET /settings/thinking: median 240µs, worst 267µs, budget 150ms
perf: GET /signin: median 297µs, worst 322µs, budget 150ms
perf: GET /specialists/new: median 3.061ms, worst 3.162ms, budget 150ms
perf: GET /specialists/{key}: median 10.744ms, worst 13.909ms, budget 150ms
perf: GET /specialists/{key}/edit: median 3.356ms, worst 3.485ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 3.422ms, worst 3.494ms, budget 150ms
perf: GET /tasks: median 4.659ms, worst 4.816ms, budget 150ms
perf: GET /tasks/new: median 2.976ms, worst 3.092ms, budget 150ms
perf: GET /tasks/{id}: median 5.14ms, worst 5.208ms, budget 150ms
perf: GET /tasks/{id}/merge: median 4.481ms, worst 4.575ms, budget 150ms
perf: GET /tasks/{id}/move: median 4.132ms, worst 4.269ms, budget 150ms
perf: GET /tasks/{id}/plan: median 5.42ms, worst 5.481ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.014ms, worst 6.753ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 4.57ms, worst 4.698ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 3.992ms, worst 4.147ms, budget 150ms
perf: GET /tasks/{id}/thread: median 7.665ms, worst 7.825ms, budget 150ms
perf: GET /team/{specialist}: median 3.986ms, worst 4.158ms, budget 150ms
perf: GET /teams: median 9.634ms, worst 9.828ms, budget 150ms
perf: GET /templates: median 3.218ms, worst 3.296ms, budget 150ms
perf: GET /usage: median 3.983ms, worst 4.108ms, budget 150ms
perf: GET /work: median 2.826ms, worst 2.888ms, budget 150ms
perf: cold boot: median 252ms of [251.968481ms 251.992802ms 254.970106ms], budget 500ms
receipt: test step 29.209s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 82 without tests, 0 failed
receipt: slow package 8.518s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-tool-proxy
receipt: slow package 0s amadan.net/oficina/equipo/internal/advice
receipt: slow package 0s amadan.net/oficina/equipo/internal/attach
receipt: slow test 7.71s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 810ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 2.52 GiB in 17087 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 0.84 GiB in 27329 files
diff --git a/docs/api/equipo-v1.md b/docs/api/equipo-v1.md| index bbedd07f..f780ff17 100644 |
| --- a/docs/api/equipo-v1.md |
| +++ b/docs/api/equipo-v1.md |
| @@ -76,9 +76,9 @@ Web clients can follow the private Rastrillo notification topic through the brow |
| ## Talk to your Coordinator from a device |
| -With a device bearer, the conversation, tasks, projects and events come from the conversation engine. Every one of these routes takes only `Authorization: Bearer <token>`, except the event stream, which also takes a same-origin browser session. A request without a bearer gets `401 unauthenticated`. Every JSON response has `Cache-Control: no-store`, and every error has the `Error` body. The schemas for these routes are generated from the engine's own types and checked against answers the server gives a device, so a field is required when the server always sends it, may be null when the server can send null, and nothing else appears. The earlier person API's schemas that share a name with one of these carry the prefix `PersonAPI`, such as `PersonAPITask`. |
| +With a device bearer, the conversation, tasks, projects and events come from the conversation engine. Every one of these routes takes only `Authorization: Bearer <token>`, except the event stream, which also takes a same-origin browser session. A request without a bearer gets `401 unauthenticated`. Every JSON response has `Cache-Control: no-store`, and every error has the `Error` body. The schemas for these routes are generated from the engine's own types and checked against answers the server gives a device. In an answer, a field is required when the server always sends it, may be null when the server can send null, and nothing else appears. A request body requires no field in the contract: the server rejects a field it does not know, and checks itself the fields each operation needs, answering `422 invalid_input` when one is missing or wrong. An input type that is also part of an answer has the suffix `Input`, such as `PreferencesInput`. The earlier person API's schemas that share a name with one of these carry the prefix `PersonAPI`, such as `PersonAPITask`. |
| -Some paths are shared with the earlier person API, and the request decides which one answers. `GET /tasks`, `/needs-you`, `/runners`, `/connections` and `/specialists` answer a device bearer with the engine's lists, and a browser session with the earlier pages. `GET /tasks/{id}` and `POST /tasks/{id}/cancel` take the engine's task IDs, which start with `tk`; `GET /questions/{id}` takes IDs that start with `q_`; `GET` and `DELETE /connections/{id}` take IDs that start with `cn_`. Any other ID gets the earlier answer, with a bearer or a browser session. In the contract, each of these operations describes what a device gets, and its `x-earlierPersonAPI` holds the earlier answer and when it is served. `GET` and `POST /projects` are the engine's alone and answer only a device bearer. |
| +Some paths are shared with the earlier person API, and the request decides which one answers. `GET /tasks`, `/needs-you`, `/runners`, `/connections` and `/specialists` answer a device bearer with the engine's lists, and a browser session with the earlier pages. `GET /tasks/{id}` and `POST /tasks/{id}/cancel` take the engine's task IDs, which start with `tk`; `GET /questions/{id}` takes IDs that start with `q_`; `GET` and `DELETE /connections/{id}` take IDs that start with `cn_`. Any other ID gets the earlier answer, with a bearer or a browser session. In the contract, each of these operations describes what a device gets, and its `x-earlierPersonAPI` holds the earlier answer and when it is served. A client generated from the contract does not see those earlier operations, so a browser client should not be generated from it for these paths. `GET` and `POST /projects` are the engine's alone and answer only a device bearer. |
| Start with `GET /api/v1/snapshot`. It returns everything a client shows, read in one transaction: `me`, the newest messages and their turns, the cards, tasks, projects, runners, connections, the Coordinator, and the event `cursor`. Read older messages with `GET /api/v1/messages?before=<message ID>&limit=<count>`, where `limit` is 1 to 200 and defaults to 50. |
diff --git a/docs/api/equipo-v1.openapi.json b/docs/api/equipo-v1.openapi.json| index bc4a4723..3658183c 100644 |
| --- a/docs/api/equipo-v1.openapi.json |
| +++ b/docs/api/equipo-v1.openapi.json |
| @@ -10313,7 +10313,7 @@ |
| "content": { |
| "application/json": { |
| "schema": { |
| - "$ref": "#/components/schemas/Preferences" |
| + "$ref": "#/components/schemas/PreferencesInput" |
| } |
| } |
| }, |
| @@ -13009,7 +13009,7 @@ |
| "content": { |
| "application/json": { |
| "schema": { |
| - "$ref": "#/components/schemas/ThinkingChoice" |
| + "$ref": "#/components/schemas/ThinkingChoiceInput" |
| } |
| } |
| }, |
| @@ -16291,30 +16291,6 @@ |
| ], |
| "additionalProperties": false |
| }, |
| - "ProjectPage": { |
| - "type": "object", |
| - "properties": { |
| - "items": { |
| - "type": "array", |
| - "items": { |
| - "$ref": "#/components/schemas/PersonAPIProject" |
| - } |
| - }, |
| - "next_cursor": { |
| - "type": "string" |
| - }, |
| - "revision": { |
| - "type": "integer", |
| - "format": "int64" |
| - } |
| - }, |
| - "required": [ |
| - "items", |
| - "next_cursor", |
| - "revision" |
| - ], |
| - "additionalProperties": false |
| - }, |
| "SpecialistPage": { |
| "type": "object", |
| "properties": { |
| @@ -17511,7 +17487,14 @@ |
| "type": "object", |
| "properties": { |
| "kind": { |
| - "type": "string" |
| + "type": "string", |
| + "enum": [ |
| + "read", |
| + "search", |
| + "edit", |
| + "run", |
| + "other" |
| + ] |
| }, |
| "subject": { |
| "type": "string" |
| @@ -17596,9 +17579,6 @@ |
| "type": "string" |
| } |
| }, |
| - "required": [ |
| - "repo" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.AddProject" |
| }, |
| @@ -17681,9 +17661,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.AdviceAction" |
| }, |
| @@ -17739,10 +17716,6 @@ |
| "type": "string" |
| } |
| }, |
| - "required": [ |
| - "choice", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.AnswerCard" |
| }, |
| @@ -17780,11 +17753,6 @@ |
| "type": "string" |
| } |
| }, |
| - "required": [ |
| - "text", |
| - "idempotency_key", |
| - "specialist" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.AskQuestion" |
| }, |
| @@ -17857,6 +17825,28 @@ |
| "additionalProperties": false, |
| "x-go-type": "wire.Budget" |
| }, |
| + "BudgetInput": { |
| + "type": "object", |
| + "properties": { |
| + "day": { |
| + "type": "integer", |
| + "format": "int64" |
| + }, |
| + "month": { |
| + "type": "integer", |
| + "format": "int64" |
| + }, |
| + "currency": { |
| + "type": "string" |
| + }, |
| + "revision": { |
| + "type": "integer", |
| + "format": "int64" |
| + } |
| + }, |
| + "additionalProperties": false, |
| + "x-go-type": "wire.Budget" |
| + }, |
| "BudgetMeter": { |
| "type": "object", |
| "properties": { |
| @@ -18224,9 +18214,6 @@ |
| "type": "string" |
| } |
| }, |
| - "required": [ |
| - "model" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.ChooseModel" |
| }, |
| @@ -18252,15 +18239,9 @@ |
| "type": "boolean" |
| }, |
| "budget": { |
| - "$ref": "#/components/schemas/Budget" |
| + "$ref": "#/components/schemas/BudgetInput" |
| } |
| }, |
| - "required": [ |
| - "provider", |
| - "kind", |
| - "runner_id", |
| - "same_machine" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.Connect" |
| }, |
| @@ -19275,9 +19256,6 @@ |
| "type": "string" |
| } |
| }, |
| - "required": [ |
| - "of" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.MarkDuplicate" |
| }, |
| @@ -19673,10 +19651,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "repo", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.MoveTask" |
| }, |
| @@ -19835,10 +19809,6 @@ |
| "type": "string" |
| } |
| }, |
| - "required": [ |
| - "text", |
| - "idempotency_key" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.PostThread" |
| }, |
| @@ -19884,6 +19854,24 @@ |
| "additionalProperties": false, |
| "x-go-type": "wire.Preferences" |
| }, |
| + "PreferencesInput": { |
| + "type": "object", |
| + "properties": { |
| + "provider": { |
| + "type": "string" |
| + }, |
| + "revision": { |
| + "type": "integer", |
| + "format": "int64" |
| + }, |
| + "until": { |
| + "type": "string", |
| + "format": "date-time" |
| + } |
| + }, |
| + "additionalProperties": false, |
| + "x-go-type": "wire.Preferences" |
| + }, |
| "PreviewHost": { |
| "type": "object", |
| "properties": { |
| @@ -20323,6 +20311,21 @@ |
| "additionalProperties": false, |
| "x-go-type": "wire.QuietHours" |
| }, |
| + "QuietHoursInput": { |
| + "type": "object", |
| + "properties": { |
| + "from": { |
| + "type": "integer", |
| + "format": "int64" |
| + }, |
| + "until": { |
| + "type": "integer", |
| + "format": "int64" |
| + } |
| + }, |
| + "additionalProperties": false, |
| + "x-go-type": "wire.QuietHours" |
| + }, |
| "ResearchCapability": { |
| "type": "object", |
| "properties": { |
| @@ -20495,9 +20498,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "pause_revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.ResumeSpend" |
| }, |
| @@ -20509,9 +20509,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.RevokeSpecialist" |
| }, |
| @@ -20526,10 +20523,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "step", |
| - "step_revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.RunNow" |
| }, |
| @@ -20565,6 +20558,7 @@ |
| "role": { |
| "type": "string", |
| "enum": [ |
| + "", |
| "primary", |
| "worker" |
| ] |
| @@ -20684,15 +20678,6 @@ |
| "format": "date-time" |
| } |
| }, |
| - "required": [ |
| - "box", |
| - "runner_id", |
| - "connection_id", |
| - "provider", |
| - "endpoint", |
| - "attempt", |
| - "expires_at" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.Sealed" |
| }, |
| @@ -20712,10 +20697,6 @@ |
| } |
| } |
| }, |
| - "required": [ |
| - "text", |
| - "idempotency_key" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SendMessage" |
| }, |
| @@ -20752,11 +20733,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "day", |
| - "month", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SetBudget" |
| }, |
| @@ -20771,10 +20747,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "enabled", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SetDetector" |
| }, |
| @@ -20785,17 +20757,13 @@ |
| "type": "boolean" |
| }, |
| "quiet": { |
| - "$ref": "#/components/schemas/QuietHours" |
| + "$ref": "#/components/schemas/QuietHoursInput" |
| }, |
| "revision": { |
| "type": "integer", |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "paused", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SetHousekeeping" |
| }, |
| @@ -20810,10 +20778,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "kind", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SetKind" |
| }, |
| @@ -20851,15 +20815,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "mode", |
| - "max_lines", |
| - "max_files", |
| - "main_ships", |
| - "extra_sensitive", |
| - "words", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SetMergePolicy" |
| }, |
| @@ -20880,10 +20835,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "allowed", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SetModels" |
| }, |
| @@ -20910,11 +20861,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "priority", |
| - "by", |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.SetPriority" |
| }, |
| @@ -22342,6 +22288,20 @@ |
| "additionalProperties": false, |
| "x-go-type": "wire.ThinkingChoice" |
| }, |
| + "ThinkingChoiceInput": { |
| + "type": "object", |
| + "properties": { |
| + "set": { |
| + "type": "string" |
| + }, |
| + "revision": { |
| + "type": "integer", |
| + "format": "int64" |
| + } |
| + }, |
| + "additionalProperties": false, |
| + "x-go-type": "wire.ThinkingChoice" |
| + }, |
| "ThinkingEvent": { |
| "allOf": [ |
| { |
| @@ -22644,9 +22604,6 @@ |
| "format": "int64" |
| } |
| }, |
| - "required": [ |
| - "revision" |
| - ], |
| "additionalProperties": false, |
| "x-go-type": "wire.UndoMerge" |
| }, |
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md| index 4558d90f..d2c3988c 100644 |
| --- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| +++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md |
| @@ -5832,7 +5832,7 @@ records remain unchanged. |
| | `docs/api/equipo-v1.md / Retry writes and handle revisions` | ## Retry writes and handle revisions<br><br>Every mutation on these routes needs an `Idempotency-Key` of 1–256 bytes. The conversation engine's routes for devices do not; they say below what they need instead. Resource updates also need `If-Match: "<revision>"`. Use the revision returned by GET, and retain the original key, body and revision until the result is known. Retrying identical input returns the saved result after current access is checked. Reusing a key for changed input conflicts.<br><br>A stale revision returns `409 revision_conflict`, with `current_revision` when the resource is visible. Fetch the current value before making a new decision. Missing preconditions return 428. Invalid fields return 422. Missing identity returns 401; denied access returns 403; unavailable or private resources return 404. Query or runner unavailability returns 503.<br><br>Project settings use one ETag for the combined settings visible to you. PATCH with an `action` of `approval`, `default_playbook`, or `rules`. Personal settings permit the `approval` action, including an empty approval mode to inherit the team setting. Connection choices have their own `connections_revision` in the settings response; use it for `PUT /projects/{id}/connections`. Owner roster entries and device list entries likewise carry their own resource revisions. Budgets use revision zero until configured.<br><br>Mutations accept at most 64 KiB of JSON, and message text at most 16 KiB. Unknown fields, duplicate keys, null mutation fields and trailing JSON are rejected. Use the explicit input schema for each operation. When editing an installed playbook, retain its template reference. | 11, 20; notifications 19 | Document section; COPY REVIEW REQUIRED (device API, 2026-11-19) | |
| | `docs/api/equipo-v1.md / Read lists and private setup state` | ## Read lists and private setup state<br><br>Lists default to fifty items and accept `limit` from 1 to 100. Pass the returned `next_cursor` back to the same route with the same identity. Cursors expire after twenty-four hours. They cannot be moved between people, routes or instances. Inserts may appear on later pages; deleted resources are not repeated from a saved snapshot. On 410, fetch the list again without a cursor.<br><br>Treat null counts, usage and allowance as unknown. They are not zero. Personal responses use `Cache-Control: no-store`. Keep your own conversation, device secrets and bearer credentials out of shared caches and logs.<br><br>Account setup responses contain only `id`, `state`, `mode`, and `command`. Run the command at the runner terminal to complete supported provider sign-in. The instance does not return credential-home paths or provider login codes. Connection revocation stops future use and requests containment of dependent work; it does not delete local credential files. Remembered team links grant no access to another instance. | 11, 20; notifications 19 | Document section; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `docs/api/equipo-v1.md / Reconnect and answer questions` | ## Reconnect and answer questions<br><br>After reconnecting, fetch the conversation, needs-you list and any open task again. Reconcile by resource ID and revision. Browser sessions can use the existing live invalidation stream to prompt these reads. A device reads `GET /api/v1/snapshot` and follows `GET /api/v1/events` instead, as described below. This API does not provide mobile push delivery.<br><br>The rest of this section is about the earlier questions, whose IDs do not start with `q_`. Fetch `/questions/{id}` before answering. A clarification accepts `kind: "clarification"` with `option_id` or `text`. A native permission question accepts `kind: "native"`, `behavior`, and only the `updated_input` shape permitted by that question. Post to `/questions/{id}/answer` using its original request revision and current person authentication. A notification action is never authentication. A cancelled, expired or superseded question cannot accept a new answer.<br><br>Subscribe with `POST /api/v1/notification-subscriptions`, a fresh request key, and `{"device_id":"<your device ID>"}`. Use the returned `cursor` for `GET /api/v1/notifications?cursor=<cursor>`. Each subscription has its own delivery and acknowledgement state. A bearer can use only its bound device. A browser session can manage its own devices.<br><br>Keep polling with `next_cursor`, including after an empty page. Delivery may repeat; deduplicate by notification `id`. A notification contains only its kind, resource ID, resource revision, time, state and instance-relative link. For `question`, fetch `/api/v1/questions/{resource_id}`; for `task_ready`, fetch `/api/v1/tasks/{resource_id}`; for `card`, fetch `/api/v1/cards/{resource_id}`. An `interrupted` event links to the affected task or conversation; fetch that current view before retrying work. `superseded` means the event no longer represents current work. Acknowledgement never answers a question or approves work.<br><br>After receiving an event, post `{"notification_id":"<notification ID>"}` to `/api/v1/notification-subscriptions/{id}/ack` with a request key and the subscription revision in `If-Match`. Save the returned revision. Retry a lost acknowledgement with its original key, body and revision. Only delivered events can be acknowledged. An out-of-order acknowledgement is saved, but the subscription cursor advances only after all earlier recipient events are acknowledged. Another device keeps its unread state.<br><br>Subscriptions expire after thirty days or when their device credential expires, whichever comes first. Polling and acknowledgements do not renew them. Device revocation or roster removal disables them immediately. On `410 subscription_expired`, subscribe explicitly with a current credential and a new request key. On `410 cursor_expired`, fetch notifications without a cursor and check the conversation and Needs you for open questions. Start a replacement subscription to receive those events on a device again.<br><br>Acknowledged history is kept for at least thirty days. Cleanup preserves current questions and entries unread by an active subscription. Notifications without a subscription cursor provide a private snapshot but do not record delivery to a device. To unsubscribe, send an empty JSON object to `DELETE /api/v1/notification-subscriptions/{id}` with its current revision and a request key.<br><br>Web clients can follow the private Rastrillo notification topic through the browser session. Its name is `notifications/` followed by the lowercase SHA-256 hex digest of compact JSON `[team_id,address,subscription_id]`. Pass that topic with `@0` in the existing `/live?t=` protocol. Each stream write checks the current roster, device and subscription deadline. External mobile push delivery is not implemented. | 11, 20; notifications 19 | Document section; COPY REVIEW REQUIRED (device API, 2026-11-19) | |
| -| `docs/api/equipo-v1.md / Talk to your Coordinator from a device` | ## Talk to your Coordinator from a device<br><br>With a device bearer, the conversation, tasks, projects and events come from the conversation engine. Every one of these routes takes only `Authorization: Bearer <token>`, except the event stream, which also takes a same-origin browser session. A request without a bearer gets `401 unauthenticated`. Every JSON response has `Cache-Control: no-store`, and every error has the `Error` body. The schemas for these routes are generated from the engine's own types and checked against answers the server gives a device, so a field is required when the server always sends it, may be null when the server can send null, and nothing else appears. The earlier person API's schemas that share a name with one of these carry the prefix `PersonAPI`, such as `PersonAPITask`.<br><br>Some paths are shared with the earlier person API, and the request decides which one answers. `GET /tasks`, `/needs-you`, `/runners`, `/connections` and `/specialists` answer a device bearer with the engine's lists, and a browser session with the earlier pages. `GET /tasks/{id}` and `POST /tasks/{id}/cancel` take the engine's task IDs, which start with `tk`; `GET /questions/{id}` takes IDs that start with `q_`; `GET` and `DELETE /connections/{id}` take IDs that start with `cn_`. Any other ID gets the earlier answer, with a bearer or a browser session. In the contract, each of these operations describes what a device gets, and its `x-earlierPersonAPI` holds the earlier answer and when it is served. `GET` and `POST /projects` are the engine's alone and answer only a device bearer.<br><br>Start with `GET /api/v1/snapshot`. It returns everything a client shows, read in one transaction: `me`, the newest messages and their turns, the cards, tasks, projects, runners, connections, the Coordinator, and the event `cursor`. Read older messages with `GET /api/v1/messages?before=<message ID>&limit=<count>`, where `limit` is 1 to 200 and defaults to 50.<br><br>Send a message with `POST /api/v1/messages`:<br><br>```json<br>{"text":"What is left?","idempotency_key":"<a new key for each message>"}<br>```<br><br>A new message is `201`, with the message and the turn that carries it. The same key and text again return `200` with the same result; the same key with other text is `409 idempotency_conflict`. To send images or files, upload each with `POST /api/v1/attachments` first, the file's bytes as the body, and add their IDs to `attachments`, at most five.<br><br>Follow the conversation with `GET /api/v1/events?after=<cursor>`, a stream of Server-Sent Events. `after` wins over `Last-Event-ID`; with neither, the stream starts at the newest event. The stream opens with `retry: 2000`, then sends each event as `id: <cursor>`, `event: <type>` and `data:` with the event as JSON. A `ping` comes every 20 seconds, with only `{"type":"ping"}` as its data. A cursor older than the kept events is `410 cursor_expired`: read the snapshot again and follow from its cursor.<br><br>Each event has `type`, `resource`, `id`, `revision` and `data`, and may have `turn_id`, `message_id` and `attempt`. `type` and `resource` together say what `data` holds, and the contract names a schema for each pair, such as `MessageEvent` or `ActivityStepEvent`:<br><br>- `message`, `turn`, `card`, `project`, `runner`, `coordinator`, `connection`, `preference`, `thinking`, `task`, `step` and `question`, each with the resource of the same name, carry that resource as it is now.<br>- `delta` with resource `turn` or `question` carries text to append to the draft of a running turn or question: `turn_id`, `offset` and `text`. Apply it only when `offset` equals the length of the draft you hold.<br>- `activity` with resource `turn` or `question` says what the Coordinator is doing before or between its text: `kind` is `thinking` or `tool`, and `label` is the line to show. With resource `step` it carries a step's recent activity lines.<br>- `housekeeping` with resource `housekeeping` carries the housekeeping summary; with resource `action` it carries one housekeeping action.<br><br>Apply an event only when its `revision` is newer than what you hold. Deltas and activity are the exception: they have revision 0, a delta applies by its `offset`, and an activity line shows until more text comes or the turn ends. Roster removal or device revocation closes the stream.<br><br>Answer a card with `POST /api/v1/cards/{id}/answer`, one of its `options` and its revision:<br><br>```json<br>{"choice":"merge","revision":2}<br>```<br><br>The answer is `200` with the card, your answer as a message, and its turn. When the answer starts no turn, `message` and `turn` are empty, with zero times and empty roles and states. A stale revision is `409` with code `card_stale`, and a card already answered is `409` with code `card_answered`. Both bodies carry the card as it is now in `card`.<br><br>Cancel a turn in flight with `POST /api/v1/turns/{id}/cancel`. The answer is `202` with the turn's `attempt`, or `409 turn_ended` once the turn has ended. Post to a task's thread with `POST /api/v1/tasks/{id}/thread` and move a task to another project with `POST /api/v1/tasks/{id}/move`. The contract lists every other route and its body. | API doc: the conversation engine's routes for a device bearer | Document section; COPY REVIEW REQUIRED (device API, 2026-11-19) | |
| +| `docs/api/equipo-v1.md / Talk to your Coordinator from a device` | ## Talk to your Coordinator from a device<br><br>With a device bearer, the conversation, tasks, projects and events come from the conversation engine. Every one of these routes takes only `Authorization: Bearer <token>`, except the event stream, which also takes a same-origin browser session. A request without a bearer gets `401 unauthenticated`. Every JSON response has `Cache-Control: no-store`, and every error has the `Error` body. The schemas for these routes are generated from the engine's own types and checked against answers the server gives a device. In an answer, a field is required when the server always sends it, may be null when the server can send null, and nothing else appears. A request body requires no field in the contract: the server rejects a field it does not know, and checks itself the fields each operation needs, answering `422 invalid_input` when one is missing or wrong. An input type that is also part of an answer has the suffix `Input`, such as `PreferencesInput`. The earlier person API's schemas that share a name with one of these carry the prefix `PersonAPI`, such as `PersonAPITask`.<br><br>Some paths are shared with the earlier person API, and the request decides which one answers. `GET /tasks`, `/needs-you`, `/runners`, `/connections` and `/specialists` answer a device bearer with the engine's lists, and a browser session with the earlier pages. `GET /tasks/{id}` and `POST /tasks/{id}/cancel` take the engine's task IDs, which start with `tk`; `GET /questions/{id}` takes IDs that start with `q_`; `GET` and `DELETE /connections/{id}` take IDs that start with `cn_`. Any other ID gets the earlier answer, with a bearer or a browser session. In the contract, each of these operations describes what a device gets, and its `x-earlierPersonAPI` holds the earlier answer and when it is served. A client generated from the contract does not see those earlier operations, so a browser client should not be generated from it for these paths. `GET` and `POST /projects` are the engine's alone and answer only a device bearer.<br><br>Start with `GET /api/v1/snapshot`. It returns everything a client shows, read in one transaction: `me`, the newest messages and their turns, the cards, tasks, projects, runners, connections, the Coordinator, and the event `cursor`. Read older messages with `GET /api/v1/messages?before=<message ID>&limit=<count>`, where `limit` is 1 to 200 and defaults to 50.<br><br>Send a message with `POST /api/v1/messages`:<br><br>```json<br>{"text":"What is left?","idempotency_key":"<a new key for each message>"}<br>```<br><br>A new message is `201`, with the message and the turn that carries it. The same key and text again return `200` with the same result; the same key with other text is `409 idempotency_conflict`. To send images or files, upload each with `POST /api/v1/attachments` first, the file's bytes as the body, and add their IDs to `attachments`, at most five.<br><br>Follow the conversation with `GET /api/v1/events?after=<cursor>`, a stream of Server-Sent Events. `after` wins over `Last-Event-ID`; with neither, the stream starts at the newest event. The stream opens with `retry: 2000`, then sends each event as `id: <cursor>`, `event: <type>` and `data:` with the event as JSON. A `ping` comes every 20 seconds, with only `{"type":"ping"}` as its data. A cursor older than the kept events is `410 cursor_expired`: read the snapshot again and follow from its cursor.<br><br>Each event has `type`, `resource`, `id`, `revision` and `data`, and may have `turn_id`, `message_id` and `attempt`. `type` and `resource` together say what `data` holds, and the contract names a schema for each pair, such as `MessageEvent` or `ActivityStepEvent`:<br><br>- `message`, `turn`, `card`, `project`, `runner`, `coordinator`, `connection`, `preference`, `thinking`, `task`, `step` and `question`, each with the resource of the same name, carry that resource as it is now.<br>- `delta` with resource `turn` or `question` carries text to append to the draft of a running turn or question: `turn_id`, `offset` and `text`. Apply it only when `offset` equals the length of the draft you hold.<br>- `activity` with resource `turn` or `question` says what the Coordinator is doing before or between its text: `kind` is `thinking` or `tool`, and `label` is the line to show. With resource `step` it carries a step's recent activity lines.<br>- `housekeeping` with resource `housekeeping` carries the housekeeping summary; with resource `action` it carries one housekeeping action.<br><br>Apply an event only when its `revision` is newer than what you hold. Deltas and activity are the exception: they have revision 0, a delta applies by its `offset`, and an activity line shows until more text comes or the turn ends. Roster removal or device revocation closes the stream.<br><br>Answer a card with `POST /api/v1/cards/{id}/answer`, one of its `options` and its revision:<br><br>```json<br>{"choice":"merge","revision":2}<br>```<br><br>The answer is `200` with the card, your answer as a message, and its turn. When the answer starts no turn, `message` and `turn` are empty, with zero times and empty roles and states. A stale revision is `409` with code `card_stale`, and a card already answered is `409` with code `card_answered`. Both bodies carry the card as it is now in `card`.<br><br>Cancel a turn in flight with `POST /api/v1/turns/{id}/cancel`. The answer is `202` with the turn's `attempt`, or `409 turn_ended` once the turn has ended. Post to a task's thread with `POST /api/v1/tasks/{id}/thread` and move a task to another project with `POST /api/v1/tasks/{id}/move`. The contract lists every other route and its body. | API doc: the conversation engine's routes for a device bearer | Document section; COPY REVIEW REQUIRED (device API, 2026-11-19) | |
| | `docs/plan-3-acceptance.md / COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)` | # COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context)<br><br>Plan 3a adds a private coordinator conversation, shared task threads, editable<br>plans, sourced recommendations and personal preferences. Tasks 1–11 cover the 3a offline stop. Tasks 12–21 add invitations, runner/account<br>setup, specialist and playbook copies, remembered teams, device authentication<br>and a private notification feed. Production use still needs reviewed copy and certification<br>with Paul's dedicated provider accounts.<br><br>For the offline gate, run these commands from the `plan-3` checkout with on-disk<br>`TMPDIR` and the default Go caches:<br><br>```bash<br>CGO_ENABLED=0 go test ./internal/plan3test \<br> -run 'TestCoordinatorAcceptance3[AB]|TestCoordinatorRelease|TestPlan3ReleaseBoundaries|TestPlan3Upgrade|TestPersonAPIContractCoverage' -count=1<br>CGO_ENABLED=0 go build ./cmd/equipo ./cmd/equipo-runner<br>make migration-check<br>make budget<br>staticcheck ./...<br>go vet ./...<br>```<br><br>Use the pinned `go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 ./...` invocation<br>if staticcheck is not installed. The controller runs `make ci` once before final<br>review. Individual task runs use targeted tests.<br><br>The acceptance test uses two fixture browser identities, loopback HTTP, the<br>runner service, durable capture and journal, and fake provider frames. It covers<br>bug, feature and recommendation proposals, editing, approval, project correction,<br>questions, routed replies, preference privacy, cancellation and interrupted-turn<br>recovery. The companion runner graph tests use local Git, fake providers and the<br>fake forge to check exact-candidate evidence, independent-family review,<br>publication readback and the wait for a person. These fixtures establish offline<br>behavior only.<br><br>The browser-session person API uses `/api/v1`. Fetch the current revision before<br>editing. Send it as `If-Match` and use an `Idempotency-Key` for a mutation. Retry<br>an identical request with the same key after a lost response. A different edit<br>needs a new key and the current revision. Plan 3b also accepts revocable person-device bearers. They never authenticate<br>as a runner and cannot approve another device. See [the API schema](api/equipo-v1.openapi.json).<br><br>List cursors are opaque and scoped to the person and stream. They expire after<br>24 hours. Tasks, journey, actionable work, cards and preferences use the latest<br>stored resource audit time, newest first, then ID to break ties. People use<br>address order. Conversation and thread messages use their stored sequence.<br>Changes can move an item ahead of an existing cursor; start again to see the<br>latest order. Lists read current authorized data and never carry stored copies<br>of private content in a cursor.<br><br>A contained uncertain coordinator turn waits for your choice. Retrying creates<br>new admitted work; resetting advances the coordinator generation. A refused<br>recovery does not make that choice for you. Cancellation and reset still need<br>containment before they can release a running account.<br><br>Before live use, review every pending entry in the controller report's<br>`Plan 3 copy inventory (for Paul's review)`, then follow<br>[the live scripts and checklists](superpowers/plans/LIVE-GATE-plan-3.md).<br>Record the offline result, copy-review result and live certification separately.<br>Keep release eligibility off until all three are complete. Equipo publishes<br>review branches and waits for the decision owner; you merge manually.<br><br><br>COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context). The 3b acceptance path uses fake official CLIs on disk,<br>temporary dedicated homes, actual pairing proofs, runner HTTP and application<br>transactions. It connects two same-provider accounts and an independent review<br>family, edits copied templates, chooses a project default, approves a feature<br>plan and answers a question with a device token. Separate runner fixtures use<br>local Git, trusted checks and a fake forge. Installation fixtures test missing<br>containment prerequisites, unsupported platforms and the stops-at-logout state.<br>These are layered tests, not a real-provider certification or one continuous<br>browser-to-merge run.<br><br>Upgrade tests start at schema 0018 with active tasks, historical evidence,<br>reservations, recovery charges and decision ownership, and at the end of 3a<br>with private conversation and preference data. They compare retained columns,<br>check the current schema and reopen the database and execution core twice.<br><br>The release check refuses pending runtime copy, the API guide, acceptance and<br>live instructions, and the consolidated inventory containing the onboarding<br>mockup proposals. No pending entry is treated as reviewed. The manifest still<br>needs exact live policy certificates and the supported terminal login evidence.<br>Paul and a teammate run section 3b separately after review and certification.<br>The controller runs `make ci` once; Task 21 runs the named tests, build, migration,<br>budget, vet, pinned staticcheck and the previously skipped `equipotest` package. | 11, 21 | Document section; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `docs/superpowers/plans/LIVE-GATE-plan-3.md / 3a` | ## 3a<br><br>Paul runs this gate after the controller has reviewed the offline results and<br>copy. Task 11 did not run it. Keep the release disabled until the reviewed live<br>bundle and the usable checks below pass. Fixtures cannot certify a production<br>provider, model, account or policy.<br><br>Use Linux/amd64, the enrolled runner, Paul's existing dedicated Equipo Claude<br>and Codex homes, and a disposable repository. Use the configuration and identity<br>file shapes in [the direct live guide](../../live-gate.md). Supply actual account<br>IDs, home IDs, model names, auth hosts, executable paths and machine fingerprint.<br>Do not copy interactive credentials, create a shared login, or put credentials<br>in the evidence. This pass needs no new sign-in or enrolment.<br><br>Before running:<br><br>- Finish the Plan 2b release gate. Its checked-in manifest still has no certified<br> tuples, binary digests or evidence references. A passing fixture is insufficient.<br>- Review the `3a copy inventory` in `CONTROLLER-REPORT-plan-3.md`, the API schema<br> prose and both Task 11 draft documents. Leave pending entries marked until Paul<br> approves them through the controller's review channel.<br>- Select `.equipo/checks.json` and a small reproducible defect in the disposable<br> repository. Record its default branch and starting commit. Record an acceptance<br> test for a small feature and a project document to cite in a recommendation.<br>- Confirm separate, positive call, input-token, output-token and duration limits<br> in the private `DirectLiveConfig`. Record job funding and remaining project/team<br> headroom. Set `Seconds` to at most 3600 for this run. Stop when the chosen bound<br> is reached. Never raise it automatically. The verifier calculates twice the<br> measured maximum, rounded up to 1,000, and checks the 23-reservation job floor.<br>- Confirm that `EQUIPO_LIVE_CONFIG` names that private file, `disposable` is true,<br> both selected homes belong to Paul, and `evidence_dir` is a new empty directory<br> outside scratch. Preserve that directory after the run. Configure the required<br> sentinels and protected paths from the direct live guide.<br>- Export the reviewed runner path variables from the direct live guide. Choose<br> the intended installation paths for `EQUIPO_TOOL_PROXY_PATH` and<br> `EQUIPO_RUNNER_EXECUTABLE`; they must not overwrite a running installation.<br> Certification binds the constructed policy and installed binaries.<br><br>Run this script from the reviewed `plan-3` checkout. It uses the existing<br>`directlive` driver once and verifies all five groups, including both coordinator<br>profiles. It does not enable instance execution or promote a manifest.<br><br>```bash<br>#!/usr/bin/env bash<br>set -euo pipefail<br>umask 077<br>: "${TMPDIR:?Set on-disk TMPDIR}"<br>: "${EQUIPO_LIVE_CONFIG:?Set the reviewed private config file}"<br>: "${EQUIPO_CLAUDE_PATH:?Set the pinned Claude executable}"<br>: "${EQUIPO_CODEX_PATH:?Set the pinned Codex executable}"<br>: "${EQUIPO_CODEX_CODE_MODE_HOST_PATH:?Set the pinned code-mode host}"<br>: "${EQUIPO_BWRAP_PATH:?Set bubblewrap 0.11.0}"<br>: "${EQUIPO_TOOL_PROXY_PATH:?Set the intended helper installation path}"<br>: "${EQUIPO_RUNNER_EXECUTABLE:?Set the intended runner installation path}"<br>: "${EQUIPO_RUNNER_STATE_DIR:?Set private runner state}"<br>: "${EQUIPO_ACCOUNT_BINDINGS_PATH:?Set private account bindings}"<br>: "${EQUIPO_AMADAN_CREDENTIAL_PATH:?Set the private forge credential path}"<br>: "${EQUIPO_WORKSPACE_ROOT:?Set the workspace root}"<br>: "${EQUIPO_SCRATCH_ROOT:?Set on-disk runner scratch}"<br><br>python3 - <<'PY'<br>import json, os<br>from pathlib import Path<br>c = json.loads(Path(os.environ['EQUIPO_LIVE_CONFIG']).read_text())<br>assert c['disposable'] is True<br>assert 0 < c['funding']['Seconds'] <= 3600<br>assert {b['binding']['Provider'] for b in c['bindings']} == {'claude', 'codex'}<br>evidence = Path(c['evidence_dir'])<br>assert evidence.is_absolute() and evidence.is_dir() and not any(evidence.iterdir())<br>assert Path(c['repository'], '.git').is_dir()<br>PY<br><br>read -r -p 'Type LIVE DISPOSABLE ONLY: ' equipo_confirmation<br>[[ "$equipo_confirmation" == 'LIVE DISPOSABLE ONLY' ]]<br>read -r -p 'Type RUN LIVE GATE: ' equipo_confirmation<br>[[ "$equipo_confirmation" == 'RUN LIVE GATE' ]]<br><br>CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -buildvcs=false \<br> -ldflags '-s -w' -o "$EQUIPO_TOOL_PROXY_PATH" ./cmd/equipo-tool-proxy<br>CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -tags direct_live -trimpath \<br> -buildvcs=false -ldflags '-s -w' -o "$EQUIPO_RUNNER_EXECUTABLE" ./cmd/equipo-runner<br>EQUIPO_LIVE_DIRECT=1 CGO_ENABLED=0 go test -tags direct_live \<br> ./internal/runner/provider \<br> -run '^TestDirectLive(Contract|Isolation|Recovery|Calibration|Coordinator)$' \<br> -count=1 -timeout=70m<br>```<br><br>The bounded driver runs the Engineering implementation and reproduction, Review,<br>legacy Product, Scope, Research, Investigation, Copy, Design and Coordinator<br>profiles for Claude. It runs the same profiles except legacy Product for Codex.<br>This covers the new executable actions `scope`, `recommend`, `investigate`,<br>`copy`, `design` and `coordinate`, as well as the changed policies for existing<br>actions. `research` shares the Research profile. Every configured model needs its<br>own reviewed run and fresh evidence directory.<br><br>For each exact tuple, retain the configuration hash, provider/launcher/bwrap<br>versions, policy hash, executable digests, account and home identity, model,<br>tool inventory, sanitized captures, bounded usage and funding, and the<br>`index.json` and per-tuple `certification.json` files. Every assertion must name<br>an artifact and its digest. Missing observations stay uncertified. Check refresh,<br>readback, durable replay, no automatic redispatch, active cancellation and absence<br>of surviving descendants. A failure in one tuple cannot authorize it through a<br>passing tuple from the other provider.<br><br>The Codex coordinator profile includes three inert MCP resource tools by<br>controller ruling, Amadan discussion 7: `list_mcp_resources`,<br>`list_mcp_resource_templates`, and `read_mcp_resource`. Its only MCP server<br>exposes no resources. Require those tools plus the scoped Equipo coordinator<br>tools, with no shell, file, search, image or delegation capability. Claude has no<br>native-tool exception. Record an actual structured question and its answer for<br>both coordinator profiles.<br><br>The current `ManifestCandidate` deliberately excludes coordinator-only evidence.<br>Do not treat its specialist candidate as coordinator release approval. The<br>controller must review complete coordinator evidence and the release promotion<br>path before removing the corresponding `uncertified_policies` entries. Keep<br>`ActionCertified` false for any pending action. No handwritten certificate or<br>fixture digest can replace live evidence.<br><br>After certification and human release approval, Paul installs a versioned release<br>and explicitly enables execution for the disposable instance. Use two fixture<br>people in separate browser sessions and manual personal connection choices:<br><br>| Check | Paul does | Expected evidence |<br>| --- | --- | --- |<br>| Bug | Send “Fix the failing test in the disposable project.” Choose the project when asked, inspect and approve the plan. | One task and thread, frozen reproduction, candidate commit, review from a family independent of every retained builder, checks on that exact candidate, review-branch head and description readback. |<br>| Feature | Send “Add the small feature described in the acceptance document.” Edit a future step and correct the project before it starts. Approve the current plan. | Revision conflict for a stale edit, unchanged started steps, frozen acceptance, exact candidate review/checks, publication readback. |<br>| Recommendation | Send “Recommend one improvement and cite the project document.” Choose one permitted family. | One answer with source IDs, revisions and content hashes. No branch or pretend software-fix evidence. |<br>| Question and thread | Answer a current question, then explicitly route a private reply to the task thread. Read it as the other person. | One answer effect, one routed reply, shared discussion visible to both, private history and preferences isolated. |<br>| Preference | Confirm, correct and delete a preference, then start a fresh turn. | Only the current confirmed value enters instructions. Team rules and authority remain unchanged. |<br>| Interrupted turn | Stop the runner during one admitted coordinator turn, then restart it. | No duplicate task, turn, tool effect or delivery. Unknown usage remains charged. A contained uncertain turn blocks its queue until Paul explicitly chooses retry or reset. |<br>| Cancel | Cancel active work, wait for containment, then inspect its state. | Cancellation acknowledgement, no new work for the cancelled attempt, no surviving process or retained account lease. |<br>| Manual merge | Inspect the published branch, diff, review and checks. Merge it personally, then acknowledge the merge in Equipo. | The app waits for the decision owner. Before Paul's merge the default branch has not moved. Record the merge commit and acknowledgement. |<br><br>Record the run ID, release commit/version, task IDs, plan revisions, actual<br>provider families and accounts, candidate/review/check hashes, readback records,<br>question and cancellation outcomes, and Paul's merge reference in the controller<br>report. Stop the disposable instance and runner, verify that their children have<br>exited, and remove only scratch created for this run. Preserve the private evidence<br>bundle and the dedicated homes. Do not publish secrets or sign-in links. | 11, 17, 21 | Document section; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
| | `docs/superpowers/plans/LIVE-GATE-plan-3.md / Install and pair a runner` | ### Install and pair a runner<br><br>COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context). Not run by Task 21. Paul and a teammate each run this<br>checklist with their own browser session, runner state and dedicated provider<br>accounts. Record two separate results. Neither person uses the other<br>person's bearer, account homes or saved bindings.<br><br>Before installing, the controller reviews the branch, the complete Plan 3 copy<br>inventory and the 3a policy evidence above. Both versioned release targets must<br>pass `copy-release-check` and `direct-release-check`. Empty certificates or any<br>remaining uncertified policy block this gate. Use Linux/amd64 for each runner<br>and Linux/arm64 for the instance. Mac is a browser client only; hosted and Mac<br>runner choices must have no launch action. No release was prepared by Task 21.<br><br>The owner creates an invitation for the teammate. The teammate verifies that<br>email address and accepts it. Choose a provider in onboarding, close the browser,<br>then reopen onboarding. The saved stage and provider must remain. Ask the owner<br>to assign the disposable project's work decision to the person running this<br>exercise, its merge decision to the person who will merge, and explicit bounded<br>team/project/coordinator budgets. Stop if the instance cannot report a budget.<br><br>On each Linux runner, use the generated installation command from onboarding.<br>For an auditable local copy, these are its equivalent steps. Fill in the reviewed<br>immutable release, HTTPS origin and instance ID; do not use `latest` or `dev`.<br>The bootstrap needs curl, Python 3 and sha256sum. The configured provider,<br>code-mode host, bubblewrap, Go, Git and Amadan executables must match the release<br>and its pinned checks. Keep their explicit path settings in the terminal.<br><br>```bash<br>set -euo pipefail<br>umask 077<br>: "${TMPDIR:?Set on-disk scratch}"<br>: "${EQUIPO_ORIGIN:?Set the reviewed HTTPS instance origin}"<br>: "${EQUIPO_INSTANCE_ID:?Copy the instance ID from onboarding}"<br>: "${EQUIPO_RELEASE_VERSION:?Set the reviewed immutable release}"<br>equipo_gate_dir=$(mktemp -d "$TMPDIR/equipo-3b-install-XXXXXXXX")<br>trap 'rm -rf "$equipo_gate_dir"' EXIT<br>curl --fail --silent --show-error --proto '=https' --tlsv1.2 \<br> "$EQUIPO_ORIGIN/releases/$EQUIPO_RELEASE_VERSION/install-v1.sh" \<br> -o "$equipo_gate_dir/install-v1.sh"<br>sh "$equipo_gate_dir/install-v1.sh" \<br> "$EQUIPO_ORIGIN" "$EQUIPO_RELEASE_VERSION" "$EQUIPO_INSTANCE_ID"<br>```<br><br>Check or edit the actual machine label at the terminal, then type `yes` to enrol.<br>Type the code printed by the runner into the signed-in pairing page. Check the<br>returned machine label and server request time before approving. Opening a link<br>with a code in its query must not prefill or approve it. The runner consumes its<br>one-use proof and saves its own credential. Keep that credential private.<br><br>Collect the release version/digests, architecture, actual label and pairing time,<br>plus these outcomes:<br><br>- A missing namespace prerequisite or AppArmor restriction fails containment<br> preflight before service enablement. Record the diagnostic, correct the host<br> configuration through its administrator, and rerun. Do not use an unconfined<br> fallback. Do not deliberately alter a shared host to manufacture this failure.<br>- `systemctl --user status equipo-runner.service` reports the installed release.<br> With lingering disabled, onboarding and the terminal report that the runner<br> stops at logout. They must not promise persistent service. If persistence is<br> needed, the host administrator enables it separately.<br>- Before login, the runner remains paired but has no usable account. Reopening<br> onboarding must distinguish pairing from account availability. | 11, 17, 21 | Document section; COPY ACCEPTED FOR NOW (Paul, 2026-11-04; iterate in context) | |
diff --git a/internal/plan3test/person_api_contract_test.go b/internal/plan3test/person_api_contract_test.go| index ed03ece0..20777432 100644 |
| --- a/internal/plan3test/person_api_contract_test.go |
| +++ b/internal/plan3test/person_api_contract_test.go |
| @@ -142,16 +142,34 @@ func personAPIContractCoverage(t *testing.T) { |
| } |
| } |
| + // person is the person API's operation for a route it registers: on a |
| + // path the engine shares, the earlier operation kept in |
| + // x-earlierPersonAPI; nil where the engine replaced it. |
| + person := func(method, path string) map[string]any { |
| + op, _ := document["paths"].(map[string]any)[path].(map[string]any)[strings.ToLower(method)].(map[string]any) |
| + switch { |
| + case !shared(method + " " + path): |
| + return op |
| + case deviceShared[method+" "+path] == "replaced" || op == nil: |
| + return nil |
| + } |
| + earlier, _ := op["x-earlierPersonAPI"].(map[string]any) |
| + inner, _ := earlier["operation"].(map[string]any) |
| + if inner == nil { |
| + t.Fatal("missing earlier operation", method, path) |
| + } |
| + return inner |
| + } |
| for _, r := range personapi.Routes { |
| - if r.Input == nil || shared(r.Method+" "+r.Path) { |
| + if r.Input == nil || deviceShared[r.Method+" "+r.Path] == "replaced" { |
| continue |
| } |
| name := reflect.TypeOf(r.Input()).Elem().Name() |
| if name == "" { |
| name = "Empty" |
| } |
| - operation, ok := document["paths"].(map[string]any)[r.Path].(map[string]any)[strings.ToLower(r.Method)].(map[string]any) |
| - if !ok { |
| + operation := person(r.Method, r.Path) |
| + if operation == nil { |
| t.Fatal("missing OpenAPI operation", r.Method, r.Path) |
| } |
| body := operation["requestBody"].(map[string]any)["content"].(map[string]any)["application/json"].(map[string]any)["schema"].(map[string]any) |
| @@ -167,10 +185,14 @@ func personAPIContractCoverage(t *testing.T) { |
| if !registered[method+" "+path] { |
| t.Fatal("missing 3a route", method, path) |
| } |
| - operation, ok := doc.Paths[path][strings.ToLower(method)] |
| - if !ok { |
| + if _, ok := doc.Paths[path][strings.ToLower(method)]; !ok { |
| t.Fatal("missing OpenAPI operation", method, path) |
| } |
| + if deviceShared[method+" "+path] == "replaced" { |
| + continue |
| + } |
| + operation, err := json.Marshal(person(method, path)) |
| + must(t, err) |
| var value struct { |
| OperationID string `json:"operationId"` |
| Parameters []struct { |
| @@ -189,9 +211,6 @@ func personAPIContractCoverage(t *testing.T) { |
| if value.OperationID != operationIDs[method+" "+path] { |
| t.Fatal("operation ID differs from registration", method, path, value.OperationID) |
| } |
| - if shared(method + " " + path) { |
| - continue |
| - } |
| if len(value.Responses["200"].Content["application/json"].Schema) == 0 { |
| t.Fatal("untyped response", method, path) |
| } |
diff --git a/internal/plan3test/person_api_device_contract_test.go b/internal/plan3test/person_api_device_contract_test.go| index 4cb0977b..e71b7e96 100644 |
| --- a/internal/plan3test/person_api_device_contract_test.go |
| +++ b/internal/plan3test/person_api_device_contract_test.go |
| @@ -6,6 +6,7 @@ import ( |
| "encoding/json" |
| "fmt" |
| "net/http" |
| + "net/http/httptest" |
| "os" |
| "path/filepath" |
| "reflect" |
| @@ -13,8 +14,11 @@ import ( |
| "slices" |
| "strings" |
| "testing" |
| + "time" |
| + "amadan.net/oficina/equipo/internal/equipo" |
| "amadan.net/oficina/equipo/internal/equipo/chat" |
| + "amadan.net/oficina/equipo/internal/equipo/personapi" |
| "amadan.net/oficina/equipo/internal/wire/wireschema" |
| "github.com/go-chi/chi/v5" |
| ) |
| @@ -183,6 +187,45 @@ func TestPersonAPIDeviceContract(t *testing.T) { |
| } |
| } |
| + // The stream's event types are the Event schema's, and a ping. |
| + types := append(slices.Clone(schemas["Event"].(map[string]any)["properties"].(map[string]any)["type"].(map[string]any)["enum"].([]any)), "ping") |
| + listed := paths["/events"].(map[string]any)["get"].(map[string]any)["x-eventTypes"].([]any) |
| + byText := func(a, b any) int { return strings.Compare(a.(string), b.(string)) } |
| + slices.SortFunc(types, byText) |
| + slices.SortFunc(listed, byText) |
| + if !reflect.DeepEqual(types, listed) { |
| + t.Errorf("GET /events x-eventTypes %v, want %v", listed, types) |
| + } |
| + // Every schema is some operation's, the earlier ones included. |
| + reached := map[string]bool{} |
| + var walk func(any) |
| + walk = func(v any) { |
| + switch x := v.(type) { |
| + case map[string]any: |
| + for k, item := range x { |
| + if ref, ok := item.(string); ok && k == "$ref" && strings.HasPrefix(ref, "#/components/schemas/") { |
| + if name := strings.TrimPrefix(ref, "#/components/schemas/"); !reached[name] { |
| + reached[name] = true |
| + walk(schemas[name]) |
| + } |
| + } else { |
| + walk(item) |
| + } |
| + } |
| + case []any: |
| + for _, item := range x { |
| + walk(item) |
| + } |
| + } |
| + } |
| + walk(paths) |
| + walk(doc["components"].(map[string]any)["responses"]) |
| + for name := range schemas { |
| + if !reached[name] { |
| + t.Errorf("schema %s is no operation's", name) |
| + } |
| + } |
| + |
| codes := schemas["Error"].(map[string]any)["properties"].(map[string]any)["code"].(map[string]any)["enum"].([]any) |
| sources, _ := filepath.Glob("../equipo/chat/*.go") |
| written := regexp.MustCompile(`WriteError\(w, r, [^,]+, "([a-z_]+)"`) |
| @@ -212,7 +255,7 @@ func deviceOperation(t *testing.T, key string, op map[string]any, spec wireschem |
| t.Errorf("%s: missing request body", key) |
| case spec.In != nil: |
| content := body["content"].(map[string]any) |
| - if _, bytes := spec.In.(wireschema.Bytes); !bytes && !reflect.DeepEqual(content["application/json"], map[string]any{"schema": deviceJSON(t, wireschema.Body(spec.In))}) { |
| + if _, bytes := spec.In.(wireschema.Bytes); !bytes && !reflect.DeepEqual(content["application/json"], map[string]any{"schema": deviceJSON(t, wireschema.RequestBody(spec.In))}) { |
| t.Errorf("%s: request body differs from %T", key, spec.In) |
| } |
| } |
| @@ -278,3 +321,84 @@ func deviceJSON(t *testing.T, v any) any { |
| must(t, json.Unmarshal(raw, &out)) |
| return out |
| } |
| + |
| +// TestPersonAPIDeviceProbes asks a new instance, with no runner, task or |
| +// project yet, what a freshly paired device first reads, and checks |
| +// each answer against its operation's documented schema; and checks |
| +// the documented query bounds against the handlers'. |
| +// |
| +// What stays unchecked against a live answer: the engine's writes and |
| +// most reads of populated resources. Their statuses and wire types are |
| +// read from the handlers' source (wireschema TestOpsAreWhatTheHandlersWrite) |
| +// and their schemas generated from those types; where the native apps |
| +// captured an answer, it is checked here too. The event stream's data |
| +// is checked by its fixtures and by TestEventDataIsWhatTheEngineAppends, |
| +// which reads each event's type and resource but not its data's type. |
| +func TestPersonAPIDeviceProbes(t *testing.T) { |
| + raw, err := os.ReadFile("../../docs/api/equipo-v1.openapi.json") |
| + must(t, err) |
| + var doc map[string]any |
| + must(t, json.Unmarshal(raw, &doc)) |
| + paths := doc["paths"].(map[string]any) |
| + schemas := doc["components"].(map[string]any)["schemas"].(map[string]any) |
| + f := newFixture(t) |
| + apiRouter(t, f, func(_ context.Context, token string) (personapi.PersonPrincipal, error) { |
| + if token != "device-probe" { |
| + return personapi.PersonPrincipal{}, equipo.ErrForbidden |
| + } |
| + return personapi.PersonPrincipal{Address: owner.Address, CredentialID: "device-probe", SessionEpoch: time.Now().Unix()}, nil |
| + }) |
| + get := func(path string) *httptest.ResponseRecorder { |
| + r := httptest.NewRequest("GET", "/api/v1"+path, nil) |
| + r.Header.Set("Authorization", "Bearer device-probe") |
| + w := httptest.NewRecorder() |
| + f.Handler.ServeHTTP(w, r) |
| + return w |
| + } |
| + param := func(path, name string) map[string]any { |
| + for _, p := range paths[path].(map[string]any)["get"].(map[string]any)["parameters"].([]any) { |
| + if p.(map[string]any)["name"] == name { |
| + return p.(map[string]any)["schema"].(map[string]any) |
| + } |
| + } |
| + t.Fatalf("GET %s documents no %s", path, name) |
| + return nil |
| + } |
| + probes := []string{"/snapshot", "/messages", "/tasks", "/needs-you", "/projects", "/runners", "/connections", "/notebook", |
| + "/thinking", "/connections/preference", "/specialists", "/housekeeping", "/housekeeping/actions", "/advice"} |
| + for _, by := range param("/usage", "by")["enum"].([]any) { |
| + for _, period := range param("/usage", "period")["enum"].([]any) { |
| + probes = append(probes, fmt.Sprintf("/usage?period=%s&by=%s", period, by)) |
| + } |
| + } |
| + for _, path := range []string{"/messages", "/housekeeping/actions"} { |
| + limit := param(path, "limit") |
| + for _, n := range []any{limit["minimum"], limit["maximum"]} { |
| + probes = append(probes, fmt.Sprintf("%s?limit=%v", path, n)) |
| + } |
| + for _, n := range []float64{limit["minimum"].(float64) - 1, limit["maximum"].(float64) + 1} { |
| + if w := get(fmt.Sprintf("%s?limit=%v", path, n)); w.Code != http.StatusUnprocessableEntity { |
| + t.Errorf("GET %s?limit=%v = %d, outside the documented bounds", path, n, w.Code) |
| + } |
| + } |
| + } |
| + for _, q := range []string{"period=year", "by=colour"} { |
| + if w := get("/usage?" + q); w.Code != http.StatusUnprocessableEntity { |
| + t.Errorf("GET /usage?%s = %d, outside the documented enum", q, w.Code) |
| + } |
| + } |
| + for _, path := range probes { |
| + w := get(path) |
| + route, _, _ := strings.Cut(path, "?") |
| + if w.Code != http.StatusOK { |
| + t.Errorf("GET %s = %d: %s", path, w.Code, w.Body.String()) |
| + continue |
| + } |
| + schema := paths[route].(map[string]any)["get"].(map[string]any)["responses"].(map[string]any)["200"].(map[string]any)["content"].(map[string]any)["application/json"].(map[string]any)["schema"].(map[string]any) |
| + var value any |
| + must(t, json.Unmarshal(w.Body.Bytes(), &value)) |
| + if err := wireschema.Validate(schemas, value, schema, "$"); err != nil { |
| + t.Errorf("GET %s on a new instance does not match its schema: %v", path, err) |
| + } |
| + } |
| +} |
diff --git a/internal/wire/wireschema/wireschema.go b/internal/wire/wireschema/wireschema.go| index 71bbe32d..bbd6712d 100644 |
| --- a/internal/wire/wireschema/wireschema.go |
| +++ b/internal/wire/wireschema/wireschema.go |
| @@ -8,9 +8,9 @@ package wireschema |
| import ( |
| "bytes" |
| + "encoding" |
| "encoding/json" |
| "fmt" |
| - "maps" |
| "reflect" |
| "regexp" |
| "slices" |
| @@ -138,16 +138,19 @@ var EventData = map[string]any{ |
| // constants, by schema and property. |
| // |
| // A card answer that starts no turn answers with a zero message and |
| -// turn: their role and state are then empty. |
| +// turn: their role and state are then empty. A snapshot before the |
| +// person has a primary runner, or whose primary has not reported, has a |
| +// runner with no role. |
| var Enums = map[string][]string{ |
| "Turn.state": {"", wire.TurnQueued, wire.TurnRunning, wire.TurnWaiting, wire.TurnReplied, wire.TurnFailed, wire.TurnCancelled}, |
| "Turn.kind": {wire.TurnPerson, wire.TurnMoveIn, wire.TurnExplore, wire.TurnHousekeeping}, |
| "Message.role": {"", wire.RolePerson, wire.RoleCoordinator}, |
| "MessageAttachment.kind": {wire.AttachmentImage, wire.AttachmentFile}, |
| "Activity.kind": {wire.ActivityThink, wire.ActivityTool}, |
| + "ActivityLine.kind": {wire.ActivityRead, wire.ActivitySearch, wire.ActivityEdit, wire.ActivityRun, wire.ActivityOther}, |
| "Coordinator.state": {wire.CoordinatorNew, wire.CoordinatorMovingIn, wire.CoordinatorReady}, |
| "Project.state": {wire.ProjectActive, wire.ProjectRemoved}, |
| - "Runner.role": {wire.RolePrimary, wire.RoleWorker}, |
| + "Runner.role": {"", wire.RolePrimary, wire.RoleWorker}, |
| "Connection.state": {wire.ConnConnecting, wire.ConnHealthy, wire.ConnLimited, wire.ConnSignInAgain, wire.ConnError, wire.ConnSignedOut, wire.ConnForgotten}, |
| "Question.state": {wire.QuestionQueued, wire.QuestionRunning, wire.QuestionAnswered, wire.QuestionFailed, wire.QuestionCancelled}, |
| "Task.stage": {wire.StageNoted, wire.StageInvestigated, wire.StageInProgress, wire.StageInReview, wire.StageReadyToMerge, wire.StageMerging, wire.StageDone, wire.StageCancelled}, |
| @@ -266,16 +269,45 @@ func (o *ordered) MarshalJSON() ([]byte, error) { |
| // struct value is never dropped) or omitzero; a pointer, slice or map |
| // that is not dropped when nil may be null; a struct allows no other |
| // properties. |
| +// |
| +// A request body is read, not written: wire.Strict rejects an unknown |
| +// field but takes any field missing. So an input schema (input set) |
| +// requires nothing; the handler's own checks are in the operation's |
| +// description. An input type that is also an answer's is named with the |
| +// suffix Input, from outputs. |
| type gen struct { |
| - defs map[string]*ordered |
| - types map[string]reflect.Type |
| - enums map[string]bool |
| + defs map[string]*ordered |
| + types map[string]reflect.Type |
| + enums map[string]bool |
| + input bool |
| + outputs map[string]reflect.Type |
| } |
| func newGen() *gen { |
| return &gen{defs: map[string]*ordered{}, types: map[string]reflect.Type{}, enums: map[string]bool{}} |
| } |
| +var ( |
| + marshaler = reflect.TypeOf((*json.Marshaler)(nil)).Elem() |
| + textMarshaler = reflect.TypeOf((*encoding.TextMarshaler)(nil)).Elem() |
| +) |
| + |
| +// unsupported says why a type's JSON is not what its fields say, or "". |
| +func unsupported(t reflect.Type) string { |
| + if t == timeType || t == rawType || t.Kind() == reflect.Pointer { |
| + return "" // a pointer is its element's JSON, checked in turn |
| + } |
| + for _, m := range []reflect.Type{marshaler, textMarshaler} { |
| + if t.Implements(m) || reflect.PointerTo(t).Implements(m) { |
| + return t.String() + " writes its own JSON (" + m.String() + ")" |
| + } |
| + } |
| + if t.Kind() == reflect.Map && t.Key().Kind() != reflect.String { |
| + return t.String() + " has keys that are not strings" |
| + } |
| + return "" |
| +} |
| + |
| var ( |
| timeType = reflect.TypeOf(time.Time{}) |
| rawType = reflect.TypeOf(json.RawMessage{}) |
| @@ -296,6 +328,9 @@ func nullable(s *ordered) *ordered { |
| func (g *gen) ref(v any) *ordered { return g.of(reflect.TypeOf(v)) } |
| func (g *gen) of(t reflect.Type) *ordered { |
| + if why := unsupported(t); why != "" { |
| + panic("wireschema: no schema for " + why) |
| + } |
| switch { |
| case t == timeType: |
| return obj("type", "string", "format", "date-time") |
| @@ -329,6 +364,12 @@ func (g *gen) of(t reflect.Type) *ordered { |
| return g.object(t, "") |
| } |
| name := t.Name() |
| + if out, ok := g.outputs[name]; ok && g.input { |
| + if out != t { |
| + panic("two Go types named " + name + ": " + out.String() + ", " + t.String()) |
| + } |
| + name += "Input" |
| + } |
| if seen, ok := g.types[name]; ok && seen != t { |
| panic("two Go types named " + name + ": " + seen.String() + ", " + t.String()) |
| } else if !ok { |
| @@ -342,7 +383,7 @@ func (g *gen) of(t reflect.Type) *ordered { |
| func (g *gen) object(t reflect.Type, name string) *ordered { |
| props, required := obj(), []string{} |
| - g.fields(t, name, props, &required) |
| + g.fields(t, t.Name(), props, &required) |
| s := obj("type", "object", "properties", props) |
| if len(required) > 0 { |
| s.set("required", required) |
| @@ -366,6 +407,12 @@ func (g *gen) fields(t reflect.Type, name string, props *ordered, required *[]st |
| g.fields(f.Type, name, props, required) |
| continue |
| } |
| + if f.Anonymous && key == "" { |
| + panic("wireschema: " + t.String() + " embeds " + f.Type.String() + ", whose fields are written only when it is set") |
| + } |
| + if strings.Contains(","+opts+",", ",string,") { |
| + panic("wireschema: " + t.String() + "." + f.Name + " is written as a string (,string)") |
| + } |
| if key == "" { |
| key = f.Name |
| } |
| @@ -377,6 +424,8 @@ func (g *gen) fields(t reflect.Type, name string, props *ordered, required *[]st |
| case omit && kind == reflect.Pointer: |
| // Dropped when nil, so never null. |
| s = g.of(f.Type.Elem()) |
| + case omit && f.Type == rawType: |
| + // Dropped when empty; anything when written. |
| case omit && (kind == reflect.Slice || kind == reflect.Map): |
| s.set("type", s.vals["type"].([]string)[0]) |
| } |
| @@ -385,7 +434,7 @@ func (g *gen) fields(t reflect.Type, name string, props *ordered, required *[]st |
| g.enums[name+"."+key] = true |
| } |
| props.set(key, s) |
| - if !omit { |
| + if !omit && !g.input { |
| *required = append(*required, key) |
| } |
| } |
| @@ -407,21 +456,53 @@ func Generate() map[string]json.RawMessage { |
| } |
| func generate() map[string]*ordered { |
| - g := newGen() |
| + out, in := build() |
| + for key := range Enums { |
| + if !out.enums[key] && !in.enums[key] { |
| + panic("Enums names no field: " + key) |
| + } |
| + } |
| + for name, s := range in.defs { |
| + out.defs[name] = s |
| + } |
| + return out.defs |
| +} |
| + |
| +// build generates the answers' schemas (out) and then the request |
| +// bodies' (in). |
| +func build() (out, in *gen) { |
| + out, in = newGen(), newGen() |
| for _, op := range Ops { |
| - for _, v := range append([]any{op.In}, slices.Collect(maps.Values(op.Out))...) { |
| + for _, v := range op.Out { |
| if _, bytes := v.(Bytes); v != nil && !bytes { |
| - g.ref(v) |
| + out.ref(v) |
| } |
| } |
| } |
| - g.events() |
| - for key := range Enums { |
| - if !g.enums[key] { |
| - panic("Enums names no field: " + key) |
| + out.events() |
| + in.input, in.outputs = true, out.types |
| + for _, op := range Ops { |
| + if _, bytes := op.In.(Bytes); op.In != nil && !bytes { |
| + in.ref(op.In) |
| } |
| } |
| - return g.defs |
| + return out, in |
| +} |
| + |
| +// RequestBody is the schema of a request body in Ops, as the document |
| +// writes it. |
| +func RequestBody(v any) json.RawMessage { |
| + if _, bytes := v.(Bytes); bytes { |
| + return Body(v) |
| + } |
| + out, _ := build() |
| + in := newGen() |
| + in.input, in.outputs = true, out.types |
| + raw, err := json.Marshal(in.ref(v)) |
| + if err != nil { |
| + panic(err) |
| + } |
| + return raw |
| } |
| // Body is the schema of a body in Ops, as the document writes it. |
diff --git a/internal/wire/wireschema/wireschema_test.go b/internal/wire/wireschema/wireschema_test.go| index 53e3a2ac..425731f2 100644 |
| --- a/internal/wire/wireschema/wireschema_test.go |
| +++ b/internal/wire/wireschema/wireschema_test.go |
| @@ -2,7 +2,17 @@ package wireschema |
| import ( |
| "encoding/json" |
| + "fmt" |
| + "go/ast" |
| + "go/parser" |
| + "go/token" |
| + "math/big" |
| "os" |
| + "path/filepath" |
| + "reflect" |
| + "regexp" |
| + "slices" |
| + "strconv" |
| "strings" |
| "testing" |
| "time" |
| @@ -107,7 +117,7 @@ func TestDump(t *testing.T) { |
| } |
| o := map[string]any{"out": out} |
| if op.In != nil { |
| - o["in"] = Body(op.In) |
| + o["in"] = RequestBody(op.In) |
| } |
| ops[key] = o |
| } |
| @@ -119,3 +129,474 @@ func TestDump(t *testing.T) { |
| t.Fatal(err) |
| } |
| } |
| + |
| +// families says where each enum in Enums comes from: the internal/wire |
| +// string constants named with prefix, less those named in other (a |
| +// different field's, recorded here so a new constant must be placed). |
| +// zero are values the field takes that no constant names. |
| +var families = map[string]struct{ prefix, other, zero string }{ |
| + "Turn.state": {"Turn", "TurnPerson TurnMoveIn TurnExplore TurnHousekeeping TurnTeamUpdate", `""`}, |
| + "Turn.kind": {"Turn", "TurnQueued TurnRunning TurnWaiting TurnReplied TurnFailed TurnCancelled TurnTeamUpdate", ""}, // team_update: the Assistant's lane only |
| + "Message.role": {"Role", "RolePrimary RoleWorker RoleAssistant", `""`}, // assistant: the Assistant's lane only |
| + "Runner.role": {"Role", "RolePerson RoleCoordinator RoleAssistant", `""`}, |
| + "MessageAttachment.kind": {"Attachment", "AttachmentRepo", ""}, // a project's attachment |
| + "Activity.kind": {"Activity", "ActivityRead ActivitySearch ActivityEdit ActivityRun ActivityOther", ""}, |
| + "ActivityLine.kind": {"Activity", "ActivityThink ActivityTool", ""}, |
| + "Coordinator.state": {"Coordinator", "CoordinatorLooking CoordinatorMerging", ""}, // TaskActivity kinds |
| + "Project.state": {"Project", "", ""}, |
| + "Connection.state": {"Conn", "", ""}, |
| + "Question.state": {"Question", "", ""}, |
| + "Task.stage": {"Stage", "", ""}, |
| + "Task.kind": {"Kind", "KindAPIKey KindSubscription KindToken", ""}, // connection kinds |
| + "Step.state": {"Step", "", ""}, |
| + "Advice.kind": {"Advice", "AdviceOpen AdviceActed AdviceDismissed AdviceWithdrawn", ""}, |
| + "Advice.state": {"Advice", "AdviceBudgetNear AdvicePreferSwitch AdviceDeferTasks AdviceHeldLong", ""}, |
| + "Specialist.state": {"Specialist", "SpecialistChecks SpecialistCopy SpecialistEngineering SpecialistMerge SpecialistPreview SpecialistPublish SpecialistResearch SpecialistReview", ""}, // step specialists |
| + "HousekeepingAction.state": {"Action", "", ""}, |
| + "TaskPriority.priority": {"Priority", "PrioritySetByCoordinator PrioritySetByPerson", ""}, |
| + "SetPriority.priority": {"Priority", "PrioritySetByCoordinator PrioritySetByPerson", ""}, |
| + "TaskPriority.set_by": {"PrioritySetBy", "", ""}, |
| + "UsageTotals.period": {"Usage", "UsageByConnection UsageByRole UsageByProject UsageByTask UsageByModel UsageProbe", ""}, // probe: a usage row's role |
| + "UsageTotals.by": {"UsageBy", "", ""}, |
| + "Event.type": {"Event", "EventPing EventGlance", ""}, // a ping is not an Event; a glance is the Assistant's |
| +} |
| + |
| +// parseGo parses the Go files in dir, tests apart. |
| +func parseGo(t *testing.T, dir string) []*ast.File { |
| + t.Helper() |
| + names, _ := filepath.Glob(filepath.Join(dir, "*.go")) |
| + var out []*ast.File |
| + fset := token.NewFileSet() |
| + for _, name := range names { |
| + if strings.HasSuffix(name, "_test.go") { |
| + continue |
| + } |
| + f, err := parser.ParseFile(fset, name, nil, 0) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + out = append(out, f) |
| + } |
| + if len(out) == 0 { |
| + t.Fatal("no Go files in " + dir) |
| + } |
| + return out |
| +} |
| + |
| +// wireConstants are internal/wire's string constants by name. |
| +func wireConstants(t *testing.T) map[string]string { |
| + t.Helper() |
| + files := parseGo(t, "..") |
| + out := map[string]string{} |
| + for _, f := range files { |
| + for _, d := range f.Decls { |
| + if g, ok := d.(*ast.GenDecl); ok && g.Tok == token.CONST { |
| + for _, spec := range g.Specs { |
| + v := spec.(*ast.ValueSpec) |
| + for i, name := range v.Names { |
| + if i < len(v.Values) { |
| + if lit, ok := v.Values[i].(*ast.BasicLit); ok && lit.Kind == token.STRING { |
| + out[name.Name], _ = strconv.Unquote(lit.Value) |
| + } |
| + } |
| + } |
| + } |
| + } |
| + } |
| + } |
| + return out |
| +} |
| + |
| +// Each enum is exactly its family of wire constants: a new constant |
| +// fails here until it is placed. |
| +func TestEnumsAreTheWireConstants(t *testing.T) { |
| + consts := wireConstants(t) |
| + for key := range Enums { |
| + if _, ok := families[key]; !ok && key != "Event.resource" && !strings.HasSuffix(key, "Conflict.code") { |
| + t.Errorf("%s has no family of wire constants", key) |
| + } |
| + } |
| + for key, f := range families { |
| + want := []string{} |
| + for name, value := range consts { |
| + if strings.HasPrefix(name, f.prefix) && !slices.Contains(strings.Fields(f.other), name) { |
| + want = append(want, value) |
| + } |
| + } |
| + if f.zero != "" { |
| + want = append(want, "") |
| + } |
| + got := slices.Clone(Enums[key]) |
| + slices.Sort(want) |
| + slices.Sort(got) |
| + if !slices.Equal(got, want) { |
| + t.Errorf("%s is %q; its wire constants are %q", key, got, want) |
| + } |
| + } |
| +} |
| + |
| +// Every event the engine appends (txn.event in internal/equipo/chat) has |
| +// a schema, and every schema an event: by type and resource. |
| +func TestEventDataIsWhatTheEngineAppends(t *testing.T) { |
| + consts := wireConstants(t) |
| + files, _ := filepath.Glob("../../equipo/chat/*.go") |
| + call := regexp.MustCompile(`\.event\(([^,]+), ([^,]+), ([^,]+), ([^,]+),`) |
| + resolve := func(arg string) string { |
| + if v, err := strconv.Unquote(arg); err == nil { |
| + return v |
| + } |
| + if v, ok := consts[strings.TrimPrefix(arg, "wire.")]; ok && strings.HasPrefix(arg, "wire.") { |
| + return v |
| + } |
| + t.Errorf("an event's type or resource is %s, not a constant", arg) |
| + return "" |
| + } |
| + found := map[string]bool{} |
| + for _, file := range files { |
| + if strings.HasSuffix(file, "_test.go") { |
| + continue |
| + } |
| + src, err := os.ReadFile(file) |
| + if err != nil { |
| + t.Fatal(err) |
| + } |
| + for _, m := range call.FindAllStringSubmatch(string(src), -1) { |
| + found[resolve(m[3])+" "+resolve(m[4])] = true |
| + } |
| + } |
| + for key := range found { |
| + if _, ok := EventData[key]; !ok { |
| + t.Errorf("the engine appends %s events, which have no schema", key) |
| + } |
| + } |
| + for key := range EventData { |
| + if !found[key] { |
| + t.Errorf("nothing appends %s events", key) |
| + } |
| + } |
| +} |
| + |
| +// The generator refuses what it cannot describe, rather than guess. |
| +func TestGeneratorRefusesWhatItCannotDescribe(t *testing.T) { |
| + type text struct{ big.Int } |
| + type stringy struct { |
| + N int64 `json:"n,string"` |
| + } |
| + type embedded struct { |
| + *sampleInner |
| + } |
| + type keyed struct { |
| + M map[int]string `json:"m"` |
| + } |
| + type marshals struct { |
| + V big.Float `json:"v"` |
| + } |
| + for name, v := range map[string]any{"text": text{}, "string": stringy{}, "embedded": embedded{}, "keyed": keyed{}, "marshals": marshals{}} { |
| + func() { |
| + defer func() { |
| + if recover() == nil { |
| + t.Errorf("%s: described", name) |
| + } |
| + }() |
| + newGen().ref(v) |
| + }() |
| + } |
| + type raw struct { |
| + R json.RawMessage `json:"r,omitempty"` |
| + } |
| + g := newGen() |
| + g.ref(raw{}) |
| + if got, _ := json.Marshal(g.defs["raw"]); !strings.Contains(string(got), `"properties":{"r":{}}`) || strings.Contains(string(got), "required") { |
| + t.Errorf("an omitempty RawMessage: %s", got) |
| + } |
| +} |
| + |
| +// A request body requires nothing (wire.Strict takes a missing field), |
| +// and an input type that is also an answer's takes the suffix Input. |
| +func TestRequestBodies(t *testing.T) { |
| + out := newGen() |
| + out.ref(sample{}) |
| + in := newGen() |
| + in.input, in.outputs = true, out.types |
| + if got, _ := json.Marshal(in.ref(sample{})); string(got) != `{"$ref":"#/components/schemas/sampleInput"}` { |
| + t.Fatal(string(got)) |
| + } |
| + if got, _ := json.Marshal(in.defs["sampleInput"]); strings.Contains(string(got), `"required"`) { |
| + t.Errorf("an input requires fields: %s", got) |
| + } |
| + for name, s := range Generate() { |
| + var v map[string]any |
| + if err := json.Unmarshal(s, &v); err != nil { |
| + t.Fatal(err) |
| + } |
| + if _, required := v["required"]; required && strings.HasSuffix(name, "Input") { |
| + t.Errorf("%s requires fields", name) |
| + } |
| + } |
| +} |
| + |
| +// handlerSource is internal/equipo/chat read for what its person API |
| +// handlers write: the functions by name, HTTP's and Store's methods |
| +// apart. |
| +type handlerSource struct { |
| + http, store, funcs map[string]*ast.FuncDecl |
| +} |
| + |
| +func readHandlers(t *testing.T) handlerSource { |
| + t.Helper() |
| + files := parseGo(t, "../../equipo/chat") |
| + src := handlerSource{map[string]*ast.FuncDecl{}, map[string]*ast.FuncDecl{}, map[string]*ast.FuncDecl{}} |
| + for _, f := range files { |
| + for _, d := range f.Decls { |
| + fn, ok := d.(*ast.FuncDecl) |
| + if !ok { |
| + continue |
| + } |
| + switch recv := receiver(fn); recv { |
| + case "HTTP": |
| + src.http[fn.Name.Name] = fn |
| + case "Store": |
| + src.store[fn.Name.Name] = fn |
| + case "": |
| + src.funcs[fn.Name.Name] = fn |
| + } |
| + } |
| + } |
| + return src |
| +} |
| + |
| +func receiver(fn *ast.FuncDecl) string { |
| + if fn.Recv == nil { |
| + return "" |
| + } |
| + if star, ok := fn.Recv.List[0].Type.(*ast.StarExpr); ok { |
| + if id, ok := star.X.(*ast.Ident); ok { |
| + return id.Name |
| + } |
| + } |
| + return "other" |
| +} |
| + |
| +var statuses = map[string]string{"http.StatusOK": "200", "http.StatusCreated": "201", "http.StatusAccepted": "202", "http.StatusNoContent": "204", "http.StatusConflict": "409"} |
| + |
| +// typeName is a type expression's wire name: "Task" for wire.Task. |
| +func typeName(e ast.Expr) string { |
| + if sel, ok := e.(*ast.SelectorExpr); ok { |
| + if pkg, ok := sel.X.(*ast.Ident); ok && pkg.Name == "wire" { |
| + return sel.Sel.Name |
| + } |
| + } |
| + if _, ok := e.(*ast.MapType); ok { |
| + return "map" |
| + } |
| + return "?" + fmt.Sprintf("%T", e) |
| +} |
| + |
| +// writes is what fn writes, by status: the wire type's name, "" for no |
| +// body, "bytes" for a file, "map" for a map literal. in is the request |
| +// body's type, if it reads one. |
| +func (src handlerSource) writes(t *testing.T, fn *ast.FuncDecl, out map[string]string, in *string) { |
| + t.Helper() |
| + params := map[string]*ast.FuncType{} |
| + for _, f := range fn.Type.Params.List { |
| + if ft, ok := f.Type.(*ast.FuncType); ok { |
| + for _, n := range f.Names { |
| + params[n.Name] = ft |
| + } |
| + } |
| + } |
| + // resultOf is the first result type of what a call calls. |
| + resultOf := func(call *ast.CallExpr) string { |
| + switch fun := call.Fun.(type) { |
| + case *ast.Ident: |
| + if ft := params[fun.Name]; ft != nil { |
| + return typeName(ft.Results.List[0].Type) |
| + } |
| + case *ast.SelectorExpr: |
| + if m := src.store[fun.Sel.Name]; m != nil { |
| + return typeName(m.Type.Results.List[0].Type) |
| + } |
| + } |
| + return "?call" |
| + } |
| + assigned := map[string][]ast.Expr{} // ident -> every value assigned |
| + vars := map[string]string{} // var in wire.T |
| + writes := false |
| + for n := range ast.Preorder(fn.Body) { |
| + switch x := n.(type) { |
| + case *ast.AssignStmt: |
| + for i, l := range x.Lhs { |
| + if id, ok := l.(*ast.Ident); ok { |
| + if len(x.Rhs) == len(x.Lhs) { |
| + assigned[id.Name] = append(assigned[id.Name], x.Rhs[i]) |
| + } else if i == 0 && len(x.Rhs) == 1 { |
| + assigned[id.Name] = append(assigned[id.Name], x.Rhs[0]) |
| + } |
| + } |
| + } |
| + case *ast.ValueSpec: |
| + for _, n := range x.Names { |
| + if x.Type != nil { |
| + vars[n.Name] = typeName(x.Type) |
| + } |
| + } |
| + case *ast.CallExpr: |
| + if sel, ok := x.Fun.(*ast.SelectorExpr); ok && sel.Sel.Name == "Write" { |
| + writes = true |
| + } |
| + } |
| + } |
| + status := func(e ast.Expr) []string { |
| + switch x := e.(type) { |
| + case *ast.BasicLit: |
| + return []string{x.Value} |
| + case *ast.SelectorExpr: |
| + return []string{statuses[fmt.Sprint(x.X, ".", x.Sel.Name)]} |
| + case *ast.Ident: |
| + var all []string |
| + for _, v := range assigned[x.Name] { |
| + if sel, ok := v.(*ast.SelectorExpr); ok { |
| + all = append(all, statuses[fmt.Sprint(sel.X, ".", sel.Sel.Name)]) |
| + } |
| + } |
| + return all |
| + } |
| + return []string{"?status"} |
| + } |
| + body := func(e ast.Expr) string { |
| + switch x := e.(type) { |
| + case *ast.CompositeLit: |
| + return typeName(x.Type) |
| + case *ast.Ident: |
| + for _, v := range assigned[x.Name] { |
| + if call, ok := v.(*ast.CallExpr); ok { |
| + return resultOf(call) |
| + } |
| + } |
| + } |
| + return "?body" |
| + } |
| + for n := range ast.Preorder(fn.Body) { |
| + call, ok := n.(*ast.CallExpr) |
| + if !ok { |
| + continue |
| + } |
| + switch fun := call.Fun.(type) { |
| + case *ast.Ident: |
| + switch { |
| + case fun.Name == "writeJSON": |
| + for _, s := range status(call.Args[1]) { |
| + out[s] = body(call.Args[2]) |
| + } |
| + case fun.Name == "readJSON": |
| + if u, ok := call.Args[1].(*ast.UnaryExpr); ok { |
| + *in = vars[u.X.(*ast.Ident).Name] |
| + } |
| + case fun.Name == "ReadUpload": |
| + *in = "bytes" |
| + case src.funcs[fun.Name] != nil: |
| + src.writes(t, src.funcs[fun.Name], out, in) |
| + } |
| + case *ast.SelectorExpr: |
| + switch { |
| + case fun.Sel.Name == "WriteHeader": |
| + for _, s := range status(call.Args[0]) { |
| + out[s] = "" |
| + if writes { |
| + out[s] = "bytes" |
| + } |
| + } |
| + case fun.Sel.Name == "Strict" && fmt.Sprint(fun.X) == "wire": |
| + if u, ok := call.Args[1].(*ast.UnaryExpr); ok { |
| + *in = vars[u.X.(*ast.Ident).Name] |
| + } |
| + case fmt.Sprint(fun.X) == "h" && src.http[fun.Sel.Name] != nil: |
| + src.writes(t, src.http[fun.Sel.Name], out, in) |
| + } |
| + } |
| + } |
| +} |
| + |
| +// handlerOf is the HTTP method a route's handler expression ends in: |
| +// h.bearer(h.name), h.thinOr(..., h.bearer(h.name)), h.bearer(h.name(...)). |
| +func handlerOf(e ast.Expr) string { |
| + switch x := e.(type) { |
| + case *ast.CallExpr: |
| + if sel, ok := x.Fun.(*ast.SelectorExpr); ok && sel.Sel.Name != "bearer" && sel.Sel.Name != "thinOr" { |
| + return sel.Sel.Name |
| + } |
| + return handlerOf(x.Args[len(x.Args)-1]) |
| + case *ast.SelectorExpr: |
| + return x.Sel.Name |
| + } |
| + return "" |
| +} |
| + |
| +// Ops is what the handlers write: each route's request body and its |
| +// answers' statuses and wire types, read from internal/equipo/chat. |
| +// The event stream writes text, not JSON, and is held by the fixtures. |
| +func TestOpsAreWhatTheHandlersWrite(t *testing.T) { |
| + src := readHandlers(t) |
| + seen := map[string]bool{} |
| + for _, mount := range []string{"Mount", "mountHousekeeping", "mountUsage"} { |
| + for n := range ast.Preorder(src.http[mount].Body) { |
| + call, ok := n.(*ast.CallExpr) |
| + if !ok || len(call.Args) != 2 { |
| + continue |
| + } |
| + fun, isSel := call.Fun.(*ast.SelectorExpr) |
| + lit, isLit := call.Args[0].(*ast.BasicLit) |
| + if !isSel || !isLit || !slices.Contains([]string{"Get", "Post", "Put", "Delete"}, fun.Sel.Name) { |
| + continue |
| + } |
| + path, _ := strconv.Unquote(lit.Value) |
| + key := strings.ToUpper(fun.Sel.Name) + " " + path |
| + seen[key] = true |
| + op, ok := Ops[key] |
| + if !ok { |
| + t.Errorf("%s is served but not in Ops", key) |
| + continue |
| + } |
| + if key == "GET /events" { |
| + continue |
| + } |
| + name := handlerOf(call.Args[1]) |
| + fn := src.http[name] |
| + if fn == nil { |
| + t.Errorf("%s: cannot find its handler %q", key, name) |
| + continue |
| + } |
| + got, in := map[string]string{}, "" |
| + src.writes(t, fn, got, &in) |
| + want := map[string]string{} |
| + for status, v := range op.Out { |
| + want[status] = opName(v) |
| + } |
| + if !reflect.DeepEqual(got, want) { |
| + t.Errorf("%s (%s) writes %v; Ops says %v", key, name, got, want) |
| + } |
| + if wantIn := opName(op.In); in != wantIn { |
| + t.Errorf("%s (%s) reads %q; Ops says %q", key, name, in, wantIn) |
| + } |
| + continue |
| + } |
| + } |
| + for key := range Ops { |
| + if !seen[key] { |
| + t.Errorf("%s is in Ops but not served", key) |
| + } |
| + } |
| +} |
| + |
| +func opName(v any) string { |
| + switch v.(type) { |
| + case nil: |
| + return "" |
| + case Bytes: |
| + return "bytes" |
| + } |
| + if name := reflect.TypeOf(v).Name(); name != "" { |
| + return name |
| + } |
| + return "map" |
| +} |