Skip to content

Turn override E2E fixtures need hosted root authority #6377

Closed

Description

@senamakel

The TinyAgents hosted-root migration requires OpenHumanSessionHost instances to carry hosted authority. Four agent_turn_overrides_e2e fixtures still build legacy sessions without it and fail before a provider call with hosted root invocation is unavailable because the session has no hosted authority.

Affected temporary quarantines: suppress_active_goal_keeps_the_thread_goal_out_of_the_prompt, suppress_transcript_autoload_does_not_replay_a_prior_threads_transcript, thread_goal_complete_and_clear_stop_the_goal_reaching_later_turns, and turn_overrides_apply_to_exactly_one_turn_and_then_reset.

Do not add a legacy fallback; migrate the fixtures to the production hosted builder and restore the tests.

Activity

  1. added
    priority: p1Next. Wrong behaviour a user will hit, or a security weakness behind a condition.
    on Sep 20, 2026
  2. tinysweeper commented on Sep 20, 2026

    @tinysweeper

    Four E2E fixtures for turn-override tests fail because they lack hosted authority, blocking tests from exercising provider calls.

    Labelled priority: p1.

  3. added theissue type on Sep 20, 2026
  4. self-assigned this
    on Sep 24, 2026
  5. M3gA-Mind commented on Sep 24, 2026

    @M3gA-Mind
    Collaborator

    Investigated and shipped a partial fix in #6628. It does not close this issue, and the reason is that the filed cause turned out to cover only half of the quarantined cases.

    What I checked

    • tests/agent_turn_overrides_e2e.rs — all four #[ignore] markers, the shared agent_with fixture (:231-255 before the change), and each failing assertion.
    • crates/openhuman-core/src/agent/session_host/builder/setters.rs:336 (agent_definition) and its doc, plus the canonical usage in builder/builder_tests_session_definition_tests.rs:43-53,114-117.
    • crates/openhuman-core/src/agent/harness/definition/execution_spec.rs:42-49 for ToolScope semantics.
    • cargo test -p openhuman-cli --test agent_turn_overrides_e2e -- --ignored --test-threads=1, before and after, and then without --ignored to see it the way CI runs it.

    What I found

    The premise is correct but incomplete, and the count is wrong. There are four quarantined tests under this marker, not three — the fourth is thread_goal_complete_and_clear_stop_the_goal_reaching_later_turns (:526 on main).

    The filed cause is real. The fixture only set:

    .agent_definition_name("turn-overrides/orchestrator")

    which stamps an id without putting a definition behind it, and no built-in uses that id. Every turn was therefore unresolvable against the host catalogue. Supplying the definition via SessionHostBuilder::agent_definition fixes two of the four, which now pass and are un-quarantined in #6628:

    • suppress_active_goal_keeps_the_thread_goal_out_of_the_prompt
    • thread_goal_complete_and_clear_stop_the_goal_reaching_later_turns

    The other two fail for reasons that have nothing to do with the authority, which is why #6628 uses Refs, not Closes. I left them quarantined and re-aimed their markers rather than lifting them:

    1. suppress_transcript_autoload_does_not_replay_a_prior_threads_transcript now fails in its own control, at :466 — not in the assertion under test:

    control: a fresh agent must auto-load the prior thread's transcript even under a different thread id, otherwise this test cannot prove that suppress_transcript_autoload prevents anything

    A fresh agent does not auto-load the prior transcript by agent name on the hosted path. Not isolated: either auto_save no longer writes where latest_for_agent looks, or the lookup key moved with the stamped session id. I did not relax the control to get past it — the control is what makes the test non-vacuous.

    2. turn_overrides_apply_to_exactly_one_turn_and_then_reset fails at :549:

    turn 2 set no overrides, so the toolbelt must be back — the override is one-shot, not a rebuild; got []

    Turn 2 sets no overrides and must carry the session's belt, but the upstream request's tool schema is empty. ToolScope is ruled out — I ran it with both Named(["turn_overrides_echo"]) and Wildcard and got an identical empty schema. Note that turn 1's assertion cannot discriminate here: a suppressed belt and a belt that never arrives are both []. So the open question is whether suppress_tools leaks past its one turn, or the belt never reaches the model on this path at all.

    Why the PR does not close this

    Two of four tests still fail, and neither is about the fixture's authority any more. Closing on #6628 would record a defect as resolved while two of its symptoms are still disabled in the tree.

    I did not attempt either remaining fix: both look like product behaviour in the hosted path rather than fixture wiring, and I could not validate a change to either tonight.

    What the next person should do

    • Start from test(agent): give the turn-overrides fixture a hosted root authority #6628 — the authority fix is a prerequisite for both remaining cases; without it they fail earlier, for the filed reason, and you cannot see these two.
    • For (2), the cheap discriminating experiment is a variant of the test that sets no overrides at all on either turn. If turn 1's schema is also empty, the belt never reaches the model and suppress_tools is innocent.
    • For (1), check whether auto_save's write path and latest_for_agent's lookup still agree on the key now that the session is stamped from the definition's id.
    • Verified command: cargo test -p openhuman-cli --test agent_turn_overrides_e2e → currently 2 passed, 0 failed, 2 ignored with test(agent): give the turn-overrides fixture a hosted root authority #6628 applied.

    Possible new issue

    The two remaining symptoms are unrelated to each other and to the filed cause — one is transcript autoload, the other is belt projection. They probably belong in their own issues so this one can close on #6628. I have not filed them.

  6. M3gA-Mind commented on Sep 30, 2026

    @M3gA-Mind
    Collaborator

    Closing as completed: the filed cause is fixed on main. The two tests still ignored fail for different reasons, and each now has its own issue.

    What fixed the filed cause. The fixture now carries a hosted root authority. #6628 (merge f7abe916fe, an ancestor of main @ 636f2e5ad8 and 1b82b9dba4) supplies the definition through .agent_definition(turn_overrides_definition()) at tests/agent_turn_overrides_e2e.rs:286. Two of the four quarantined tests now run un-ignored:

    • suppress_active_goal_keeps_the_thread_goal_out_of_the_prompt (:309)
    • thread_goal_complete_and_clear_stop_the_goal_reaching_later_turns (:587)

    Remaining, split out; neither is about the fixture's authority:

    Both #[ignore] markers still say TODO(#6377). The new issues note that they should be re-pointed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

priority: p1Next. Wrong behaviour a user will hit, or a security weakness behind a condition.

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions