Skip to content

Decision record · ADR

ADR-0043: Resolve golden curves in the integration to single-source the draft count

Status: accepted | Date: 2026-08-30

References: RFC-0003, RFC-0006, ADR-0042

ADR-0042 put golden-curve lookup in the control plane, keyed by a num_speculative_tokens coordinate declared in the workspace. That coordinate duplicates the one behavioral authority for the draft count — the operator’s framework speculative configuration (vLLM’s speculative-config JSON, SGLang’s speculative flags, TensorRT-LLM’s llm-api options) — creating two human-maintained copies of one fact, glued together by a planning-time cross-check. The cross-check is a symptom, not a feature: the curve form dragged the duplicate into existence, because the control plane cannot parse framework configuration without violating the integration boundary.

The golden-curve lookup itself is a confirmed requirement: it keeps the upstream committed curve file as the single authority for the acceptance value, with digest-pinned provenance, instead of hand-transcribed floats. The design question is where the lookup can live so that the draft count has exactly one source.

Move golden-curve lookup from the control plane into the selected integration. The curve declaration keeps only the workspace-relative path, the digest pin, the model key, and the optional thinking mode; the draft-count coordinate is removed from the declaration. The control plane digest-verifies and shape-validates the curve file, then supplies its exact text and digest to the integration over adapter protocol version 9, which is still unpublished and is reshaped in place. The integration reads the draft count from the operator’s framework speculative configuration — which it already parses — resolves the effective acceptance length through one shared lookup implementation in the adapter SDK, injects it with the framework’s spelling, and returns the effective length in the plan response. The control plane validates the returned length and preserves it with the curve provenance in dry-run, execution, and serve-record evidence.

The curve form requires a draft count the integration can determine from the operator configuration; when none is determinable, planning fails with a typed error and the explicit acceptance-length form remains available. The explicit form, the overlay injection, the Eval exclusion, and the prohibition on modeling speculative methods all stand unchanged from ADR-0042.

Positive: the draft count has exactly one source — the operator’s framework configuration — and the declaration carries no coordinate that could disagree with it. The mismatch cross-check and its failure class disappear. Curve authority and digest provenance are preserved end to end: the control plane pins the bytes, the integration resolves against the real configuration, and the effective value flows back into evidence. The lookup logic exists once in the adapter SDK instead of once per integration.

Negative: the effective acceptance length is known only after integration planning, so dry-run and record evidence source it from the accepted plan response rather than from control-plane resolution, and a curve whose entry is missing for the configured draft count fails at planning instead of at workspace resolution. Curve text now crosses the protocol in both requests, adding a modest wire member.

Neutral: protocol version 9 is reshaped in place because it is unpublished; no version 10 is cut. The control plane retains curve file integrity — digest verification and shape validation — while only the keyed lookup moves. The Eval exclusion remains keyed on the declaration, unaffected by where the value is resolved.

Supply the digest-pinned curve text to the integration, which reads the draft count from the operator configuration and resolves the acceptance length (accepted)

Section titled “Supply the digest-pinned curve text to the integration, which reads the draft count from the operator configuration and resolves the acceptance length (accepted)”
  • Pros: The draft count has exactly one source — the operator’s framework configuration — and the cross-check disappears, Curve file authority and digest provenance are preserved, with one shared lookup implementation in the adapter SDK
  • Cons: The effective acceptance length is resolved at integration planning time rather than control-plane resolution time, so evidence sources it from the accepted plan response, The curve form requires a determinable draft count in the operator configuration; configurations without one must use the explicit form

Drop the curve form and keep only an explicit acceptance length (rejected)

Section titled “Drop the curve form and keep only an explicit acceptance length (rejected)”
  • Pros: Smallest contract; every fact single-sourced
  • Cons: Hand-transcribed floats lose the upstream curve file as the authority and its digest provenance
  • Rejected because: The curve lookup is a confirmed requirement: golden curves are committed upstream files, and transcribing them by hand creates an unverified second copy of the acceptance value.

Keep control-plane lookup keyed by a declared draft count with a mismatch cross-check (rejected)

Section titled “Keep control-plane lookup keyed by a declared draft count with a mismatch cross-check (rejected)”
  • Pros: Effective acceptance length known at control-plane resolution time
  • Cons: Keeps two human-maintained copies of the draft count whose only reconciliation is a mismatch check
  • Rejected because: The declared coordinate duplicates the behavioral authority for the draft count; one authority per fact forbids the duplicate, not just its detection.