Skip to content

fix(ci): make full-expiry renewal qualification explicit - #2276

Merged
JAORMX merged 3 commits into
mainfrom
fix/2257-bounded-renewal-qualification
Oct 13, 2026
Merged

JAORMX merged 3 commits into
mainfrom
fix/2257-bounded-renewal-qualification

Conversation

@JAORMX

@JAORMX JAORMX commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Closes #2257.

Normal production-profile PR checks and native OpenRouter qualification no longer wait for the original one-hour certificate lifetime. The complete serial security/isolation suite and real in-flight renewal qualification remain mandatory.

  • Default MECATL_EXECUTION_QUAL_NATURAL_EXPIRY=0; validate the selector before provisioning and preserve it through the clean-environment re-exec.
  • Retain natural-expiry qualification as an explicit k8s-e2e.yml dispatch (natural_expiry=true), with an 80-minute test ceiling. Its distinct evidence is the deployed mecak8s automatic client reload loop across issuer renewals and expiry. The mandatory in-flight test explicitly reloads a host-side client and cannot substitute for this proof.
  • Run mandatory in-flight qualification separately with a 30-minute ceiling. Default production job budget is 100 minutes; explicit long qualification gets 210 minutes.
  • Native qualification explicitly disables natural expiry, while preserving reviewed-SHA verification, successful same-run production qualification before credential staging, owned-cluster handoff, and cleanup.
  • Add deterministic provider snapshot expiry-boundary coverage and behavioral tests for selector defaults, validation, exact executable arguments/environment, and workflow wiring.

Coverage audit

Regression Evidence retained
Stale client material / transport replacement executionclient/client_test.go, renewal_test.go
Coherent projected certificate/key/trust snapshots executioncontroller/security_rotation_test.go and mandatory production projected-volume qualification
Expiry and withdrawn trust New deterministic snapshot boundary test; retired-channel synctest, active-RPC trust withdrawal, original-peer admission/during/completion checks
In-flight terminal result, receipt, output and workspace Mandatory TestKindExecutionInFlightAutomaticRenewal
Session/workspace/authorization continuity and fencing Full serial production suite plus in-flight qualification
Deployed mecak8s automatic reloader across natural expiry Explicit long qualification only; not represented as equivalent to host-side reload

Durable semantics, trigger, budgets, and coverage matrix are documented in docs/architecture/deployment-and-hardening.md. No production TLS behavior or issuer fixture was changed.

Measured before/after

Historical successful baselines at bfd33c335: production 38130792055, native 38131528482.

Successful after-change runs at d66f380a825810a24adefcbe454338067ec00a3c: production 38270333662, native 38271221861 attempt 2.

Measurement Before After
Ordinary production qualification step 79m02s 39m01s
Ordinary production whole job 81m04s 40m59s
Native production prerequisite 79m04s 38m46s
Native credential staging after job start 80m19s 39m57s
Native coding step 7m30s 7m21s
Native whole job 87m59s 47m35s
Ordinary mandatory in-flight renewal 10m04.17s 8m56.40s
Native mandatory in-flight renewal 10m03.34s 10m08.59s

Production qualification fell by 50.6% in ordinary CI and 51.0% in native CI. These are measured run-to-run comparisons, not timeout estimates; runner load, issuer timing, and provider latency vary. Queue time is excluded. The native in-flight test was slightly slower, demonstrating that its evidence was retained rather than skipped.

Both successful runs recorded:

qualification phase=automatic_certificate_renewal skipped selector=0 elapsed=0s

Both then passed the dedicated mandatory in-flight renewal phase. Native attempt 2 additionally passed TestKindExecutionQualification and TestKindExecutionLiveQualification, verified restart with exit code 0 before and after, and recorded production=success, credential=success, live=success, cleanup=success.

