oficina / equipo Public

Merge branch 'native/markdown-streaming' into main

claude agent, operated by paul@keymail.dev 198ce406181884f7f7b78d34fe020983a5f66b76 parent 3589c22parent c1d2c02
18 files changed, +897 −108
  • internal/chatmarkdown/native_test.go +7 −1
  • native/MARKDOWN-STREAMING-REPORT.md +116 −0
  • native/apple/Package.swift +1 −1
  • native/apple/Sources/EquipoKit/Markdown/ChatMarkdown.swift +17 −3
  • native/apple/Sources/EquipoKit/Markdown/ChatMarkdownView.swift +12 −11
  • native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift +62 −0
  • native/apple/Sources/EquipoKit/Markdown/MarkdownTranscript.swift +30 −0
  • native/apple/Sources/EquipoKit/Presentation/Roster.swift +1 −1
  • native/apple/Sources/EquipoKit/Session/EquipoSession.swift +3 −0
  • native/apple/Sources/EquipoKit/UI/RosterViews.swift +4 −2
  • native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift +1 −1
  • native/apple/Sources/EquipoMac/LiveTranscript.swift +121 −55
  • native/apple/Tests/EquipoKitTests/ChatMarkdownTests.swift +6 −1
  • native/apple/Tests/EquipoKitTests/Fixtures/markdown/golden.json +77 −1
  • native/apple/Tests/EquipoKitTests/MacTranscriptTests.swift +123 −0
  • native/apple/Tests/EquipoKitTests/MarkdownLayoutTests.swift +56 −3
  • native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift +148 −0
  • scripts/runner-reference-allowlist.json +112 −28

CI passed — run details

CI log
=== prepare ===
ci-box: machine: aarch64, 32 CPUs, 62 GiB memory, kernel 7.0.0-1017-aws
ci-box: python 3.12.3; Docker version 29.1.3, build 29.1.3-0ubuntu3~24.04.2
ci-box: user namespaces allowed: 233151
ci-box: cgroup: cgroup2fs
ci-box: disk /home/ci/work/repos/oficina__equipo/wt/main: Type  Size Avail | ext4   96G   85G
ci-box: disk /home/ci/.cache/equipo-ci-box: Type  Size Avail | ext4   96G   85G
ci-box: bwrap: fetched and verified in 0.3s
ci-box: claude: fetched and verified in 1.8s
ci-box: codex: fetched and verified in 3.5s
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.8s
ci-box: pi: installed and verified in 7.4s
ci-box: opencode: installed and verified in 2.4s
ci-box: chromium 156.0.8078.79-1~deb13u1: 76 packages fetched, verified and unpacked in 8.6s
ci-box: clone deepened in 3.9s
ci-box: file times set from content: 2911 files, 190 directories
ci-box: ready in 17.6s
=== 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.143s
=== compile ===
go build ./...
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py compile
+ go build -tags testbuild ./...
  1.2s
+ go list -export -test -tags testbuild -f  ./...
  0.7s
+ go list -export -test -tags browser,testbuild -f  ./internal/equipo ./internal/headless ./internal/idtest ./internal/plan3test ./internal/thintest
  0.3s
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -version
staticcheck 2026.1 (v0.7.0)
go run golang.org/x/vuln/cmd/govulncheck@v1.8.0 -version
Go: go1.26.11
Scanner: govulncheck@v1.8.0
DB: https://vuln.go.dev
DB updated: 2026-11-11 02:51:11 +0000 UTC

go run github.com/zricethezav/gitleaks/v8@v8.30.1 version
version is set by build process
=== check ===
--- shard 0 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-work: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m6.497s 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 1m4.964s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m4.96s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 38.13, cpu waiting 23.28%, memory waiting 0.00%, io waiting 1.35%
--- shard 1 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-review: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m5.443s 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 1m3.832s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m3.83s amadan.net/oficina/equipo/internal/headless TestHeadless
machine: 32 CPUs, load 38.13, cpu waiting 23.66%, memory waiting 0.00%, io waiting 1.40%
--- shard 2 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-connections: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m6.019s 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 1m4.086s amadan.net/oficina/equipo/internal/headless
receipt: slow test 56.25s amadan.net/oficina/equipo/internal/headless TestHeadlessConnections
receipt: slow test 4.18s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenPasteEndToEnd
receipt: slow test 3.66s amadan.net/oficina/equipo/internal/headless TestHeadlessTokenConnection
machine: 32 CPUs, load 38.13, cpu waiting 23.66%, memory waiting 0.00%, io waiting 1.40%
--- shard 3 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-mac: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m5.125s 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 1m3.521s amadan.net/oficina/equipo/internal/headless
receipt: slow test 30.28s amadan.net/oficina/equipo/internal/headless TestMacWorker
receipt: slow test 16.42s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.63s amadan.net/oficina/equipo/internal/headless TestHeadlessPrewarm
receipt: slow test 8.18s amadan.net/oficina/equipo/internal/headless TestHeadlessAttachments
machine: 32 CPUs, load 38.13, cpu waiting 23.66%, memory waiting 0.00%, io waiting 1.40%
--- shard 4 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-guards: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m16.217s 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 1m14.594s amadan.net/oficina/equipo/internal/headless
receipt: slow test 47.33s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.73s amadan.net/oficina/equipo/internal/headless TestHeadlessRunnerKillLeavesNoCopies
receipt: slow test 7.57s amadan.net/oficina/equipo/internal/headless TestHeadlessCopyRotation
receipt: slow test 6.63s amadan.net/oficina/equipo/internal/headless TestHeadlessPolicyGuards
receipt: slow test 4.33s amadan.net/oficina/equipo/internal/headless TestHeadlessNewHouseRuleStartsFresh
machine: 32 CPUs, load 37.84, cpu waiting 22.50%, memory waiting 0.00%, io waiting 1.14%
--- shard 5 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane headless-rest: ./internal/headless
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestHeadless$/^4c_rebase$|^TestHeadless$/^4b_ask$|^TestHeadless$/^4c_checks_card$|^TestHeadless$/^4_step_crash$|^TestHeadless$/^4_review$|^TestHeadless$/^2b_access$|^TestHeadless$/^runner_crash$|^TestHeadless$/^2b_first_message$|^TestHeadless$/^4_checks_honest$|^TestHeadless$/^7_stream_resume$|^TestHeadless$/^2b_notebook$|^TestHeadless$/^2b_move_in$|^TestHeadless$/^2b_desk_failure$|^TestHeadless$/^cancel$|^TestHeadlessConnections$|^TestHeadlessTokenPasteEndToEnd$|^TestHeadlessTokenConnection$|^TestMacWorker$|^TestHeadlessAttachments$|^TestHeadlessPrewarm$|^TestHeadless$/^1_first_token$|^TestHeadless$/^6_quick_messages$|^TestHeadless$/^8_instance_restart$|^TestHeadless$/^3_runner_offline$|^TestHeadlessCopyRotation$|^TestHeadlessPolicyGuards$|^TestHeadlessRunnerKillLeavesNoCopies$|^TestHeadlessNewHouseRuleStartsFresh$|^TestHeadless$/^3_engineering$|^TestHeadless$/^3_step_cancel$|^TestHeadless$/^3_step_contained$|^TestHeadless$/^3_empty_repo$|^TestHeadless$/^3_empty_engineering$|^TestHeadless$/^3_empty_merge$|^TestHeadless$/^3_empty_merge_rebuilt$|^TestHeadless$/^3_empty_fix_round$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 2m32s 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 2m29.934s amadan.net/oficina/equipo/internal/headless
receipt: slow test 1m25.97s amadan.net/oficina/equipo/internal/headless TestHeadlessAssistant
receipt: slow test 17.9s amadan.net/oficina/equipo/internal/headless TestHeadless
receipt: slow test 8.45s amadan.net/oficina/equipo/internal/headless TestHeadlessResearchHandoff
receipt: slow test 6.5s amadan.net/oficina/equipo/internal/headless TestHeadlessTurnBatching
receipt: slow test 6.29s amadan.net/oficina/equipo/internal/headless TestHeadlessBatchAfterRefusedReply
machine: 32 CPUs, load 18.00, cpu waiting 7.06%, memory waiting 0.00%, io waiting 0.32%
--- 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 434ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2m4.941s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 8.17s amadan.net/oficina/equipo/internal/thintest TestContractTeamJobSettledStates
receipt: slow test 6.72s amadan.net/oficina/equipo/internal/thintest TestExplorePreviewsOff
receipt: slow test 4.54s amadan.net/oficina/equipo/internal/thintest TestContractTeamNudgePersonNeeds
receipt: slow test 3.68s amadan.net/oficina/equipo/internal/thintest TestContractPreviewHeldUntilPublishAnswer
receipt: slow test 2.47s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotHeldBelow19
machine: 32 CPUs, load 0.78, cpu waiting 0.78%, memory waiting 0.00%, io waiting 4.08%
--- shard 7 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane thintest-contract: ./internal/thintest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^Test([^C]|C[^o]|Co[^n]|Con[^t])|^TestContract(Assistant|Outcome|Team|Handoff|HostAllowlist|HostIsPerPerson|Look|Use[A-Z]|RemoteCall|LanesRunAtOnce|NoMergeQuestionWhenGateMerges|PreviewHeldUntilPublishAnswer|PreviewNotHeldBelow19|PublishNeedsOwnerAnswer)' ./internal/thintest

receipt: test step 383ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m27.163s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 9.24s amadan.net/oficina/equipo/internal/thintest TestContractPreviewNotScheduled
receipt: slow test 5.02s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotOffered
receipt: slow test 4.47s amadan.net/oficina/equipo/internal/thintest TestContractMacRecheckMergeAuthority
receipt: slow test 2.36s amadan.net/oficina/equipo/internal/thintest TestContractPreview
receipt: slow test 2.35s amadan.net/oficina/equipo/internal/thintest TestContractPublishNotNow
machine: 32 CPUs, load 0.78, cpu waiting 0.00%, memory waiting 0.00%, io waiting 4.08%
--- shard 8 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-thin: ./internal/runner/thin
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./internal/runner/thin
cache miss: amadan.net/oficina/equipo/internal/runner/thin: its inputs changed
budget note: internal/runner/thin took 4m32.476s, over the 45s its record on line 44 allows; reported only, timing fails on CI

receipt: test step 4m46.173s 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 4m32.476s amadan.net/oficina/equipo/internal/runner/thin
receipt: slow test 36.96s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeAnsweredByAnotherModel
receipt: slow test 36.83s amadan.net/oficina/equipo/internal/runner/thin TestModelsEngineeringProbesThenRunsTheStrongest
receipt: slow test 36.81s amadan.net/oficina/equipo/internal/runner/thin TestModelsUnhealthyRetriedOnDemand
receipt: slow test 18.46s amadan.net/oficina/equipo/internal/runner/thin TestModelsProbeRunsInsideTheAdmission
receipt: slow test 6.78s amadan.net/oficina/equipo/internal/runner/thin TestOpenCodeStepsRealOpenCode
machine: 32 CPUs, load 2.32, cpu waiting 0.72%, memory waiting 0.00%, io waiting 0.03%
--- shard 9 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-bug: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 48.202s 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 47.057s amadan.net/oficina/equipo/internal/runner
receipt: slow test 27.02s amadan.net/oficina/equipo/internal/runner TestDirectBugWorkflow
receipt: slow test 20.02s amadan.net/oficina/equipo/internal/runner TestEnrolKeepsTheRole
machine: 32 CPUs, load 37.97, cpu waiting 23.20%, memory waiting 0.00%, io waiting 1.89%
--- shard 10 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-plans: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 49.092s 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 47.244s amadan.net/oficina/equipo/internal/runner
receipt: slow test 37.28s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowCandidateOrder
receipt: slow test 33.42s amadan.net/oficina/equipo/internal/runner TestPlanWorkflowFeature
receipt: slow test 8.38s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryCallRefusalKeepsServing
receipt: slow test 1.57s amadan.net/oficina/equipo/internal/runner TestCoordinatorRefusalMatrix
machine: 32 CPUs, load 37.97, cpu waiting 23.52%, memory waiting 0.00%, io waiting 1.83%
--- shard 11 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
test lane runner-rest: ./internal/runner
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -skip '^TestDirectBugWorkflow$|^TestEnrolKeepsTheRole$|^TestPlanWorkflowCandidateOrder$|^TestPlanWorkflowFeature$|^TestCoordinatorRecoveryCallRefusalKeepsServing$|^TestCoordinatorRefusalMatrix$' ./internal/runner
cache miss: amadan.net/oficina/equipo/internal/runner: its inputs changed

receipt: test step 35.174s 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.287s amadan.net/oficina/equipo/internal/runner
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner TestDirectFaultIsolation
receipt: slow test 3.52s amadan.net/oficina/equipo/internal/runner TestClaimRefusalsBackOff
receipt: slow test 3.13s amadan.net/oficina/equipo/internal/runner TestCoordinatorRecoveryRefusedKeepsServing
receipt: slow test 2.08s amadan.net/oficina/equipo/internal/runner TestToolVerbUnderFakeHarness
receipt: slow test 1.62s amadan.net/oficina/equipo/internal/runner TestCoordinatorTransientRefusalKeepsServing
machine: 32 CPUs, load 29.89, cpu waiting 16.48%, memory waiting 0.00%, io waiting 2.31%
--- 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 30.3%, load 23.26
test lane equipotest-a: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^Test[A-D]|^TestQ' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

receipt: test step 1m6.412s 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 1m4.355s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 28.02s amadan.net/oficina/equipo/internal/equipotest TestAuthorityCoreIntegration
receipt: slow test 27.94s amadan.net/oficina/equipo/internal/equipotest TestBootstrapNamesOwnersSetting
receipt: slow test 25.99s amadan.net/oficina/equipo/internal/equipotest TestAccountLabelMigration
receipt: slow test 23.54s amadan.net/oficina/equipo/internal/equipotest TestBudgetConfigurationFailuresAreAtomic
receipt: slow test 23.26s amadan.net/oficina/equipo/internal/equipotest TestAccountConcurrentDuplicate
machine: 32 CPUs, load 34.69, cpu waiting 17.46%, memory waiting 0.00%, io waiting 0.84%
--- 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 30.3%, load 23.26
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 655ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m15.48s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 20.5s amadan.net/oficina/equipo/internal/equipotest TestProjectsFailuresRollBack
receipt: slow test 20.49s amadan.net/oficina/equipo/internal/equipotest TestProjectRejectsUnsafeBinding
receipt: slow test 20.45s amadan.net/oficina/equipo/internal/equipotest TestProjectRequestActorAndUpdate
receipt: slow test 20.44s amadan.net/oficina/equipo/internal/equipotest TestProjectBindingUniqueness
receipt: slow test 20.41s amadan.net/oficina/equipo/internal/equipotest TestProjectsAccountRevisionAndValidation
machine: 32 CPUs, load 23.26, cpu waiting 13.46%, memory waiting 0.00%, io waiting 2.47%
--- 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 30.3%, load 23.26
test lane equipotest-r: ./internal/equipotest
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m -run '^TestR' ./internal/equipotest
cache miss: amadan.net/oficina/equipo/internal/equipotest: its inputs changed

