Skip to content

test: time rotation convergence and scripted journeys - #2120

Merged
jbeda merged 1 commit into
mainfrom
test/k8s-qualification-granular-timing
Oct 5, 2026
Merged

jbeda merged 1 commit into
mainfrom
test/k8s-qualification-granular-timing

Conversation

@jbeda

@jbeda jbeda commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add per-step timing for production security rotation (candidate apply, ledger convergence, provider readiness transitions, authority RPC proofs, and client-trust/agent restore).
  • Record scripted prompt session creation and streamed turn/tool-result durations without logging event text, tool arguments/results, identifiers, or credentials; split independent verification's attach/read from its go test and file-tool checks.
  • Preserve the existing security and lifecycle assertions and all timeout bounds; this change measures cost but does not optimize the runtime yet.

Verification

  • go test -race -tags kind_execution_e2e ./e2e/k8s_execution -run '^(TestPromptTiming_|TestAcquireCurrentAuthorityRun|TestReadCurrentAuthorityContent|TestResignFixtureGrant|TestHelmLifetimeSelectsClientSideWritesOnlyForHelm4)' -count=1
  • task test
  • Local production Kind qualification: passed (MECATL_EXECUTION_QUAL_CI=1 task e2e:k8s:execution:production); CI-owned cluster removed. Images: 158s; tests: 1252s.
  • task lint and task test:race passed; go run ./cmd/mecademo showed a tool call, permission ask/approval, and result.

First local measurement

  • Rotation: invalid/recovery 26s to lose Ready and 73s to regain it; bridge ledger 51s; fixture-restore ledger 71s. Apply calls were <1s each. Ledger convergence is not itself proof of per-replica projected-volume timing; existing authority RPC proofs remain necessary.
  • Both scripted prompts spent ~78s in the stream after ~8–9s session creation. Tool call Service has no session-end signal over gRPC/HTTP (learned permission rules never evict there) #10 took ~22s in each; the other tool calls were mostly 2–7s. Independent verification's extra go test took ~2s; file tools and owner check took ~39s.

CI measurement

Production-profile Kind job passed: images 303s, tests 1344s. Ordinary Kind e2e passed too.

  • Rotation: invalid/recovery took 36s to lose Ready and 89s to regain it; bridge/final/restore ledger waits took 67s/68s/60s. Candidate apply calls were each <1s; Ready was already 2 at the post-ledger check. Ledger convergence is the dominant measured interval, not proof that projected-volume refresh is the cause.
  • Scripted prompt streams took ~82s/~81s after 9s/7s session creation. Call Service has no session-end signal over gRPC/HTTP (learned permission rules never evict there) #10 (scripted go test ./...) took ~26s/~25s. Independent verification's second go test took ~2s, while file tools and owner check took ~38s.

This is instrumentation only; the existing RPC checks, not PodReady alone, prove authority.

@jbeda
jbeda marked this pull request as ready for review October 5, 2026 19:34
@jbeda
jbeda merged commit a5c42b9 into main Oct 5, 2026
83 of 87 checks passed
@jbeda
jbeda deleted the test/k8s-qualification-granular-timing branch October 5, 2026 23:01
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 7, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant