Skip to content

feat(config): add ProviderKind::Gonka, GonkaNode schema, and vault key resolution#3618

Merged
bug-ops merged 1 commit intomainfrom
3607-gonka-config-schema
May 5, 2026
Merged

feat(config): add ProviderKind::Gonka, GonkaNode schema, and vault key resolution#3618
bug-ops merged 1 commit intomainfrom
3607-gonka-config-schema

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented May 5, 2026

Summary

  • Adds ProviderKind::Gonka enum variant and GonkaNode { url: String, name: Option<String> } struct per spec 052-gonka-native
  • Extends ProviderEntry with gonka_nodes: Vec<GonkaNode> and gonka_chain_prefix: Option<String> (default "gonka"); validator enforces non-empty nodes with valid http(s):// URLs for Gonka entries
  • Wires ZEPH_GONKA_PRIVATE_KEY and ZEPH_GONKA_ADDRESS vault keys through ResolvedSecrets in zeph-config and resolves them at startup in zeph-core; partial-key presence logged as WARN
  • Handles the new ProviderKind::Gonka arm in all exhaustive matches (instructions.rs, provider_factory.rs — returns not-yet-implemented error, doctor.rs)
  • Adds ZEPH_GONKA_* vars to docker/docker-compose.yml following the existing ${ZEPH_*:-} pattern

Note on GonkaNode schema: the original issue spec described { base_url, address } fields. After merging spec 052-gonka-native, the canonical shape is { url, name }address is a vault secret (ZEPH_GONKA_ADDRESS), not a per-node field. Subsequent provider implementation (#3609#3611) picks this up.

Test plan

  • cargo +nightly fmt --check — clean
  • cargo clippy --workspace --features full -- -D warnings — 0 warnings
  • cargo nextest run --workspace --lib --bins — 8870 passed, 21 skipped
  • 13 new unit tests in providers.rs: round-trip, validator (empty nodes, bad URL scheme, missing name), default/explicit chain prefix, effective_model returns ""
  • 2 new unit tests in zeph-core/src/config.rs: both keys present, only private key set → address None
  • fy lint docker/docker-compose.yml — 0 errors
  • Playbook: .local/testing/playbooks/gonka-config.md (8 scenarios)
  • Coverage status: 2 rows added to coverage-status.md (Status: Untested, pending live session)

Closes #3607, Closes #3608.

@github-actions github-actions Bot added enhancement New feature or request size/L Large PR (201-500 lines) documentation Improvements or additions to documentation rust Rust code changes core zeph-core crate labels May 5, 2026
@bug-ops bug-ops enabled auto-merge (squash) May 5, 2026 17:31
…y resolution

Closes #3607, Closes #3608.

Add ProviderKind::Gonka enum variant with GonkaNode { url, name } struct
and two new ProviderEntry fields (gonka_nodes: Vec<GonkaNode>,
gonka_chain_prefix: Option<String>) for declaring native Gonka inference
providers. A validator enforces non-empty gonka_nodes with valid http(s)://
URLs when type = "gonka".

Wire ZEPH_GONKA_PRIVATE_KEY and ZEPH_GONKA_ADDRESS through the vault secret
resolver into ResolvedSecrets; log INFO when both keys are present, WARN when
only one is set. Address derivation happens in the provider factory (future PR).

Also handle the exhaustive ProviderKind match in instructions.rs,
provider_factory.rs (returns unimplemented error), and doctor.rs; add
ZEPH_GONKA_* env vars to docker-compose.yml following the existing pattern.
@bug-ops bug-ops force-pushed the 3607-gonka-config-schema branch from bb256b3 to 6ac295c Compare May 5, 2026 17:34
@bug-ops bug-ops merged commit 34ab6af into main May 5, 2026
32 checks passed
@bug-ops bug-ops deleted the 3607-gonka-config-schema branch May 5, 2026 17:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/L Large PR (201-500 lines)

Projects

None yet

1 participant