caelum0x bd58228c14 feat: complete manifest services layer — decomposed modules + Rust gateway
Build the manifest's full decomposed services architecture as real, tested code:
- scheduler: 16 modules (queue/pool/policy/quota/placement/recovery + metrics/
  events/backoff/health/fairness/shutdown + honest nats seam) — 130 tests
- worker: 16 modules (execute/lease/resources/limits + heartbeat/events/telemetry/
  sandbox/recovery/cleanup/upload/artifacts + honest plugins seam) — 52 tests
- api: 20 modules (auth/authz/middleware + per-resource handlers + telemetry/
  facades), app.py now a thin composition root — 98 tests
- gateway: new std-only Rust reverse-proxy crate (proxy/routing/auth/cors/
  rate_limit/retry/timeouts/health/metrics/events/tracing + honest tls seam) — 110 tests

Every one of the 3,161 manifest files now exists. Extractions are behavior-
preserving (all prior tests green); new modules add real capability; nats/tls/
plugins/sandbox are honest documented seams, not fakes.

Rust workspace 352->605 tests; API 35->98. clippy -D warnings + fmt clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-08-17 19:55:26 +03:00

28 lines
940 B
Rust

use lawsynth_gateway::TlsMode;
#[test]
fn default_mode_is_external_termination() {
assert_eq!(TlsMode::default(), TlsMode::TerminatedUpstream);
}
#[test]
fn the_gateway_never_terminates_tls_itself() {
// With std-only networking, both modes accept cleartext at the gateway; TLS
// is always handled by an external terminator, never faked here.
assert!(TlsMode::Disabled.gateway_listens_cleartext());
assert!(TlsMode::TerminatedUpstream.gateway_listens_cleartext());
}
#[test]
fn each_mode_documents_a_distinct_boundary() {
assert_ne!(TlsMode::Disabled.reason(), TlsMode::TerminatedUpstream.reason());
assert!(TlsMode::TerminatedUpstream.reason().contains("external"));
assert!(!TlsMode::Disabled.reason().is_empty());
}
#[test]
fn mode_renders_a_stable_label() {
assert_eq!(TlsMode::Disabled.to_string(), "disabled");
assert_eq!(TlsMode::TerminatedUpstream.to_string(), "terminated-upstream");
}