Repository navigation
[Contract]: Reconcile Vela span/set and truncation semantics before native parity #169
Description
Parent and existing work
Contract/acceptance follow-up for #137 and #61. Do not duplicate #151, the existing Vela 0.3B reference-worker PR by MrDongsls, or #152, the configurable encoder / ModernBERT work. The first reference and native foundation already have implementation carriers.
At the inspected #151 head 8f3ed1b7f41e7fde47b2dc6cccf3ea0f62281d8f, its body deliberately forwards all five question kinds, including span/set and top-level spans/sets/thresholds, and follows upstream state truncation. The older #137 proposal instead described rejecting span/set and no silent truncation. #61 has discussion of reference-defined fields but does not yet record these Vela-specific decisions as an accepted common contract.
A fresh GitHub read on 2026-10-25 reports #151 and #152 (8d7be88ac271d4a983ef46fe2999dc31a71a6861) as mergeable: CONFLICTING. Coordinate integration on the existing carriers and rerun their acceptance at the resolved head; open PRs and historical passing checks are not merged or current-head support.
Decision to record
- Whether the shared transport permits these model-defined extra response fields unchanged. Keep the Rust frontend a byte-forwarding transport; do not silently reinterpret span/set as exclusive Choice.
- Whether Vela's upstream state truncation is the accepted model-specific behavior, with explicit documentation of its guardrail consequences, or an intentionally stricter worker contract. Do not change it incidentally during native porting.
- Preserve Vela's reference confidence statistics and single-rendered-sequence input-token count; do not replace them with another worker's entropy or per-question sum. Keep learned temperature tau separate from inference calibration T.
Acceptance fixtures for the selected policy
- Record the decision in [RFC]: Write down which parts of the /v1/systemone contract all workers share #61's contract documentation and reconcile [New Model]: Support the Vela 2.0 series #137's acceptance wording with Vela: serve Vela 2.0 0.3B through a Python reference worker #151's final supported scope.
- Span cases retain the named state field, router/broad-head identity, label, probability and Unicode-code-point offsets. Include CJK and non-BMP characters so byte/UTF-16 offsets cannot pass.
- Set cases retain independent per-label probabilities, per-request thresholds and multi-label selection. No cross-label softmax or forced single selection.
- Preserve Noul views and the corresponding top-level extension fields together; check direct worker/frontend byte or semantic parity under the documented timing-field policy.
- Cover invalid span/set requests, error precedence, oversized schema versus oversized state, and the actual upstream truncation boundary.
- Use the pinned 0.3B CPU FP32 oracle before native comparison. Report native precision/backend tolerances separately.
Suggested non-overlapping contribution for psv666: contract acceptance and additional native parity cases after the reference/oracle is available. MrDongsls remains the author of the existing reference/ModernBERT PRs. This proposal does not assign another contributor new work or claim native parity has passed.
Activity