Validation and caveats

  • All PR-triggered CI passed at the validated SHA, including ordinary Kind, performance, and static analysis.
  • Separately dispatched full CI 38272512052 passed all 28 jobs, including Test (race) (19m04s).
  • Native attempt 1 failed in the unchanged serial clear/fork lifecycle test with HTTP 409, before renewal. The existing diagnostic omitted the problem code, so the exact conflict is not established. Credential staging/live remained blocked and cleanup passed. Rerunning the failed job at the same SHA passed; no checks were relaxed or timeouts increased. See the triage record.
  • Explicit natural-expiry runtime qualification was not dispatched for this PR. CI covers its selection/default/executable contract, and the retained long test body is unchanged.
  • Per operator request, no local tests/builds/linters/docs gates were run. Validation was CI-only.
  • Static panel has no remaining implementation findings; the timing evidence is now complete.

@JAORMX

JAORMX commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

CI validation: bounded production path

Validated commit d66f380a825810a24adefcbe454338067ec00a3c.

  • All PR-triggered checks passed: CI, Kind, performance, and Deslop. PR-triggered live jobs were correctly skipped.
  • Separately dispatched full CI passed all 28 jobs, including Test (race) (19m04s).
  • Native OpenRouter qualification, pinned to the same SHA, is still queued behind another branch's native run. That unrelated run has not been interrupted.

Measured before/after

Measurement Baseline production run 38130792055 After: production run 38270333662
Production qualification step 79m02s 39m01s
Whole production job 81m04s 40m59s
Mandatory in-flight renewal 10m04.17s 8m56.40s
Natural-expiry test 38m53.70s Skipped by default

Production qualification is 40m01s shorter (50.6%) in these runs. These are actual CI measurements, not timeout estimates; issuer scheduling and runner load still affect each run.

The new production logs show:

qualification phase=automatic_certificate_renewal skipped selector=0 elapsed=0s
qualification phase=inflight_automatic_renewal starting (ceiling=30m)
--- PASS: TestKindExecutionInFlightAutomaticRenewal (536.40s)
qualification phase=inflight_automatic_renewal elapsed=536s

The serial suite still passed real security rotation, lifecycle, qualification, TUI mock journey, and Helm lifetime tests. No local test/build/lint runs were used. Explicit long-mode runtime qualification has not been dispatched for this PR; its selection/default/executable contract is covered in CI, and the retained long test body is unchanged.

@JAORMX

JAORMX commented Oct 12, 2026

Copy link
Copy Markdown
Contributor Author

Native qualification attempt 1: lifecycle conflict, retrying unchanged

Run 38271221861 at d66f380a825810a24adefcbe454338067ec00a3c failed in unchanged TestKindExecutionProductionClearForkLifecycle: the fork request returned HTTP 409 during successor publication. This occurred inside the serial suite, before either renewal phase; no timeout fired. The same-head ordinary Kind run passed this test and the complete qualification.

The available diagnostics cannot distinguish remote placement/quiescence conflict, exhausted Kubernetes update contention, or a session ownership conflict: the existing test drops the HTTP problem code, and cleanup diagnostics are not a snapshot of the failure instant. This is not established as a known flake and is not evidence of a renewal regression.

Security boundaries behaved correctly: credential staging and live coding were skipped; owned-resource cleanup succeeded. Production failed after 27m37s, so that duration is not a successful before/after comparison.

Reran only the failed native job at the same SHA. No test skips, blanket 409 retries, timeout increases, or source changes were made. If it recurs, the next diagnostic step is to capture the allowlisted problem code—not weaken the lifecycle assertion.

@JAORMX
JAORMX marked this pull request as ready for review October 12, 2026 17:56
@JAORMX
JAORMX merged commit 22d44c2 into main Oct 13, 2026
98 of 99 checks passed
@JAORMX
JAORMX deleted the fix/2257-bounded-renewal-qualification branch October 13, 2026 08:26
@toolhive-release-app toolhive-release-app Bot mentioned this pull request Oct 13, 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.

Shorten or remove real-time certificate renewal qualification

1 participant