receipt: test step 1m16.451s 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 1m4.214s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 14.86s amadan.net/oficina/equipo/internal/equipotest TestReleaseStampContract
receipt: slow test 12.91s amadan.net/oficina/equipo/internal/equipotest TestRosterChangesAffectExistingSession
receipt: slow test 9.83s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalRollsBack
receipt: slow test 9.81s amadan.net/oficina/equipo/internal/equipotest TestRosterRemovalWhileAssigned
receipt: slow test 6.75s amadan.net/oficina/equipo/internal/equipotest TestRosterAuditFailureRollsBack
machine: 32 CPUs, load 30.63, cpu waiting 14.48%, memory waiting 0.00%, io waiting 0.69%
--- 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 30.3%, load 23.26
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 516ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 1m6.444s amadan.net/oficina/equipo/internal/equipotest
receipt: slow test 25.7s amadan.net/oficina/equipo/internal/equipotest TestSigninNoProof
receipt: slow test 24.54s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedExistingTeam
receipt: slow test 24.51s amadan.net/oficina/equipo/internal/equipotest TestSpecialistsSeedRollback
receipt: slow test 22.7s amadan.net/oficina/equipo/internal/equipotest TestSigninBackgroundSweep
receipt: slow test 22.64s amadan.net/oficina/equipo/internal/equipotest TestSpecialistSettingsRollbackAndUnavailable
machine: 32 CPUs, load 23.26, cpu waiting 13.46%, memory waiting 0.00%, io waiting 2.47%
--- 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 30.3%, load 23.26
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 671ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 51.286s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 3.63s amadan.net/oficina/equipo/internal/plan3test TestPlan3Upgrade
receipt: slow test 3.46s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3B
receipt: slow test 1.7s amadan.net/oficina/equipo/internal/plan3test TestConversationQuestionRace
receipt: slow test 1.42s amadan.net/oficina/equipo/internal/plan3test TestCoordinatorAcceptance3A
receipt: slow test 1.33s amadan.net/oficina/equipo/internal/plan3test TestInviteMigration
machine: 32 CPUs, load 23.26, cpu waiting 13.46%, memory waiting 0.00%, io waiting 2.47%
--- 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 30.3%, load 23.26
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/door ./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/push ./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/claude/realcli ./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/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags testbuild -timeout 15m ./cmd/equipo ./cmd/equipo-runner ./cmd/equipo-tool-proxy ./internal/advice ./internal/attach ./internal/attach/attachtest ./internal/chatmarkdown ./internal/chatsend ./internal/chatstream ./internal/coordinator ./internal/coordinatorcontract ./internal/coordinatormail ./internal/copydesk ./internal/equipo ./internal/equipo/activity ./internal/equipo/assist ./internal/equipo/chat ./internal/equipo/conversation ./internal/equipo/conversation/chatstate ./internal/equipo/door ./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/push ./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/claude/realcli ./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/stagingtest ./internal/taskplan ./internal/testci ./internal/toolproxy ./internal/websource ./internal/wire ./internal/wire/wireschema ./internal/wire/wiretest ./tools/drive
cache miss: amadan.net/oficina/equipo/internal/copydesk: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/idtest: its inputs changed
cache miss: amadan.net/oficina/equipo/cmd/equipo-runner: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/claude/realcli: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/opencode: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/webread: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runnerproto: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/forge: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/workspace: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/equipo/team: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/codex: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/checks: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/containment: its inputs changed
cache miss: amadan.net/oficina/equipo/internal/runner/provider/pi: its inputs changed
budget note: internal/equipo took 44.995s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/equipo/chat took 14.738s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/idtest took 1m40.542s, over the 10s the default allows; reported only, timing fails on CI
budget note: internal/release took 36.558s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI
budget note: internal/runner/containment took 38.762s, over the 15s its record on line 40 allows; reported only, timing fails on CI

receipt: test step 2m14.852s against a 60s target (the gate's other steps are not in this figure)
receipt: 16 packages ran, 47 cached, 18 without tests, 0 failed
receipt: slow package 1m40.542s amadan.net/oficina/equipo/internal/idtest
receipt: slow package 52.231s amadan.net/oficina/equipo/internal/runner/provider/opencode
receipt: slow package 51.722s amadan.net/oficina/equipo/internal/runner/provider/pi
receipt: slow package 44.995s amadan.net/oficina/equipo/internal/equipo
receipt: slow package 38.762s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 54.58s amadan.net/oficina/equipo/internal/idtest TestDoorRemembersOficinaID
receipt: slow test 45.99s amadan.net/oficina/equipo/internal/idtest TestDoorOficinaSettingsUnreadableIsNoLoop
receipt: slow test 45.89s amadan.net/oficina/equipo/internal/idtest TestDoorForgetsOficinaIDForARefusedSession
receipt: slow test 45.43s amadan.net/oficina/equipo/internal/idtest TestDoorNeverJudgesANativeSession
receipt: slow test 45.34s amadan.net/oficina/equipo/internal/idtest TestDoorStepUpIsLocal
machine: 32 CPUs, load 14.23, cpu waiting 5.59%, memory waiting 0.00%, io waiting 0.25%
--- shard 18 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-chat: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserChat$|^TestBrowserChatSendStaysOnPage$|^TestBrowserComposer$|^TestBrowserComposerReconcile$|^TestBrowserComposerFocus$|^TestBrowserComposerDock$|^TestBrowserDraftStreamsFormatted$|^TestBrowserDraftIsTheMessage$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m18.758s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 0 without tests, 0 failed
receipt: slow package 1m17.216s amadan.net/oficina/equipo/internal/headless
receipt: slow test 37.17s amadan.net/oficina/equipo/internal/headless TestBrowserDraftIsTheMessage
receipt: slow test 14.32s amadan.net/oficina/equipo/internal/headless TestBrowserDraftStreamsFormatted
receipt: slow test 8.76s amadan.net/oficina/equipo/internal/headless TestBrowserChat
receipt: slow test 7.05s amadan.net/oficina/equipo/internal/headless TestBrowserComposer
receipt: slow test 5.07s amadan.net/oficina/equipo/internal/headless TestBrowserChatSendStaysOnPage
machine: 32 CPUs, load 39.21, cpu waiting 22.05%, memory waiting 0.00%, io waiting 1.11%
--- shard 19 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-work: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserTaskCard$|^TestBrowserReceiptFollowsReview$|^TestBrowserRailFollowsWork$|^TestBrowserTaskThread$|^TestBrowserAskAfterMerge$|^TestBrowserReceiptsDesktop$|^TestBrowserReceiptsTouch$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m17.207s 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 1m15.576s amadan.net/oficina/equipo/internal/headless
receipt: slow test 23.01s amadan.net/oficina/equipo/internal/headless TestBrowserRailFollowsWork
receipt: slow test 17.56s amadan.net/oficina/equipo/internal/headless TestBrowserTaskThread
receipt: slow test 12.06s amadan.net/oficina/equipo/internal/headless TestBrowserReceiptFollowsReview
receipt: slow test 8.08s amadan.net/oficina/equipo/internal/headless TestBrowserAskAfterMerge
receipt: slow test 6.74s amadan.net/oficina/equipo/internal/headless TestBrowserTaskCard
machine: 32 CPUs, load 39.21, cpu waiting 22.50%, memory waiting 0.00%, io waiting 1.14%
--- shard 20 of 29 ---
RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py shard
timing budgets: reported, not enforced: a shared runner's load is not this change's time (set EQUIPO_CI_DEDICATED=1 on a dedicated runner)
browser: /opt/chromium-156.0.8078.79-1_deb13u1/chrome: Chromium 156.0.8078.79
browser lane browser-headless-connections: ./internal/headless
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -tags browser,testbuild -timeout 15m -run '^TestBrowserConnections|^TestBrowserPasteBox$|^TestBrowserPasteCopiesItsBox$' ./internal/headless
cache miss: amadan.net/oficina/equipo/internal/headless: its inputs changed

receipt: test step 1m33.93s 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 1m32.356s amadan.net/oficina/equipo/internal/headless
receipt: slow test 13.15s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAddPage
receipt: slow test 11.24s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsAdd
receipt: slow test 10.58s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsMeteredLimitRequired
receipt: slow test 10.57s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsConversation
receipt: slow test 10.09s amadan.net/oficina/equipo/internal/headless TestBrowserConnectionsOpenCodeGoLimitRequired
machine: 32 CPUs, load 34.69, cpu waiting 17.46%, memory waiting 0.00%, io waiting 0.84%
--- 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-23T14:40:08.523Z level=INFO msg="startup phase" phase=state_lock
time=2026-11-23T14:40:08.523Z level=INFO msg="startup phase done" phase=state_lock took=60µs
time=2026-11-23T14:40:08.523Z level=INFO msg="startup phase" phase=claim_roots
time=2026-11-23T14:40:08.523Z level=INFO msg="startup phase done" phase=claim_roots took=76µs
time=2026-11-23T14:40:08.523Z level=INFO msg="startup phase" phase=sweep
time=2026-11-23T14:40:08.555Z level=INFO msg="startup phase done" phase=sweep took=31.506ms
time=2026-11-23T14:40:08.555Z level=INFO msg="startup phase" phase=credentials
time=2026-11-23T14:40:08.555Z level=INFO msg="startup phase done" phase=credentials took=98µs
time=2026-11-23T14:40:08.555Z level=INFO msg="startup phase" phase=open_state
time=2026-11-23T14:40:08.598Z level=INFO msg="startup phase done" phase=open_state took=43.363ms
time=2026-11-23T14:40:08.599Z level=WARN msg="no seal key: token connections cannot be added" err=*fs.PathError
time=2026-11-23T14:40:08.600Z level=INFO msg=connecting host=127.0.0.1:35141 protocol=28
time=2026-11-23T14:40:08.602Z level=INFO msg=connected host=127.0.0.1:35141 took=2.301ms
time=2026-11-23T14:40:08.602Z level=INFO msg="capabilities gathering"
time=2026-11-23T14:40:08.603Z level=INFO msg="capabilities gathered" took=429µs tags=linux,claude,go
time=2026-11-23T14:40:08.603Z level=INFO msg="hello sent" protocol=28
time=2026-11-23T14:40:08.609Z level=INFO msg=welcome protocol=28 role=primary generation=1
    browser_copy_test.go:93: continue did not reach Checks: 0 <nil>
--- FAIL: TestBrowserCopyContinue (1.82s)

--- FAIL amadan.net/oficina/equipo/internal/headless (package output)
FAIL
rastrillo-budget/v1 ran 1m19.722s
FAIL	amadan.net/oficina/equipo/internal/headless	79.907s


receipt: test step 1m20.976s 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 1m19.722s amadan.net/oficina/equipo/internal/headless
receipt: slow test 14.52s amadan.net/oficina/equipo/internal/headless TestBrowserThinkingAndCards
receipt: slow test 9.94s amadan.net/oficina/equipo/internal/headless TestBrowserStalePageReloads
receipt: slow test 9.6s amadan.net/oficina/equipo/internal/headless TestBrowserWaitingTurns
receipt: slow test 8.85s amadan.net/oficina/equipo/internal/headless TestBrowserMoveIn
receipt: slow test 7.25s 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$' -count=1 ./internal/headless   (retry, once)
##############################################################################
FLAKE ./internal/headless:TestBrowserCopyContinue browser-headless-rest 198ce406181884f7f7b78d34fe020983a5f66b76 1.82s 39.21
##############################################################################
failed, then passed on its one retry: the step stays green and the flake is on record
machine: 32 CPUs, load 37.67, cpu waiting 20.34%, memory waiting 0.00%, io waiting 1.00%
--- 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 301ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 655ms amadan.net/oficina/equipo/internal/equipo
receipt: slow test 650ms 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|TestBrowserSmartDoor)$' ./internal/idtest
budget note: internal/idtest took 10.507s, over the 10s the default allows (measured on the run this cached result came from); reported only, timing fails on CI

receipt: test step 250ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 10.507s amadan.net/oficina/equipo/internal/idtest
receipt: slow test 8.55s amadan.net/oficina/equipo/internal/idtest TestBrowserSmartDoor
receipt: slow test 1.95s 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 228ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 2.178s amadan.net/oficina/equipo/internal/plan3test
receipt: slow test 2.18s 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|TestBrowserEmptyConversation|TestBrowserEndedNoteStaysGone|TestBrowserHousekeeping|TestBrowserInnerGallery|TestBrowserInnerScreens|TestBrowserInstantThinking|TestBrowserInstantThinkingQueued|TestBrowserMachines|TestBrowserPhoneIndex|TestBrowserPlacementQuestionAndPending|TestBrowserProjectPlacement|TestBrowserProjectsList|TestBrowserReportActionFeedback|TestBrowserReportNextSteps|TestBrowserReportThread|TestBrowserRhythm|TestBrowserRollup|TestBrowserRosterAlignment|TestBrowserRosterDecisionStates|TestBrowserRosterQuietDay|TestBrowserRosterReports|TestBrowserRosterSetAside|TestBrowserRosterSubchat|TestBrowserRosterThinking|TestBrowserRosterVisual|TestBrowserSettingsHousekeepingGroups|TestBrowserSettingsMenu|TestBrowserSettingsRail|TestBrowserSettingsSaveBar|TestBrowserSettingsShots|TestBrowserSettingsStayOnPage|TestBrowserSettingsTeams|TestBrowserShipsButtons|TestBrowserSpecialistRows|TestBrowserSpendFollowsAnswers|TestBrowserTaskRows|TestBrowserTeamPanel|TestBrowserThinkingCycles|TestBrowserThinkingLinesClear|TestBrowserThinkingSteady|TestBrowserThinkingWords|TestBrowserTokenRowEmail|TestBrowserTrackPulse|TestBrowserTrackStarCentre|TestBrowserTryAgain)$' ./internal/thintest

