Skip to content

armgit / sie

Public Imported from GitHub
0

Open-source inference server and production cluster for all the models your agent needs.

docs: stop citing ADRs that are not in this repository (#1010)

Krisztian Gajdar23396693bc36
diff --git a/packages/sie_gateway/openapi.json b/packages/sie_gateway/openapi.json
index 05a18e0b2..3d359f258 100644
--- a/packages/sie_gateway/openapi.json
+++ b/packages/sie_gateway/openapi.json
@@ -2766,7 +2766,7 @@
},
{
"$ref": "#/components/schemas/ModelCapabilitiesWire",
- "description": "Advertised model capabilities. Consumers use this to discover\nwhich features the model supports before composing a request.\n\nValidation is profile-scoped per ADR-0001 / M10 — clients\nselecting a specific profile must check\n``capabilities.profile_lora_adapters[profile_name]``, not the\n``capabilities.lora_adapters`` union summary."
+ "description": "Advertised model capabilities. Consumers use this to discover\nwhich features the model supports before composing a request.\n\nValidation is profile-scoped — clients\nselecting a specific profile must check\n``capabilities.profile_lora_adapters[profile_name]``, not the\n``capabilities.lora_adapters`` union summary."
}
]
},
diff --git a/packages/sie_gateway/src/config.rs b/packages/sie_gateway/src/config.rs
index 94825928e..2c9f80699 100644
--- a/packages/sie_gateway/src/config.rs
+++ b/packages/sie_gateway/src/config.rs
@@ -728,8 +728,8 @@ fn env_static_queue_pools(key: &str) -> Vec<PoolSpec> {
/// A target may be a bare model id (`Org/Model`), a concrete profile variant
/// (`Org/Model:profile`), or a bundle-qualified spec (`bundle:/Org/Model`).
/// The bundle form lets an operator pin a precision / profile bundle for a job
-/// — e.g. map `sql` to a BF16 bundle that avoids the FP8 SQL-accuracy
-/// regression (ADR 0001). `resolve_model_spec_with_aliases` (proxy.rs) applies
+/// — e.g. map `sql` to a BF16 bundle that avoids an FP8 accuracy regression
+/// on SQL. `resolve_model_spec_with_aliases` (proxy.rs) applies
/// the bundle and preserves concrete profile variants.
/// Returns the resolution map plus the subset that may be advertised on
/// `/v1/models`. Only explicitly-declared aliases are publishable; see
diff --git a/packages/sie_gateway/src/handlers/proxy.rs b/packages/sie_gateway/src/handlers/proxy.rs
index ec600826d..a8a6cead4 100644
--- a/packages/sie_gateway/src/handlers/proxy.rs
+++ b/packages/sie_gateway/src/handlers/proxy.rs
@@ -5780,8 +5780,9 @@ pub(crate) async fn run_streaming_generate(
// first_chunk : 30s (cold-start, grammar compile, queue depth)
// inter_chunk : 10s (gap between chunks after streaming starts)
// overall : max_new_tokens/10 + 30, capped at 5 min
- // Env overrides keep tuning ops-friendly. Per ADR-0003 the
- // profile/runtime overall_timeout_s is the sole authority for
+ // Env overrides keep tuning ops-friendly. The overall timeout that
+ // `generation_timeout_config` resolves (env override, request option,
+ // profile runtime, default) is the sole authority for
// generation; the legacy `SIE_GATEWAY_REQUEST_TIMEOUT` ceiling is
// *not* applied here (it would collapse a 300s profile overall to
// the default 30s and make the first-chunk policy unreachable).
@@ -10771,9 +10772,9 @@ pub fn responses_dispatch_inputs(
}
/// Parse + validate a `/v1/responses` body. MVP: a string `input` or a
-/// list of role/content messages, non-streaming. Out of scope per
-/// ADR-0001: tools, stateful threading (`previous_response_id`), reasoning,
-/// background, metadata, instructions, multimodal content parts.
+/// list of role/content messages, non-streaming. Out of scope: tools,
+/// stateful threading (`previous_response_id`), reasoning, background,
+/// metadata, instructions, multimodal content parts.
///
/// Validation is strict (H2 hardening): unrecognized top-level fields,
/// known-out-of-scope fields, missing roles, non-text content parts,
@@ -10802,8 +10803,8 @@ fn responses_params_from_json(body: &serde_json::Value) -> ResponsesParamsResult
);
};
- // -- explicit reject-list: known-out-of-scope Responses fields. ADR-0001
- // scopes the Responses MVP to a stateless, single-turn, text-only
+ // -- explicit reject-list: known-out-of-scope Responses fields. The
+ // Responses MVP is a stateless, single-turn, text-only
// surface. Anything else surfaces as ``unsupported_field`` so SDKs
// that target the wider OpenAI Responses spec fail loudly rather
// than silently losing context.
@@ -11491,7 +11492,7 @@ pub fn generation_timeout_config(
}
}
-/// ADR-0003 invariant: `overall >= first_chunk`. If a misconfiguration
+/// Invariant: `overall >= first_chunk`. If a misconfiguration
/// declares the inverse, the first-chunk policy would be dead code (the
/// overall deadline would fire before first-chunk could). The
/// pure-function shape keeps the runtime guard testable without
@@ -11515,7 +11516,7 @@ pub(crate) fn enforce_first_chunk_invariant(
overall_s = overall,
"generation timeout misconfigured: first_chunk > overall; clamping first_chunk \
to overall. Adjust the profile or env override so overall_timeout_s >= \
- first_chunk_timeout_s (ADR-0003)."
+ first_chunk_timeout_s."
);
(overall, overall)
} else {
@@ -12115,7 +12116,7 @@ fn alias_model_target(target: &str, requested_profile: Option<&str>) -> String {
/// target, else the `__`->`/` form, else verbatim). The addition: an alias
/// *target* may be a full `bundle:/org/model` spec, so an operator can pin a
/// precision/profile bundle for a job alias — e.g. map `sql` to a BF16 bundle
-/// that avoids the FP8 SQL-accuracy regression (ADR 0001). An explicit caller
+/// that avoids an FP8 accuracy regression on SQL. An explicit caller
/// bundle (`somebundle:/sql`) always wins over the alias's bundle.
/// `pub` because it is THE definition of "which model does this string denote"
/// for this gateway, and two surfaces outside the route need that definition:
@@ -22292,7 +22293,7 @@ mod tests {
// accepts (and that the chat route already accepts). Each newly-
// accepted field gets a forward-path test (the value lands on
// ``GenerateParams``) and a rejection test (type / range / cross-
- // field). See ADR-0001 for the canonicality argument.
+ // field).
#[test]
fn test_generate_params_from_json_forwards_seed() {
@@ -23021,7 +23022,7 @@ mod tests {
std::env::remove_var(&key);
}
- // ── ADR-0003: generation timeout authority + invariant ────────
+ // ── Generation timeout authority + invariant ──────────────────
#[test]
fn test_enforce_first_chunk_invariant_passes_through_when_ok() {
@@ -23164,15 +23165,15 @@ mod tests {
}
}
- // H7 contract (ADR-0003): generation streaming does NOT clamp
+ // H7 contract: generation streaming does NOT clamp
// `timeout_config.overall` with `state.config.request_timeout`. The
// legacy ceiling continues to bound encode/score/extract, but the
// two generation call-sites in `proxy.rs::handle_generation_streaming`
// and `sse.rs::handle_sse_stream` feed `timeout_config.overall`
// directly into the driver. A textual-contract test was tried here
// but self-matched its own assertion strings; the contract is
- // enforced by ADR-0003, the invariant unit tests above, and the
- // gateway integration tests that exercise long-running generations.
+ // enforced by the invariant unit tests above and the gateway
+ // integration tests that exercise long-running generations.
// ── StreamCancelGuard (streaming cancel-on-drop) ──────────────
//
diff --git a/packages/sie_gateway/src/handlers/sse.rs b/packages/sie_gateway/src/handlers/sse.rs
index d3b7add82..b756afcb6 100644
--- a/packages/sie_gateway/src/handlers/sse.rs
+++ b/packages/sie_gateway/src/handlers/sse.rs
@@ -315,8 +315,9 @@ pub async fn build_sse_response(params: SseParams<'_>) -> Response {
&work_params,
max_new_tokens,
);
- // Per ADR-0003: generation streaming uses the profile/runtime
- // overall_timeout_s as authority. The legacy SIE_GATEWAY_REQUEST_TIMEOUT
+ // Generation streaming uses the overall timeout that
+ // `generation_timeout_config` resolves (env override, request option,
+ // profile runtime, default) as authority. The legacy SIE_GATEWAY_REQUEST_TIMEOUT
// ceiling is not applied — it would clamp a 300s model-profile overall
// to the default 30s and make the first-chunk policy unreachable on
// cold loads.
diff --git a/packages/sie_gateway/src/openapi.rs b/packages/sie_gateway/src/openapi.rs
index ab8e9e461..4f10ef2f6 100644
--- a/packages/sie_gateway/src/openapi.rs
+++ b/packages/sie_gateway/src/openapi.rs
@@ -2810,7 +2810,7 @@ pub struct ModelInfoWire {
/// Advertised model capabilities. Consumers use this to discover
/// which features the model supports before composing a request.
///
- /// Validation is profile-scoped per ADR-0001 / M10 — clients
+ /// Validation is profile-scoped — clients
/// selecting a specific profile must check
/// ``capabilities.profile_lora_adapters[profile_name]``, not the
/// ``capabilities.lora_adapters`` union summary.
diff --git a/packages/sie_gateway/src/routing/key.rs b/packages/sie_gateway/src/routing/key.rs
index 91b11670c..2993c347b 100644
--- a/packages/sie_gateway/src/routing/key.rs
+++ b/packages/sie_gateway/src/routing/key.rs
@@ -44,9 +44,6 @@
//! 4. Legacy whole-window hash of the system message / prompt (first 512
//! bytes) — used when the prefix is too short to pin, or `mode=off`.
//! 5. None — caller falls through to round-robin / pool publish.
-//!
-//! See ADR-0001 *Decision 10* ("keep default-on; document + add knobs;
-//! load-test") for the rationale behind making these knobs opt-in.
use std::sync::LazyLock;
diff --git a/packages/sie_server/src/sie_server/processors/streaming.py b/packages/sie_server/src/sie_server/processors/streaming.py
index 0792cd6f4..d7d1e9bdf 100644
--- a/packages/sie_server/src/sie_server/processors/streaming.py
+++ b/packages/sie_server/src/sie_server/processors/streaming.py
@@ -2648,8 +2648,7 @@ class StreamingProcessor:
# H6: separate flag for "the terminal we published was
# ``transport_failure``" — even when the terminal lands on the
# wire successfully, we MUST withhold the JetStream ACK so the
- # message is redelivered (per ADR-0001 supported-primitive
- # contract). ``terminal_sent`` stays True so the publisher loop
+ # message is redelivered. ``terminal_sent`` stays True so the publisher loop
# drains cleanly; the ACK gate at the bottom of run_one() reads
# both flags.
transport_failure_published = False
@@ -3143,7 +3142,7 @@ class StreamingProcessor:
# H6: withhold ACK when the terminal we published was a
# ``transport_failure`` — required content was dropped on the
# backpressure path and JetStream redelivery is the recovery
- # mechanism (per ADR-0001 supported-primitive contract). The
+ # mechanism. The
# gateway forwards the transport_failure terminal to the client
# so the surface error is still visible; redelivery gives the
# request a second chance on a healthy worker.
diff --git a/packages/sie_server/tests/processors/test_streaming.py b/packages/sie_server/tests/processors/test_streaming.py
index dd2f7bb76..5a0b402b5 100644
--- a/packages/sie_server/tests/processors/test_streaming.py
+++ b/packages/sie_server/tests/processors/test_streaming.py
@@ -1635,10 +1635,11 @@ def _patch_compile(monkeypatch: pytest.MonkeyPatch, fn: Any) -> list[int]:
invocation appended).
Also enables ``SIE_GRAMMAR_PREFLIGHT_DEBUG=1`` so tests that
- exercise the legacy worker-side preflight (now off by default per
- ADR-0002) still run the preflight code path.
+ exercise the legacy worker-side preflight (now off by default because
+ SGLang owns request-time grammar compilation) still run the preflight
+ code path.
"""
- # ADR-0002: the worker-side preflight is off by default. Tests that
+ # The worker-side preflight is off by default. Tests that
# use this helper are explicitly exercising the preflight path, so
# enable the debug flag for their scope.
monkeypatch.setenv("SIE_GRAMMAR_PREFLIGHT_DEBUG", "1")
@@ -3065,7 +3066,7 @@ async def test_streaming_tool_choice_named_unknown_function_rejected() -> None:
# ---------------------------------------------------------------------------
-# ADR-0002 — SGLang owns request-time grammar compilation
+# SGLang owns request-time grammar compilation
# ---------------------------------------------------------------------------
@@ -3073,7 +3074,7 @@ async def test_streaming_tool_choice_named_unknown_function_rejected() -> None:
async def test_grammar_preflight_default_does_not_call_compile_outlines(
monkeypatch: pytest.MonkeyPatch,
) -> None:
- """ADR-0002: with ``SIE_GRAMMAR_PREFLIGHT_DEBUG`` unset the default
+ """With ``SIE_GRAMMAR_PREFLIGHT_DEBUG`` unset the default
structured-output path MUST NOT invoke ``compile_outlines``. The raw
schema is forwarded straight to SGLang.
"""
@@ -3114,7 +3115,7 @@ async def test_grammar_preflight_default_does_not_call_compile_outlines(
wi = _make_work_item(generate={"prompt": "Hi", "max_new_tokens": 8, "grammar": grammar_payload})
await proc.process(_make_msg(wi), "test/model")
- assert calls == [], "Default path (SIE_GRAMMAR_PREFLIGHT_DEBUG unset) must NOT invoke compile_outlines per ADR-0002"
+ assert calls == [], "Default path (SIE_GRAMMAR_PREFLIGHT_DEBUG unset) must NOT invoke compile_outlines"
terminal = _terminal_chunk(nc)
assert terminal["finish_reason"] == "stop"
@@ -3123,7 +3124,7 @@ async def test_grammar_preflight_default_does_not_call_compile_outlines(
async def test_grammar_preflight_enabled_via_env_calls_compile_outlines(
monkeypatch: pytest.MonkeyPatch,
) -> None:
- """ADR-0002: ``SIE_GRAMMAR_PREFLIGHT_DEBUG=1`` re-enables the legacy
+ """``SIE_GRAMMAR_PREFLIGHT_DEBUG=1`` re-enables the legacy
worker-side Outlines preflight. The preflight code path runs and
``compile_outlines`` is invoked exactly once for a cache-miss
request.
@@ -3159,7 +3160,7 @@ async def test_grammar_preflight_enabled_via_env_calls_compile_outlines(
async def test_grammar_malformed_payload_still_rejected_without_preflight(
monkeypatch: pytest.MonkeyPatch,
) -> None:
- """ADR-0002 regression: removing the worker preflight from the hot
+ """Regression: removing the worker preflight from the hot
path MUST NOT weaken validation. Cheap shape checks (``kind`` must be
one of the allowed strings) still reject a malformed grammar at the
worker before any inference cost is spent.