Skip to content

fix(session-host): preserve typed stop causes in deterministic summaries - #432

Merged
senamakel merged 31 commits into
epic/8092-inference-outfrom
epic-8092-248-typed-stop-summary
Oct 19, 2026
Merged

senamakel merged 31 commits into
epic/8092-inference-outfrom
epic-8092-248-typed-stop-summary

Conversation

@senamakel

@senamakel senamakel commented Oct 19, 2026 •

Copy link
Copy Markdown
Owner

When the harness has a typed stop cause, deterministic session summaries now classify from its stable failure class and retain the operation through close/checkpoint projection. This keeps provider configuration, credit, policy, transient, repeated/varied failure, and other stop copy stable when note wording changes or is translated. Unknown typed classes stay generic; only genuinely untyped legacy stops use the note-based compatibility mapping.

Actual grounded close handles typed causes even without a halt note, avoids another provider call, and preserves the operation in the projected stop. Tests cover contradictory and translated notes, all 17 user-facing stop categories and producer aliases, plus the no-note close path.

Validation on 14bf27ab2ef2bfc7321668a6088ccb8dbf1cf178:

  • Passed: cargo fmt --all -- --check, git diff --check, pnpm rust:layout (including storage schema, 28 owners), cargo check --manifest-path Cargo.toml, and cargo check --manifest-path crates/openhuman-app/Cargo.toml.
  • Passed focused runtime regression and final pnpm debug rust --lib session_host: 198 passed.
  • Final pnpm debug rust inference: 533 core tests passed; the command exits 101 on two agent_harness_e2e hosted-provider registration failures (BACKEND_UNAVAILABLE). The exact failures match prior OH247 receipts.
  • Final strict cargo clippy -p openhuman --all-targets -- -D warnings exits 101 on eight diagnostics in seven unchanged files. Parent comparison verified exact diagnostic and source matches against prior OH247 runs.

The branch also merges canonical main at 03abae10bbb58a8a1b6590a9f0bd7f6a2732064d; its additional workflow, script, registry-test, and tinycomputer gitlink changes are byte-identical to that upstream commit. The leaf implementation changes only the five session-host files.

Refs #248
Part of tinyhumansai#8092

senamakel and others added 30 commits October 18, 2026 21:03
Update the vendored tinycomputer submodule to a newer commit.

Auto-committed-on: macbook
Update the tinycomputer registry test to expect contract version 2.20
instead of 2.19, keeping the assertion in sync with the published bus
contract.

Auto-committed-on: macbook
chore(modules): bump tinycomputer for browser identity options
Co-authored-by: Medulla <medulla@tinyhumans.ai>
Updates the pinned commits for the tinyagents and tinyjuice vendored dependencies to their latest revisions.

Auto-committed-on: macbook
…checkouts

Co-authored-by: Medulla <medulla@tinyhumans.ai>
releases new and set-commits ended in || true, so a failed release
creation still passed and symbols attached to a release that might not
exist. Both now fail the script.

set-commits currently 403s on every desktop target (release 0.64.15),
so build-desktop.yml skips it deliberately through
SENTRY_SKIP_SET_COMMITS, backed by a repo variable that defaults to 1.
Setting the variable to 0 once the token can associate commits makes
the step fatal with no code change.

Refs tinyhumansai#8104
ea3fbfb moved the replay, agent and orchestration controllers from
crate::agent to crate::agent_runs without changing their wire names.
tests/in_process/agent_approval_memory_coverage_e2e.rs still round-trips
agent_run_events, agent_run_status and agent_runs_active, but the guard
matches domains by module name with \bagent_runs\b, which none of those
method names satisfy. So test-inventory failed on main and on every PR.

Allowlist the domain with that cause spelled out. It is not a coverage
gap; the entry should go once a test names the domain or the guard
matches by RPC method name.
…ory-agent-runs

ci(test-inventory): allowlist agent_runs after its module move
…-no-swallow

fix(ci): stop swallowing Sentry release failures in symbol upload
chore(modules): bump tinycomputer for browser identity options
Add a regression test asserting that a typed out_of_credits failure cause takes precedence over contradictory halt prose when building the classified halt summary.

Auto-committed-on: dragonfly
Stopped-turn summaries now derive their copy from the harness's typed
failure cause when one is present, falling back to the stop note only for
legacy untyped stops. This keeps translated or conflicting halt prose from
selecting the wrong summary.

Auto-committed-on: dragonfly
…ummaries

Stop summaries now derive their reason solely from the stop note, so the
typed failure-cause variants and their wrappers are removed. The tests were
updated to match the note-based copy.

Auto-committed-on: dragonfly
Stopped-turn summaries now derive their copy from the typed breaker
cause when the harness provides one, falling back to parsing the stop
note only for old untyped stops. This prevents English halt wording from
overriding a typed failure class and adds mappings for out-of-credits
and provider-config causes.

Auto-committed-on: dragonfly
…maries

Grounded close now treats a typed failure cause as a halt signal even when the breaker reason lacks the usual prefix, and routes both close paths through the cause-aware summary builder so typed failures are reported instead of falling back to generic copy.

Auto-committed-on: dragonfly
This change updates `classified_halt_close` to default the halt reason to an empty string if it is not present. This prevents a potential panic when checking the reason string, and a new test case is added to verify correct behavior when a typed cause exists without an explicit halt note.

Auto-committed-on: dragonfly
The deterministic final summary now falls back to the classified failure
cause when no stop reason is present, so a typed cause still produces a
provider-aware summary instead of the generic "no result" message.

Auto-committed-on: dragonfly
The grounded close path now also runs when the outcome carries a failure
cause, so sessions that end in an error still get a final closing message
instead of stopping silently.

Auto-committed-on: dragonfly
This updates a test case to use async/await and introduces a scripted model to verify that a typed cause without a halt note still correctly closes the session and maintains the operation state.

Auto-committed-on: dragonfly
The deterministic final summary builder now handles the no-results and
stop-reason cases itself and delegates to the cause-aware variant only when
a classified failure cause is present. The cause-aware builder falls back to
the plain builder, removing the duplicated summary logic.

Auto-committed-on: dragonfly
Dropped the unused build_deterministic_final_summary import from the
grounded close driver, leaving only the variant that takes a cause. This
keeps the import list aligned with what the module actually calls.

Auto-committed-on: dragonfly
Updates the assertion in grounded close tests to check that no requests are made when a typed cause closes the session.

Auto-committed-on: dragonfly
This change introduces a new module for testing typed stop scenarios in grounded close logic. This separates the more complex typed stop tests into their own file for better organization.

Auto-committed-on: dragonfly
Dropped the module declaration for grounded_close_typed_stop_tests, which no longer exists in the tree.

Auto-committed-on: dragonfly
Dropped a stray trailing newline at the end of the grounded_close driver
module so the file ends cleanly.

Auto-committed-on: dragonfly
Adds a table-driven test asserting that every typed stop category and its
aliases map to the expected stop-category copy when a classified halt closes
the turn. It also verifies these closes happen without issuing another model
call.

Auto-committed-on: dragonfly
Auto-committed-on: dragonfly
Extend the stop reason parser to recognize missing_program, invalid_calls,
repeated_failure, varied_failures, repeating_step, and missing_connection so
these reasons resolve to their dedicated kinds instead of falling back to
Generic.

Auto-committed-on: dragonfly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants