oficina / equipo Public

Keep trusted check failures and preview origin boundaries

Paul Campbell pushed by paul@keymail.dev c72d9dd2f705ff1976db93ea7b804c04da015eaf parent d6a94d9
23 files changed, +245 −32
  • .rastrillo/budgets.txt +5 −5
  • docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md +1 −0
  • docs/superpowers/specs/2026-11-19-injection-defences-follow-up.md +15 −0
  • internal/equipo/chat/injection_merge_test.go +25 −0
  • internal/equipo/chat/mergeauth.go +3 −1
  • internal/equipo/chat/tasks.go +15 −2
  • internal/equipo/copy.go +1 −0
  • internal/equipo/migrations/0093_base_checks_result.sql +1 −0
  • internal/equipo/migrations/schema.sql +1 −1
  • internal/equipo/preview_wrapper_test.go +33 −0
  • internal/equipo/work_views.go +21 −4
  • internal/plan3test/plan3_release_test.go +1 −1
  • internal/runner/thin/check_diagnostics_test.go +17 −1
  • internal/runner/thin/judge.go +17 −0
  • internal/runner/thin/preview.go +7 −7
  • internal/runner/thin/preview_devbox_test.go +2 −2
  • internal/runner/thin/preview_security.go +15 −5
  • internal/runner/thin/preview_security_test.go +26 −1
  • internal/runner/thin/preview_test.go +2 −1
  • internal/thintest/review_contract_test.go +25 −0
  • internal/wire/injection_test.go +1 −1
  • internal/wire/runners.go +8 −0
  • internal/wire/tasks.go +3 −0

CI cancelled — superseded by a newer push — 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/injection-defences: Type  Size Avail | ext4   96G   86G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   86G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 2.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.9s
ci-box: pi: installed and verified in 7.5s
ci-box: opencode: installed and verified in 1.9s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 9.0s
ci-box: clone deepened in 2.9s
ci-box: file times set from content: 2705 files, 172 directories
ci-box: ready in 16.0s
=== 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.245s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  3.8s
+ go list -export -test -tags testbuild -f  ./...
  4.3s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  3.0s
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

