Skip to content

fix(shiso): prevent chat reset when selecting a Vault recipe - #78

Merged
kryptek2000 merged 1 commit into
mainfrom
fix/shiso-global-conversation-reset
Nov 29, 2026
Merged

kryptek2000 merged 1 commit into
mainfrom
fix/shiso-global-conversation-reset

Conversation

@kryptek2000

Copy link
Copy Markdown
Owner

Summary

Fixes the demonstrated SHISO chat reset when select_vault_recipe binds a recipe during a named global conversation.

The owner-visible failure was: SHISO began executing a recipe-development task, then the chat reset and the turn never completed. The application itself stayed healthy.

Root cause

select_vault_recipe calls the App's onSelectRecipe, which updates the selected recipe. The App then derived the SHISO context key from that recipe, changing it from global to recipe:<id>.

The named global:* conversation override no longer matched the new context, so ShisoModal fell back to the unscoped global conversation. Its conversation-key effect aborted the in-flight turn and cleared the visible transcript.

The named conversation was not deleted, but its in-flight turn was lost. Because the saved model history was empty, reopening it did not offer the existing retry path.

Correction

A global conversation now derives its context key from shiso.source === 'global', not from the currently selected recipe. Selecting a recipe is an operation inside that conversation, not a conversation-identity change.

Recipe-entered conversations remain bound to their recipe identity. Creation conversations remain bound to create. Existing mismatch-release behavior for recipe conversations is unchanged. Conversation storage and persistence architecture are unchanged.

Verified behavior

The real-App, disposable on-disk Vault regression test:

  1. Creates a named global conversation.
  2. Searches for and selects Braised Beef Short Ribs.
  3. Reads the selected recipe.
  4. Applies an authorized 2 tbsp olive oil → 3 tbsp olive oil edit to the unsaved working copy.
  5. Completes the turn with a final reply.

Verified:

  • The same named conversation key remains active.
  • The user message and assistant entry remain in the same transcript.
  • Five requests complete: initial, search, select, read, edit.
  • The working-copy banner reports one change and the UI shows 3 tbsp olive oil.
  • The on-disk recipe is byte-for-byte unchanged.
  • No codexNutrition is written.
  • No Save or Apply tool runs.

The original test failed against the unmodified baseline (the chat reset and the final reply never appeared) and passes after the correction.

Recipe-scoped isolation remains intact: the existing recipe A → recipe B context-release test passes. Create-scoped conversation tests also pass.

No personal Vault files were accessed or changed. All acceptance used a disposable Vault under /tmp.

Verification

Check Result
New regression test — baseline FAIL (expected reset)
New regression test — fixed PASS
Full real-App on-disk integration file 12/12 PASS
Conversation integrity + 3 security files 92/92 PASS
Additional security files (H1fRepairs, H2Editing) 52/52 PASS
Recipe-scoped isolation test 1/1 PASS
TypeScript tsc --noEmit PASS
Production build PASS
git diff --check PASS

The transport is deterministic and stubbed; this verifies the execution, conversation, evidence, and working-copy contracts, not live-model culinary quality. No paid provider calls were made.

Scope

Two files, 212 insertions and 2 deletions:

  • src/App.tsx — global conversation context derivation.
  • tests/integration/shisoAgentFoundationAppOnDisk.test.tsx — named-global selection regression test and deterministic transport.

No installation, native replacement, deployment, merge, or unrelated SHISO development. Not merged.

@kryptek2000
kryptek2000 merged commit a5df01b into main Nov 29, 2026
14 checks passed
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.

1 participant