#1 [high] Change: PR #637 replaces concatenated tool-call IDs with 37-char SHA-256-derived IDs
PR #637 (flare-autobot, COLLABORATOR), head d1508112, base main, 3 files +881/-7, opened+updated 2026-11-30 11:40, no reviews, no comments, CI failed on head.
Actual diff:
- helios/src/server/output.rs (+418/-6):
- module-scope
use sha2::{Digest, Sha256};(was test-module only), new consts MAX_SYNTHESIZED_TOOL_CALL_ID_LEN=40, SYNTHESIZED_TOOL_CALL_ID_LEN=37,const _: () = assert!(...)compile-time check, andfn synthesize_tool_call_id(scope_id: &str, index: usize) -> Stringhashingb"flare-tool-call-id-v1\0"+ LE u64 len + scope bytes + LE u64 index, emittingcall_+ 32 lowercase hex of first 16 digest bytes. Accumulator::apply:format!("call_{}_{}", self.id, index)->synthesize_tool_call_id(&self.id, index).ResponseOutput::close:if let Some(index) = self.open.take()->if let Some(index) = self.open { ...check unclosed Tool...; self.open = None; changes.push(...) }(no state clear on rejection).ResponseOutput::apply: ID synthesis+validation moved BEFOREself.close(&mut changes)?(was after close), so a rejected ID no longer closes the open block; format!("call_{request_id}_{index}") -> synthesize_tool_call_id(request_id, index).
- module-scope
- helios/src/server/protocol/tests.rs (+454/-0, pure additions):
assert_synthesized_protocol_tool_call_id,synthesized_tool_call_ids_stay_bounded_across_protocols_modes_and_restarts,synthesized_high_counter_tool_call_ids_round_trip_through_decode_and_template_messages. - docs/api.md (+9/-1): paragraph in the "output parser" section documenting deterministic 37-char
call_<32 hex>IDs, hash inputs, 40-char CC max,[a-zA-Z0-9_-]+.
No other code paths touched: no change to http.rs request IDs, decode.rs, encode.rs, Cargo.toml, or the parsers.
Description claims the sha2 import is "gated behind #[cfg(feature = "server")] in helios/src/lib.rs" — i.e. the PR relies on an existing gate; it does not add the gate. Verify (see separate note).
#2 [high] Why: issue #447 by shieldstar, 2026-11-21, with maintainer pushback from yatesdr
Issue #447 "Synthesized tool-call ids pass 40 characters once the request counter reaches 100000", by shieldstar, opened 2026-11-21 18:26, updated 2026-11-30, label area:api, still open.
Claim: id = call_chatcmpl-<16 hex run>-<seq>_<choice>_<index>; 40 chars at seq=99999, 41 at seq=100000. Live OpenAI rejects ids >40 with HTTP 400 string_above_max_length, citing only https://github.com/BerriAI/litellm/issues/11392 (a third-party LiteLLM issue). Repro is a CPU-only unit test driving Accumulator at upstream 25b4951 (arm64, rust 1.94.1). Source pointers: helios/src/server/http.rs:316 (prefix), 321-325 (request id {prefix}-{run:016x}-{seq}), protocol/encode.rs:127-129 (Accumulator::new(format!("{id}_{i}"))), output.rs:66 (format!("call_{}_{}")), output.rs:67-69 (only nonempty+unique validation), output.rs:1357 (Responses path same shape).
Discussion:
- 2026-11-21 18:38, yatesdr (maintainer, 47 commits in helios/src): "The arithmetic holds at main 21a40f05... Every parser leaves ids to Flare, so all models get synthesized ids. Flare documents no length limit, and the only limit cited is a third-party report of Azure OpenAI rejecting 41 characters, so the client contract this should meet is not established yet." => the limit itself is contested, not the arithmetic.
- 2026-11-30 11:41, flare-autobot: reproduction confirmed on main c146d7be, states every native parser in helios/src/output/ emits id:None, and describes the prepared fix branch
fix/issue-447-bound-synthesized-tool-call-ids(commit d1508112) == this PR. So the PR text is a re-post of that comment.
Connection: PR #637 "Fixes #447"; #447 links back to #637.
#3 [high] Related work: #176 (merged 2026-11-03) created the run+counter ID scheme this PR now hashes
#176 (yatesdr, merged 2026-11-03, +30/-2, commit cc696a6b "Keep request and tool-call IDs unique across server restarts") is the change that introduced exactly the format whose length #447 complains about:
- Added
HttpState::run(random u64 from std hasher keys, helios/src/server.rs:165-166, 177-180, 324) and changed request IDs in helios/src/server/http.rs to{prefix}-{run:016x}-{counter}(currently http.rs:317-327, counterAtomicU64::new(1)at server.rs:325). - Its stated motivation: after a restart inside a container the pid was always 1, so every restart reissued the same IDs; Claude Code reported
[Tool use interrupted]and the model repeated calls; chat templates pair tool results to calls by ID (Kimi, Gemma, GLM). Live evidence: DeepSeek V4.1 Flash on SM120 behind Claude Code, 74 of 124 tool calls collided after restart before, 9/9 distinct after. - #176 explicitly reasoned about tool-call IDs derived from request IDs (
call_{request id}_{index}) — so #637 preserves #176's uniqueness intent while decoupling length. PR #637's description does not cite #176 at all, but its "retaining full 64-bit per-start run entropy" claim only makes sense against #176. - Note a tension: #176's fix bought restart uniqueness by lengthening IDs; #637 re-encodes the same entropy in a fixed width. Nobody has measured whether 128 bits of digest keeps cross-restart/cross-host collision risk acceptable vs the full
run— the description asserts "injective over (scope_id,index)" which is true for the input, not for the 128-bit truncated output (birthday bound ~2^64).
#5 [high] Change detail (verified): sha2 is reachable under the server feature; item_id left unbounded
Verified from code at PR head:
- Feature gating:
helios/src/lib.rs:29-30gatespub mod serverbehind#[cfg(feature = "server")].helios/Cargo.toml:25listsserver = [... "images" ...],:23images = ["frontend", ...],:22frontend = [..., "dep:sha2", ...]. So the new module-scopeuse sha2::{Digest, Sha256};(output.rs:15) is only compiled when sha2 is enabled — the description's claim holds.sha2 = { version = "0.10.9", features = ["asm"], optional = true }(Cargo.toml:147-149). No Cargo.toml change in the diff. - The pre-existing test-module
use sha2::{Digest, Sha256};was removed from output.rs tests; the only other sha2 use in the file is inside a test at output.rs:544 (format!("{:x}", Sha256::digest(bytes))), which now resolves throughuse super::*. - Helpers: output.rs:17-49 (consts +
synthesize_tool_call_id), call sites output.rs:101 (Accumulator::apply), output.rs:1768 (ResponseOutput::apply), reorderedcloseoutput.rs:1714-1723. - Accumulator scope is
{request_id}_{choice}set in encode.rs:130-131 (Accumulator::new(format!("{id}_{i}"))); ResponseOutput gets the bareself.id(encode.rs:567self.outputs[index].apply(event, &self.id)), so Responses/Messages call index alone must disambiguate — fine because Responses/Messages are choice-0 only (onlyresponses[0]is rendered, e.g. encode.rs:280, 742, 756). - Not changed by the PR:
item_id(encode.rs:268-270) is stillformat!("item_{}_{index}", self.id)— unbounded, so Responsesitem.idgrows with the counter, contradicting nothing in the PR but left as-is; description claims<= 54chars up to u64::MAX (5 + 1 + prefix + 1 + 16 + 1 + 20 = 44 foritem_resp-<16>-<20>; 54 figure doesn't follow for any protocol prefix — worth flagging as an unverified/possibly wrong arithmetic claim). Actually compute:item_=5,resp-=5, run 16,-=1, seq up to 20 digits,_index= 1+digits(index). Worst case 5+5+16+1+20+2 = 49 for single-digit index; 54 would need index of 6 digits. So "<=" is true but the exact 54 is unexplained. - x-request-id header set from the request id (http.rs:42), so the human-readable id survives unchanged.
#6 [high] Change accuracy: what is verified vs what the description overstates or omits
- All native tool-call parsers emit
id: None, verified by search of helios/src/output/: argument_tags.rs:596, dsml.rs:185, recipient.rs:186 and :279, tagged.rs:269, tml.rs:361 and :488, xtml.rs:209. (The PR says "nine native parsers"; the search shows 7 files / 8 literalid: Nonesites plus shared helpers.) This is why every served model gets synthesized IDs — confirmed independently by yatesdr in #447 comment 2026-11-21. - The 40-character OpenAI/Azure limit is not documented anywhere in this repo (grep of docs/ finds no 40/64-char tool-call ID limits); the only external citation in #447 is https://github.com/BerriAI/litellm/issues/11392 (third party), plus shieldstar's report. PR #637's docs/api.md addition (api.md:443-451 under the head) is the first place the number appears in-tree. The Responses 64-char
item.idlimit and Messages 64-char claim in the PR are also uncited in-repo. - The OpenAPI-ish contract the repo targets is "the documented subset of the OpenAI API, Anthropic Messages API and JSON Schema" (charter, Standards & Contributions), so an undocumented-but-real 40-char limit is plausibly in scope, but the evidence brought is second-hand.
- Internal change from readable to opaque IDs: previously
tool_calls[].idwas human-decodable and contained the request id; after the change it contains no recoverable request/choice/call info. This affects anyone logging or debugging by tool-call id. The PR does not mention it. - Behavior change beyond the ID format: previously
ResponseOutput::applyclosed the open block (emittingChange::End) before rejecting a bad tool ID; now rejection leaves the block open. Andclose()no longer clearsself.openwhen it errors, sofinish()becomes retryable. Callers: encode.rs:567 (apply) and encode.rs:609 (finish) — error paths therefore keep the encoder in a retryable state instead of a half-closed one. This is described in the PR, but it is a semantic change to error handling, not just to IDs.
#7 [high] Process: CI failed on head, no reviews, commit authored by derek but published by the bot account
- CI on head d1508112 is reported failed in the orientation packet; PR has no comments and no reviews, opened and last updated 2026-11-30 11:40 (same minute → no human interaction since). Author is
flare-autobot, a COLLABORATOR bot account; the commit d1508112 is attributed to derek (search_history of helios/src/server/output.rs shows "d1508112 2026-11-29 derek: Bound synthesized tool-call IDs to 37 characters across HTTP protocols"). So a human (derek) authored the commit and the bot published the PR/description. - Both PRs from this account (#637 and #638) are open, 0 comments, and the account has 0 merged/0 closed items in 180 days — i.e. no track record to judge it by in the local copy.
- Compare with a sibling bot-published PR that did draw review: #626 (lukealonso) carries an automated "Autobot Review" comment (Recommendation: Changes Requested; explicitly notices "CI on head f7907a2 is currently failing (unexplained)") plus a case-file comment. #637 has had no such auto-review yet, so CI failure cause is unknown here.
- CI pipeline that will run:
.github/workflows/native-serving.yml— ubuntu-24.04 x86_64 + windows-2022 matrix,cargo test --locked --release --manifest-path helios/Cargo.toml --target-dir flare-cli/target --features runtime-core,serveron both OSes (lines 56-68), plus flare-cli (69-73), flare (74-77), eos/selene; prep steppython tests/frontend/prepare_templates.pywith 7 recipes (line 31). No fmt/clippy step in any workflow (grep of .github found none). The PR only ran aarch64 Linux locally, so an x86_64/Windows-only failure is a plausible CI cause; the description explicitly says x86_64 and Windows builds were not executed. - Charter requires 4-part PR descriptions (why / what / claimed result / evidence) — #637 has all four, plus a limitations section; this is above the repo's norm (charter, Code Review Standards).
- Charter: "Bring real evidence... Bug fixes need to address the root cause" — #637 does address the root cause (length bound) rather than truncating. Charter also warns "Good ideas in the wrong place will be declined"; the change is in the shared Helios HTTP protocol layer, not per-model — aligned with "Keep the runtime small and model-agnostic".
- Charter non-goal tension: "It is not trying to be a general-purpose production server", yet shieldstar's motivation (long-running multi-provider conversation replay past 100k requests) is a production-hosting concern; yatesdr already flagged that the client contract is not established.
#9 [high] Claims and evidence: length property is structurally proven; the 40-char API contract and the green-suite claim are not
Claims → what backs them:
- "Every synthesized ID is fixed at 37 chars, matches ^call_[0-9a-f]{32}$, across seq 0..u64::MAX, choices, up to 128 calls, streaming==buffered" — backed by construction (output.rs:31-49: fixed 5+32 chars) and by 4 new tests: output.rs
synthesized_tool_call_ids_are_bounded_deterministic_and_distinct(output.rs:1301-1470 approx) andresponse_output_rejects_invalid_tool_begin_and_unclosed_close_without_partial_mutation(output.rs:~1470-1671); protocol/tests.rssynthesized_tool_call_ids_stay_bounded_across_protocols_modes_and_restartsandsynthesized_high_counter_tool_call_ids_round_trip_through_decode_and_template_messages(tests.rs:2665-3119). All CPU-only; the length property is structurally guaranteed, so the tests mainly protect regressions. - "OpenAI/Azure reject >40 chars" — NOT verified by this PR; the only evidence is #447's LitellM issue link and shieldstar's report. The PR adds the number to docs/api.md:448 as fact. No live OpenAI/Azure request was made.
- Test counts: 1803 passed / 0 failed / 84 ignored for helios (runtime-core,server); flare 245; flare-cli 227 — matches what the CI workflow would run on Linux, but CI on the head commit is reported failed, so the claim that the tree is green is contradicted by the pipeline result at least on one matrix leg (x86_64 or Windows). The author states x86_64 and Windows builds were never run locally. Case file: this is the single biggest evidence gap.
- "Retains full 64-bit per-start run entropy" — the run value is hashed in, but the emitted ID carries only 128 bits of the SHA-256 digest over the whole (scope,index) input; "full 64-bit run entropy" is preserved in the input, not literally recoverable/guaranteed distinct per run after truncation. Cross-host collision probability is ~2^-64 per pair, which is fine, but the phrase overstates.
- "Injective over (scope_id, index)" — the hash input encoding is injective (length-delimited + LE u64 index), but the 128-bit truncated digest is not mathematically injective. Within one response the uniqueness check (output.rs:102-104, 1769-1776) catches any collision, so the practical claim holds.
- "Previously exported cores load and serve without re-export" — plausible: no core/protobuf/contract code touched; diff is confined to output.rs, protocol/tests.rs, docs/api.md. Not separately tested by the PR.
- Unrun and acknowledged by the author: live HTTP SDK suite (tests/server/test_protocols.py, which does exercise tool-call ids end-to-end, see tests/server/test_protocols.py:282-344, 547-567), ignored GPU/core tests, x86_64/Windows builds, scheduling sim, TLA+, Kani.
- Not claimed and not tested: no test reproduces issue #447's exact scenario against a live server past seq 100000; the closest is the unit test at seq 100_000.
#4 [medium] Related work: sibling PR #638, and other tool-call-area PRs/issues
- #638 (flare-autobot, opened same day 2026-11-30 11:40, head f414393, +1316/-33, 9 files, open, 0 comments) "Echo Responses tools and text.format and decode tool output is_error", fixes #450. Same author, same batch of bot PRs, touches helios/src/server/protocol/{decode,encode,tests}.rs and docs/api.md — i.e. it overlaps PR #637's docs/api.md hunk and helios/src/server/protocol/tests.rs additions (both append to the end of tests.rs; textual conflict likely if both merge). It is otherwise a different concern (Responses echo, is_error, GET /v1/responses). Same review status: no discussion.
- #418 (merged, "Add strict function-tool schemas for DSML, Qwen, GLM and TML parsers", commit 0b09434d) added the
strict/pending_strict_callsbuffering path in encode.rs:502-556 that PR #637's new protocol test exercises explicitly ("Strict function tools (buffered via pending_strict_calls before re-emission)"). - #573 (merged, "helios: tolerate omitted closing tags on complete tagged tool calls at EOS", 2bdc8472) and #226746cd ("Complete responses after one tool call when parallel calls are disabled") are adjacent tool-call semantics changes in the same files.
- #333 (merged) "Complete responses after one tool call when parallel calls are disabled"; #513 (open, jannerchang) touches helios/src/server/output.rs but in
Decoder/logprobs, unrelated to IDs; #191 (open) and #170/#67/#167 (merged) also touch output.rs. - No competing or duplicate fix for #447: searching the repo's items for tool-call ID length/collision found only #447 and #637. Nothing supersedes #637; nothing is undone by it other than the raw
call_{request_id}_{index}format itself.
#8 [medium] People: derek authored the commit, flare-autobot published it; shieldstar reported; yatesdr is the only maintainer on record
People:
- Author of record on the PR:
flare-autobot(COLLABORATOR), Discordflare-autobot; its other open items are #625 (eos THP compaction stalls) and #638. The actual commit author isderek, a frequent contributor in this area (history of helios/src/server/output.rs: 48bae6bb, 2a65f7f3, 2a8fcb9f, 2ae8c0b1 logprobs work; this commit is his most recent in that file after 8628b7c5 by Luke Alonso). - The issue reporter is
shieldstar(files the bug with a full reproduction and a source map; the tone and precision match a maintainer-style report; no other items from them surfaced in local search). - Maintainer who engaged:
yatesdr(47 commits in helios/src, 55 in docs). His #447 comment is the only substantive human opinion on record: the arithmetic holds but "the only limit cited is a third-party report ... so the client contract this should meet is not established yet." He also authored #176, the change that created this ID format, so he is the natural reviewer. - Who usually works in these areas: helios/src — Luke Alonso (229 commits), Martin Vit (52), yatesdr (47); docs — Luke Alonso (384). Recent touching PRs: #513 (jannerchang), #191 (YouNeedCryDear), #418 (Joshua Cartu), #573 (Luke Alonso).
- Engagement so far: zero comments/reviews on #637; the only cross-reference is the bot's own comment on #447 announcing the branch. No human has looked at the PR itself.
#10 [medium] Reach: opaque IDs for clients, no config/wire change, Responses item.id still unbounded
Reach:
- Users/operators: anyone replaying Flare conversations through OpenAI/Azure gets shorter IDs; anyone scripting against tool-call IDs sees an opaque value instead of
call_chatcmpl-<run>-<seq>_0_0. Clients that merely echo the id back (the normal pattern, see tests/server/test_minimax_m3.py:126, test_kimi3.py:124, test_inkling2.py:117) are unaffected; templates pair results by id viaorder_tool_result_batch(helios/src/server/inference.rs:393-415), which keys on the assistant's call ids, so it continues to work because ids stay stable within a response — the new round-trip test covers exactly this. - Compatibility: no config, default, flag, env var, wire format, protobuf, core format or Cargo dependency change.
docs/api.mdgains a documented guarantee (api.md:443-451 at head).x-request-idand the response top-levelidstay human-readable (http.rs:42, 323-327 unchanged). - Untouched but closely related: Responses
item.id(item_{request_id}_{index}, encode.rs:268-270) is still unbounded and grows with the counter; if any provider limit applies to Responses item ids (PR claims 64), it can still be exceeded for very large counters/high item indexes. The PR documents this as "<= 54 characters" without showing the arithmetic or the 64-char source. - Cross-restart/cross-host uniqueness: preserved in the sense that the run id is an input; a restart gets a new run, so ids differ (test simulates 2 runs). Collision risk is now probabilistic (128-bit truncation) rather than structural.
- Deployment/dependencies: sha2 already a transitive feature dep of
server; no new build requirement, no GPU/ABI/CUDA-graph/lifetime interaction (diff touches no execution code). Build matrix relevance: Windows/x86_64 untested locally but the code is portable (no platform-specific code added). - Documentation reach: docs/api.md is the client-facing contract, so a documented "37-character" format becomes a compatibility promise the project would then need to keep.
#11 [medium] Coverage check: all ten angles and orientation-packet leads resolved
Six angles summarised; all leads from the orientation packet were followed (this note replaces the failed tool call made on the previous turn):
- Change — done (entries 1, 5, 6).
- Why — done (entry 2: #447 by shieldstar 2026-11-21; the 40-char client contract is contested by yatesdr).
- Related work — done (entries 3, 4: #176 is the predecessor that created the
{prefix}-{run:016x}-{seq}format; #638 is a same-day same-author sibling overlapping docs/api.md and the end of protocol/tests.rs; #418 added thestrict/pending_strict_callspath the new protocol test exercises; #573, #226746cd, #333 are adjacent tool-call semantics; no competing or duplicate fix for #447, nothing superseded or undone beyond the rawcall_{request_id}_{index}format). - Recent activity — done (entries 3, 7): the only main-branch commit since the branch point (c146d7b) touching a changed file is 0a8c20f4 (#626), which edits a different part of docs/api.md, so no textual conflict; the ID scheme itself last changed in cc696a6b (#176, 2026-11-03); output.rs last touched by 8628b7c5 (2026-11-14, Luke Alonso, unrelated).
- People — done (entry 8: commit authored by derek, PR published by flare-autobot; issue reported by shieldstar; yatesdr the only maintainer on record; Luke Alonso / Martin Vit / yatesdr own helios/src).
- Community — done (entries 7, 8): zero comments, zero reviews, zero reactions; the only cross-reference anywhere is the bot's own comment on #447 announcing the branch.
- Project fit — done (entry 7): satisfies the charter's 4-part PR description rule, the "root cause, not truncation" rule, and model-agnostic Helios placement; tensions are "not trying to be a general-purpose production server" and the unestablished client contract.
- Claims and evidence — done (entry 9): the 37-char property is structurally guaranteed and unit-tested; the 40-char OpenAI/Azure limit is second-hand (a LitellM issue) and newly asserted as fact in docs/api.md:448; CI on the head commit is reported failed, contradicting the "all suites pass" narrative; "injective" and "full 64-bit run entropy" are imprecise phrasings of a sound mechanism.
- Reach — done (entry 10): no config/default/wire/protobuf/core change; response top-level
idandx-request-idstay human-readable; tool-call ids become opaque; Responsesitem.id(encode.rs:268-270) is left unbounded despite the description's "<= 54 characters" claim, whose arithmetic is unexplained (5 + 5 + 16 + 1 + up-to-20 digits +_index= 49 for a single-digit index). - Process — done (entry 7): open, "ready for review", no labels, no reviewers, opened and last updated the same minute on 2026-11-30 (0 days old), CI failed.
Leads checked and found not relevant: #513 (open) touches helios/src/server/output.rs but only the Decoder/logprobs part, no overlapping lines; #191, #170, #67, #167 touch output.rs historically but not IDs; #615/#619/#620/#626 are recent helios/src commits that do not touch the call-ID code.