receipt: test step 1m29.155s 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 1m27.02s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m27.02s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 62.81, cpu waiting 38.91%, memory waiting 0.00%, io waiting 0.61%
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless
=== RUN   TestHeadless
--- FAIL: TestHeadless (81.86s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestHeadless/4_review
=== RUN   TestHeadless/4_review
time=2026-11-19T13:50:25.355Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:50:25.355Z level=INFO msg="startup phase done" phase=state_lock took=185µs
time=2026-11-19T13:50:25.355Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:50:25.356Z level=INFO msg="startup phase done" phase=claim_roots took=165µs
time=2026-11-19T13:50:25.356Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:50:25.385Z level=INFO msg="startup phase done" phase=sweep took=28.931ms
time=2026-11-19T13:50:25.385Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:50:25.385Z level=INFO msg="startup phase done" phase=credentials took=152µs
time=2026-11-19T13:50:25.385Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:50:25.425Z level=INFO msg="startup phase done" phase=open_state took=39.798ms
time=2026-11-19T13:50:25.425Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:50:25.426Z level=INFO msg=connecting host=127.0.0.1:34001 protocol=28
time=2026-11-19T13:50:25.428Z level=INFO msg=connected host=127.0.0.1:34001 took=973µs
time=2026-11-19T13:50:25.428Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:50:25.429Z level=INFO msg="capabilities gathered" took=500µs tags=linux,claude,go
time=2026-11-19T13:50:25.429Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:50:25.435Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-19T13:50:26.565Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-19T13:50:31.540Z level=INFO msg="kept sessions" kept=1 bytes=3061 expired=0
time=2026-11-19T13:50:34.481Z level=INFO msg="kept sessions" kept=2 bytes=8233 expired=0
    review_test.go:87: checks and the branch do not refer to one SHA: task tk25vbammfpe candidate "897ff895ef70b5972ad88742290431f6ce3101fb", engineering "897ff895ef70b5972ad88742290431f6ce3101fb", checks {BaseChecks: ID:s_hzvwpl2liqkzkuvcafgu3hjonx Revision:1 TaskID:tk25vbammfpe Index:4 Specialist:checks State:queued Reason: Attempt:1 BaseSHA:325e9cb2fbcb4c916e2605c6a50c44d1e70a6c02 CandidateSHA:897ff895ef70b5972ad88742290431f6ce3101fb Pushed:false Terminated:false Summary: Headline: LogTail: StartedAt:<nil> FinishedAt:<nil> Round:1 Family: Account: Model: Verdict: ReviewLabel: Findings:[] Checks: Gate: ExitCode:<nil> Askable:false Rebase:false MergeSHA: Into: Strategy: WithoutChecks:false Switched:<nil> Activity:[] RunnerID:767YDQU7M7DX3QFZ6BKKXAAHCU RunnerLabel:Headless runner Needs:[] Placement: Publication: TerminationKind: ChecksSandbox: Preview:<nil> Research:<nil> Hold:<nil> Publish:<nil>}
--- FAIL: TestHeadless/4_review (9.56s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m21.857s
FAIL	amadan.net/oficina/equipo/internal/headless	82.217s


receipt: test step 1m23.419s 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 1m21.857s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m21.86s amadan.net/oficina/equipo/internal/headless TestHeadless
exit status 1
+ go 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$' -v -run '^TestHeadless$/^4_review$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestHeadless/4_review headless-review c72d9dd2f705ff1976db93ea7b804c04da015eaf 9.56s 62.19
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 57.92, cpu waiting 35.48%, memory waiting 0.00%, io waiting 0.48%
--- 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

receipt: test step 1m33.211s 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 1m31.138s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m19.76s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 6.31s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 5.07s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 61.31, cpu waiting 38.74%, memory waiting 0.00%, io waiting 0.55%
--- 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

receipt: test step 1m29.372s 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 1m27.139s amadan.net/oficina/equipo/internal/headless
receipt: slow test 45s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 21.79s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 10.61s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
receipt: slow test 9.73s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
machine: 32 CPUs, load 62.81, cpu waiting 39.15%, memory waiting 0.00%, io waiting 0.59%
--- 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

receipt: test step 1m45.88s 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 1m43.891s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m6.72s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 11.99s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 10.47s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 8.77s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 5.94s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 54.00, cpu waiting 33.33%, 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

amadan: job cancelled — a newer push superseded it
--- 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 2m1.666s 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 1m59.229s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 7.79s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.75s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 5.57s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.74s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.48s amadan.net/oficina/equipo/internal/thintest TestResearchDoneFallsBack
machine: 32 CPUs, load 44.07, cpu waiting 25.80%, memory waiting 0.00%, io waiting 0.34%
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/thintest TestContractPreview
=== RUN   TestContractPreview
    preview_contract_test.go:124: task page lacks "Preview: https://tmp-tkocydm4cdkw.bds.oncarlos.com/ (expires in 7 days)"
--- FAIL: TestContractPreview (0.33s)

--- FAIL amadan.net/oficina/equipo/internal/thintest TestContractPreviewDevbox
=== RUN   TestContractPreviewDevbox
    preview_contract_test.go:279: no tailnet preview line
--- FAIL: TestContractPreviewDevbox (0.31s)

--- FAIL amadan.net/oficina/equipo/internal/thintest (package output)
FAIL
rastrillo-budget/v1 ran 1m20.767s
FAIL	amadan.net/oficina/equipo/internal/thintest	81.080s


receipt: test step 1m22.305s 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 1m20.767s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.08s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.04s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.4s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.35s amadan.net/oficina/equipo/internal/thintest TestContractPublishNameTaken
receipt: slow test 2.32s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotNow
exit status 1
+ go 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)' -v -run '^TestContractPreview$|^TestContractPreviewDevbox$' -count=1 ./internal/thintest   (retry, once)
FAILED TWICE ./internal/thintest:TestContractPreview thintest-contract
FAILED TWICE ./internal/thintest:TestContractPreviewDevbox thintest-contract
=== RUN   TestContractPreview
    preview_contract_test.go:124: task page lacks "Preview: https://tmp-tkhemjicpspq.bds.oncarlos.com/ (expires in 7 days)"
--- FAIL: TestContractPreview (1.41s)
=== RUN   TestContractPreviewDevbox
    preview_contract_test.go:279: no tailnet preview line
--- FAIL: TestContractPreviewDevbox (0.32s)
FAIL
rastrillo-budget/v1 ran 1.738s
FAIL	amadan.net/oficina/equipo/internal/thintest	2.056s
FAIL
machine: 32 CPUs, load 62.19, cpu waiting 38.74%, memory waiting 0.00%, io waiting 0.63%
make: *** [Makefile:113: ci-shard] Error 1

amadan: step check shard 7 of 29 failed: exit status 2
--- 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

amadan: job cancelled — a newer push superseded it
--- 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

receipt: test step 49.695s 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 48.67s amadan.net/oficina/equipo/internal/runner
receipt: slow test 28.64s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.03s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 51.38, cpu waiting 31.32%, memory waiting 0.00%, io waiting 1.16%
--- 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

receipt: test step 1m0.144s 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 58.783s amadan.net/oficina/equipo/internal/runner
receipt: slow test 48.68s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 43.17s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.42s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.67s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 56.89, cpu waiting 36.77%, memory waiting 0.00%, io waiting 0.98%
--- 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

receipt: test step 35.793s 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.93s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.13s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.28s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.5s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.61s amadan.net/oficina/equipo/internal/runner TestReportPostsRetryExactRequest
machine: 32 CPUs, load 34.17, cpu waiting 20.19%, memory waiting 0.00%, io waiting 1.46%
--- 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 35.9%, load 25.48
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

receipt: test step 1m6.974s 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 1m5.089s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 27.39s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 27.29s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 25.32s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 22.93s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 22.33s amadan.net/oficina/equipo/internal/equipotest TestAuthorityRejectsMismatchedTarget
machine: 32 CPUs, load 57.92, cpu waiting 37.31%, memory waiting 0.00%, io waiting 0.51%
--- 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 35.9%, load 25.48
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 1m13.986s 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 1m12.329s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 18.58s amadan.net/oficina/equipo/internal/equipotest TestProjectRejectsUnsafeBinding
receipt: slow test 18.57s amadan.net/oficina/equipo/internal/equipotest TestProjectConcurrentRetry
receipt: slow test 18.55s amadan.net/oficina/equipo/internal/equipotest TestProjectOwnersAreMembers
receipt: slow test 18.52s amadan.net/oficina/equipo/internal/equipotest TestProjectBindingUniqueness
receipt: slow test 18.49s amadan.net/oficina/equipo/internal/equipotest TestProjectsReopen
machine: 32 CPUs, load 54.00, cpu waiting 34.39%, memory waiting 0.00%, io waiting 0.46%
--- 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 35.9%, load 25.48
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

receipt: test step 1m12.094s 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 1m7.516s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 15.22s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 13.33s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 10.25s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 10.14s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 7.22s amadan.net/oficina/equipo/internal/equipotest TestRosterProtectsLastOwner
machine: 32 CPUs, load 57.92, cpu waiting 35.48%, memory waiting 0.00%, io waiting 0.48%
--- 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 35.9%, load 25.48
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 1m7.453s 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 1m5.826s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.1s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 24.38s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 24.35s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 22.63s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedAuditRollback
receipt: slow test 22.55s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsCurrentOwner
machine: 32 CPUs, load 57.92, cpu waiting 37.31%, memory waiting 0.00%, io waiting 0.51%
--- 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 38.6%, load 25.48
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 51.614s 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 49.323s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.56s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 3.56s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 1.52s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.4s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.19s amadan.net/oficina/equipo/internal/plan3test TestPlanMigrationUpgrade
machine: 32 CPUs, load 62.19, cpu waiting 38.77%, memory waiting 0.00%, io waiting 0.65%
--- 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 35.9%, load 25.48
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/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/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed

amadan: job cancelled — a newer push superseded it
--- 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChat
=== RUN   TestBrowserChat
time=2026-11-19T13:49:49.521Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:49:49.521Z level=INFO msg="startup phase done" phase=state_lock took=81µs
time=2026-11-19T13:49:49.521Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:49:49.521Z level=INFO msg="startup phase done" phase=claim_roots took=77µs
time=2026-11-19T13:49:49.521Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:49:49.577Z level=INFO msg="startup phase done" phase=sweep took=55.65ms
time=2026-11-19T13:49:49.577Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:49:49.577Z level=INFO msg="startup phase done" phase=credentials took=140µs
time=2026-11-19T13:49:49.577Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:49:49.630Z level=INFO msg="startup phase done" phase=open_state took=52.856ms
time=2026-11-19T13:49:49.631Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:49:49.631Z level=INFO msg=connecting host=127.0.0.1:37779 protocol=28
time=2026-11-19T13:49:49.634Z level=INFO msg=connected host=127.0.0.1:37779 took=2.227ms
time=2026-11-19T13:49:49.634Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:49:49.635Z level=INFO msg="capabilities gathered" took=837µs tags=linux,claude,go
time=2026-11-19T13:49:49.638Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:49:49.644Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-19T13:49:51.646Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_test.go:46: waiting for [...document.querySelectorAll('[equipo-message="incoming"] [equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes('fake coordinator')): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserChat (6.21s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
=== RUN   TestBrowserChatSendStaysOnPage
time=2026-11-19T13:49:55.777Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:49:55.777Z level=INFO msg="startup phase done" phase=state_lock took=266µs
time=2026-11-19T13:49:55.777Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:49:55.777Z level=INFO msg="startup phase done" phase=claim_roots took=186µs
time=2026-11-19T13:49:55.777Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:49:55.820Z level=INFO msg="startup phase done" phase=sweep took=42.968ms
time=2026-11-19T13:49:55.821Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:49:55.821Z level=INFO msg="startup phase done" phase=credentials took=208µs
time=2026-11-19T13:49:55.821Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:49:55.887Z level=INFO msg="startup phase done" phase=open_state took=66.412ms
time=2026-11-19T13:49:55.888Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:49:55.889Z level=INFO msg=connecting host=127.0.0.1:43321 protocol=28
time=2026-11-19T13:49:55.891Z level=INFO msg=connected host=127.0.0.1:43321 took=966µs
time=2026-11-19T13:49:55.892Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:49:55.897Z level=INFO msg="capabilities gathered" took=5.146ms tags=linux,claude,go
time=2026-11-19T13:49:55.900Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:49:55.902Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-19T13:49:58.236Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_test.go:108: waiting for [...document.querySelectorAll('[equipo-message="incoming"] [equipo-markdown]:not([data-stream-text])')].some(e=>e.textContent.includes('fake coordinator')): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserChatSendStaysOnPage (6.21s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
=== RUN   TestBrowserDraftIsTheMessage
time=2026-11-19T13:50:01.956Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:50:01.956Z level=INFO msg="startup phase done" phase=state_lock took=146µs
time=2026-11-19T13:50:01.956Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:50:01.956Z level=INFO msg="startup phase done" phase=claim_roots took=193µs
time=2026-11-19T13:50:01.956Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:50:01.990Z level=INFO msg="startup phase done" phase=sweep took=34.031ms
time=2026-11-19T13:50:01.990Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:50:01.990Z level=INFO msg="startup phase done" phase=credentials took=204µs
time=2026-11-19T13:50:01.990Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:50:02.045Z level=INFO msg="startup phase done" phase=open_state took=54.677ms
time=2026-11-19T13:50:02.046Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:50:02.048Z level=INFO msg=connecting host=127.0.0.1:38167 protocol=28
time=2026-11-19T13:50:02.051Z level=INFO msg=connected host=127.0.0.1:38167 took=1.214ms
time=2026-11-19T13:50:02.051Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:50:02.052Z level=INFO msg="capabilities gathered" took=1.078ms tags=linux,claude,go
time=2026-11-19T13:50:02.055Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:50:02.057Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-19T13:50:04.303Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_thinking_test.go:106: waiting for !!window.__m: context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserDraftIsTheMessage (8.17s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 48.598s
FAIL	amadan.net/oficina/equipo/internal/headless	48.948s


receipt: test step 50.249s 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 48.598s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.29s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 8.17s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 7.78s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 6.21s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 6.21s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' -v -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserDraftIsTheMessage$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserChat browser-headless-chat c72d9dd2f705ff1976db93ea7b804c04da015eaf 6.21s 51.38
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserChatSendStaysOnPage browser-headless-chat c72d9dd2f705ff1976db93ea7b804c04da015eaf 6.21s 51.38
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserDraftIsTheMessage browser-headless-chat c72d9dd2f705ff1976db93ea7b804c04da015eaf 8.17s 51.38
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 50.96, cpu waiting 32.27%, memory waiting 0.00%, io waiting 0.43%
--- 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
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
=== RUN   TestBrowserRailFollowsWork
time=2026-11-19T13:49:46.813Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:49:46.813Z level=INFO msg="startup phase done" phase=state_lock took=184µs
time=2026-11-19T13:49:46.813Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:49:46.813Z level=INFO msg="startup phase done" phase=claim_roots took=106µs
time=2026-11-19T13:49:46.813Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:49:46.844Z level=INFO msg="startup phase done" phase=sweep took=30.424ms
time=2026-11-19T13:49:46.844Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:49:46.844Z level=INFO msg="startup phase done" phase=credentials took=216µs
time=2026-11-19T13:49:46.844Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:49:46.887Z level=INFO msg="startup phase done" phase=open_state took=43.411ms
time=2026-11-19T13:49:46.888Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:49:46.889Z level=INFO msg=connecting host=127.0.0.1:38661 protocol=28
time=2026-11-19T13:49:46.890Z level=INFO msg=connected host=127.0.0.1:38661 took=1.068ms
time=2026-11-19T13:49:46.890Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:49:46.891Z level=INFO msg="capabilities gathered" took=508µs tags=linux,claude,go
time=2026-11-19T13:49:46.891Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:49:46.898Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-19T13:49:48.129Z level=INFO msg="connection checked" connection=claude-1 state=healthy
time=2026-11-19T13:49:57.432Z level=INFO msg="kept sessions" kept=1 bytes=2770 expired=0
time=2026-11-19T13:50:01.941Z level=INFO msg="kept sessions" kept=2 bytes=4922 expired=0
time=2026-11-19T13:50:02.741Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:50:02.741Z level=INFO msg="startup phase done" phase=state_lock took=249µs
time=2026-11-19T13:50:02.742Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:50:02.742Z level=INFO msg="startup phase done" phase=claim_roots took=213µs
time=2026-11-19T13:50:02.742Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:50:02.779Z level=INFO msg="startup phase done" phase=sweep took=37.261ms
time=2026-11-19T13:50:02.779Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:50:02.779Z level=INFO msg="startup phase done" phase=credentials took=199µs
time=2026-11-19T13:50:02.779Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:50:02.826Z level=INFO msg="startup phase done" phase=open_state took=46.363ms
time=2026-11-19T13:50:02.826Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:50:02.828Z level=INFO msg=connecting host=127.0.0.1:37345 protocol=28
time=2026-11-19T13:50:02.830Z level=INFO msg=connected host=127.0.0.1:37345 took=1.275ms
time=2026-11-19T13:50:02.830Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:50:02.831Z level=INFO msg="capabilities gathered" took=1.222ms tags=linux,claude,go
time=2026-11-19T13:50:02.834Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:50:02.837Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-19T13:50:05.002Z level=INFO msg="connection checked" connection=claude-1 state=healthy
    browser_review_test.go:57: waiting for document.querySelector('#rail [data-specialist="engineering"]')?.dataset.state==='working' && document.querySelector('#rail [data-specialist="engineering"]').querySelector('[equipo-nav-task]')?.textContent==='Slow sidebar change' && document.querySelector('#nav-tasks [data-count]')?.textContent==='1': context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserRailFollowsWork (22.40s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m35.132s
FAIL	amadan.net/oficina/equipo/internal/headless	95.417s


receipt: test step 1m36.562s 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 1m35.132s amadan.net/oficina/equipo/internal/headless
receipt: slow test 25.86s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 22.4s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 14.55s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 11.22s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 11.2s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
rastrillo: budget test: go test failed
exit status 1
+ go test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' -v -run '^TestBrowserRailFollowsWork$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserRailFollowsWork browser-headless-work c72d9dd2f705ff1976db93ea7b804c04da015eaf 22.40s 57.92
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 44.07, cpu waiting 25.80%, memory waiting 0.00%, io waiting 0.34%
--- 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

receipt: test step 1m48.062s 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 1m46.277s amadan.net/oficina/equipo/internal/headless
receipt: slow test 17.77s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 14.43s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 13.19s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 10.77s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.52s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 50.96, cpu waiting 31.25%, 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
rastrillo: budget test: go test failed
--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserCopyContinue
=== RUN   TestBrowserCopyContinue
time=2026-11-19T13:50:00.247Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:50:00.247Z level=INFO msg="startup phase done" phase=state_lock took=275µs
time=2026-11-19T13:50:00.247Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:50:00.247Z level=INFO msg="startup phase done" phase=claim_roots took=217µs
time=2026-11-19T13:50:00.247Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:50:00.306Z level=INFO msg="startup phase done" phase=sweep took=59.043ms
time=2026-11-19T13:50:00.306Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:50:00.307Z level=INFO msg="startup phase done" phase=credentials took=105µs
time=2026-11-19T13:50:00.307Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:50:00.371Z level=INFO msg="startup phase done" phase=open_state took=64.554ms
time=2026-11-19T13:50:00.372Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:50:00.374Z level=INFO msg=connecting host=127.0.0.1:45559 protocol=28
time=2026-11-19T13:50:00.375Z level=INFO msg=connected host=127.0.0.1:45559 took=925µs
time=2026-11-19T13:50:00.375Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:50:00.376Z level=INFO msg="capabilities gathered" took=1.05ms tags=linux,claude,go
time=2026-11-19T13:50:00.376Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:50:00.386Z level=INFO msg=welcome protocol=28 role=primary generation=1
    browser_copy_test.go:90: waiting for !document.querySelector('[data-copy-continue]'): context deadline exceeded (last evaluation: context deadline exceeded)
--- FAIL: TestBrowserCopyContinue (6.40s)

--- FAIL amadan.net/oficina/equipo/internal/headless TestBrowserEmptyExplore
=== RUN   TestBrowserEmptyExplore
time=2026-11-19T13:50:40.427Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-19T13:50:40.427Z level=INFO msg="startup phase done" phase=state_lock took=152µs
time=2026-11-19T13:50:40.427Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-19T13:50:40.427Z level=INFO msg="startup phase done" phase=claim_roots took=126µs
time=2026-11-19T13:50:40.427Z level=INFO msg="startup phase" phase=sweep
time=2026-11-19T13:50:40.454Z level=INFO msg="startup phase done" phase=sweep took=27.218ms
time=2026-11-19T13:50:40.454Z level=INFO msg="startup phase" phase=credentials
time=2026-11-19T13:50:40.454Z level=INFO msg="startup phase done" phase=credentials took=103µs
time=2026-11-19T13:50:40.454Z level=INFO msg="startup phase" phase=open_state
time=2026-11-19T13:50:40.495Z level=INFO msg="startup phase done" phase=open_state took=40.741ms
time=2026-11-19T13:50:40.496Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-19T13:50:40.498Z level=INFO msg=connecting host=127.0.0.1:35189 protocol=28
time=2026-11-19T13:50:40.499Z level=INFO msg=connected host=127.0.0.1:35189 took=977µs
time=2026-11-19T13:50:40.499Z level=INFO msg="capabilities gathering"
time=2026-11-19T13:50:40.500Z level=INFO msg="capabilities gathered" took=434µs tags=linux,claude,go
time=2026-11-19T13:50:40.502Z level=INFO msg="hello sent" protocol=28
time=2026-11-19T13:50:40.504Z level=INFO msg=welcome protocol=28 role=primary generation=1
time=2026-11-19T13:50:41.592Z 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.83s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m38.533s
FAIL	amadan.net/oficina/equipo/internal/headless	98.911s


receipt: test step 1m40.276s 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 1m38.533s amadan.net/oficina/equipo/internal/headless
receipt: slow test 15.27s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 12.43s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 11.95s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 10.88s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 8.09s amadan.net/oficina/equipo/internal/headless TestBrowserRefreshRace
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 c72d9dd2f705ff1976db93ea7b804c04da015eaf 6.40s 57.92
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
##############################################################################
FLAKE ./internal/headless:TestBrowserEmptyExplore browser-headless-rest c72d9dd2f705ff1976db93ea7b804c04da015eaf 5.83s 57.92
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 50.96, cpu waiting 30.26%, memory waiting 0.00%, io waiting 0.40%
--- 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/equipo
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^(TestBrowserPreviewBlocksNavigation)$' ./internal/equipo

receipt: test step 2.374s 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 709ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 710ms amadan.net/oficina/equipo/internal/equipo TestBrowserPreviewBlocksNavigation
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 2.789s 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.628s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 1.63s 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 3.102s 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.797s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 1.8s 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|TestBrowserAutonomySettings|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

amadan: job cancelled — a newer push superseded it
--- 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   (58s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 5.08s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.28s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 10.49s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 10.90s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 27.77s
+ 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   (65s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 19.33s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 13.56s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 12.16s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 17.87s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (24s)
ok ./internal/headless TestMixedVersions 22.00s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (2s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.85s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (2s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 56.58, cpu waiting 37.90%, memory waiting 0.00%, io waiting 0.88%
--- 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 12.488s 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.594s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 196ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 64ms 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 5.25s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.72s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 490ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 200ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxToolchain
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.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 2.908s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 290ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 190ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 130ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryMalformedRecord
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryReusedPID
machine: 32 CPUs, load 17.11, cpu waiting 8.95%, memory waiting 0.00%, io waiting 2.05%
--- 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 35.9%, load 25.48
shard 25: make runner-dead-references lanes-check build vet fmt-check budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2419 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: 85 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.433s
machine: 32 CPUs, load 59.82, cpu waiting 38.51%, memory waiting 0.00%, io waiting 0.80%
--- 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 35.9%, load 25.48
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 51.38, cpu waiting 32.92%, memory waiting 0.00%, io waiting 1.12%
--- 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 35.9%, load 25.48
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 34.17, cpu waiting 21.88%, memory waiting 0.00%, io waiting 1.41%
--- 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 35.9%, load 25.48
shard 28: make gitleaks
1:49PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
1:50PM INF 996 commits scanned.
1:50PM INF scanned ~59308288 bytes (59.31 MB) in 22.6s
1:50PM INF no leaks found
machine: 32 CPUs, load 51.38, cpu waiting 32.92%, memory waiting 0.00%, io waiting 1.12%
diff --git a/.rastrillo/budgets.txt b/.rastrillo/budgets.txt
index 903c5162..0945827f 100644
--- a/.rastrillo/budgets.txt
+++ b/.rastrillo/budgets.txt
@@ -14,8 +14,8 @@ perf GET /* skip Unknown private paths render 404; this fallback contains no scr
time internal/equipo/team 60s Plan 3 loaded CI measured 45.985s; niced serial reruns measured 18.079s and 22.031s. Keep migration, recovery, accounting and concurrency assertions; 60s leaves 30 percent headroom above loaded CI.
time internal/equipotest 300s Final fix package rerun measured 187.035s (review 172.4s); 300s gives 60 percent headroom for HTTP, sandbox, authority and final regression coverage.
-size internal/equipo 21321 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 21321/- source/test lines.
-size internal/wire 6626 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 6626/- source/test lines.
+size internal/equipo 21339 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 21339/- source/test lines.
+size internal/wire 6637 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 6637/- source/test lines.
size internal/equipotest - 13400 Task 21 repairs historical migration and conversation fixtures after Plan 3. Measured 13024 test lines; the 300s time ceiling is unchanged.
time internal/runner/checks 90s CI worker measured 44.553s (44.6s rounded);
time internal/runner 330s Plan 3 CI repair measured 292.120s for the full package (controller CI 472.184s).
@@ -38,7 +38,7 @@ time internal/runner/provider 15s Plan 3 CI repair measured 10.346s for the full
perf GET /releases/* skip Verified runner release file downloads, not browser GET screens.
perf GET /install.sh skip Mac runners: the one-line bootstrap a terminal pipes to sh, not a browser screen.
time internal/runner/containment 15s Plan 3 loaded CI measured 10.817s;
-size internal/runner/thin 27822 20981 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 27822/20981 source/test lines.
+size internal/runner/thin 27849 21023 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 27849/21023 source/test lines.
time internal/thintest 240s Thin contract and page tests, the Assistant's and the models' included, share one harness. Measured 202s on a shared 16 CPU box (2026-11-13); CI runs two lanes.
time internal/runner/mac 30s Mac runners (Darwin worker): real process groups killed after a grace and proven gone (SIGTERM, SIGKILL, the marker sweep), and the probes run end to end with fake srt and xcodebuild, P6 killing.
time internal/runner/thin 45s Thin v1 slice 4 review: real git repositories for the merge and squash checks, a stalled fetch, and a 16 MiB candidate streamed through the review diff and the checks pack (about 5s).
@@ -56,7 +56,7 @@ perf GET /api/v1/tasks/{id} skip Thin v1 person API: bearer-only JSON for device
perf GET /api/v1/assistant/snapshot skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/messages skip Assistant person API: bearer-only JSON for Base's chat, not a browser screen.
perf GET /api/v1/assistant/events skip Assistant event stream (Server-Sent Events), bearer-only and long-lived; not a screen.
-size internal/equipo/chat 31043 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 31043/- source/test lines.
+size internal/equipo/chat 31058 - Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured 31058/- source/test lines.
perf GET /api/v1/questions/{id} skip Thin v1 person API: bearer-only JSON for devices; the browser reads questions on /tasks/{id}.
perf GET /api/v1/steps/{id}/log skip Thin v1 person API: bearer-only JSON for devices; the browser shows the log tail on /tasks/{id}.
perf GET /api/v1/connections/preference skip Connections slice 1 person API: bearer-only JSON for devices; the browser shows the preference on /conversation/connections.
@@ -71,7 +71,7 @@ perf GET /tasks/{id}/files/{file} skip Research kept images: the bytes of one im
perf GET /api/v1/runners skip Mac runners person API: bearer-only JSON for devices; the browser shows runners in the Team section.
time cmd/equipo-runner 60s TestReleaseRunnerHasNoFakeWorker builds the release runner and the thin package under testbuild (about 12s locally).
size internal/headless - 11245 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured -/11245 source/test lines.
-size internal/thintest - 31511 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured -/31511 source/test lines.
+size internal/thintest - 31536 Fable follow-up: base and diagnostic gates, preview isolation and provenance guards; measured -/31536 source/test lines.
perf GET /api/v1/projects/{id}/merge-policy skip Merge authority person API: bearer-only JSON for devices; the browser reads the policy on /projects/{id}.
perf GET /api/v1/usage skip Thin v1 person API: bearer-only JSON for devices; the browser reads usage through /usage.
diff --git a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
index 4993d707..9ee4abb5 100644
--- a/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
+++ b/docs/superpowers/plans/CONTROLLER-REPORT-plan-3.md
@@ -4714,6 +4714,7 @@ All eight entries have individual `COPY REVIEW REQUIRED` markers. The API guide
| `autonomy.public_previews` | Publish previews publicly | Injection defences | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19) |
| `autonomy.public_previews_help` | Allow temporary preview links that anyone on the internet can open. | Injection defences | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19) |
| `autonomy.empty` | Add a project to choose what Equipo can do on its own. | Injection defences | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19) |
+| `chat.merge.not.base_failed` | the base version's checks failed | Injection defences final review | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19) |
| `chat.merge.not.base_checks` | its checks were not run using the base version’s check files | Injection defences | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19) |
| `chat.merge.not.gates` | it changes the files that run its checks | Injection defences | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19) |
| `chat.merge.not.review_truncated` | Review received a shortened diff | Injection defences | COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19) |
diff --git a/docs/superpowers/specs/2026-11-19-injection-defences-follow-up.md b/docs/superpowers/specs/2026-11-19-injection-defences-follow-up.md
index b489119e..1540bfd6 100644
--- a/docs/superpowers/specs/2026-11-19-injection-defences-follow-up.md
+++ b/docs/superpowers/specs/2026-11-19-injection-defences-follow-up.md
@@ -72,3 +72,18 @@ Linux amd64 and Mac arm64, record each digest in the install manifest, and link
the corresponding digest into each runner. Tests re-execute the already compiled
gitleaks command from the test binary. No compiler or module cache is needed to
prepare or run a scanner during those tests.
+
+## Final review corrections
+
+The trusted base gate keeps its own outcome alongside the combined checks
+outcome. Candidate diagnostics cannot turn a failed base gate into a pass.
+A base failure enters the existing fix-round path; any merge explanation names
+the base failure. Persist the outcome additively, after main's migrations.
+
+Preview link labels contain only the host. Their targets remain Equipo wrapper
+routes. The exported and verified CSP names the configured Equipo origin in
+frame-ancestors, including after restart. A republishing attempt offers no stale
+header-confirmation link.
+
+The platform patch refuses serving only for requested security headers that
+cannot be applied. Invalid nonsecurity lines retain the edge's skip behaviour.
diff --git a/internal/equipo/chat/injection_merge_test.go b/internal/equipo/chat/injection_merge_test.go
index f175c237..332bb144 100644
--- a/internal/equipo/chat/injection_merge_test.go
+++ b/internal/equipo/chat/injection_merge_test.go
@@ -30,6 +30,8 @@ func TestBaseChecksAttestationAcceptance(t *testing.T) {
{"hosted", func(_ *Lease, _ *stepRecord, v *wire.StepReport) { v.Hosted = &wire.HostedResult{} }, wire.RolePrimary},
{"hosted gate", func(_ *Lease, _ *stepRecord, v *wire.StepReport) { v.Gate = wire.GateHosted }, wire.RolePrimary},
{"unsandboxed", func(_ *Lease, _ *stepRecord, v *wire.StepReport) { v.ChecksSandbox = wire.SandboxNone }, wire.RolePrimary},
+ {"base failed", func(_ *Lease, _ *stepRecord, v *wire.StepReport) { v.BaseChecks = wire.ChecksFailed }, wire.RolePrimary},
+ {"base unavailable", func(_ *Lease, _ *stepRecord, v *wire.StepReport) { v.BaseChecks = wire.ChecksCannotRun }, wire.RolePrimary},
{"failed", func(_ *Lease, _ *stepRecord, v *wire.StepReport) { v.Checks = wire.ChecksFailed }, wire.RolePrimary},
{"running", func(_ *Lease, _ *stepRecord, v *wire.StepReport) { v.Termination = false }, wire.RolePrimary},
{"wrong specialist", func(_ *Lease, s *stepRecord, _ *wire.StepReport) { s.Specialist = wire.SpecialistReview }, wire.RolePrimary},
@@ -111,3 +113,26 @@ func TestMergeInputsRecheckAutonomyAndBaseEvidence(t *testing.T) {
t.Fatal("authority lookup error accepted")
}
}
+
+func TestBaseFailureMergeExplanation(t *testing.T) {
+ r, _ := rosterRig(t)
+ r.s.authority.Copy = func(key string) string {
+ switch key {
+ case "chat.merge.not.base_failed":
+ return "the base version's checks failed"
+ case "chat.merge.stance_wait":
+ return "%s: %s"
+ }
+ return key
+ }
+ k := r.task("tkbasefailure", "Gate update", hkOwner)
+ p := progress{candidate: strings.Repeat("b", 40), checks: &stepRecord{State: wire.StepDone, Checks: wire.ChecksFailed, Reason: "base_checks_failed"}, review: &stepRecord{State: wire.StepDone, Verdict: wire.VerdictApprove}}
+ d := mergegate.Decide(mergegate.Inputs{Candidate: p.candidate, Verdict: wire.VerdictApprove, Checks: wire.ChecksFailed, ChecksReason: "base_checks_failed"})
+ r.must(r.tx(func(tx *txn) error {
+ q, _, err := tx.mergeQuestion(k, p, d)
+ if err == nil && !strings.Contains(q, "the base version's checks failed") {
+ t.Fatalf("base failure hidden: %s", q)
+ }
+ return err
+ }))
+}
diff --git a/internal/equipo/chat/mergeauth.go b/internal/equipo/chat/mergeauth.go
index 898a5cef..0a840365 100644
--- a/internal/equipo/chat/mergeauth.go
+++ b/internal/equipo/chat/mergeauth.go
@@ -601,6 +601,8 @@ func (t *txn) mergeQuestion(k taskRecord, p progress, d mergegate.Decision) (str
case c.OK && c.Name == mergegate.CritRevert:
phrase = t.words("chat.merge.why.exact_revert", short(k.RevertSHA))
case c.OK:
+ case (c.Name == mergegate.CritEnvironment || c.Name == mergegate.CritBaseChecks) && reason == "base_checks_failed":
+ phrase = t.words("chat.merge.not.base_failed")
case c.Name == mergegate.CritEnvironment:
why := t.words("work.decide.reason." + reason)
switch {
@@ -1370,7 +1372,7 @@ const (
// acceptBaseChecks binds trusted gate execution to this checks attempt.
func acceptBaseChecks(l Lease, role string, s stepRecord, v *wire.StepReport) string {
- if l.Protocol < wire.ProtocolInjectionDefences || role != wire.RolePrimary || s.Specialist != wire.SpecialistChecks || v.Checks != wire.ChecksPassed || !v.Termination || v.Hosted != nil || v.Gate == wire.GateHosted || v.ChecksSandbox == wire.SandboxHosted || v.ChecksSandbox == wire.SandboxNone || !validSHA(v.BaseChecksSHA) || v.BaseChecksSHA != s.BaseSHA || v.BaseSHA != s.BaseSHA || v.CandidateSHA != s.CandidateSHA {
+ if l.Protocol < wire.ProtocolInjectionDefences || role != wire.RolePrimary || s.Specialist != wire.SpecialistChecks || v.Checks != wire.ChecksPassed || v.BaseChecks == wire.ChecksFailed || v.BaseChecks == wire.ChecksCannotRun || !v.Termination || v.Hosted != nil || v.Gate == wire.GateHosted || v.ChecksSandbox == wire.SandboxHosted || v.ChecksSandbox == wire.SandboxNone || !validSHA(v.BaseChecksSHA) || v.BaseChecksSHA != s.BaseSHA || v.BaseSHA != s.BaseSHA || v.CandidateSHA != s.CandidateSHA {
return ""
}
return v.BaseChecksSHA
diff --git a/internal/equipo/chat/tasks.go b/internal/equipo/chat/tasks.go
index 686495bc..945d6321 100644
--- a/internal/equipo/chat/tasks.go
+++ b/internal/equipo/chat/tasks.go
@@ -217,6 +217,7 @@ type stepRecord struct {
// none when they ran outside the sandbox (Paul's ruling 2). "" is the
// primary's bubblewrap.
ChecksSandbox string
+ BaseChecks string
BaseChecksSHA string
// ChangeFacts is the review's measured change (wire.ChangeFacts JSON),
// kept only when it passed acceptance. DecidedBy is who decided a
@@ -445,7 +446,7 @@ func (t *txn) latestStep(taskID string) (stepRecord, bool, error) {
func stepView(s stepRecord) wire.Step {
return wire.Step{RunnerID: s.RunnerID, Needs: decodeList(s.Needs), Placement: s.Placement, Publication: s.Publication, TerminationKind: s.TerminationKind, ChecksSandbox: s.ChecksSandbox, ID: s.ID, Revision: s.Revision, TaskID: s.TaskID, Index: s.Idx, Specialist: s.Specialist, State: s.State, Reason: s.Reason, Attempt: s.Attempt, BaseSHA: s.BaseSHA, CandidateSHA: s.CandidateSHA, Pushed: s.Pushed, Terminated: s.Terminated, Summary: s.Summary, Headline: s.Headline, LogTail: s.LogTail, StartedAt: s.StartedAt, FinishedAt: s.FinishedAt,
- Round: s.Round, Family: s.Family, Account: s.Account, Model: s.Model, Verdict: s.Verdict, ReviewLabel: s.ReviewLabel, Findings: decodeFindings(s.Findings), Checks: s.Checks, Gate: s.Gate, ExitCode: s.ExitCode, Askable: s.Askable,
+ Round: s.Round, Family: s.Family, Account: s.Account, Model: s.Model, Verdict: s.Verdict, ReviewLabel: s.ReviewLabel, Findings: decodeFindings(s.Findings), BaseChecks: s.BaseChecks, Checks: s.Checks, Gate: s.Gate, ExitCode: s.ExitCode, Askable: s.Askable,
Rebase: s.Rebase, MergeSHA: s.MergeSHA, Into: s.MergeInto, Strategy: s.MergeStrategy, WithoutChecks: s.WithoutChecks, Activity: decodeActivity(s.Activity), Preview: decodePreview(s.Preview), Publish: decodePublish(s.Publish)}
}
@@ -729,7 +730,7 @@ func (t *txn) writeStep(s *stepRecord) error {
}
s.Revision++
s.UpdatedAt = t.now()
- if err := t.db.Model(&stepRecord{}).Where("id = ?", s.ID).Select("base_checks_sha", "copy_owner", "copy_revision", "copy_result", "failure_signature", "state", "reason", "attempt", "base_sha", "candidate_sha", "pushed", "terminated", "summary", "log_tail", "started_at", "finished_at", "revision", "updated_at", "headline", "family", "account", "verdict", "review_label", "findings", "checks", "gate", "exit_code", "output", "republish", "from_attempt", "askable", "rebase", "from_base", "from_candidate", "merge_sha", "merge_into", "merge_strategy", "without_checks", "switched", "activity", "runner_id", "needs", "placement", "waiting_since", "refused_by", "withdrawn", "termination_kind", "publication", "publication_id", "apple", "checks_sandbox", "change_facts", "decided_by", "merge_source", "merge_parents", "hosted_ci", "kind", "note", "sandbox_runner", "unsandboxed_by", "unsandboxed_at", "unsandboxed_attempt", "unsandboxed_runner", "has_preview", "preview", "boundary", "question", "request_turn", "sources_card", "sources_hash", "research_grant", "research_grant_revision", "hold", "housekeeping_attempt", "held_at", "publish", "model").Updates(s).Error; err != nil {
+ if err := t.db.Model(&stepRecord{}).Where("id = ?", s.ID).Select("base_checks", "base_checks_sha", "copy_owner", "copy_revision", "copy_result", "failure_signature", "state", "reason", "attempt", "base_sha", "candidate_sha", "pushed", "terminated", "summary", "log_tail", "started_at", "finished_at", "revision", "updated_at", "headline", "family", "account", "verdict", "review_label", "findings", "checks", "gate", "exit_code", "output", "republish", "from_attempt", "askable", "rebase", "from_base", "from_candidate", "merge_sha", "merge_into", "merge_strategy", "without_checks", "switched", "activity", "runner_id", "needs", "placement", "waiting_since", "refused_by", "withdrawn", "termination_kind", "publication", "publication_id", "apple", "checks_sandbox", "change_facts", "decided_by", "merge_source", "merge_parents", "hosted_ci", "kind", "note", "sandbox_runner", "unsandboxed_by", "unsandboxed_at", "unsandboxed_attempt", "unsandboxed_runner", "has_preview", "preview", "boundary", "question", "request_turn", "sources_card", "sources_hash", "research_grant", "research_grant_revision", "hold", "housekeeping_attempt", "held_at", "publish", "model").Updates(s).Error; err != nil {
return err
}
if s.Retired {
@@ -1526,6 +1527,18 @@ func (t *txn) stepReport(l Lease, v *wire.StepReport) error {
return nil
}
s.Reason, s.Verdict, s.ReviewLabel, s.Checks, s.Gate, s.ExitCode = v.Reason, v.Verdict, v.ReviewLabel, v.Checks, v.Gate, v.ExitCode
+ if s.Specialist == wire.SpecialistChecks && role == wire.RolePrimary && l.Protocol >= wire.ProtocolInjectionDefences {
+ switch v.BaseChecks {
+ case wire.ChecksPassed, wire.ChecksFailed, wire.ChecksCannotRun:
+ s.BaseChecks = v.BaseChecks
+ }
+ if s.BaseChecks == wire.ChecksFailed {
+ s.Checks, s.Reason = wire.ChecksFailed, "base_checks_failed"
+ if s.ExitCode != nil && *s.ExitCode == 0 {
+ s.ExitCode = nil
+ }
+ }
+ }
if s.Specialist == wire.SpecialistChecks && role == wire.RoleWorker {
// A worker's word on how its checks were confined;
// anything but seatbelt is outside the sandbox, and a
diff --git a/internal/equipo/copy.go b/internal/equipo/copy.go
index c3242416..bc185b91 100644
--- a/internal/equipo/copy.go
+++ b/internal/equipo/copy.go
@@ -81,6 +81,7 @@ var pageCopy = map[string]string{
"autonomy.public_previews": "Publish previews publicly", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)
"autonomy.public_previews_help": "Allow temporary preview links that anyone on the internet can open.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)
"autonomy.empty": "Add a project to choose what Equipo can do on its own.", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)
+ "chat.merge.not.base_failed": "the base version's checks failed", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)
"chat.merge.not.base_checks": "its checks were not run using the base version’s check files", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)
"chat.merge.not.gates": "it changes the files that run its checks", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)
"chat.merge.not.review_truncated": "Review received a shortened diff", // COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)
diff --git a/internal/equipo/migrations/0093_base_checks_result.sql b/internal/equipo/migrations/0093_base_checks_result.sql
new file mode 100644
index 00000000..cc2b520f
--- /dev/null
+++ b/internal/equipo/migrations/0093_base_checks_result.sql
@@ -0,0 +1 @@
+ALTER TABLE chat_steps ADD COLUMN base_checks text;
diff --git a/internal/equipo/migrations/schema.sql b/internal/equipo/migrations/schema.sql
index fc3c4799..acdc8e32 100644
--- a/internal/equipo/migrations/schema.sql
+++ b/internal/equipo/migrations/schema.sql
@@ -610,7 +610,7 @@ CREATE TABLE chat_project_attachments (project_id text, kind text, ref text, nam
CREATE TABLE chat_tasks (id text PRIMARY KEY, project_id text, title text, brief text, stage text, branch text, base_sha text, creator text, turn_id text, cancel_requested numeric, revision integer, created_at datetime, updated_at datetime, watching text, moved_from text, branch_head text, merge_asked text, merged_sha text, merged_into text, merge_strategy text, merged_without_checks numeric, merged_at datetime, ready_sha text, merge_eligible text, done_at datetime, duplicate_of text, folded_into text, folded_stage text, folded_at datetime, engineering_runner text, merge_hold text, merge_verified numeric, revert_of text, revert_sha text, kind text, direction_asked text, built_as text, explored_from text, priority text, due_by datetime, priority_set_by text, priority_revision integer, publish_asked text, repair_round integer, copy_hold numeric, copy_recovery text, lane text);
CREATE INDEX chat_task_project ON chat_tasks(project_id);
CREATE INDEX chat_task_lane ON chat_tasks(lane);
-CREATE TABLE chat_steps (base_checks_sha text, id text PRIMARY KEY, task_id text, idx integer, specialist text, person text, state text, reason text, attempt integer, base_sha text, candidate_sha text, pushed numeric, terminated numeric, summary text, log_tail text, started_at datetime, finished_at datetime, revision integer, created_at datetime, updated_at datetime, round integer, family text, account text, verdict text, review_label text, findings text, checks text, gate text, exit_code integer, output text, republish numeric, from_attempt integer, askable numeric, rebase numeric, from_base text, from_candidate text, merge_sha text, merge_into text, merge_strategy text, without_checks numeric, activity text, switched text, headline text, runner_id text, needs text, placement text, waiting_since datetime, refused_by text, withdrawn numeric, termination_kind text, publication text, publication_id text, apple numeric, checks_sandbox text, recheck_by text, change_facts text, decided_by text, merge_source text, merge_parents text, hosted_ci text, sandbox_runner text, unsandboxed_by text, unsandboxed_at datetime, unsandboxed_attempt integer, unsandboxed_runner text, has_preview numeric, preview text, kind text, note text, boundary text, question text, request_turn text, sources_card text, sources_hash text, research_grant text, research_grant_revision integer, hold text, housekeeping_attempt integer, held_at datetime, publish text, model text, copy_owner text, copy_revision integer, copy_result text, failure_signature text);
+CREATE TABLE chat_steps (base_checks text, base_checks_sha text, id text PRIMARY KEY, task_id text, idx integer, specialist text, person text, state text, reason text, attempt integer, base_sha text, candidate_sha text, pushed numeric, terminated numeric, summary text, log_tail text, started_at datetime, finished_at datetime, revision integer, created_at datetime, updated_at datetime, round integer, family text, account text, verdict text, review_label text, findings text, checks text, gate text, exit_code integer, output text, republish numeric, from_attempt integer, askable numeric, rebase numeric, from_base text, from_candidate text, merge_sha text, merge_into text, merge_strategy text, without_checks numeric, activity text, switched text, headline text, runner_id text, needs text, placement text, waiting_since datetime, refused_by text, withdrawn numeric, termination_kind text, publication text, publication_id text, apple numeric, checks_sandbox text, recheck_by text, change_facts text, decided_by text, merge_source text, merge_parents text, hosted_ci text, sandbox_runner text, unsandboxed_by text, unsandboxed_at datetime, unsandboxed_attempt integer, unsandboxed_runner text, has_preview numeric, preview text, kind text, note text, boundary text, question text, request_turn text, sources_card text, sources_hash text, research_grant text, research_grant_revision integer, hold text, housekeeping_attempt integer, held_at datetime, publish text, model text, copy_owner text, copy_revision integer, copy_result text, failure_signature text);
CREATE INDEX chat_step_task ON chat_steps(task_id);
CREATE TABLE chat_task_entries (id text PRIMARY KEY, task_id text, idempotency_key text, kind text, author text, text text, repo text, path text, line integer, created_at datetime, headline text, folded_from text);
CREATE INDEX chat_entry_task ON chat_task_entries(task_id);
diff --git a/internal/equipo/preview_wrapper_test.go b/internal/equipo/preview_wrapper_test.go
index c112658e..8ec59455 100644
--- a/internal/equipo/preview_wrapper_test.go
+++ b/internal/equipo/preview_wrapper_test.go
@@ -1,8 +1,10 @@
package equipo
import (
+ "amadan.net/oficina/equipo/internal/wire"
"strings"
"testing"
+ "time"
)
func TestPreviewWrapperPinsOriginAndSandbox(t *testing.T) {
@@ -22,3 +24,34 @@ func TestPreviewWrapperPinsOriginAndSandbox(t *testing.T) {
}
}
}
+
+func TestPreviewLabelsAndRepublish(t *testing.T) {
+ task := wire.Task{ID: "tk1", Stage: wire.StageInReview, Steps: []wire.Step{{Specialist: wire.SpecialistPreview, State: wire.StepDone, Preview: &wire.PreviewResult{Outcome: wire.PreviewDeployed, URL: "https://eq-tk1.dev.example/", App: "eq-tk1"}}}}
+ target, label := previewCard(task, time.Now())
+ if target != "/tasks/tk1/preview" || strings.Contains(label, "https://") || !strings.Contains(label, "eq-tk1.dev.example") {
+ t.Fatalf("preview link %q %q", target, label)
+ }
+ items := timelineOf(task, taskLine{})
+ found := false
+ for _, it := range items {
+ if strings.Contains(it.Markdown, "/tasks/tk1/preview") {
+ found = true
+ if strings.Contains(it.Markdown, "https://") {
+ t.Fatal(it.Markdown)
+ }
+ }
+ }
+ if !found {
+ t.Fatal("preview timeline link missing")
+ }
+ task.Steps[0].State, task.Steps[0].Reason = wire.StepRunning, "preview_header_missing"
+ if target, _ := previewCard(task, time.Now()); target != "" {
+ t.Fatalf("republishing still offers confirmation: %s", target)
+ }
+}
+
+func TestBaseFailureHeadline(t *testing.T) {
+ if got := checksHeadline(wire.ChecksFailed, "base_checks_failed"); got != "The base version's checks failed." {
+ t.Fatal(got)
+ }
+}
diff --git a/internal/equipo/work_views.go b/internal/equipo/work_views.go
index 2e3568d6..efe52752 100644
--- a/internal/equipo/work_views.go
+++ b/internal/equipo/work_views.go
@@ -712,6 +712,9 @@ func decisionOf(t wire.Task, v taskLine) *decisionView {
d.Ask = copyText("work.decide.retry_ask")
case wire.NeedsFixRounds:
d.Tone, d.Why, d.Ask, d.Talk, d.Cancel, d.Round = "attention", copyText("work.decide.fix_rounds_why"), copyText("work.decide.talk_ask"), true, v.Cancel, v.Mine
+ if t.ChecksReason == "base_checks_failed" {
+ d.Why = sentenceCase(copyText("chat.merge.not.base_failed")) + "."
+ }
if v.CopyRepeat != nil {
d.Why = copyText("copy.repeated")
}
@@ -974,6 +977,9 @@ func clipWords(s string, n int) string {
// checksHeadline is a checks result as a person reads it.
func checksHeadline(outcome, reason string) string {
+ if reason == "base_checks_failed" {
+ return sentenceCase(copyText("chat.merge.not.base_failed")) + "."
+ }
switch outcome {
case wire.ChecksPassed:
return copyText("work.headline.checks_passed")
@@ -1123,7 +1129,7 @@ func timelineOf(t wire.Task, v taskLine) []timelineItem {
out = append(out, previewBuiltItem(*s.Preview))
it := timelineItem{Kind: "step", What: copyText("work.tl.preview_unconfirmed"), Took: took(s), At: s.FinishedAt, Text: []string{on(s.CandidateSHA)}}
if s.Preview.Outcome == wire.PreviewDeployed && s.Preview.URL != "" {
- it.What, it.Markdown = copyText("work.tl.preview_ready"), "["+s.Preview.URL+"](/tasks/"+t.ID+"/preview)"
+ it.What, it.Markdown = copyText("work.tl.preview_ready"), "["+previewHostLabel(s.Preview.URL)+"](/tasks/"+t.ID+"/preview)"
}
out = append(out, it)
case wire.SpecialistReview:
@@ -1443,6 +1449,9 @@ func byteSize(n int64) string {
func previewCard(t wire.Task, now time.Time) (url, line string) {
for i := len(t.Steps) - 1; i >= 0; i-- {
s := t.Steps[i]
+ if s.Specialist == wire.SpecialistPreview && !wire.StepTerminal(s.State) {
+ return "", ""
+ }
if s.Specialist == wire.SpecialistPreview && s.Preview != nil && (s.Reason == "preview_headers" || s.Reason == "preview_header_missing") {
return "/tasks/" + t.ID + "/preview", copyText("preview.unsafe_question")
}
@@ -1456,10 +1465,10 @@ func previewCard(t wire.Task, now time.Time) (url, line string) {
if wire.FinalStage(t.Stage) {
return "", ""
}
- return "/tasks/" + t.ID + "/preview", fmt.Sprintf(copyText("work.card.preview_tailnet"), p.URL)
+ return "/tasks/" + t.ID + "/preview", fmt.Sprintf(copyText("work.card.preview_tailnet"), previewHostLabel(p.URL))
}
if p.ExpiresAt == nil {
- return "/tasks/" + t.ID + "/preview", fmt.Sprintf(copyText("work.card.preview_open"), p.URL)
+ return "/tasks/" + t.ID + "/preview", fmt.Sprintf(copyText("work.card.preview_open"), previewHostLabel(p.URL))
}
left := p.ExpiresAt.Sub(now)
if left <= 0 {
@@ -1475,7 +1484,15 @@ func previewCard(t wire.Task, now time.Time) (url, line string) {
in = fmt.Sprintf(copyText("work.preview.in_days"), days)
}
}
- return "/tasks/" + t.ID + "/preview", fmt.Sprintf(copyText("work.card.preview"), p.URL, in)
+ return "/tasks/" + t.ID + "/preview", fmt.Sprintf(copyText("work.card.preview"), previewHostLabel(p.URL), in)
}
return "", ""
}
+
+func previewHostLabel(raw string) string {
+ u, err := url.Parse(raw)
+ if err != nil {
+ return ""
+ }
+ return u.Host
+}
diff --git a/internal/plan3test/plan3_release_test.go b/internal/plan3test/plan3_release_test.go
index ce9c166a..536326e7 100644
--- a/internal/plan3test/plan3_release_test.go
+++ b/internal/plan3test/plan3_release_test.go
@@ -185,7 +185,7 @@ func plan3CopyInventory(t *testing.T) {
acceptedPlacementEdges := slices.Contains([]string{"placement.late_push", "placement.late_report"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-17)")
acceptedReportActions := slices.Contains([]string{"roster.talk", "roster.round_busy", "roster.round_done", "roster.merge_busy", "roster.merge_done"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-15)")
// Luna's delegated pass on the boot refusal for CARLOS mail submission.
- acceptedInjection := slices.Contains([]string{"autonomy.title", "autonomy.lede", "autonomy.auto_merge_ci", "autonomy.auto_merge_ci_help", "autonomy.public_previews", "autonomy.public_previews_help", "autonomy.empty", "chat.merge.not.base_checks", "chat.merge.not.gates", "chat.merge.not.review_truncated", "work.reason.base_gate_unavailable", "work.reason.preview_secrets", "work.reason.preview_scanner", "work.reason.preview_public_disabled", "work.reason.preview_host", "work.reason.preview_headers", "autonomy.auto_merge_sensitive", "autonomy.auto_merge_sensitive_help", "work.reason.preview_header_missing", "preview.unsafe_question", "preview.unsafe_help", "preview.unsafe_open", "preview.wrapper_title"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)")
+ acceptedInjection := slices.Contains([]string{"autonomy.title", "autonomy.lede", "autonomy.auto_merge_ci", "autonomy.auto_merge_ci_help", "autonomy.public_previews", "autonomy.public_previews_help", "autonomy.empty", "chat.merge.not.base_failed", "chat.merge.not.base_checks", "chat.merge.not.gates", "chat.merge.not.review_truncated", "work.reason.base_gate_unavailable", "work.reason.preview_secrets", "work.reason.preview_scanner", "work.reason.preview_public_disabled", "work.reason.preview_host", "work.reason.preview_headers", "autonomy.auto_merge_sensitive", "autonomy.auto_merge_sensitive_help", "work.reason.preview_header_missing", "preview.unsafe_question", "preview.unsafe_help", "preview.unsafe_open", "preview.wrapper_title"}, key) && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Astra, 2026-11-19)")
acceptedMail := key == "copyMissingSMTP" && strings.HasSuffix(strings.TrimSuffix(cells[3], " |"), "COPY ACCEPTED BY DELEGATION (Luna, 2026-11-17)")
acceptedCopy := strings.TrimSuffix(cells[3], " |") == "COPY ACCEPTED BY DELEGATION (Copy, record-bound) sha256:"+copydesk.Hash(rows[key])
if !acceptedInjection && !acceptedMail && !acceptedAccess && !acceptedPlacementEdges && !acceptedPlacement && !acceptedReportActions && !acceptedRoster && !acceptedCopy && !strings.Contains(cells[3], "COPY REVIEW REQUIRED") && !acceptedAll && !acceptedGuide && !acceptedRound2 && !acceptedStarter && !acceptedDelegation && !approvedPublish && !approvedAssistant && !approvedJobs && !approvedOficina {
diff --git a/internal/runner/thin/check_diagnostics_test.go b/internal/runner/thin/check_diagnostics_test.go
index 67cbfaaf..7d3df42e 100644
--- a/internal/runner/thin/check_diagnostics_test.go
+++ b/internal/runner/thin/check_diagnostics_test.go
@@ -2,6 +2,7 @@ package thin
import (
"context"
+ "encoding/json"
"os"
"path/filepath"
"strings"
@@ -60,7 +61,7 @@ func TestCandidateGateDiagnostics(t *testing.T) {
}
rep := e.Exec(context.Background(), r, func(wire.StepReport) {})
want := wire.ChecksPassed
- if !tc.candidatePass {
+ if !tc.candidatePass || manifest && !tc.basePass {
want = wire.ChecksFailed
}
wantBase := ""
@@ -70,6 +71,21 @@ func TestCandidateGateDiagnostics(t *testing.T) {
if rep.Checks != want || rep.BaseChecksSHA != wantBase {
t.Fatalf("diagnostic failed or certified itself: %+v", rep)
}
+ raw, _ := json.Marshal(rep)
+ var fields map[string]any
+ _ = json.Unmarshal(raw, &fields)
+ if manifest {
+ baseOutcome := wire.ChecksFailed
+ if tc.basePass {
+ baseOutcome = wire.ChecksPassed
+ }
+ if fields["base_checks"] != baseOutcome {
+ t.Fatalf("base result lost: %s", raw)
+ }
+ if !tc.basePass && rep.Reason != "base_checks_failed" {
+ t.Fatalf("base failure not identified: %+v", rep)
+ }
+ }
exit := "2"
if tc.basePass {
exit = "0"
diff --git a/internal/runner/thin/judge.go b/internal/runner/thin/judge.go
index d14b47d2..7955ef05 100644
--- a/internal/runner/thin/judge.go
+++ b/internal/runner/thin/judge.go
@@ -311,6 +311,16 @@ func (e *Engineer) checks(ctx context.Context, r stepRow, progress func(wire.Ste
return rep
}
res := e.runGate(ctx, r, tree.Dir, g)
+ baseResult, baseGate := res, g
+ if certified {
+ rep.BaseChecks = wire.ChecksCannotRun
+ if res.terminated && res.reason == "" && (res.code == 0 || !offline.MatchString(res.output)) {
+ rep.BaseChecks = wire.ChecksFailed
+ if res.code == 0 {
+ rep.BaseChecks = wire.ChecksPassed
+ }
+ }
+ }
gateOutput := res.output
if certified && res.terminated && res.reason == "" && res.code == 0 {
rep.BaseChecksSHA = r.BaseSHA
@@ -338,6 +348,10 @@ func (e *Engineer) checks(ctx context.Context, r stepRow, progress func(wire.Ste
}
}
rep.Gate, rep.Output, rep.LogTail = g.name, res.output, lastLines(res.output, stepTailLines, wire.MaxLogTail)
+ // Diagnostics keep their output, but cannot replace a trusted gate failure.
+ if certified && rep.BaseChecks != wire.ChecksPassed && res.terminated {
+ res, gateOutput, rep.Gate = baseResult, baseResult.output, baseGate.name
+ }
if !res.terminated {
rep.State, rep.Reason, rep.Termination = wire.StepFailed, firstNonEmpty(res.reason, "provider_failed"), false
return rep
@@ -363,6 +377,9 @@ func (e *Engineer) checks(ctx context.Context, r stepRow, progress func(wire.Ste
if code == 0 {
return done(wire.ChecksPassed, "")
}
+ if rep.BaseChecks == wire.ChecksFailed {
+ return done(wire.ChecksFailed, "base_checks_failed")
+ }
return done(wire.ChecksFailed, "")
}
diff --git a/internal/runner/thin/preview.go b/internal/runner/thin/preview.go
index 80326df1..bedcbd05 100644
--- a/internal/runner/thin/preview.go
+++ b/internal/runner/thin/preview.go
@@ -238,8 +238,8 @@ type previewExport struct {
// path clean, within the caps, which are checked against the listing
// before any read and again while copying. The digest is SHA-256 over the
// sorted "<path> <sha256>" lines.
-func exportPreview(ctx context.Context, git, gitDir, sha, output, stage string) (previewExport, error) {
- return exportStatic(ctx, git, gitDir, sha, output, stage, previewHeaders)
+func exportPreview(ctx context.Context, git, gitDir, sha, output, stage, origin string) (previewExport, error) {
+ return exportStatic(ctx, git, gitDir, sha, output, stage, previewHeaders(origin))
}
func exportStatic(ctx context.Context, git, gitDir, sha, output, stage, headers string) (previewExport, error) {
@@ -481,7 +481,7 @@ func (e *Engineer) preview(ctx context.Context, r stepRow, progress func(wire.St
if err != nil || json.Unmarshal(raw, &mark) != nil {
return e.previewDone(rep, r, previewExport{}, nil, false)
}
- if mark.Security != previewSecurityStamp() {
+ if mark.Security != previewSecurityStamp(e.O.Runner.Origin) {
return e.previewDone(rep, r, previewExport{Digest: mark.Digest}, nil, false)
}
// Even when the step was cancelled meanwhile: the marker says what
@@ -503,7 +503,7 @@ func (e *Engineer) preview(ctx context.Context, r stepRow, progress func(wire.St
if err != nil {
return failed("preview_config")
}
- ex, err := exportPreview(ctx, tree.Git, tree.GitDir, r.CandidateSHA, cfg.Output, stage)
+ ex, err := exportPreview(ctx, tree.Git, tree.GitDir, r.CandidateSHA, cfg.Output, stage, e.O.Runner.Origin)
switch {
case errors.Is(err, errPreviewTooLarge):
return failed("preview_too_large")
@@ -521,7 +521,7 @@ func (e *Engineer) preview(ctx context.Context, r stepRow, progress func(wire.St
return failed("preview_failed")
}
}
- mark := previewMark{Security: previewSecurityStamp(), Task: r.TaskID, Candidate: r.CandidateSHA, Step: r.StepID, Attempt: r.Attempt, Digest: ex.Digest}
+ mark := previewMark{Security: previewSecurityStamp(e.O.Runner.Origin), Task: r.TaskID, Candidate: r.CandidateSHA, Step: r.StepID, Attempt: r.Attempt, Digest: ex.Digest}
raw, _ := json.Marshal(mark)
if err := os.WriteFile(filepath.Join(stage, previewMarker), raw, 0o600); err != nil {
return failed("preview_failed")
@@ -579,7 +579,7 @@ func (e *Engineer) preview(ctx context.Context, r stepRow, progress func(wire.St
if err := os.MkdirAll(hold, 0o700); err != nil {
return failed("preview_failed")
}
- if err := os.WriteFile(filepath.Join(hold, "_headers"), []byte(previewHeaders), 0o600); err != nil {
+ if err := os.WriteFile(filepath.Join(hold, "_headers"), []byte(previewHeaders(e.O.Runner.Origin)), 0o600); err != nil {
return failed("preview_failed")
}
if r.PreviewUnsafeDigest != "" {
@@ -681,7 +681,7 @@ func (e *Engineer) markerStatus(ctx context.Context, host previewHost, app, mark
res.Body.Close()
var got previewMark
if res.StatusCode == http.StatusOK && json.Unmarshal(raw, &got) == nil && got == want {
- if marker == previewMarker && !unsafe && (len(res.Header.Values("Content-Security-Policy")) != 1 || res.Header.Get("Content-Security-Policy") != previewCSP()) {
+ if marker == previewMarker && !unsafe && (len(res.Header.Values("Content-Security-Policy")) != 1 || res.Header.Get("Content-Security-Policy") != previewCSP(e.O.Runner.Origin)) {
return false, "preview_header_missing"
}
return true, ""
diff --git a/internal/runner/thin/preview_devbox_test.go b/internal/runner/thin/preview_devbox_test.go
index 5dec73b8..4660d1a5 100644
--- a/internal/runner/thin/preview_devbox_test.go
+++ b/internal/runner/thin/preview_devbox_test.go
@@ -66,7 +66,7 @@ func devboxRig(t *testing.T) (*Engineer, *fakeDevbox, *[]string, stepRow) {
http.NotFound(w, req)
return
}
- w.Header().Set("Content-Security-Policy", previewCSP())
+ w.Header().Set("Content-Security-Policy", previewCSP("https://equipo.example"))
http.ServeFile(w, req, filepath.Join(fd.served, previewMarker))
}))
t.Cleanup(origin.Close)
@@ -98,7 +98,7 @@ func TestDevboxPreviewShares(t *testing.T) {
if rep.State != wire.StepDone || rep.Preview == nil || rep.Preview.Outcome != wire.PreviewDeployed || rep.Preview.App != "eq-tk1" || rep.Preview.URL != "https://eq-tk1.devbox.dev.example/" || rep.Preview.ExpiresAt != nil {
t.Fatalf("report %+v %+v", rep, rep.Preview)
}
- if fd.headers != previewHeaders || !strings.Contains(fd.headers, "default-src 'none'") {
+ if fd.headers != previewHeaders(e.O.Runner.Origin) || !strings.Contains(fd.headers, "default-src 'none'") {
t.Fatalf("private headers: %q", fd.headers)
}
stage := filepath.Join(e.root(), stepKey(r), "preview")
diff --git a/internal/runner/thin/preview_security.go b/internal/runner/thin/preview_security.go
index 1c17041b..a58d2f32 100644
--- a/internal/runner/thin/preview_security.go
+++ b/internal/runner/thin/preview_security.go
@@ -8,6 +8,7 @@ import (
"encoding/hex"
"encoding/json"
"fmt"
+ "net/url"
"os"
"os/exec"
"path/filepath"
@@ -17,10 +18,19 @@ import (
"time"
)
-const previewHeaders = "/*\n Content-Security-Policy: default-src 'none'; connect-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; media-src 'self'; form-action 'none'; frame-src 'none'; base-uri 'none'; object-src 'none'\n X-Content-Type-Options: nosniff\n Referrer-Policy: no-referrer\n X-DNS-Prefetch-Control: off\n"
+const previewHeadersTemplate = "/*\n Content-Security-Policy: default-src 'none'; connect-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; media-src 'self'; form-action 'none'; frame-src 'none'; base-uri 'none'; object-src 'none'; frame-ancestors %s\n X-Content-Type-Options: nosniff\n Referrer-Policy: no-referrer\n X-DNS-Prefetch-Control: off\n"
-func previewCSP() string {
- _, value, _ := strings.Cut(strings.Split(previewHeaders, "\n")[1], ": ")
+func previewHeaders(origin string) string {
+ ancestor := "'none'"
+ u, err := url.Parse(origin)
+ if err == nil && u.Host != "" && u.User == nil && u.Path == "" && u.RawQuery == "" && !u.ForceQuery && u.Fragment == "" && !strings.ContainsAny(u.Host, "* ;\r\n\t'\"\\") && (u.Scheme == "https" || u.Scheme == "http" && u.Hostname() == "127.0.0.1") {
+ ancestor = u.Scheme + "://" + u.Host
+ }
+ return fmt.Sprintf(previewHeadersTemplate, ancestor)
+}
+
+func previewCSP(origin string) string {
+ _, value, _ := strings.Cut(strings.Split(previewHeaders(origin), "\n")[1], ": ")
return value
}
@@ -98,7 +108,7 @@ func previewPublishFailure(out string) string {
return "preview_failed"
}
-func previewSecurityStamp() string {
- sum := sha256.Sum256([]byte("preview/v1\n" + previewHeaders + previewScanner))
+func previewSecurityStamp(origin string) string {
+ sum := sha256.Sum256([]byte("preview/v1\n" + previewHeaders(origin) + previewScanner))
return hex.EncodeToString(sum[:])
}
diff --git a/internal/runner/thin/preview_security_test.go b/internal/runner/thin/preview_security_test.go
index 3dccca71..3322cb78 100644
--- a/internal/runner/thin/preview_security_test.go
+++ b/internal/runner/thin/preview_security_test.go
@@ -27,7 +27,7 @@ func TestPreviewFixedHeaders(t *testing.T) {
if err != nil {
t.Fatal(err)
}
- for _, want := range []string{"default-src 'none'", "connect-src 'self'", "script-src 'self'", "img-src 'self' data:", "form-action 'none'", "frame-src 'none'", "base-uri 'none'", "object-src 'none'", "X-DNS-Prefetch-Control: off"} {
+ for _, want := range []string{"frame-ancestors https://equipo.example", "default-src 'none'", "connect-src 'self'", "script-src 'self'", "img-src 'self' data:", "form-action 'none'", "frame-src 'none'", "base-uri 'none'", "object-src 'none'", "X-DNS-Prefetch-Control: off"} {
if !strings.Contains(string(raw), want) {
t.Fatalf("missing %q: %s", want, raw)
}
@@ -231,3 +231,28 @@ func TestPreviewUnsafeTapStillScansAndBindsExport(t *testing.T) {
t.Fatal("tap skipped scan", rep)
}
}
+
+func TestPreviewAncestorOrigin(t *testing.T) {
+ for _, origin := range []string{"https://equipo.example", "https://other.example:8443", "http://127.0.0.1:4321"} {
+ if !strings.Contains(previewHeaders(origin), "frame-ancestors "+origin+"\n") {
+ t.Fatalf("origin missing: %s", previewHeaders(origin))
+ }
+ }
+ for _, bad := range []string{"", "https://*.example", "https://eq.example/; default-src *", "https://user@eq.example", "https://eq.example?extra=1"} {
+ if !strings.Contains(previewHeaders(bad), "frame-ancestors 'none'\n") {
+ t.Fatalf("unsafe ancestor: %s", previewHeaders(bad))
+ }
+ }
+ if previewSecurityStamp("https://one.example") == previewSecurityStamp("https://two.example") {
+ t.Fatal("restart certificate did not bind Equipo origin")
+ }
+}
+
+func TestPreviewRejectsDifferentAncestor(t *testing.T) {
+ e, _, _, r := previewRig(t, mockups, nil)
+ e.Preview.Client = &http.Client{Transport: headerTransport{base: http.DefaultTransport, policy: previewCSP("https://another-equipo.example")}}
+ rep := e.Exec(context.Background(), r, func(wire.StepReport) {})
+ if rep.Preview == nil || rep.Preview.Outcome != wire.PreviewUnconfirmed || rep.Reason != "preview_header_missing" {
+ t.Fatalf("different ancestor accepted: %+v", rep)
+ }
+}
diff --git a/internal/runner/thin/preview_test.go b/internal/runner/thin/preview_test.go
index 05319de2..9b0c9467 100644
--- a/internal/runner/thin/preview_test.go
+++ b/internal/runner/thin/preview_test.go
@@ -114,7 +114,7 @@ func previewRig(t *testing.T, files map[string]string, links map[string]string)
http.NotFound(w, r)
return
}
- w.Header().Set("Content-Security-Policy", previewCSP())
+ w.Header().Set("Content-Security-Policy", previewCSP("https://equipo.example"))
http.ServeFile(w, r, filepath.Join(fc.served, previewMarker))
}))
t.Cleanup(origin.Close)
@@ -126,6 +126,7 @@ func previewRig(t *testing.T, files map[string]string, links map[string]string)
return nil
}}
e.O.Runner.GitPath, e.O.Runner.WorkspaceRoot, e.O.Runner.StateDir, e.O.State = "/usr/bin/git", filepath.Join(root, "work"), filepath.Join(root, "state"), s
+ e.O.Runner.Origin = "https://equipo.example"
e.O.Runner.Executable = previewScannerFixture(t)
r := stepRow{DispatchCommand: wire.DispatchCommand{Person: "p@x", TaskID: "tk1", StepID: "s_pv1", Attempt: 1, Specialist: wire.SpecialistPreview, Repo: "amadan.net/paulca/threatmin", Branch: "equipo/tk1-barber-mockups", Title: "Barber mockups", BaseSHA: base, CandidateSHA: cand}}
if err := s.AcceptDispatch(context.Background(), "d1", r.DispatchCommand); err != nil {
diff --git a/internal/thintest/review_contract_test.go b/internal/thintest/review_contract_test.go
index 964ed1fc..20426f36 100644
--- a/internal/thintest/review_contract_test.go
+++ b/internal/thintest/review_contract_test.go
@@ -1,6 +1,7 @@
package thintest
import (
+ "encoding/json"
"fmt"
"slices"
"strings"
@@ -446,3 +447,27 @@ func TestContractFixRoundFeedbackByProtocol(t *testing.T) {
})
}
}
+
+func TestContractBaseFailureStartsFixRound(t *testing.T) {
+ r := newToolRigAt(t, wire.ProtocolInjectionDefences)
+ base, cand := strings.Repeat("a", 40), strings.Repeat("b", 40)
+ id, _ := r.pushed("base-failure", "Update budgets", base, cand)
+ d := r.dispatched(wire.SpecialistChecks, base, cand, 0)
+ report := wire.StepReport{TaskID: id, StepID: d.StepID, Attempt: 1, State: wire.StepDone, BaseSHA: base, CandidateSHA: cand, Termination: true, Checks: wire.ChecksPassed, Gate: "make ci", ExitCode: exit(0), Output: "Candidate gate diagnostic: pass. Base gate: failed."}
+ // Simulate a contradictory report: candidate success cannot mask the base result.
+ if err := json.Unmarshal([]byte(`{"base_checks":"failed"}`), &report); err != nil {
+ t.Fatal(err)
+ }
+ r.step("base-result", report)
+ fix := r.dispatched(wire.SpecialistEngineering, cand, "", 1)
+ if !strings.Contains(fix.Feedback, "Base gate: failed") {
+ t.Fatalf("base diagnostic absent: %s", fix.Feedback)
+ }
+ var outcome, reason, baseOutcome string
+ if err := r.inst.DB.Writer().QueryRow("SELECT checks,reason,base_checks FROM chat_steps WHERE id=?", d.StepID).Scan(&outcome, &reason, &baseOutcome); err != nil {
+ t.Fatal(err)
+ }
+ if outcome != wire.ChecksFailed || baseOutcome != wire.ChecksFailed || reason != "base_checks_failed" {
+ t.Fatalf("lost base failure: %s %s %s", outcome, reason, baseOutcome)
+ }
+}
diff --git a/internal/wire/injection_test.go b/internal/wire/injection_test.go
index dd9f9b2a..ef9cb0e6 100644
--- a/internal/wire/injection_test.go
+++ b/internal/wire/injection_test.go
@@ -15,7 +15,7 @@ func TestInjectionProtocolDowngrade(t *testing.T) {
body any
keys []string
}{
- {wire.FrameStep, wire.StepReport{BaseChecksSHA: strings.Repeat("a", 40), Change: &wire.ChangeFacts{GateFilesChanged: true, ReviewTruncated: true}}, []string{"base_checks_sha", "gate_files_changed", "review_truncated"}},
+ {wire.FrameStep, wire.StepReport{BaseChecks: wire.ChecksFailed, BaseChecksSHA: strings.Repeat("a", 40), Change: &wire.ChangeFacts{GateFilesChanged: true, ReviewTruncated: true}}, []string{"base_checks", "base_checks_sha", "gate_files_changed", "review_truncated"}},
{wire.FrameDispatch, wire.DispatchCommand{PersonWords: []string{"Don't publish"}}, []string{"person_words"}},
} {
f, err := wire.NewFrame("test", tc.kind, tc.body)
diff --git a/internal/wire/runners.go b/internal/wire/runners.go
index 0d47dfb5..501afdf2 100644
--- a/internal/wire/runners.go
+++ b/internal/wire/runners.go
@@ -626,6 +626,14 @@ func Encode(f Frame, protocol int) (Frame, error) {
changed = true
}
if r, ok := body.(*StepReport); ok {
+ if r.BaseChecks != "" {
+ r.BaseChecks = ""
+ changed = true
+ }
+ if r.Reason == "base_checks_failed" {
+ r.Reason = ""
+ changed = true
+ }
if r.BaseChecksSHA != "" {
r.BaseChecksSHA = ""
changed = true
diff --git a/internal/wire/tasks.go b/internal/wire/tasks.go
index 3ce07646..186cd024 100644
--- a/internal/wire/tasks.go
+++ b/internal/wire/tasks.go
@@ -224,6 +224,7 @@ type ThreadEntry struct {
// forge confirmed the branch points at it. Terminated is the runner's
// proof that the attempt's namespace has exited.
type Step struct {
+ BaseChecks string `json:"base_checks,omitempty"`
ID string `json:"id"`
Revision int64 `json:"revision"`
TaskID string `json:"task_id"`
@@ -769,6 +770,7 @@ type CancelStepCommand struct {
// its candidate), done (pushed), failed or cancelled. Termination is true
// once the attempt's namespace exit was observed. Reason is a fixed code.
type StepReport struct {
+ BaseChecks string `json:"base_checks,omitempty"`
BaseChecksSHA string `json:"base_checks_sha,omitempty"`
Failure *copydesk.Signature `json:"failure,omitempty"`
Copy *CopyResult `json:"copy,omitempty"`
@@ -1003,6 +1005,7 @@ var StepReasons = map[string]bool{
"checks_timeout": true,
"checks_unavailable": true,
"base_gate_unavailable": true,
+ "base_checks_failed": true,
"preview_secrets": true,
"preview_headers": true,
"preview_header_missing": true,