Skip to content

build(deps): cascade Verbara.Sdk 2.8.0 and Verbara.Sdk.Pro 2.18.0-pro; ship the Asterisk chart's AMI/ARI users - #361

Merged
Harol-Reina merged 5 commits into
mainfrom
feat/sdk-2-8-0-pin-cascade
Oct 9, 2026
Merged

Harol-Reina merged 5 commits into
mainfrom
feat/sdk-2-8-0-pin-cascade

Conversation

@Harol-Reina

Copy link
Copy Markdown
Contributor

Host leg of the cross-repo change sdk-2-8-0-pin-cascade (roadmap R-021 second hop / licensing plan C16; decision_ref: Verbara.Sdk/ADR-0040). Pro shipped its leg as v2.18.0-pro (Verbara.Sdk.Pro #193). This PR ships in Platform v2.27.0 together with R-023 (#348) and the WhatsApp work (#354), which rebases on top.

What changes

  • Pins (3f83bb18): 7 Verbara.Sdk.* pins move to 2.8.0 and 22 Verbara.Sdk.Pro.* pins to 2.18.0-pro. Restore reports no NU1605/NU1109 and no floor moves.
  • Exporter pin dropped (78269f5a): Sdk 2.8.0 brings OpenTelemetry.Exporter.Prometheus.AspNetCore 1.19.1-beta.1 itself (Sdk H167), so the central pin added in build(deps): cascade Verbara.Sdk 2.7.0 and Verbara.Sdk.Pro 2.17.0-pro #332 goes. PrometheusScrapingEndpointTests is unchanged and green. The AOT publish has 0 "will always throw".
  • DeferredPrimaryAmiConnection forwards the new IAmiConnection.Subscribe(Func<…>) default member (8da98b82). Without it the wrapper compiles and silently loses the Sdk's docs(changelog): cite PR #390 on the rate-limit entry #391 fast-close. The test was written first and goes red when the forwarding is removed.
  • Behaviour Platform takes on: the pool sweep (Sdk docs(changelog): cite #382 on the migration-runner Fixed entry #402, BREAKING). Every 30 s, calls whose Hangup never reached Platform are ended. It needs the AMI user to have write with system, call or reporting. The shipped Compose manager.conf.template already has it.
  • Helm Asterisk chart (4a933abd):
    • it now ships Platform's AMI and ARI users from templates, with passwords only from a Kubernetes Secret (no literal secret in the repo);
    • systemname is set per pod;
    • it runs exactly one replica (rendering more fails, because Platform registers a single AMI node);
    • the PDB stays minAvailable: 1 as a deliberate interlock, with unhealthyPodEvictionPolicy: AlwaysAllow and a comment;
    • scripts/k8s-apps.sh passes one password to both charts.
  • Docs (a8fc0e79):
    • the voice manual documents the full AMI user and where to see a missing permission ([LIVE] Status refused in the start-up log);
    • the customer validation checklist gains that log check and a transfer test;
    • upgrade notes cover the breaking chart change and a node-maintenance procedure;
    • staging-environment.md is corrected about what the PDB does.

Verification

  • Local gate: Release build with 0 warnings; unit tests; Live-DB tests; OpenAPI fixture checks; coverage; Invariant Gates; AOT publish clean.
  • Helm: helm lint; render checks, including that replicas=2 must fail; a local andrius/asterisk:22 boot proving the AMI user, the systemname and an AMI Status.
  • An independent verifier re-ran everything and refuted nothing.
  • CodeQL branch gate: 0.

Lab merge gate (verbara-lab #16, merged) on this head with Sdk 2.8.0 / Pro 2.18.0-pro:

  • two strict h159-queue-owner runs, 20/20 each with 0 calls not offered;
  • the H142 variant, 4/4: calls with the Hangup event filtered out were ended by the sweep 5–12 s after the caller hung up, and a 100 s control call stayed up.

Rollback

Revert. The pins go back to Sdk 2.7.0 / Pro 2.17.1-pro and the exporter pin returns with it. The Helm chart change reverts cleanly; an installed release keeps its Secret.

🤖 Generated with Claude Code

- 7 Verbara.Sdk.* pins 2.7.0 -> 2.8.0 (Data.Npgsql, Cluster.Primitives,
  Cluster.Postgres, Hosting, Push, Resilience, OpenTelemetry).
- 22 Verbara.Sdk.Pro.* pins 2.17.1-pro -> 2.18.0-pro.
- Measured restore: no NU1605/NU1109; the project.assets.json diff by
  package name moves only Verbara.Sdk* (2.8.0) and Verbara.Sdk.Pro*
  (2.18.0-pro) packages, nothing added or removed, so no floor moved.

Change: sdk-2-8-0-pin-cascade (decision record Verbara.Sdk/ADR-0040).
Verbara.Sdk.OpenTelemetry 2.8.0 declares
OpenTelemetry.Exporter.Prometheus.AspNetCore 1.19.1-beta.1 itself (Sdk #388,
H167), so Platform's transitive pin and its comment go. The project.assets.json
diff by package name is empty: the exporter still resolves to 1.19.1-beta.1 in
Verbara.Platform.Api and Verbara.Platform.Api.Tests.
PrometheusScrapingEndpointTests stays unchanged and green.

Change: sdk-2-8-0-pin-cascade (decision record Verbara.Sdk/ADR-0040).
…dded

Sdk 2.8.0 (#391) added Subscribe(Func<ManagerEvent, CancellationToken,
ValueTask>) to IAmiConnection with a default body. DeferredPrimaryAmiConnection
compiled clean without it, so a handler subscribed through the wrapper was
attached via the wrapper's OnEvent with a token that is never cancelled, and
the primary connection's fast close never reached it. The wrapper now forwards
the overload to the primary, resolved at use like every other member.

Test first: the new forwarding test failed against the unforwarded wrapper
(OnEventTokenSubscription returned instead of the primary's subscription), and
a mutation pass that deletes the forwarding still builds and turns it red.

Change: sdk-2-8-0-pin-cascade (decision record Verbara.Sdk/ADR-0040).
…erisk replica

The Asterisk chart mounted only pjsip, extensions and modules, so AMI and ARI
came from the andrius/asterisk:22 defaults: manager.conf has AMI disabled and
http.conf binds ARI to 127.0.0.1. It also ran two replicas behind one
load-balanced AMI address while Platform registers exactly one AMI server.

- ConfigMap: manager.conf.template with Platform's [platform] user (same
  read/write/deny/permit as the Compose template, no eventfilter, so Sdk
  2.8.0's pool sweep can send Status and sees every Hangup), ari.conf.template
  with the [verbara] user, and an http.conf serving ARI on 0.0.0.0:8088.
- Passwords only in Secrets (asterisk.ami/ari.passwordSecret), rendered by the
  chart only when asterisk.ami/ari.password is passed; no literal in the repo.
- The container command renders manager.conf and ari.conf with awk from
  ENVIRON (no sed replacement, so /, & and \ stay literal), sets systemname to
  the pod name under [options] of asterisk.conf, then execs asterisk -fpvvv.
- replicas: 1, and the StatefulSet fails to render above 1.
- PDB keeps minAvailable: 1 as a deliberate interlock and gains
  unhealthyPodEvictionPolicy: AlwaysAllow plus a comment on the maintenance
  procedure.
- scripts/k8s-apps.sh requires VERBARA_AMI_PASSWORD and VERBARA_ARI_PASSWORD and
  passes each to both charts with --set-literal, so the Asterisk users and
  Platform's Asterisk__Ami__Password / Asterisk__Ari__Password cannot drift.

Checked: helm lint, the default, password and replicas=2 renders, an unchanged
platform chart render, and a local andrius/asterisk:22 boot showing the
platform user's classes, system name asterisk-0, AMI login plus Status Success
and ARI 200/401.

Change: sdk-2-8-0-pin-cascade (decision record Verbara.Sdk/ADR-0040).
…sterisk

- CHANGELOG [Unreleased] Upgrading: the pool sweep (Sdk #402, H142), the AMI
  write classes it needs, no Hangup eventfilter, systemname per Asterisk of a
  pool, the start-up '[LIVE] Status refused' signal; the breaking Asterisk
  chart change (AMI/ARI passwords at install, systemname per pod, one replica,
  replicas > 1 refused) and the maintenance procedure the PDB now requires.
- CHANGELOG [Unreleased] Dependencies: Sdk 2.8.0 x Pro 2.18.0-pro, no floor
  moved, exporter pin removed (Sdk #388), Subscribe(Func) forwarded (Sdk #391),
  the sweep consumed with its defaults (Verbara.Sdk/ADR-0040).
- Voice manual 06 §0.1: the whole [platform] AMI user, the reason for each
  read/write class from Platform's AMI call sites, the Hangup warning,
  systemname for a pool, what fails without them and how to detect it.
- Validation checklist: a start-up log check for 'Status refused' and a
  two-agent blind-transfer test.
- staging-environment.md: the Asterisk PDB blocks a drain (it does not keep
  voice up), and the chart runs one Asterisk replica.

Change: sdk-2-8-0-pin-cascade (decision record Verbara.Sdk/ADR-0040).
@Harol-Reina
Harol-Reina added this pull request to the merge queue Oct 9, 2026
Merged via the queue into main with commit 695f1d3 Oct 9, 2026
11 checks passed
@Harol-Reina
Harol-Reina deleted the feat/sdk-2-8-0-pin-cascade branch October 9, 2026 22:39
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