Service-level objective (SLO)-as-code tools make per-service reliability declarative, but users experience journeys: end-to-end executions whose availability and tail latency emerge from topology, routing, redundancy, timeouts/fallbacks, shared failure domains, and tail amplification. Journey objectives are therefore often maintained outside code and drift away from the effective runtime graph. We propose Emergence-as-Code (EmaC), a declarative contract that compiles journey-level SLI bounds and governance artifacts for declared SLOs from intent and evidence. An EmaC specification defines a typed journey expression, leaf bindings to atomic SLOs and telemetry, failure-domain assumptions, and guarded actions. Model Discovery proposes evidence-backed deltas for edges, branch probabilities, redundancy groups, and failure-domain hypotheses; each delta carries provenance and confidence. The compiler derives optimistic and pessimistic journey bounds and emits reviewable governance artifacts. An executable checkout replay shows that local SLOs can remain green while evidence-backed discovery changes the failure-domain model, collapses the pessimistic payment-race bound, and changes the rollout decision from pass to fail or review.
翻译:服务级别目标(SLO)即代码工具使每项服务的可靠性声明式化,但用户体验的是完整旅程:端到端执行过程,其可用性和尾延迟由拓扑结构、路由、冗余、超时/回退机制、共享故障域以及尾延迟放大效应共同决定。因此,旅程目标通常被维护在代码之外,并与有效运行时图谱产生偏差。我们提出"涌现即代码"(EmaC)这一声明式契约,它能根据意图和证据,将声明式SLO的旅程级SLI边界与治理产物编译输出。一个EmaC规范定义了类型化旅程表达式、原子化SLO与遥测信号的叶子绑定、故障域假设以及防护动作。模型发现模块提出带有证据支持的增量变更,涵盖边关系、分支概率、冗余组和故障域假设;每个增量变更都携带溯源信息和置信度。编译器推导出乐观和悲观的旅程边界,并输出可审查的治理产物。可执行检查点回放显示:当证据驱动的发现模块改变故障域模型时,本地SLO仍可保持绿色状态,但悲观付款竞争边界被压缩,部署决策从"通过"转变为"失败"或"需审查"。