receipt: test step 271ms against a 60s target (the gate's other steps are not in this figure)
receipt: 0 packages ran, 1 cached, 0 without tests, 0 failed
receipt: slow package 3m27.609s amadan.net/oficina/equipo/internal/thintest
receipt: slow test 21.89s amadan.net/oficina/equipo/internal/thintest TestBrowserAccessRequest
receipt: slow test 14.4s amadan.net/oficina/equipo/internal/thintest TestBrowserSettingsTeams
receipt: slow test 12.03s amadan.net/oficina/equipo/internal/thintest TestBrowserThinkingCycles
receipt: slow test 10.6s amadan.net/oficina/equipo/internal/thintest TestBrowserPlacementQuestionAndPending
receipt: slow test 8.86s amadan.net/oficina/equipo/internal/thintest TestBrowserRhythm
machine: 32 CPUs, load 2.40, cpu waiting 1.57%, memory waiting 0.00%, io waiting 3.94%
--- 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   (46s)
ok ./internal/headless TestHeadlessConnections/A5_cancel_and_sign_out 4.57s
ok ./internal/headless TestHeadlessConnections/C4_claude_sign_in 1.17s
ok ./internal/headless TestHeadlessConnections/C5_engineering_failover 6.71s
ok ./internal/headless TestHeadlessConnections/C5_engineering_to_codex 7.65s
ok ./internal/headless TestHeadlessConnections/C5_engineering_waits 24.23s
+ 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   (44s)
ok ./internal/headless TestHeadlessConnections/C5_review_auth 9.46s
ok ./internal/headless TestHeadlessConnections/C5_review_failover 9.60s
ok ./internal/headless TestHeadlessConnections/C5_review_on_codex 9.33s
ok ./internal/headless TestHeadlessConnections/C5_review_other_family_first 13.59s
+ go test -tags testbuild -timeout 15m -v -run '^TestMixedVersions$' ./internal/headless   (18s)
ok ./internal/headless TestMixedVersions 16.69s
+ go test -tags testbuild -timeout 15m -v -run '^TestCheckSandboxDeniedPathsTampering$' ./internal/runner/checks   (1s)
ok ./internal/runner/checks TestCheckSandboxDeniedPathsTampering 0.76s
+ go test -tags testbuild -timeout 15m -v -run '^TestRunnerCancelAndSupersede$' ./internal/runner/thin   (1s)
ok ./internal/runner/thin TestRunnerCancelAndSupersede 0.05s
quarantine: 0 flaked (passed on the retry), 0 failed
machine: 32 CPUs, load 37.01, cpu waiting 23.20%, memory waiting 0.00%, io waiting 1.89%
--- 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 8.45s against a 60s target (the gate's other steps are not in this figure)
receipt: 4 packages ran, 0 cached, 4 without tests, 0 failed
receipt: slow package 7.204s amadan.net/oficina/equipo/internal/runner/checks
receipt: slow package 179ms amadan.net/oficina/equipo/internal/runner/provider/claude
receipt: slow package 68ms amadan.net/oficina/equipo/internal/runner/provider/codex
receipt: slow package 2ms amadan.net/oficina/equipo/internal/runner/provider
receipt: slow package 0s amadan.net/oficina/equipo/internal/runner/provider/claude/realcli
receipt: slow test 5.12s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsGoFixture
receipt: slow test 1.67s amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPaths
receipt: slow test 330ms amadan.net/oficina/equipo/internal/runner/checks TestCheckSandboxDeniedPathsCache
receipt: slow test 180ms amadan.net/oficina/equipo/internal/runner/provider/claude TestDirectJournalAdapterBarrier
receipt: slow test 70ms amadan.net/oficina/equipo/internal/runner/provider/codex TestDirectJournalAdapterBarrier
CGO_ENABLED=0 RASTRILLO='go run amadan.net/rastrillo/rastrillo/cmd/rastrillo' python3 scripts/ci-test.py retried runner-host -run '^TestNamespace' -count=1 ./internal/runner/containment
+ go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -run '^TestNamespace' -count=1 ./internal/runner/containment

receipt: test step 3.13s 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.761s amadan.net/oficina/equipo/internal/runner/containment
receipt: slow test 260ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReadOnlyScratch
receipt: slow test 170ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryUnavailableProof
receipt: slow test 110ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceDirectPolicyAdmission
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceRecoveryCleansScratch
receipt: slow test 100ms amadan.net/oficina/equipo/internal/runner/containment TestNamespaceReapsOrphans
machine: 32 CPUs, load 6.22, cpu waiting 4.97%, memory waiting 0.00%, io waiting 3.45%
--- 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 30.3%, load 23.26
shard 25: make runner-dead-references lanes-check build vet fmt-check spacing budget migration-check
python3 scripts/runner-dead-references.py
reference scan: 2624 text files, 3206 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 tool fiesta spacing -skip tokens.css internal/equipo/static
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget size
budget size: 90 directories within budget
CGO_ENABLED=0 go test ./internal/equipo -run '^TestMigrationModels$' -count=1
ok  	amadan.net/oficina/equipo/internal/equipo	2.488s
machine: 32 CPUs, load 37.01, cpu waiting 21.50%, memory waiting 0.00%, io waiting 2.02%
--- 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 30.3%, load 23.26
shard 26: make staticcheck
go run honnef.co/go/tools/cmd/staticcheck@v0.7.0 -tags browser,perf,testbuild ./...
machine: 32 CPUs, load 29.89, cpu waiting 13.46%, memory waiting 0.00%, io waiting 2.47%
--- 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 30.3%, load 23.26
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 3
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 29.89, cpu waiting 16.48%, memory waiting 0.00%, io waiting 2.31%
--- 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 30.3%, load 23.26
shard 28: make gitleaks
2:40PM INF Unknown SCM platform. Use --platform to include links in findings. host=amadan.net
2:40PM INF 1107 commits scanned.
2:40PM INF scanned ~64633267 bytes (64.63 MB) in 14.7s
2:40PM INF no leaks found
machine: 32 CPUs, load 37.01, cpu waiting 21.50%, memory waiting 0.00%, io waiting 2.02%
=== perf ===
go run amadan.net/rastrillo/rastrillo/cmd/rastrillo budget test -no-time -require TestPerfScreens,TestPerfBoot -tags perf -count=1 -p 1 -parallel 1 -run '^TestPerf' ./...
perf: GET /: median 1.074ms, worst 1.138ms, budget 150ms
perf: GET /api/runner/protocol: median 87µs, worst 105µs, budget 150ms
perf: GET /api/v1/account-setups/{id}: median 609µs, worst 641µs, budget 150ms
perf: GET /api/v1/accounts: median 432µs, worst 450µs, budget 150ms
perf: GET /api/v1/auth/devices: median 462µs, worst 516µs, budget 150ms
perf: GET /api/v1/budgets: median 482µs, worst 544µs, budget 150ms
perf: GET /api/v1/capabilities: median 259µs, worst 269µs, budget 150ms
perf: GET /api/v1/cards/{id}: median 1.233ms, worst 1.322ms, budget 150ms
perf: GET /api/v1/connections: median 601µs, worst 645µs, budget 150ms
perf: GET /api/v1/connections/{id}: median 551µs, worst 579µs, budget 150ms
perf: GET /api/v1/conversation: median 932µs, worst 966µs, budget 150ms
perf: GET /api/v1/conversation/cards: median 1.487ms, worst 1.531ms, budget 150ms
perf: GET /api/v1/coordinator: median 1.762ms, worst 1.854ms, budget 150ms
perf: GET /api/v1/invites/{id}: median 460µs, worst 516µs, budget 150ms
perf: GET /api/v1/journey: median 7.775ms, worst 10.566ms, budget 150ms
perf: GET /api/v1/me: median 423µs, worst 474µs, budget 150ms
perf: GET /api/v1/me/settings: median 500µs, worst 559µs, budget 150ms
perf: GET /api/v1/needs-you: median 6.976ms, worst 7.271ms, budget 150ms
perf: GET /api/v1/notifications: median 1.601ms, worst 1.672ms, budget 150ms
perf: GET /api/v1/onboarding: median 395µs, worst 427µs, budget 150ms
perf: GET /api/v1/people: median 415µs, worst 443µs, budget 150ms
perf: GET /api/v1/playbooks: median 574µs, worst 591µs, budget 150ms
perf: GET /api/v1/playbooks/{id}: median 517µs, worst 530µs, budget 150ms
perf: GET /api/v1/playbooks/{id}/template-diff: median 802µs, worst 912µs, budget 150ms
perf: GET /api/v1/preferences: median 730µs, worst 764µs, budget 150ms
perf: GET /api/v1/projects/{id}: median 441µs, worst 485µs, budget 150ms
perf: GET /api/v1/projects/{id}/settings: median 560µs, worst 583µs, budget 150ms
perf: GET /api/v1/roster: median 451µs, worst 504µs, budget 150ms
perf: GET /api/v1/runners/{id}: median 432µs, worst 452µs, budget 150ms
perf: GET /api/v1/specialists: median 7.835ms, worst 8.032ms, budget 150ms
perf: GET /api/v1/specialists/{id}: median 7.679ms, worst 7.808ms, budget 150ms
perf: GET /api/v1/specialists/{id}/template-diff: median 806µs, worst 876µs, budget 150ms
perf: GET /api/v1/tasks/{id}/plan: median 1.054ms, worst 1.127ms, budget 150ms
perf: GET /api/v1/tasks/{id}/thread: median 694µs, worst 769µs, budget 150ms
perf: GET /api/v1/teams: median 412µs, worst 458µs, budget 150ms
perf: GET /api/v1/templates: median 569µs, worst 618µs, budget 150ms
perf: GET /api/v1/templates/{id}: median 432µs, worst 448µs, budget 150ms
perf: GET /auth/callback: median 93µs, worst 117µs, budget 150ms
perf: GET /auth/devices/{id}: median 3.513ms, worst 3.592ms, budget 150ms
perf: GET /auth/verify: median 71µs, worst 83µs, budget 150ms
perf: GET /connections: median 3.894ms, worst 4.135ms, budget 150ms
perf: GET /conversation: median 7.752ms, worst 7.849ms, budget 150ms
perf: GET /conversation/connections: median 241µs, worst 259µs, budget 150ms
perf: GET /conversation/notebook: median 248µs, worst 266µs, budget 150ms
perf: GET /conversation/settings: median 4.359ms, worst 7.826ms, budget 150ms
perf: GET /conversation/settings/autonomy: median 4.289ms, worst 4.518ms, budget 150ms
perf: GET /conversation/settings/connections: median 6.66ms, worst 6.824ms, budget 150ms
perf: GET /conversation/settings/connections/add: median 6.763ms, worst 6.855ms, budget 150ms
perf: GET /conversation/settings/copy: median 4.248ms, worst 4.535ms, budget 150ms
perf: GET /conversation/settings/housekeeping: median 4.272ms, worst 4.36ms, budget 150ms
perf: GET /conversation/settings/machines: median 4.599ms, worst 4.765ms, budget 150ms
perf: GET /conversation/settings/machines/add: median 4.531ms, worst 4.643ms, budget 150ms
perf: GET /conversation/settings/notebook: median 3.737ms, worst 3.835ms, budget 150ms
perf: GET /conversation/settings/thinking: median 4.269ms, worst 5.981ms, budget 150ms
perf: GET /housekeeping: median 4.073ms, worst 4.114ms, budget 150ms
perf: GET /invites/new: median 598µs, worst 637µs, budget 150ms
perf: GET /invites/{id}: median 628µs, worst 682µs, budget 150ms
perf: GET /jobs: median 3.545ms, worst 3.598ms, budget 150ms
perf: GET /jobs/{id}: median 4.71ms, worst 4.792ms, budget 150ms
perf: GET /journey: median 10.247ms, worst 10.35ms, budget 150ms
perf: GET /nav/rail: median 3.18ms, worst 3.248ms, budget 150ms
perf: GET /needs-you: median 9.961ms, worst 10.119ms, budget 150ms
perf: GET /onboarding: median 4.315ms, worst 7.276ms, budget 150ms
perf: GET /people: median 3.623ms, worst 3.842ms, budget 150ms
perf: GET /playbook-suggestions/{suggestion}: median 5.578ms, worst 5.686ms, budget 150ms
perf: GET /playbooks: median 5.041ms, worst 5.109ms, budget 150ms
perf: GET /playbooks/new: median 5.135ms, worst 5.28ms, budget 150ms
perf: GET /playbooks/{id}: median 4.701ms, worst 4.824ms, budget 150ms
perf: GET /playbooks/{id}/edit: median 4.733ms, worst 4.818ms, budget 150ms
perf: GET /playbooks/{id}/template-diff: median 3.978ms, worst 4.046ms, budget 150ms
perf: GET /preferences: median 4.378ms, worst 4.59ms, budget 150ms
perf: GET /preferences/sources/{source}: median 4.163ms, worst 4.246ms, budget 150ms
perf: GET /projects: median 5.854ms, worst 6.115ms, budget 150ms
perf: GET /projects/accounts: median 4.111ms, worst 6.598ms, budget 150ms
perf: GET /projects/new: median 3.873ms, worst 3.962ms, budget 150ms
perf: GET /projects/{id}: median 10.468ms, worst 10.669ms, budget 150ms
perf: GET /projects/{id}/edit: median 3.884ms, worst 4.035ms, budget 150ms
perf: GET /runners/enrol: median 4.556ms, worst 4.717ms, budget 150ms
perf: GET /settings: median 3.67ms, worst 3.758ms, budget 150ms
perf: GET /settings/coordinator: median 5.593ms, worst 5.66ms, budget 150ms
perf: GET /settings/devices: median 3.49ms, worst 3.598ms, budget 150ms
perf: GET /settings/recovery: median 3.548ms, worst 3.691ms, budget 150ms
perf: GET /settings/recovery/release: median 3.68ms, worst 3.711ms, budget 150ms
perf: GET /settings/thinking: median 251µs, worst 281µs, budget 150ms
perf: GET /signed-out: median 272µs, worst 313µs, budget 150ms
perf: GET /signin: median 267µs, worst 288µs, budget 150ms
perf: GET /specialists/new: median 3.694ms, worst 3.757ms, budget 150ms
perf: GET /specialists/{key}: median 10.931ms, worst 11.632ms, budget 150ms
perf: GET /specialists/{key}/edit: median 3.852ms, worst 3.952ms, budget 150ms
perf: GET /specialists/{key}/template-diff: median 3.882ms, worst 3.986ms, budget 150ms
perf: GET /tasks: median 5.683ms, worst 5.77ms, budget 150ms
perf: GET /tasks/new: median 3.418ms, worst 3.554ms, budget 150ms
perf: GET /tasks/{id}: median 5.599ms, worst 5.652ms, budget 150ms
perf: GET /tasks/{id}/merge: median 4.91ms, worst 5.02ms, budget 150ms
perf: GET /tasks/{id}/move: median 4.78ms, worst 4.961ms, budget 150ms
perf: GET /tasks/{id}/plan: median 5.8ms, worst 5.906ms, budget 150ms
perf: GET /tasks/{id}/preview: median 1.572ms, worst 2.891ms, budget 150ms
perf: GET /tasks/{id}/questions/{question}: median 5.403ms, worst 5.453ms, budget 150ms
perf: GET /tasks/{id}/rendered-change: median 4.892ms, worst 5.002ms, budget 150ms
perf: GET /tasks/{id}/rendered-change/{hash}.png: median 4.429ms, worst 4.521ms, budget 150ms
perf: GET /tasks/{id}/thread: median 7.993ms, worst 8.159ms, budget 150ms
perf: GET /team/{specialist}: median 4.529ms, worst 4.623ms, budget 150ms
perf: GET /teams: median 9.939ms, worst 10.084ms, budget 150ms
perf: GET /templates: median 3.691ms, worst 3.724ms, budget 150ms
perf: GET /usage: median 4.412ms, worst 4.505ms, budget 150ms
perf: GET /work: median 3.475ms, worst 4.918ms, budget 150ms
perf: GET /auth/devices/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/autonomy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/connections/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/copy: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/machines/add: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/notebook: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /conversation/settings/thinking: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /housekeeping: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /invites/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /jobs/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /journey: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /nav/rail: 0 bytes of framework CSS and JS, gzipped; 16000-byte budget
perf: GET /needs-you: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /onboarding: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /people: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbook-suggestions/{suggestion}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /playbooks/{id}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /preferences/sources/{source}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/accounts: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /projects/{id}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /runners/enrol: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/coordinator: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/devices: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /settings/recovery/release: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /signed-out: 30270 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/edit: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /specialists/{key}/template-diff: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/new: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/merge: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/move: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/plan: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/preview: 25954 bytes of framework CSS and JS, gzipped; 40000-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/questions/{question}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/rendered-change: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /tasks/{id}/thread: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /team/{specialist}: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /teams: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /templates: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /usage: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: GET /work: 57416 bytes of framework CSS and JS, gzipped; 60600-byte budget; it links the whole tokens.css: add Assets: assets to ui.PagesConfig (PagesConfig.Assets) in render.go, and in the layout use {{path $ pageStylesheet}} in place of static/tokens.css and replace the busy.js, live.js, light.js and anchor.js tags and the neededScripts line (or the select.js, calendar.js and datetime.js tags) with {{range pageScripts}}, keeping rastrillo.js and shell.js
perf: cold boot: median 156ms of [155.047071ms 155.542725ms 155.565132ms], budget 500ms

receipt: test step 31.247s against a 60s target (the gate's other steps are not in this figure)
receipt: 1 packages ran, 0 cached, 86 without tests, 0 failed
receipt: slow package 10.153s amadan.net/oficina/equipo/internal/equipotest
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-runner
receipt: slow package 0s amadan.net/oficina/equipo/cmd/equipo-tool-proxy
receipt: slow package 0s amadan.net/oficina/equipo/internal/advice
receipt: slow package 0s amadan.net/oficina/equipo/internal/attach
receipt: slow test 9.64s amadan.net/oficina/equipo/internal/equipotest TestPerfScreens
receipt: slow test 520ms amadan.net/oficina/equipo/internal/equipotest TestPerfBoot
=== cache ===
ci-box: build cache /home/ci/work/repos/oficina__equipo/cache/go-build: 3.55 GiB in 24105 files
ci-box: module cache /home/ci/work/repos/oficina__equipo/cache/go-mod: 1.15 GiB in 40997 files
diff --git a/internal/chatmarkdown/native_test.go b/internal/chatmarkdown/native_test.go
index c2305656..a4880ba4 100644
--- a/internal/chatmarkdown/native_test.go
+++ b/internal/chatmarkdown/native_test.go
@@ -234,6 +234,7 @@ func TestNativeMarkdownFixtures(t *testing.T) {
}
}
}
+ inputs = append(inputs, "`*_test.go", "`a_b_c", "`resizeReply(_:)", "`[text](url)", "`![alt](src)")
fixtures := []nativeFixture{}
for i, s := range inputs {
for _, draft := range []bool{false, true} {
@@ -248,6 +249,7 @@ func TestNativeMarkdownFixtures(t *testing.T) {
streams = append(streams, prefix+span)
}
}
+ streams = append(streams, "`*_test.go`", "`a_b_c`", "`resizeReply(_:)`", "`[text](url)`", "`![alt](src)`")
for i, s := range streams {
for cut := 0; cut <= len(s); cut++ {
if cut < len(s) && !utf8.RuneStart(s[cut]) {
@@ -346,7 +348,7 @@ func TestNativeMarkdownDifferential(t *testing.T) {
target += pick([]string{"?case=", "#"}) + strconv.Itoa(r.IntN(65536))
}
var s string
- switch i % 19 {
+ switch i % 21 {
case 0:
s = "[" + w + "](" + target + ")"
case 1:
@@ -385,6 +387,10 @@ func TestNativeMarkdownDifferential(t *testing.T) {
s = "[" + w + "][ref]\n\n[ref]: <" + pick([]string{" ", "\t", ""}) + target + ">"
case 17:
s = pick([]string{"Glob `**/*.go`", "\\*escaped*", ">*word", "a `a\\`b`", "**a\\*b**"}) + " " + w
+ case 20:
+ s = pick([]string{"", "Before ", "> ", "- "}) + "`" + pick([]string{"", "!"}) + "[" + w + "](" + pick([]string{"url", "/tasks/tk1", "https://example.test", "src"}) + pick([]string{"", ")", ") after", ")`"})
+ case 19:
+ s = pick([]string{"", "See ", "> ", "- "}) + "`" + pick([]string{"*", "_", "**", "__", "a_", "a*", "resizeReply("}) + pick([]string{"_test.go", "b_c", "*word", "_:)", "a_b_c", "*a_b*", "**/*.go"}) + pick([]string{"", "`", " " + w, "\\_"})
case 18:
s = "```ts\n" + w + "\n\nfoo[i](<T<U>>x)\n```\n"
diff --git a/native/MARKDOWN-STREAMING-REPORT.md b/native/MARKDOWN-STREAMING-REPORT.md
new file mode 100644
index 00000000..8b15203b
--- /dev/null
+++ b/native/MARKDOWN-STREAMING-REPORT.md
@@ -0,0 +1,116 @@
+# Markdown streaming follow-up
+
+Branch `native/markdown-streaming`, based on main at `3589c220`. This report
+includes the follow-up to Fable's review of `b533757b`.
+
+## Message lifetime and large replies
+
+A session owns a `MarkdownTranscript`, keyed by message identity. Each message
+has one background parsing worker. Appended deltas replace the pending request
+without cancelling the in-flight parse. Every finished prefix publishes before
+the worker parses the latest pending revision. Intermediate revisions do not
+queue. Small replies still render synchronously; cached revisions include the
+account origin, message ID, exact text and draft/completed state.
+
+SwiftUI hosts borrow the message's renderer. Disappearance, scrolling and
+re-hosting do not stop it. Removing a message from the feed or a snapshot stops
+its worker, as does leaving the session. Cancellation and a generation check
+reject late results. A completed message settles its final parse, then the
+worker exits. Replacing a message's source starts fresh.
+
+The original 64 KiB test streams 67 updates at 5 ms intervals. The old
+cancel-on-delta implementation showed only one distinct height before the
+stream ended. The regression requires at least six. A delayed-parser test checks
+that prefixes publish, only one parse runs, appends cause no cancellations and
+the final completed tree is exact. A deterministic held-parse test sends 67
+pending revisions plus completion and requires exactly two parses: the first
+prefix and the latest completed revision.
+
+## Mac transcript rows
+
+`LiveTranscript` retains each row and reply host. A row revision includes its
+feed item, width, task details, answer/aside feedback and stopping state.
+Unchanged revisions receive no content update or intrinsic-size measurement.
+Changed replies update their existing host in place; new and removed IDs alone
+attach or detach rows. Ordering changes sort existing views without re-hosting.
+Height callbacks resize the changed reply and move later rows without rebuilding
+their contents. A width change resizes the existing rows.
+
+Fable's reproduction is covered two ways: a SwiftUI host is repeatedly detached
+and reattached across 67 large deltas, and the actual `EquipoMac.LiveTranscript`
+runs 49 historical replies plus one 17–25 KB streaming reply. The first test
+failed at one height before the fix. The actual transcript now grows throughout
+the stream; a focused run saw 10 growing heights (64 with other layout tests
+running concurrently). Completion keeps the same row, and removal cancels its
+message parser.
+
+The performance test uses the production Mac transcript inside an `NSWindow`,
+with 50 realistic replies. Before the fix, its median update was 723 ms. After
+the fix, a debug run measured 3.44 ms median and 5.50 ms maximum. The 50 ms median
+budget allows debug/CI variation while rejecting the original full rebuild by
+more than an order of magnitude. Timing is paired with deterministic assertions:
+exactly one content revision per changed reply, the same row and host identities,
+and no window detach/attach notifications. Removal, reinsertion, ordering and
+width changes are checked too.
+
+The Release test (`swift test --package-path native/apple -c release --filter
+MacTranscriptTests`) passed: 2.71 ms median, 4.83 ms maximum for the 50-reply
+update; the large reply showed 29 growing heights during 67 deltas. This
+uses the real transcript class and window layout, with in-memory test accounts;
+it is not a signed-in production-app timing session. No personal Keychain or
+signing settings were accessed for the harness.
+
+## Open code spans
+
+The first follow-up matched Goldmark's merging of unmatched emphasis delimiters
+into watched fallback backtick text, including adjacent closers. This revision
+also ends that watched text at a link/image opener. Bracket labels remain
+visible while the code span and destination are still open.
+
+Every streaming cut of the supplied underscore/asterisk examples and
+`[text](url)` / `![alt](src)` inside backticks is checked. The fixed-seed grammar
+adds links and images inside open code spans, with quote/list prefixes, optional
+closers, destinations and random cuts. The expansion found 322 mismatches before
+the bracket fix. There are now 3,586 checked-in cases and 32,000 unique generated
+inputs: 35,586 comparisons with zero mismatches. Go Render/RenderDraft output
+is unchanged.
+
+## Verification
+
+Tests preceded the fixes. Focused checks use:
+
+```sh
+EQUIPO_MARKDOWN_DIFFERENTIAL="$PWD/native/build/markdown-differential.json" \
+ swift test --package-path native/apple \
+ --filter 'MacTranscriptTests|MarkdownParsingStreamTests|MarkdownLayoutTests|ChatMarkdownTests'
+native/scripts/check-native.sh
+```
+
+The earlier commit's nine guards were broken and restored in eleven mutation
+runs. All ten re-review guards were also broken and caught: detaching existing
+rows, ignoring row revisions, replacing reply hosts, stopping on disappearance,
+losing owner identity, omitting cancellation for removed messages, omitting
+session-departure cancellation, hiding open-code link labels, omitting snapshot
+removal cleanup and omitting feed removal cleanup. Each focused regression
+failed, then the guard was restored; none failed to compile or timed out.
+
+The revision-guard mutation initially stayed within the broad performance
+budget; adding the exact content-update count made that unnecessary work
+observable independently of machine speed.
+
+`native/scripts/check-native.sh` passed: fixture freshness and the generated
+corpus, strings/parity, reference scan, 167 Swift tests in 20 suites, Mac build
+and unsigned iOS Simulator build. The suite retains the existing known Oficina
+ID session issue; no new known issue was introduced. The full-suite Mac stream
+also grew through 64 sampled heights during 67 deltas.
+
+Go tests, vet, staticcheck v0.7.0 for `internal/chatmarkdown`, `make fmt-check` and
+`go mod tidy -diff` passed with `GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0`, with that
+toolchain on PATH. Local evidence is under `native/build/logs/streaming-review-*`.
+
+## Remaining scope
+
+Fable's random-token finished-reply cases involving lone CR, reference
+definitions and nested `<` in angle destinations remain deferred. The current
+corpus matches, which does not claim those independent counterexamples match.
+No product strings or dependency pins changed. Projects awaits its brief.
diff --git a/native/apple/Package.swift b/native/apple/Package.swift
index 25a778a3..3c9d70cf 100644
--- a/native/apple/Package.swift
+++ b/native/apple/Package.swift
@@ -32,7 +32,7 @@ let package = Package(
.product(name: "RastrilloMacUpdates", package: "native", condition: .when(platforms: [.macOS]))],
path: "Sources/EquipoMac"),
.testTarget(name: "EquipoKitTests",
- dependencies: ["EquipoKit", "EquipoActivity", .product(name: "RastrilloTestSupport", package: "native"), .product(name: "RastrilloNative", package: "native")],
+ dependencies: ["EquipoKit", "EquipoActivity", .target(name: "EquipoMac", condition: .when(platforms: [.macOS])), .product(name: "RastrilloTestSupport", package: "native"), .product(name: "RastrilloNative", package: "native")],
resources: [.copy("Fixtures")]),
]
)
diff --git a/native/apple/Sources/EquipoKit/Markdown/ChatMarkdown.swift b/native/apple/Sources/EquipoKit/Markdown/ChatMarkdown.swift
index 5d097921..7bd74b8e 100644
--- a/native/apple/Sources/EquipoKit/Markdown/ChatMarkdown.swift
+++ b/native/apple/Sources/EquipoKit/Markdown/ChatMarkdown.swift
@@ -436,11 +436,19 @@ private struct MarkdownProjection {
let char = bytes[at]
// The watched fallback text is extended up to the next inline
// parser trigger, even if that parser ultimately finds no node.
+ var startsLinkLabel = false
if let firstBacktick, [33, 42, 60, 91, 93, 95, 96].contains(char) {
var escapes = 0, previous = at
while previous > 0, bytes[previous - 1] == 92 { escapes += 1; previous -= 1 }
- if escapes % 2 == 0 { hidden.append(firstBacktick..<at) }
+ if escapes % 2 == 0 {
+ hidden.append(firstBacktick..<at)
+ // A link/image opener starts its own text segment, even
+ // before its destination arrives. Its label is not part
+ // of the watched unmatched code opener.
+ if char == 91 || char == 33 && at + 1 < bytes.count && bytes[at + 1] == 91 { startsLinkLabel = true }
+ }
}
+ if startsLinkLabel { firstBacktick = nil }
guard [42, 95, 96].contains(char) else { at += 1; continue }
let start = at
while at < segment.upperBound, bytes[at] == char { at += 1 }
@@ -462,8 +470,14 @@ private struct MarkdownProjection {
let rf = !space(left) && (!punct(left) || space(right) || punct(right))
let canOpen = char == 42 ? lf : lf && (!rf || punct(left))
let canClose = char == 42 ? rf : rf && (!lf || punct(right))
- if !canOpen && !canClose, let firstBacktick { hidden.append(firstBacktick..<at) }
- if canOpen || canClose { firstBacktick = nil }
+ // Goldmark creates a delimiter even when it cannot open or
+ // close. Removing that first unmatched delimiter merges it into
+ // the watched backtick text; later text is a separate segment.
+ if let firstBacktick { hidden.append(firstBacktick..<at) }
+ // A closer that cannot open is removed during the forward
+ // delimiter pass. An adjacent surviving delimiter can then merge
+ // into that same watched text during the final reverse pass.
+ if !(canClose && !canOpen && at < bytes.count && [42, 95].contains(bytes[at])) { firstBacktick = nil }
if canOpen && (!canClose || at - start >= 2) || at == bytes.count && !partiallyConsumed { hidden.append(start..<at) }
}
if let firstBacktick, segment.upperBound < bytes.count,
diff --git a/native/apple/Sources/EquipoKit/Markdown/ChatMarkdownView.swift b/native/apple/Sources/EquipoKit/Markdown/ChatMarkdownView.swift
index 312d9445..0a37de53 100644
--- a/native/apple/Sources/EquipoKit/Markdown/ChatMarkdownView.swift
+++ b/native/apple/Sources/EquipoKit/Markdown/ChatMarkdownView.swift
@@ -13,28 +13,29 @@ public struct ChatMarkdownView: View {
private let origin: URL
private let openTask: (String) -> Void
@Environment(\.openURL) private var openURL
- @State private var parsed: [ChatMarkdownNode] = []
- @State private var renderedRequest: MarkdownRenderCache.Request?
+ private let stream: MarkdownStreamRenderer
private let request: MarkdownRenderCache.Request
private let initial: MarkdownRenderCache.Result
private var nodes: [ChatMarkdownNode] {
- initial.complete ? initial.tree : renderedRequest == request ? parsed : initial.tree
+ initial.complete ? initial.tree : stream.visible(for: request) ?? initial.tree
}
private let prepared: Bool
private let onHeightChange: () -> Void
- public init(_ text: String, draft: Bool = false, messageID: String? = nil, origin: URL, openTask: @escaping (String) -> Void, onHeightChange: @escaping () -> Void = {}) {
+ public init(_ text: String, draft: Bool = false, messageID: String? = nil, origin: URL, transcript: MarkdownTranscript, openTask: @escaping (String) -> Void, onHeightChange: @escaping () -> Void = {}) {
self.text = text; self.draft = draft; self.origin = origin; self.openTask = openTask
self.prepared = false; self.onHeightChange = onHeightChange
request = MarkdownRenderCache.Request(messageID: origin.absoluteString + "/" + (messageID ?? text), text: text, draft: draft)
initial = MarkdownRenderCache.shared.initial(request)
+ stream = transcript.renderer(for: request.messageID)
}
// Tests render the completed background parse without needing a live host.
init(rendered nodes: [ChatMarkdownNode], origin: URL, openTask: @escaping (String) -> Void) {
text = ""; draft = false; self.origin = origin; self.openTask = openTask
prepared = true; onHeightChange = {}
+ stream = MarkdownStreamRenderer()
request = MarkdownRenderCache.Request(messageID: "prepared", text: "", draft: false)
initial = MarkdownRenderCache.Result(tree: nodes, complete: true)
}
@@ -42,13 +43,13 @@ public struct ChatMarkdownView: View {
MarkdownBlocks(nodes: nodes)
.font(MarkdownTypography.prose).foregroundStyle(Palette.text).tint(Palette.accent)
.textSelection(.enabled)
- .task(id: request) {
- guard !prepared, !initial.complete, renderedRequest != request else { return }
- let parsed = await ChatMarkdown.parseInBackground(text, draft: draft)
- guard !Task.isCancelled else { return }
- MarkdownRenderCache.shared.store(parsed, for: request)
- self.parsed = parsed
- renderedRequest = request
+ .onAppear {
+ guard !prepared else { return }
+ stream.submit(request, needsParsing: !initial.complete)
+ }
+ .onChange(of: request) {
+ guard !prepared else { return }
+ stream.submit(request, needsParsing: !initial.complete)
}
.onGeometryChange(for: CGFloat.self, of: { $0.size.height }) { _, _ in onHeightChange() }
.environment(\.openURL, OpenURLAction { url in
diff --git a/native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift b/native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift
new file mode 100644
index 00000000..9989c1b9
--- /dev/null
+++ b/native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift
@@ -0,0 +1,62 @@
+import Foundation
+import Observation
+
+/// One parser per message. New deltas replace the pending request, never
+/// the in-flight parse; each completed prefix can become visible immediately.
+@MainActor @Observable final class MarkdownStreamRenderer {
+ typealias Request = MarkdownRenderCache.Request
+ struct Publication {
+ let request: Request
+ let tree: [ChatMarkdownNode]
+ }
+ private(set) var publication: Publication?
+ @ObservationIgnored private var pending: Request?
+ @ObservationIgnored private var worker: Task<Void, Never>?
+ @ObservationIgnored private var generation = 0
+ @ObservationIgnored private let cache: MarkdownRenderCache
+ @ObservationIgnored private let parse: (Request) async -> [ChatMarkdownNode]
+
+ init(cache: MarkdownRenderCache = .shared, parse: @escaping (Request) async -> [ChatMarkdownNode] = {
+ await ChatMarkdown.parseInBackground($0.text, draft: $0.draft)
+ }) {
+ self.cache = cache
+ self.parse = parse
+ }
+
+ func visible(for request: Request) -> [ChatMarkdownNode]? {
+ guard let publication, publication.request.messageID == request.messageID,
+ request.text.hasPrefix(publication.request.text) else { return nil }
+ return publication.tree
+ }
+
+ func submit(_ request: Request, needsParsing: Bool = true) {
+ guard needsParsing else { stop(); return }
+ if pending == request || publication?.request == request { return }
+ if let previous = pending ?? publication?.request,
+ previous.messageID != request.messageID || !request.text.hasPrefix(previous.text) {
+ stop()
+ }
+ pending = request
+ guard worker == nil else { return }
+ let epoch = generation
+ worker = Task { [weak self] in
+ guard let self else { return }
+ while let request = self.pending {
+ let tree = await self.parse(request)
+ guard !Task.isCancelled, self.generation == epoch else { return }
+ self.cache.store(tree, for: request)
+ self.publication = Publication(request: request, tree: tree)
+ if self.pending == request { self.pending = nil }
+ }
+ self.worker = nil
+ }
+ }
+
+ func stop() {
+ generation += 1
+ worker?.cancel()
+ worker = nil
+ pending = nil
+ publication = nil
+ }
+}
diff --git a/native/apple/Sources/EquipoKit/Markdown/MarkdownTranscript.swift b/native/apple/Sources/EquipoKit/Markdown/MarkdownTranscript.swift
new file mode 100644
index 00000000..7a230c3d
--- /dev/null
+++ b/native/apple/Sources/EquipoKit/Markdown/MarkdownTranscript.swift
@@ -0,0 +1,30 @@
+import Foundation
+
+/// Parsing belongs to messages in a signed-in conversation, not to their
+/// temporary SwiftUI hosts. Scrolling or re-hosting cannot end a reply's work.
+@MainActor public final class MarkdownTranscript {
+ private var renderers: [String: MarkdownStreamRenderer] = [:]
+ private let makeRenderer: () -> MarkdownStreamRenderer
+ public init() { makeRenderer = { MarkdownStreamRenderer() } }
+ init(makeRenderer: @escaping () -> MarkdownStreamRenderer) { self.makeRenderer = makeRenderer }
+
+ func renderer(for messageID: String) -> MarkdownStreamRenderer {
+ if let renderer = renderers[messageID] { return renderer }
+ let renderer = makeRenderer()
+ renderers[messageID] = renderer
+ return renderer
+ }
+
+ public func retainMessages(_ ids: Set<String>, origin: URL) {
+ let keys = Set(ids.map { origin.absoluteString + "/" + $0 })
+ for key in Array(renderers.keys) where !keys.contains(key) {
+ renderers.removeValue(forKey: key)?.stop()
+ }
+ }
+
+ public func removeAll() {
+ for renderer in renderers.values { renderer.stop() }
+ renderers.removeAll()
+ }
+ isolated deinit { for renderer in renderers.values { renderer.stop() } }
+}
diff --git a/native/apple/Sources/EquipoKit/Presentation/Roster.swift b/native/apple/Sources/EquipoKit/Presentation/Roster.swift
index fbe7fefe..9e969c80 100644
--- a/native/apple/Sources/EquipoKit/Presentation/Roster.swift
+++ b/native/apple/Sources/EquipoKit/Presentation/Roster.swift
@@ -107,7 +107,7 @@ public struct TaskReport: Sendable, Equatable {
// MARK: - The feed
/// One thing in the conversation.
-public enum FeedItem: Identifiable, Sendable {
+public enum FeedItem: Identifiable, Sendable, Equatable {
case draft(ThinTurn, text: String)
public var reply: TranscriptReply? {
switch self {
diff --git a/native/apple/Sources/EquipoKit/Session/EquipoSession.swift b/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
index 9694f632..6c0413ca 100644
--- a/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
+++ b/native/apple/Sources/EquipoKit/Session/EquipoSession.swift
@@ -25,6 +25,7 @@ public final class EquipoSession {
/// A departing session can never become current again, even if a read
/// or credential renewal ignores cancellation and completes later.
public let lifetime: SignInLifetime
+ public let markdown = MarkdownTranscript()
var isInvalidated: Bool { !lifetime.isActive }
public private(set) var status: Status = .loading
public private(set) var account: DeviceAccount
@@ -141,6 +142,7 @@ public final class EquipoSession {
guard let turn = turns.first(where: { $0.id == id }) else { return true }
return turn.isLive && (turn.attempt ?? 0) <= draft.attempt
}
+ markdown.retainMessages(Set(Feed.build(self).filter { $0.reply != nil }.map(\.id)), origin: origin)
if account.teamName != snapshot.me.teamName {
account.teamName = snapshot.me.teamName; account.address = snapshot.me.address
try? accounts.commit(.save(account), lifetime: lifetime)
@@ -423,6 +425,7 @@ public final class EquipoSession {
/// not prevent a completed network response from reaching persistence.
func invalidate() {
lifetime.end()
+ markdown.removeAll()
status = .signedOut
drafts = [:]
stopLive()
diff --git a/native/apple/Sources/EquipoKit/UI/RosterViews.swift b/native/apple/Sources/EquipoKit/UI/RosterViews.swift
index d745a2ed..43c7b66b 100644
--- a/native/apple/Sources/EquipoKit/UI/RosterViews.swift
+++ b/native/apple/Sources/EquipoKit/UI/RosterViews.swift
@@ -517,9 +517,11 @@ struct MiniComposer: View {
public struct CoordinatorMessage: View {
let messageID: String
let reply: TranscriptReply
+ let transcript: MarkdownTranscript
let origin: URL
let openTask: (String) -> Void
- public init(reply: TranscriptReply, messageID: String, origin: URL, openTask: @escaping (String) -> Void) {
+ public init(reply: TranscriptReply, messageID: String, origin: URL, transcript: MarkdownTranscript, openTask: @escaping (String) -> Void) {
+ self.transcript = transcript
self.messageID = messageID; self.reply = reply; self.origin = origin; self.openTask = openTask
}
public var body: some View {
@@ -528,7 +530,7 @@ public struct CoordinatorMessage: View {
CoordinatorMark(size: 22).frame(width: Metric.indent, alignment: .leading)
Text(reply.date.formatted(date: .omitted, time: .shortened)).font(Typo.time).foregroundStyle(Palette.faint)
}.frame(minHeight: Metric.tile)
- ChatMarkdownView(reply.text, draft: reply.draft, messageID: messageID, origin: origin, openTask: openTask)
+ ChatMarkdownView(reply.text, draft: reply.draft, messageID: messageID, origin: origin, transcript: transcript, openTask: openTask)
}
.frame(maxWidth: .infinity, alignment: .leading)
.accessibilityElement(children: .contain)
diff --git a/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift b/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
index 86c7cd47..81ca60a3 100644
--- a/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
+++ b/native/apple/Sources/EquipoKit/UI/Screens/ConversationScreen.swift
@@ -66,7 +66,7 @@ public struct ConversationScreen: View {
@ViewBuilder private func row(_ item: FeedItem) -> some View {
if let reply = item.reply {
- CoordinatorMessage(reply: reply, messageID: item.id, origin: session.origin, openTask: openTask)
+ CoordinatorMessage(reply: reply, messageID: item.id, origin: session.origin, transcript: session.markdown, openTask: openTask)
} else {
switch item {
case .draft, .coordinator: EmptyView()
diff --git a/native/apple/Sources/EquipoMac/LiveTranscript.swift b/native/apple/Sources/EquipoMac/LiveTranscript.swift
index 74b3af58..6f47c2ce 100644
--- a/native/apple/Sources/EquipoMac/LiveTranscript.swift
+++ b/native/apple/Sources/EquipoMac/LiveTranscript.swift
@@ -4,8 +4,8 @@ import SwiftUI
/// The conversation in AppKit: Roster's bylines and cards over the live feed
/// (EquipoKit's `Feed.build`), in a centred column with a 48-point author
-/// gutter, and the composer at the bottom. Each update lays the feed out
-/// again at the column width; the view stays pinned to the newest item
+/// gutter, and the composer at the bottom. Updates reconcile rows by identity
+/// and revision; the view stays pinned to the newest item
/// unless the person has scrolled up.
@MainActor
final class LiveTranscript: NSView {
@@ -33,6 +33,23 @@ final class LiveTranscript: NSView {
// Keep each reply's SwiftUI host across delta and completion rebuilds.
// In particular, closing a fence keeps its scroll position and Copy state.
private var replyHosts: [String: NSHostingView<MarkdownReplyHost>] = [:]
+ private struct RowRevision: Equatable {
+ let item: FeedItem
+ let width: CGFloat
+ let task: ThinTask?
+ let answer: AnswerState?
+ let aside: AnswerState?
+ let stopping: Bool
+ }
+ private struct Row {
+ let view: NSView
+ let revision: RowRevision
+ }
+ // Counts row content updates independently of frame-only positioning.
+ private(set) var renderedRevisions = 0
+ private var rows: [String: Row] = [:]
+ private var rowOrder: [String] = []
+ private var emptyView: NSView?
private var contentHeight: CGFloat = 0
private var laidOutWidth: CGFloat = 0
private var hasScrolledOnce = false
@@ -60,8 +77,7 @@ final class LiveTranscript: NSView {
func update(items: [FeedItem]) {
let wasAtBottom = isAtBottom
self.items = items
- let replyIDs = Set(items.filter { $0.reply != nil }.map(\.id))
- replyHosts = replyHosts.filter { replyIDs.contains($0.key) }
+ session.markdown.retainMessages(Set(items.filter { $0.reply != nil }.map(\.id)), origin: session.origin)
rebuild()
if wasAtBottom || !hasScrolledOnce { scrollToBottom(); hasScrolledOnce = !items.isEmpty }
}
@@ -99,59 +115,105 @@ final class LiveTranscript: NSView {
// MARK: Building the feed
private func rebuild() {
- document.subviews.forEach { $0.removeFromSuperview() }
+ let ids = Set(items.map(\.id))
+ for id in Array(rows.keys) where !ids.contains(id) {
+ rows.removeValue(forKey: id)?.view.removeFromSuperview()
+ replyHosts.removeValue(forKey: id)
+ }
let column = self.column
- let x0 = column.x, width = column.width
- let content = width - MacMetric.gutter
var y: CGFloat = 24
- func place(_ view: NSView, x: CGFloat = 0, gapAfter: CGFloat = 22) {
- view.frame.origin = NSPoint(x: x0 + x, y: y)
- document.addSubview(view)
- y = view.frame.maxY + gapAfter
- }
- func placeCard(_ plate: RaisedPlate) {
- plate.frame.origin = NSPoint(x: x0 + MacMetric.gutter - MacMetric.shadow, y: y - MacMetric.shadow)
- document.addSubview(plate, positioned: .below, relativeTo: nil)
- y += plate.content.frame.height + 24
- }
- if items.isEmpty && session.status == .ready {
- place(makeText(EquipoStrings.text("conversation.empty"), MacType.line, .webSecondary, width: width), gapAfter: 0)
- }
tops = [:]
for item in items {
- tops[item.id] = y
+ let task: ThinTask?
switch item {
- case .own(let message):
- place(ownBubble(message.text, width: width), x: width - ownWidth(message.text, width: width))
- case .coordinator, .draft:
- if let reply = item.reply { place(coordinatorRow(reply, id: item.id, width: width)) }
- case .outgoing(let outgoing):
- let bubble = ownBubble(outgoing.text, width: width)
- bubble.alphaValue = outgoing.state == .sending ? 0.6 : 1
- place(bubble, x: width - bubble.frame.width, gapAfter: 4)
- let status = outgoingStatus(outgoing)
- place(status, x: width - status.frame.width)
- case .report(_, let byline, let report, let compact):
- place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
- place(hosted(LiveReport(report: report, compact: compact, wide: true) { [weak self] in self?.openTask(report.task.id) }, width: width), gapAfter: 24)
- case .question(let card, let byline):
- place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
- placeCard(questionCard(card, taskTitle: session.task(card.taskId)?.title, width: content))
- case .decision(let card, let byline):
- place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
- placeCard(decisionCard(card, taskTitle: session.task(card.taskId)?.title, width: content))
- case .receipt(let card, _):
- place(receiptRow(card, width: width))
- case .thinking(let turn, let activity):
- let session = self.session
- place(hosted(ThinkingLine(turn: turn, activity: activity, stopping: session.stopping.contains(turn.id)) { Task { await session.stop(turn) } }, width: width))
+ case .question(let card, _), .decision(let card, _): task = session.task(card.taskId)
+ default: task = nil
+ }
+ let stopping: Bool
+ if case .thinking(let turn, _) = item { stopping = session.stopping.contains(turn.id) } else { stopping = false }
+ let revision = RowRevision(item: item, width: column.width, task: task, answer: answers[item.id], aside: asides[item.id], stopping: stopping)
+ let row: NSView
+ if let existing = rows[item.id], existing.revision == revision {
+ row = existing.view
+ } else {
+ row = makeRow(item, width: column.width)
+ rows[item.id] = Row(view: row, revision: revision)
+ }
+ tops[item.id] = y
+ row.frame.origin = NSPoint(x: column.x, y: y)
+ if row.superview == nil { document.addSubview(row) }
+ y += row.frame.height
+ }
+ // Sorting does not detach hosts or trigger SwiftUI disappearance.
+ let order = items.map(\.id)
+ if rowOrder != order {
+ var ranks = Dictionary(items.enumerated().map { (ObjectIdentifier(rows[$0.element.id]!.view), $0.offset) }, uniquingKeysWith: { a, _ in a })
+ withUnsafeMutablePointer(to: &ranks) { pointer in
+ document.sortSubviews({ a, b, context in
+ let ranks = context!.assumingMemoryBound(to: [ObjectIdentifier: Int].self).pointee
+ let left = ranks[ObjectIdentifier(a)] ?? -1, right = ranks[ObjectIdentifier(b)] ?? -1
+ return left == right ? .orderedSame : left < right ? .orderedAscending : .orderedDescending
+ }, context: pointer)
}
+ rowOrder = order
}
- // The last item scrolls clear of the composer.
+ if items.isEmpty && session.status == .ready {
+ if emptyView == nil { emptyView = makeText(EquipoStrings.text("conversation.empty"), MacType.line, .webSecondary, width: column.width) }
+ if let emptyView {
+ emptyView.frame.origin = NSPoint(x: column.x, y: y)
+ if emptyView.superview == nil { document.addSubview(emptyView) }
+ y += emptyView.frame.height
+ }
+ } else { emptyView?.removeFromSuperview(); emptyView = nil }
contentHeight = y + 24
document.frame = NSRect(x: 0, y: 0, width: bounds.width, height: max(contentHeight, scroll.bounds.height))
}
+ private func makeRow(_ item: FeedItem, width: CGFloat) -> NSView {
+ renderedRevisions += 1
+ if let reply = item.reply { return coordinatorRow(reply, id: item.id, width: width) }
+ let row = rows[item.id]?.view ?? FlippedView()
+ row.subviews.forEach { $0.removeFromSuperview() }
+ let content = width - MacMetric.gutter
+ var y: CGFloat = 0
+ func place(_ view: NSView, x: CGFloat = 0, gapAfter: CGFloat = 22) {
+ view.frame.origin = NSPoint(x: x, y: y)
+ row.addSubview(view)
+ y = view.frame.maxY + gapAfter
+ }
+ func placeCard(_ plate: RaisedPlate) {
+ plate.frame.origin = NSPoint(x: MacMetric.gutter - MacMetric.shadow, y: y - MacMetric.shadow)
+ row.addSubview(plate, positioned: .below, relativeTo: nil)
+ y += plate.content.frame.height + 24
+ }
+ switch item {
+ case .own(let message):
+ place(ownBubble(message.text, width: width), x: width - ownWidth(message.text, width: width))
+ case .coordinator, .draft: break
+ case .outgoing(let outgoing):
+ let bubble = ownBubble(outgoing.text, width: width)
+ bubble.alphaValue = outgoing.state == .sending ? 0.6 : 1
+ place(bubble, x: width - bubble.frame.width, gapAfter: 4)
+ let status = outgoingStatus(outgoing)
+ place(status, x: width - status.frame.width)
+ case .report(_, let byline, let report, let compact):
+ place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
+ place(hosted(LiveReport(report: report, compact: compact, wide: true) { [weak self] in self?.openTask(report.task.id) }, width: width), gapAfter: 24)
+ case .question(let card, let byline):
+ place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
+ placeCard(questionCard(card, taskTitle: session.task(card.taskId)?.title, width: content))
+ case .decision(let card, let byline):
+ place(bylineView(byline, width: width), gapAfter: MacMetric.bylineGap)
+ placeCard(decisionCard(card, taskTitle: session.task(card.taskId)?.title, width: content))
+ case .receipt(let card, _): place(receiptRow(card, width: width))
+ case .thinking(let turn, let activity):
+ let session = self.session
+ place(hosted(ThinkingLine(turn: turn, activity: activity, stopping: session.stopping.contains(turn.id)) { Task { await session.stop(turn) } }, width: width))
+ }
+ row.frame.size = NSSize(width: width, height: y)
+ return row
+ }
+
/// Scrolls a card (a tapped notification's) into view; false while the feed lacks it.
@discardableResult
func reveal(card id: String) -> Bool {
@@ -196,13 +258,16 @@ final class LiveTranscript: NSView {
}
private func coordinatorRow(_ reply: TranscriptReply, id: String, width: CGFloat) -> NSView {
- let row = FlippedView(frame: NSRect(x: 0, y: 0, width: width, height: 0))
- let mark = sparkleView(); mark.frame.origin = NSPoint(x: 0, y: 4); row.addSubview(mark)
- let time = reply.date.formatted(date: .omitted, time: .shortened)
- let timeLabel = makeText(time, MacType.time, .webFaint)
- centre(timeLabel, x: MacMetric.gutter, row: 0, height: MacMetric.tile); row.addSubview(timeLabel)
+ let row = rows[id]?.view ?? FlippedView()
+ if rows[id]?.revision.item.reply?.date != reply.date {
+ for child in row.subviews where child !== replyHosts[id] { child.removeFromSuperview() }
+ let mark = sparkleView(); mark.frame.origin = NSPoint(x: 0, y: 4); row.addSubview(mark)
+ let time = reply.date.formatted(date: .omitted, time: .shortened)
+ let timeLabel = makeText(time, MacType.time, .webFaint)
+ centre(timeLabel, x: MacMetric.gutter, row: 0, height: MacMetric.tile); row.addSubview(timeLabel)
+ }
let innerWidth = min(width - MacMetric.gutter, 620)
- let content = MarkdownReplyHost(messageID: id, reply: reply, origin: session.origin, width: innerWidth, openTask: { [weak self] in self?.openTask($0) }, onHeightChange: { [weak self] in
+ let content = MarkdownReplyHost(messageID: id, reply: reply, origin: session.origin, transcript: session.markdown, width: innerWidth, openTask: { [weak self] in self?.openTask($0) }, onHeightChange: { [weak self] in
// Parsing completes away from the main actor. Remeasure the host
// when the resulting SwiftUI content changes its intrinsic height.
Task { @MainActor [weak self] in
@@ -217,8 +282,8 @@ final class LiveTranscript: NSView {
host.rootView = content
host.frame = NSRect(x: MacMetric.gutter, y: MacMetric.tile + 2, width: innerWidth, height: ceil(host.fittingSize.height))
replyHosts[id] = host
- row.addSubview(host)
- row.frame.size.height = host.frame.maxY
+ if host.superview == nil { row.addSubview(host) }
+ row.frame.size = NSSize(width: width, height: host.frame.maxY + 22)
return row
}
@@ -545,11 +610,12 @@ private struct MarkdownReplyHost: View {
let messageID: String
let reply: TranscriptReply
let origin: URL
+ let transcript: MarkdownTranscript
let width: CGFloat
let openTask: (String) -> Void
let onHeightChange: () -> Void
var body: some View {
- ChatMarkdownView(reply.text, draft: reply.draft, messageID: messageID, origin: origin, openTask: openTask, onHeightChange: onHeightChange)
+ ChatMarkdownView(reply.text, draft: reply.draft, messageID: messageID, origin: origin, transcript: transcript, openTask: openTask, onHeightChange: onHeightChange)
.frame(width: width, alignment: .leading)
}
}
diff --git a/native/apple/Tests/EquipoKitTests/ChatMarkdownTests.swift b/native/apple/Tests/EquipoKitTests/ChatMarkdownTests.swift
index 53a2a0a9..8faa2039 100644
--- a/native/apple/Tests/EquipoKitTests/ChatMarkdownTests.swift
+++ b/native/apple/Tests/EquipoKitTests/ChatMarkdownTests.swift
@@ -132,7 +132,12 @@ struct MarkdownGolden: Codable {
#expect(account.contains("MarkdownNotices()"))
let renderer = try String(contentsOf: apple.appendingPathComponent("Sources/EquipoKit/Markdown/ChatMarkdownView.swift"), encoding: .utf8)
#expect(renderer.contains(".accessibilityLabel(Text(verbatim: MarkdownPresentation.pasteLabel(node)))"))
- #expect(renderer.contains("await ChatMarkdown.parseInBackground"))
+ let streaming = try String(contentsOf: apple.appendingPathComponent("Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift"), encoding: .utf8)
+ #expect(streaming.contains("await ChatMarkdown.parseInBackground"))
+ #expect(renderer.contains(".onChange(of: request)"))
+ #expect(renderer.contains(".onAppear {"))
+ #expect(!renderer.contains(".onDisappear"))
+ #expect(renderer.contains("stream = transcript.renderer(for: request.messageID)"))
let strings = try String(contentsOf: apple.deletingLastPathComponent().appendingPathComponent("scripts/strings.json"), encoding: .utf8)
#expect(!strings.contains("message.coordinator_spoken"))
let parser = try String(contentsOf: apple.appendingPathComponent("Sources/EquipoKit/Markdown/ChatMarkdown.swift"), encoding: .utf8)
diff --git a/native/apple/Tests/EquipoKitTests/Fixtures/markdown/golden.json b/native/apple/Tests/EquipoKitTests/Fixtures/markdown/golden.json
index f5815111..14a07133 100644
--- a/native/apple/Tests/EquipoKitTests/Fixtures/markdown/golden.json
+++ b/native/apple/Tests/EquipoKitTests/Fixtures/markdown/golden.json
@@ -349,6 +349,16 @@
{"name":"case-173-true","source":"```\tsh\t","draft":true,"tree":[]},
{"name":"case-174-false","source":"```\tsh\r","draft":false,"tree":[{"kind":"paste","label":"Command","copy":"Copy","copied":"Copied","copyEnabled":true,"children":[]}]},
{"name":"case-174-true","source":"```\tsh\r","draft":true,"tree":[]},
+{"name":"case-175-false","source":"`*_test.go","draft":false,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"`*_test.go","children":[]}]}]},
+{"name":"case-175-true","source":"`*_test.go","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"test.go","children":[]}]}]},
+{"name":"case-176-false","source":"`a_b_c","draft":false,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"`a_b_c","children":[]}]}]},
+{"name":"case-176-true","source":"`a_b_c","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"b_c","children":[]}]}]},
+{"name":"case-177-false","source":"`resizeReply(_:)","draft":false,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"`resizeReply(_:)","children":[]}]}]},
+{"name":"case-177-true","source":"`resizeReply(_:)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":":)","children":[]}]}]},
+{"name":"case-178-false","source":"`[text](url)","draft":false,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"`text","children":[]}]}]},
+{"name":"case-178-true","source":"`[text](url)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"case-179-false","source":"`![alt](src)","draft":false,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"`alt","children":[]}]}]},
+{"name":"case-179-true","source":"`![alt](src)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
{"name":"stream-0-0000","source":"","draft":true,"tree":[]},
{"name":"stream-0-0001","source":"I","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"I","children":[]}]}]},
{"name":"stream-0-0002","source":"I ","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"I","children":[]}]}]},
@@ -3508,5 +3518,71 @@
{"name":"stream-71-0018","source":"a\\\\[a\\]b](/tasks/t","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"a\\[a]b](/tasks/t","children":[]}]}]},
{"name":"stream-71-0019","source":"a\\\\[a\\]b](/tasks/tk","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"a\\[a]b](/tasks/tk","children":[]}]}]},
{"name":"stream-71-0020","source":"a\\\\[a\\]b](/tasks/tk1","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"a\\[a]b](/tasks/tk1","children":[]}]}]},
-{"name":"stream-71-0021","source":"a\\\\[a\\]b](/tasks/tk1)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"a\\","children":[]},{"kind":"link","target":"/tasks/tk1","children":[{"kind":"text","text":"a]b","children":[]}]}]}]}
+{"name":"stream-71-0021","source":"a\\\\[a\\]b](/tasks/tk1)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"a\\","children":[]},{"kind":"link","target":"/tasks/tk1","children":[{"kind":"text","text":"a]b","children":[]}]}]}]},
+{"name":"stream-72-0000","source":"","draft":true,"tree":[]},
+{"name":"stream-72-0001","source":"`","draft":true,"tree":[]},
+{"name":"stream-72-0002","source":"`*","draft":true,"tree":[]},
+{"name":"stream-72-0003","source":"`*_","draft":true,"tree":[]},
+{"name":"stream-72-0004","source":"`*_t","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"t","children":[]}]}]},
+{"name":"stream-72-0005","source":"`*_te","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"te","children":[]}]}]},
+{"name":"stream-72-0006","source":"`*_tes","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"tes","children":[]}]}]},
+{"name":"stream-72-0007","source":"`*_test","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"test","children":[]}]}]},
+{"name":"stream-72-0008","source":"`*_test.","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"test.","children":[]}]}]},
+{"name":"stream-72-0009","source":"`*_test.g","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"test.g","children":[]}]}]},
+{"name":"stream-72-0010","source":"`*_test.go","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"test.go","children":[]}]}]},
+{"name":"stream-72-0011","source":"`*_test.go`","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"code","text":"*_test.go","children":[]}]}]},
+{"name":"stream-73-0000","source":"","draft":true,"tree":[]},
+{"name":"stream-73-0001","source":"`","draft":true,"tree":[]},
+{"name":"stream-73-0002","source":"`a","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"a","children":[]}]}]},
+{"name":"stream-73-0003","source":"`a_","draft":true,"tree":[{"kind":"paragraph","children":[]}]},
+{"name":"stream-73-0004","source":"`a_b","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"b","children":[]}]}]},
+{"name":"stream-73-0005","source":"`a_b_","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"b","children":[]}]}]},
+{"name":"stream-73-0006","source":"`a_b_c","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"b_c","children":[]}]}]},
+{"name":"stream-73-0007","source":"`a_b_c`","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"code","text":"a_b_c","children":[]}]}]},
+{"name":"stream-74-0000","source":"","draft":true,"tree":[]},
+{"name":"stream-74-0001","source":"`","draft":true,"tree":[]},
+{"name":"stream-74-0002","source":"`r","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"r","children":[]}]}]},
+{"name":"stream-74-0003","source":"`re","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"re","children":[]}]}]},
+{"name":"stream-74-0004","source":"`res","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"res","children":[]}]}]},
+{"name":"stream-74-0005","source":"`resi","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resi","children":[]}]}]},
+{"name":"stream-74-0006","source":"`resiz","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resiz","children":[]}]}]},
+{"name":"stream-74-0007","source":"`resize","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resize","children":[]}]}]},
+{"name":"stream-74-0008","source":"`resizeR","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resizeR","children":[]}]}]},
+{"name":"stream-74-0009","source":"`resizeRe","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resizeRe","children":[]}]}]},
+{"name":"stream-74-0010","source":"`resizeRep","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resizeRep","children":[]}]}]},
+{"name":"stream-74-0011","source":"`resizeRepl","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resizeRepl","children":[]}]}]},
+{"name":"stream-74-0012","source":"`resizeReply","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resizeReply","children":[]}]}]},
+{"name":"stream-74-0013","source":"`resizeReply(","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"resizeReply(","children":[]}]}]},
+{"name":"stream-74-0014","source":"`resizeReply(_","draft":true,"tree":[{"kind":"paragraph","children":[]}]},
+{"name":"stream-74-0015","source":"`resizeReply(_:","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":":","children":[]}]}]},
+{"name":"stream-74-0016","source":"`resizeReply(_:)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":":)","children":[]}]}]},
+{"name":"stream-74-0017","source":"`resizeReply(_:)`","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"code","text":"resizeReply(_:)","children":[]}]}]},
+{"name":"stream-75-0000","source":"","draft":true,"tree":[]},
+{"name":"stream-75-0001","source":"`","draft":true,"tree":[]},
+{"name":"stream-75-0002","source":"`[","draft":true,"tree":[{"kind":"paragraph","children":[]}]},
+{"name":"stream-75-0003","source":"`[t","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"t","children":[]}]}]},
+{"name":"stream-75-0004","source":"`[te","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"te","children":[]}]}]},
+{"name":"stream-75-0005","source":"`[tex","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"tex","children":[]}]}]},
+{"name":"stream-75-0006","source":"`[text","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"stream-75-0007","source":"`[text]","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"stream-75-0008","source":"`[text](","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"stream-75-0009","source":"`[text](u","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"stream-75-0010","source":"`[text](ur","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"stream-75-0011","source":"`[text](url","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"stream-75-0012","source":"`[text](url)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"text","children":[]}]}]},
+{"name":"stream-75-0013","source":"`[text](url)`","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"code","text":"[text](url)","children":[]}]}]},
+{"name":"stream-76-0000","source":"","draft":true,"tree":[]},
+{"name":"stream-76-0001","source":"`","draft":true,"tree":[]},
+{"name":"stream-76-0002","source":"`!","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"!","children":[]}]}]},
+{"name":"stream-76-0003","source":"`![","draft":true,"tree":[{"kind":"paragraph","children":[]}]},
+{"name":"stream-76-0004","source":"`![a","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"a","children":[]}]}]},
+{"name":"stream-76-0005","source":"`![al","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"al","children":[]}]}]},
+{"name":"stream-76-0006","source":"`![alt","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
+{"name":"stream-76-0007","source":"`![alt]","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
+{"name":"stream-76-0008","source":"`![alt](","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
+{"name":"stream-76-0009","source":"`![alt](s","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
+{"name":"stream-76-0010","source":"`![alt](sr","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
+{"name":"stream-76-0011","source":"`![alt](src","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
+{"name":"stream-76-0012","source":"`![alt](src)","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"text","text":"alt","children":[]}]}]},
+{"name":"stream-76-0013","source":"`![alt](src)`","draft":true,"tree":[{"kind":"paragraph","children":[{"kind":"code","text":"![alt](src)","children":[]}]}]}
]
diff --git a/native/apple/Tests/EquipoKitTests/MacTranscriptTests.swift b/native/apple/Tests/EquipoKitTests/MacTranscriptTests.swift
new file mode 100644
index 00000000..88aa5523
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/MacTranscriptTests.swift
@@ -0,0 +1,123 @@
+#if os(macOS)
+import AppKit
+import Foundation
+import Testing
+@testable import EquipoKit
+@testable import EquipoMac
+
+@MainActor private final class WindowMoveProbe: NSView {
+ var moves = 0
+ override func viewDidMoveToWindow() { super.viewDidMoveToWindow(); moves += 1 }
+}
+
+@MainActor @Suite(.serialized) struct MacTranscriptTests {
+ func fixture() throws -> (EquipoSession, [FeedItem]) {
+ let origin = URL(string: "https://transcript.example.test")!
+ let session = EquipoSession(account: .new(origin: origin, label: "Test"), accounts: DeviceAccounts(store: MemorySecretStore()))
+ let snapshot: Snapshot = try Fixture.decode("thin/snapshot")
+ let template = try #require(snapshot.messages?.first)
+ let items: [FeedItem] = (0..<50).map { i in
+ var message = template
+ message.id = "message-\(i)"; message.turnId = "turn-\(i)"
+ message.text = "**Reply \(i)**\n\n" + String(repeating: "This is a realistic reply with a [task](/tasks/tk1). ", count: 5)
+ return .coordinator(message)
+ }
+ return (session, items)
+ }
+ @Test func fiftyRepliesUpdateOnlyTheChangedRowWithinBudget() throws {
+ let (session, initial) = try fixture()
+ var items = initial
+ let view = LiveTranscript(session: session, openTask: { _ in })
+ view.frame = NSRect(x: 0, y: 0, width: 900, height: 800)
+ let window = NSWindow(contentRect: view.frame, styleMask: [.borderless], backing: .buffered, defer: false)
+ window.contentView = view
+ defer { window.contentView = nil }
+ view.update(items: items)
+ view.layoutSubtreeIfNeeded()
+ let document = try #require(view.subviews.compactMap { $0 as? NSScrollView }.first?.documentView)
+ let rows = document.subviews
+ #expect(rows.count == 50)
+ let probes = rows.map { row in
+ let probe = WindowMoveProbe()
+ row.addSubview(probe)
+ return probe
+ }
+ let initialMoves = probes.map(\.moves)
+ func hosts(_ row: NSView) -> [NSView] { row.subviews.filter { String(reflecting: type(of: $0)).contains("NSHostingView") } }
+ let initialHosts = try rows.map { try #require(hosts($0).first) }
+ let initialRevisions = view.renderedRevisions
+ var times: [Double] = []
+ for revision in 1...10 {
+ guard case .coordinator(var message) = items[49] else { return }
+ message.text += " More words \(revision)."; message.revision += 1
+ items[49] = .coordinator(message)
+ let start = ContinuousClock.now
+ view.update(items: items)
+ view.layoutSubtreeIfNeeded()
+ let elapsed = start.duration(to: .now).components
+ times.append(Double(elapsed.seconds) * 1000 + Double(elapsed.attoseconds) / 1e15)
+ #expect(view.renderedRevisions == initialRevisions + revision, "only the changed row receives content")
+ #expect(document.subviews.count == 50)
+ #expect(probes.map(\.moves) == initialMoves, "updates must not detach and reattach existing rows")
+ #expect(zip(rows, initialHosts).allSatisfy { hosts($0).count == 1 && hosts($0).first === $1 }, "each reply keeps its single host")
+ #expect(zip(document.subviews, rows).allSatisfy { $0 === $1 }, "feed deltas must preserve row identity, including the changed reply")
+ }
+ let median = times.sorted()[times.count / 2]
+ print("Mac transcript: 50 replies, update median \(median) ms, max \(times.max() ?? 0) ms")
+ // 50 ms allows debug builds and shared CI machines; it still rejects
+ // the observed 1,156 ms full rebuild by more than an order of magnitude.
+ #expect(median < 50)
+ view.update(items: Array(items.dropFirst()))
+ #expect(document.subviews.count == 49)
+ #expect(rows[0].superview == nil)
+ #expect(zip(document.subviews, rows.dropFirst()).allSatisfy { $0 === $1 })
+ view.update(items: Array(items.reversed()))
+ #expect(document.subviews.count == 50)
+ #expect(zip(document.subviews.dropLast(), rows.dropFirst().reversed()).allSatisfy { $0 === $1 })
+ #expect(document.subviews.last !== rows[0], "a removed row gets a fresh lifetime when reinserted")
+ let ordered = document.subviews
+ #expect(zip(ordered, ordered.dropFirst()).allSatisfy { $0.frame.maxY <= $1.frame.minY })
+ view.frame.size.width = 1100
+ view.layoutSubtreeIfNeeded()
+ #expect(zip(document.subviews, ordered).allSatisfy { $0 === $1 }, "width changes resize existing rows")
+ #expect(document.subviews.allSatisfy { $0.frame.width == 768 })
+ }
+
+ @Test func actualTranscriptGrowsThroughFastLargeDeltas() async throws {
+ let (session, history) = try fixture()
+ let snapshot: Snapshot = try Fixture.decode("thin/snapshot")
+ var turn = try #require(snapshot.turns?.first)
+ turn.id = "live"; turn.state = "running"
+ let text = String(repeating: "A long reply with **emphasis** and words. ", count: 1000)
+ let view = LiveTranscript(session: session, openTask: { _ in })
+ view.frame = NSRect(x: 0, y: 0, width: 900, height: 800)
+ let window = NSWindow(contentRect: view.frame, styleMask: [.borderless], backing: .buffered, defer: false)
+ window.contentView = view
+ defer { window.contentView = nil; session.markdown.removeAll() }
+ func feed(_ count: Int) -> [FeedItem] { Array(history.prefix(49)) + [.draft(turn, text: String(text.prefix(count)))] }
+ view.update(items: feed(16000))
+ view.layoutSubtreeIfNeeded()
+ let document = try #require(view.subviews.compactMap { $0 as? NSScrollView }.first?.documentView)
+ let rows = document.subviews
+ let reply = try #require(rows.last)
+ var heights: [CGFloat] = []
+ for step in 1...67 {
+ view.update(items: feed(17000 + 8000 * step / 67))
+ try await Task.sleep(for: .milliseconds(5))
+ heights.append(reply.frame.height)
+ #expect(zip(document.subviews, rows).allSatisfy { $0 === $1 })
+ }
+ let renderer = session.markdown.renderer(for: session.origin.absoluteString + "/reply-" + turn.id)
+ #expect(renderer.publication != nil)
+ print("Mac live transcript: \(Set(heights.dropLast()).count) growing heights during 67 deltas")
+ #expect(Set(heights.dropLast()).count >= 5)
+ var message = try #require(snapshot.messages?.first)
+ message.id = "completed"; message.turnId = turn.id; message.text = String(text.prefix(25000))
+ view.update(items: Array(history.prefix(49)) + [.coordinator(message)])
+ #expect(document.subviews.last === reply, "completion updates the same row")
+ view.update(items: Array(history.prefix(49)))
+ #expect(reply.superview == nil)
+ #expect(renderer.publication == nil, "removing the message ends its parser lifetime")
+ }
+}
+#endif
diff --git a/native/apple/Tests/EquipoKitTests/MarkdownLayoutTests.swift b/native/apple/Tests/EquipoKitTests/MarkdownLayoutTests.swift
index 719e88f6..39821578 100644
--- a/native/apple/Tests/EquipoKitTests/MarkdownLayoutTests.swift
+++ b/native/apple/Tests/EquipoKitTests/MarkdownLayoutTests.swift
@@ -69,8 +69,9 @@ import AppKit
}
@Test func liveHostAppliesBackgroundParseAndNotifiesItsHeight() async throws {
+ let transcript = MarkdownTranscript()
var changes = 0
- let host = NSHostingView(rootView: ChatMarkdownView("**First reply**", origin: URL(string: "https://team.example.test")!, openTask: { _ in }, onHeightChange: { changes += 1 }).frame(width: 390))
+ let host = NSHostingView(rootView: ChatMarkdownView("**First reply**", origin: URL(string: "https://team.example.test")!, transcript: transcript, openTask: { _ in }, onHeightChange: { changes += 1 }).frame(width: 390))
let window = NSWindow(contentRect: NSRect(x: -10000, y: -10000, width: 390, height: 500), styleMask: [.borderless], backing: .buffered, defer: false)
window.contentView = host
defer { window.contentView = nil }
@@ -78,16 +79,68 @@ import AppKit
#expect(host.fittingSize.height > 10, "the very first layout must contain the reply")
let initial = host.fittingSize.height
#expect(initial > 10)
- host.rootView = ChatMarkdownView("**First reply**\n\nSecond paragraph.\n\n```text\nA complete paste box.\n```", origin: URL(string: "https://team.example.test")!, openTask: { _ in }, onHeightChange: { changes += 1 }).frame(width: 390)
+ host.rootView = ChatMarkdownView("**First reply**\n\nSecond paragraph.\n\n```text\nA complete paste box.\n```", origin: URL(string: "https://team.example.test")!, transcript: transcript, openTask: { _ in }, onHeightChange: { changes += 1 }).frame(width: 390)
for _ in 0..<100 where host.fittingSize.height <= initial { try await Task.sleep(for: .milliseconds(10)) }
#expect(host.fittingSize.height > initial + 20)
#expect(changes >= 2)
}
+ @Test func fastDeltasKeepA64KiBReplyGrowing() async throws {
+ let transcript = MarkdownTranscript()
+ let text = String(String(repeating: "A streaming reply with words and **emphasis**. ", count: 2000).prefix(65_536))
+ let origin = URL(string: "https://stream.example.test")!
+ let id = UUID().uuidString
+ func view(_ length: Int) -> some View {
+ ChatMarkdownView(String(text.prefix(length)), draft: true, messageID: id, origin: origin, transcript: transcript, openTask: { _ in }).frame(width: 390)
+ }
+ let host = NSHostingView(rootView: view(16_000))
+ let window = NSWindow(contentRect: NSRect(x: -10000, y: -10000, width: 390, height: 500), styleMask: [.borderless], backing: .buffered, defer: false)
+ window.contentView = host
+ defer { window.contentView = nil }
+ var heights: [CGFloat] = []
+ for step in 1...67 {
+ let length = 16_000 + (65_536 - 16_000) * step / 67
+ host.rootView = view(length)
+ try await Task.sleep(for: .milliseconds(5))
+ heights.append(host.fittingSize.height)
+ }
+ #expect(Set(heights.dropLast()).count >= 6, "visible text must grow during the fast stream, not only after it stops")
+ let deadline = ContinuousClock.now.advanced(by: .seconds(3))
+ let before = heights.first ?? 0
+ while host.fittingSize.height < before * 3 && ContinuousClock.now < deadline { try await Task.sleep(for: .milliseconds(10)) }
+ #expect(host.fittingSize.height > before * 3)
+ }
+
+ @Test func rehostingDoesNotEndTheMessageParse() async throws {
+ let transcript = MarkdownTranscript()
+ let text = String(repeating: "Words in a reply with **emphasis**. ", count: 1000)
+ let id = UUID().uuidString
+ let origin = URL(string: "https://rehost.example.test")!
+ func view(_ count: Int) -> some View {
+ ChatMarkdownView(String(text.prefix(count)), draft: true, messageID: id, origin: origin, transcript: transcript, openTask: { _ in }).frame(width: 620)
+ }
+ let window = NSWindow(contentRect: NSRect(x: -10000, y: -10000, width: 700, height: 500), styleMask: [.borderless], backing: .buffered, defer: false)
+ let host = NSHostingView(rootView: view(16000))
+ window.contentView = host
+ host.layoutSubtreeIfNeeded()
+ defer { window.contentView = nil }
+ var heights: [CGFloat] = []
+ for step in 1...67 {
+ host.removeFromSuperview()
+ window.contentView = NSView()
+ host.rootView = view(17000 + 8000 * step / 67)
+ window.contentView?.addSubview(host)
+ try await Task.sleep(for: .milliseconds(5))
+ heights.append(host.fittingSize.height)
+ }
+ #expect(Set(heights.dropLast()).count >= 5, "re-hosting must not cancel the message's in-flight parse")
+ }
+
@Test func largeReplyHasMultilineContentOnItsFirstFrame() {
+ let transcript = MarkdownTranscript()
let text = String(repeating: "A line of this large reply.\n", count: 800)
for draft in [false, true] {
- let host = NSHostingView(rootView: ChatMarkdownView(text, draft: draft, messageID: "large-first-frame-\(draft)", origin: URL(string: "https://team.example.test")!, openTask: { _ in }).frame(width: 390))
+ let host = NSHostingView(rootView: ChatMarkdownView(text, draft: draft, messageID: "large-first-frame-\(draft)", origin: URL(string: "https://team.example.test")!, transcript: transcript, openTask: { _ in }).frame(width: 390))
#expect(host.fittingSize.height > 8000, "the fallback preserves line breaks before any async parse")
}
}
diff --git a/native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift b/native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift
new file mode 100644
index 00000000..1c5a7521
--- /dev/null
+++ b/native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift
@@ -0,0 +1,148 @@
+import Foundation
+import Testing
+@testable import EquipoKit
+
+@MainActor @Suite struct MarkdownParsingStreamTests {
+ @Test func coalescesFastDeltasAndPublishesBeforeTheStreamEnds() async throws {
+ var started = 0, active = 0, maximumActive = 0, cancelled = 0
+ let renderer = MarkdownStreamRenderer(cache: MarkdownRenderCache()) { request in
+ started += 1; active += 1; maximumActive = max(maximumActive, active)
+ defer { active -= 1 }
+ do { try await Task.sleep(for: .milliseconds(25)) } catch { cancelled += 1 }
+ return await ChatMarkdown.parseInBackground(request.text, draft: request.draft)
+ }
+ let source = String(String(repeating: "Words in a long streaming reply. ", count: 4000).prefix(65_536))
+ var published: [Int] = []
+ for step in 1...67 {
+ let size = 16_000 + (65_536 - 16_000) * step / 67
+ renderer.submit(.init(messageID: "fast", text: String(source.prefix(size)), draft: true))
+ try await Task.sleep(for: .milliseconds(5))
+ if let size = renderer.publication?.request.text.utf8.count, published.last != size { published.append(size) }
+ }
+ #expect(published.count >= 5, "parses must publish while faster deltas are arriving")
+ #expect(published == published.sorted())
+ #expect(maximumActive == 1)
+ #expect(cancelled == 0, "appending deltas must not cancel an in-flight parse")
+ let final = MarkdownRenderCache.Request(messageID: "fast", text: source, draft: false)
+ renderer.submit(final)
+ let deadline = ContinuousClock.now.advanced(by: .seconds(3))
+ while renderer.publication?.request != final && ContinuousClock.now < deadline { try await Task.sleep(for: .milliseconds(10)) }
+ #expect(renderer.publication?.request == final)
+ #expect(renderer.publication?.tree == ChatMarkdown.parse(source, draft: false))
+ print("Streaming proof: \(published.count) growing publications during 67 deltas, \(started) parses, \(cancelled) cancellations, max concurrent \(maximumActive)")
+ renderer.stop()
+ }
+
+ @Test func coalescesHeldParseToOnlyTheLatestRevision() async throws {
+ var requests: [MarkdownRenderCache.Request] = []
+ var held: [CheckedContinuation<[ChatMarkdownNode], Never>] = []
+ let renderer = MarkdownStreamRenderer(cache: MarkdownRenderCache()) { request in
+ requests.append(request)
+ return await withCheckedContinuation { held.append($0) }
+ }
+ let first = MarkdownRenderCache.Request(messageID: "held", text: "start", draft: true)
+ renderer.submit(first)
+ for _ in 0..<100 where held.isEmpty { await Task.yield() }
+ #expect(requests == [first])
+ for size in 1...67 {
+ renderer.submit(.init(messageID: "held", text: "start" + String(repeating: "x", count: size), draft: true))
+ }
+ let final = MarkdownRenderCache.Request(messageID: "held", text: "start" + String(repeating: "x", count: 67), draft: false)
+ renderer.submit(final)
+ held[0].resume(returning: [ChatMarkdownNode(kind: "text", text: "start")])
+ for _ in 0..<100 where held.count < 2 { await Task.yield() }
+ #expect(renderer.publication?.request == first, "the completed prefix publishes even with newer deltas pending")
+ #expect(requests == [first, final], "all pending deltas collapse into the latest completed revision")
+ try #require(held.count == 2)
+ held[1].resume(returning: [ChatMarkdownNode(kind: "text", text: final.text)])
+ for _ in 0..<100 where renderer.publication?.request != final { await Task.yield() }
+ #expect(renderer.publication?.request == final)
+ #expect(requests.count == 2)
+ renderer.stop()
+ }
+
+ @Test func messageOwnerKeepsWorkUntilRemovalAndRejectsItsLateResult() async throws {
+ var held: CheckedContinuation<[ChatMarkdownNode], Never>?
+ let renderer = MarkdownStreamRenderer(cache: MarkdownRenderCache()) { _ in
+ await withCheckedContinuation { held = $0 }
+ }
+ let transcript = MarkdownTranscript(makeRenderer: { renderer })
+ let origin = URL(string: "https://owner.example.test")!
+ let key = origin.absoluteString + "/reply"
+ let independent = MarkdownTranscript()
+ #expect(independent.renderer(for: key) === independent.renderer(for: key))
+ let owned = transcript.renderer(for: key)
+ owned.submit(.init(messageID: key, text: "draft", draft: true))
+ for _ in 0..<100 where held == nil { await Task.yield() }
+ transcript.retainMessages(["reply"], origin: origin)
+ #expect(transcript.renderer(for: key) === owned)
+ transcript.retainMessages([], origin: origin)
+ try #require(held).resume(returning: [ChatMarkdownNode(kind: "text", text: "late")])
+ try await Task.sleep(for: .milliseconds(1))
+ #expect(owned.publication == nil)
+ }
+
+ @Test func snapshotRemovingDraftEndsOwnedMarkdown() async throws {
+ let helper = MarkdownStreamTests()
+ let (session, original, id) = try helper.fixture()
+ try await helper.delta(session, id, 0, "draft")
+ let key = session.origin.absoluteString + "/reply-" + id
+ let renderer = session.markdown.renderer(for: key)
+ renderer.submit(.init(messageID: key, text: "draft", draft: true))
+ for _ in 0..<1000 where renderer.publication == nil { await Task.yield() }
+ try #require(renderer.publication != nil)
+ var snapshot = original
+ snapshot.turns?[0].state = "cancelled"
+ snapshot.turns?[0].revision += 1
+ session.apply(snapshot)
+ #expect(renderer.publication == nil)
+ }
+
+ @Test func sessionDepartureEndsOwnedMarkdown() async throws {
+ let origin = URL(string: "https://owner.example.test")!
+ let session = EquipoSession(account: .new(origin: origin, label: "Test"), accounts: DeviceAccounts(store: MemorySecretStore()))
+ let key = origin.absoluteString + "/reply"
+ let renderer = session.markdown.renderer(for: key)
+ renderer.submit(.init(messageID: key, text: "**reply**", draft: false))
+ for _ in 0..<1000 where renderer.publication == nil { await Task.yield() }
+ try #require(renderer.publication != nil)
+ session.invalidate()
+ #expect(renderer.publication == nil)
+ }
+
+ @Test func stoppedOrReplacedReplyCannotPublishLateWork() async throws {
+ var held: [CheckedContinuation<[ChatMarkdownNode], Never>] = []
+ let renderer = MarkdownStreamRenderer(cache: MarkdownRenderCache()) { _ in
+ await withCheckedContinuation { held.append($0) }
+ }
+ func waitFor(_ count: Int) async {
+ for _ in 0..<100 where held.count < count { await Task.yield() }
+ }
+ renderer.submit(.init(messageID: "old", text: "old", draft: true))
+ await waitFor(1)
+ #expect(held.count == 1)
+ renderer.submit(.init(messageID: "new", text: "new", draft: true))
+ await waitFor(2)
+ #expect(held.count == 2)
+ held[1].resume(returning: [ChatMarkdownNode(kind: "text", text: "new")])
+ for _ in 0..<100 where renderer.publication == nil { await Task.yield() }
+ #expect(renderer.publication?.request.messageID == "new")
+ held[0].resume(returning: [ChatMarkdownNode(kind: "text", text: "old")])
+ try await Task.sleep(for: .milliseconds(1))
+ #expect(renderer.publication?.request.messageID == "new")
+ #expect(renderer.visible(for: .init(messageID: "old", text: "old", draft: true)) == nil)
+ renderer.submit(.init(messageID: "new", text: "newer", draft: true))
+ await waitFor(3)
+ renderer.stop()
+ held[2].resume(returning: [ChatMarkdownNode(kind: "text", text: "newer")])
+ try await Task.sleep(for: .milliseconds(1))
+ #expect(renderer.publication == nil)
+ renderer.submit(.init(messageID: "new", text: "newer", draft: true))
+ await waitFor(4)
+ #expect(held.count == 4, "a returning view restarts its stopped worker")
+ held[3].resume(returning: [ChatMarkdownNode(kind: "text", text: "newer")])
+ for _ in 0..<100 where renderer.publication == nil { await Task.yield() }
+ #expect(renderer.publication?.request.text == "newer")
+ renderer.stop()
+ }
+}
diff --git a/scripts/runner-reference-allowlist.json b/scripts/runner-reference-allowlist.json
index 319e7278..ae534103 100644
--- a/scripts/runner-reference-allowlist.json
+++ b/scripts/runner-reference-allowlist.json
@@ -16729,6 +16729,48 @@
"count": 1,
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
},
+ {
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
+ "line_sha256": "16bf5eea0d21f9a93d2655d57d30811e981b63af31bc1a025b76959e745c4a8e",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
+ "line_sha256": "22bde4929c9e2357172db55ff53871eaf095aa9958e4a0793686165bea28ea39",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
+ "line_sha256": "792268bb90ae50a669672d504154f405fdc93962dd732e45823d66977c7e3a83",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
+ "line_sha256": "90488618aff05703a85ccc1e3b6b60dde9f89cae8da538f4396d9c56996eb12f",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
+ "line_sha256": "90d767ddbf1a9aca8e977bff7cd2df171bc17c5b0cc88eccd7da73d3777da91a",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
+ "line_sha256": "dc057e47fb5b5b83c995bace0f8282dc415df1bcaf339651b8030f5fdb14e042",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
{
"path": "internal/chatmarkdown/native_test.go",
"line_sha256": "0a5fa6f5c21fdf7b38554d3246496046bb7121508d1df7d02b7a3833594fd7a1",
@@ -17905,13 +17947,6 @@
"count": 2,
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
},
- {
- "path": "native/apple/Sources/EquipoKit/Markdown/ChatMarkdownView.swift",
- "line_sha256": "65fb634bb0653aad147cff99c38cb20aa41e69484830225085cf920a21e6ac66",
- "match": "Node",
- "count": 1,
- "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
- },
{
"path": "native/apple/Sources/EquipoKit/Markdown/ChatMarkdownView.swift",
"line_sha256": "696796f94dbd4d188109efd601383d252de06bfbfa5b65cd15a90b1bf2c6145e",
@@ -18081,43 +18116,29 @@
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
},
{
- "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift",
"line_sha256": "16bf5eea0d21f9a93d2655d57d30811e981b63af31bc1a025b76959e745c4a8e",
"match": "Node",
"count": 1,
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
},
{
- "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
- "line_sha256": "22bde4929c9e2357172db55ff53871eaf095aa9958e4a0793686165bea28ea39",
- "match": "Node",
- "count": 1,
- "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
- },
- {
- "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
- "line_sha256": "792268bb90ae50a669672d504154f405fdc93962dd732e45823d66977c7e3a83",
- "match": "Node",
- "count": 1,
- "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
- },
- {
- "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
- "line_sha256": "90488618aff05703a85ccc1e3b6b60dde9f89cae8da538f4396d9c56996eb12f",
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift",
+ "line_sha256": "4a0af7fa8d7a75ae2a16a9b01e301c67832b8197098a6159290ece50600d6587",
"match": "Node",
"count": 1,
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
},
{
- "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
- "line_sha256": "90d767ddbf1a9aca8e977bff7cd2df171bc17c5b0cc88eccd7da73d3777da91a",
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift",
+ "line_sha256": "94a0ed8bc5b9164f2bef6d6318e875e945eeeaa8da4cf93e2e02b31469ec73c5",
"match": "Node",
"count": 1,
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
},
{
- "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownRenderCache.swift",
- "line_sha256": "dc057e47fb5b5b83c995bace0f8282dc415df1bcaf339651b8030f5fdb14e042",
+ "path": "native/apple/Sources/EquipoKit/Markdown/MarkdownStreamRenderer.swift",
+ "line_sha256": "df021a3ad81249d00bdc65aadaa5e22d4a40e2c0df016e6df79d98313a875bd6",
"match": "Node",
"count": 1,
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
@@ -18170,5 +18191,68 @@
"match": "Node",
"count": 1,
"reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "46cc33815915e9aacb81ed613317c39e9e53f8459243729fd573efe9fcfc8272",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "4e59689e8568e88c3e61c4fc1b34455130de2eff25f5ad408dd95ae53c99a505",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "5476ee257534bf08b18e4ad84b53e999b64b668843412885015680ee95211494",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "68e7f8768ab8338b100d16addc3d2b8257a81c2497a88fba7530a69a6b278f1d",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "7257641f140040289870d98807d1343656a137ef8b60a04beac126bd6d9d7866",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "7600e4c2d3ff8ade0bc5e7238803f37f9ff946a535b96cca98e3fcd19c97c00c",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "ab1b2cf9720ee96e9d0ba5f2b3e34b8fcb30d5695900bac94e1dc2eb2eeed3f8",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "cea46885ce97c45bc983102abd844c9402bcab8a339f0ed7171d5624e8e62c14",
+ "match": "Node",
+ "count": 2,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
+ },
+ {
+ "path": "native/apple/Tests/EquipoKitTests/MarkdownParsingStreamTests.swift",
+ "line_sha256": "d0d0bd79c4df462be246993e7472455bcbbe08dde224980fa877dc9e4967d45f",
+ "match": "Node",
+ "count": 1,
+ "reason": "Markdown syntax tree nodes in native rendering and web parity fixtures; no external runtime."
}
]