Repository navigation
fix(tool-search): exempt from TinyJuice, keep the pin across compaction, force options onto existing threads - #715
Merged
Conversation
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Turn::tool_discovery_force runs the turn with the options and records them on a later row; the latest record wins. Default behaviour is unchanged. Co-authored-by: Medulla <medulla@tinyhumans.ai>
This was referenced Nov 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #711
Part of tinyhumansai/chottu-core#712
What changed
tool_searchjoinsDISCOVERY_TOOLS, soToolOutputMiddlewareno longer tabulates, summarises or truncates its results; the harness's collapse step sees them whole.OpenHumanTranscriptCodec::reconcilecalls the newdiscovery::carry_forward: when a compacted generation's rows lost thetool_discoveryrecord (refreshed system prompt, summary), it is written on the generation's first row. Both in-turn and out-of-band (compact_bound_history) compaction go throughreconcile.resolvealso keeps a recorded pin when a prefix is prepared again.Turn::tool_discovery_force(opts)sets a non-serializedToolSearchConfig::force_pin. The turn runs with the options and records them on a later row when they differ from what the thread runs with (including a change back to today's behaviour). The latest record wins (recorded_metadatanow reads the last record). Default behaviour is unchanged;Turn::tool_discoverystill pins new threads only. Chottu-core#65'sallscope uses this.Tests (red first, then green)
tool_search_result_is_not_reshaped_by_tool_output_middlewarediscovery_pin_survives_compaction(codec) andcompaction_carries_the_record_onto_the_first_row_of_the_new_generationforced_discovery_options_apply_to_existing_threadplus forcing-today, no-op force, latest-wins, re-prepared prompt (pin.rs)a_forced_discovery_turn_asks_for_the_options_on_existing_threads(embed; written with the helper, no red run)Gates
cargo fmt --all -- --check: passcargo clippy -p openhuman -p openhuman-embed --lib -- -D warnings: passcargo test -p openhuman --lib(filters: discovery::pin, replay_pin, tool_output, codec, the three new tests): passcargo test -p openhuman-embed --lib a_forced_discovery_turn: passnode scripts/generate-embed-docs.mjs: no diffPre-existing, not caused by this change
[REDACTED]).session_host::discovery_pin_testshangs locally (not run); an unrelated stack overflow inattachments::providerunder the broaddiscoveryfilter.--all-targets; none in files touched here.Not covered
[context]replay options (feat(context): bump tinyagents and tinysearch, expose expiry, reasoning, pruning and keep_recent_tokens options #714) have the same compaction gap; left for a follow-up.