Repository navigation
fix(loops,ui,data): resolve adversarial loop-review audit findings (DL-1, P-3, P-4, P-8, P-9, P-11) - #134
Merged
Conversation
…L-1, P-3, P-4, P-8, P-9, P-11) - Allow end_conversation to resume 100-turn conversations via allow_at_limit=True, skip maxed conversations in find_client_conversation, and strip/sync orphan trailing player turns on failed LLM calls (F1, F11) - Invert roll-under advantage/disadvantage keep direction (2d20kl1/2d20kh1) in _format_dice_spec and Resolver._execute_roll (F2) - Avoid doubling dice-pool size when calc_modifier returns stat_value (vampire.json) and parse count-successes pool thresholds without concatenating multi-band PbtA strings (F3) - Defer SceneLoop._run_combat while awaiting a player roll on propose_roll or forced_narrative_pushback, populate pending_roll on pushback, and pass only_resource_deltas=True with case-insensitive HP matching on combat persistence (F4, F8, F12) - Keep WebSocket active on llm_provider_error, include restored dice_request, guard JSON/int parsing, and handle scene_ended phase (F5, F9) - Exclude disable/enabled from st_extensions overwrite on SillyTavern lorebook export and expose include_inactive on GET /lorebook/entries (F6) - Guard PostgresClient.connect with a per-loop asyncio.Lock and close the active loop's pool in close() (F7)
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.
Fixes uncovered during the adversarial review & live verification of the merged loop-review PRs (#120–#133):
end_conversationto resume a 100-turn conversation viaallow_at_limit=Truewhenclose_sessionfailed on turn 100; skip active conversations already at>= 100player turns infind_client_conversation; strip and persist trailing unansweredplayerturns on resume and syncturnson failedstep(); resolvecharacter_idfromclient_sessiononmonitor_session_id-only OpenAI calls.roll_underadvantage/disadvantage inversion): Invert keep direction whenroll_under=True(advantage -> 2d20kl1,disadvantage -> 2d20kh1) in_format_dice_specandResolver._execute_roll.modifier - base_modifier) into_pool_proposal_fieldsand_execute_rollsovampire.jsonattributes (calc_modifier -> stat_value) do not doublepool_size; parse pool thresholds safely and exclude additive2d6+statPbtA /4dFFate from count-successes pool execution._run_combatwhile awaiting a player roll (propose_rollorforced_narrative_pushback), populatepending_rollonforced_narrative_pushback, and passonly_resource_deltas=Truewith case-insensitiveHPmatching andmax_valueinitialization when persisting combat HP deltas.continueinstead ofbreak) onllm_provider_error, include restoreddice_request, guardjson.loadsanddice_result.valueconversion, and handlephase == 'scene_ended'.disableround-trip): Adddisableto_KNOWN_ST_FIELDS, excludedisable/enabledfromst_extensionsmerge on export so togglingis_activeis never overwritten, and addinclude_inactivequery param onGET /lorebook/entries.PostgresClientconcurrency &close()): Serialize same-loopconnect()with a per-loopasyncio.Lockand close the running loop's pool inclose().