-
Notifications
You must be signed in to change notification settings - Fork 0
fix(openworlds): slow-but-working DM turn no longer reads as broken (#399) #400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -204,16 +204,34 @@ def test_constants_exported_and_ordered(self): | |
| # and still strictly inside the hard backstop. This is the whole shape of the #348 fix. | ||
| self.assertLess(c["recoveryMs"], c["recoveryFirstMs"]) | ||
| self.assertLess(c["recoveryFirstMs"], c["backstopMs"]) | ||
| # Concretely: later = 90s, first = 4 min, backstop = 12 min. | ||
| self.assertEqual(c["recoveryMs"], 90 * 1000) | ||
| # Concretely: later = 180s (#399, was 90s), first = 4 min, backstop = 12 min. | ||
| self.assertEqual(c["recoveryMs"], 180 * 1000) | ||
| self.assertEqual(c["recoveryFirstMs"], 4 * 60 * 1000) | ||
| self.assertEqual(c["backstopMs"], 12 * 60 * 1000) | ||
|
Comment on lines
+207
to
210
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Module docstring still documents the old 90s later-beat window. The constant is now asserted at 180s here, but the docstring (Line 13: "the snappy 📝 Suggested docstring updates (outside the changed range)- • LATER beats (the ~35–60s norm): the snappy PENDING_RECOVERY_MS (~90s).
+ • LATER beats (the ~35–60s norm, but content-rich beats can run ~90–120s):
+ PENDING_RECOVERY_MS (~180s, `#399`; was 90s).- • the LATER-beat branch (snappy 90s) — preserved for a genuine mid-session stall;
+ • the LATER-beat branch (180s, `#399`) — preserved for a genuine mid-session stall;🤖 Prompt for AI Agents |
||
|
|
||
| # --- the pure selector: both branches (this is exactly what armPending calls) --- | ||
| def test_recovery_window_selector_both_branches(self): | ||
| out = self._run("({ first: h.recoveryWindowMs(true), later: h.recoveryWindowMs(false) })") | ||
| self.assertEqual(out["first"], 4 * 60 * 1000) | ||
| self.assertEqual(out["later"], 90 * 1000) | ||
| self.assertEqual(out["later"], 180 * 1000) # #399: was 90s | ||
|
|
||
| # --- #399 CORE: the FIRST-beat window covers a 120s turn without going stuck -------------- | ||
| # The first beat already gets the generous 4-min window, so a 120s turn is comfortably inside it. | ||
| # (The LATER-beat 180s window can't be exercised in THIS harness — flipping firstBeat=false needs | ||
| # a real DM beat to arrive via the /chat poll, which is stubbed here; that path is covered in | ||
| # test_live_narration_stream.py::test_resolved_beat_makes_next_turn_a_later_beat. Here we lock | ||
| # that NEITHER window trips at 120s, the worst-case content-rich turn the playtester gave up on.) | ||
| def test_no_false_stuck_at_120s(self): | ||
| out = self._run( | ||
| "h.arm('open the scene');" | ||
| # 120s in — the OLD later-beat window (90s) would already be 'stuck'. The first-beat | ||
| # window (and the new 180s later window) must NOT be. | ||
| "h.advance(120 * 1000);" | ||
| "var p1 = h.pending();" | ||
| "({ stuck_at_120s: !!(p1 && p1.stuck), active_at_120s: !!(p1 && !p1.stuck) })" | ||
| ) | ||
| self.assertFalse(out["stuck_at_120s"], "a 120s turn must not be falsely declared stuck (#399)") | ||
| self.assertTrue(out["active_at_120s"], "a 120s turn should still be narrating (pending, not stuck)") | ||
|
|
||
| # --- #348 CORE: the FIRST beat is NOT falsely declared stuck at 90s ------- | ||
| def test_first_beat_survives_past_the_old_90s_threshold(self): | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 5678
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 3032
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 4531
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 10256
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 2334
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 9166
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 366
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 147
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 3984
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 111
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 50381
🏁 Script executed:
Repository: electricsheephq/WorldOS
Length of output: 4664
Dedup for
recordPlayerEchoignores narration beats; identical actions on a later turn can be suppressed.viewer/openworlds/app.jsxrecordPlayerEchoonly checks the last entry inlog(samewho+ same trimmedtext); DM narration goes tochatBeats, notlog, so narration does not “separate” two identical actions for this dedup.Try againexact re-post idempotence and (2) different actions; there’s no test for “same action again on the next turn after narration.”Suggested fix: either correct the comment to match current behavior, or change the dedup to be scoped to the same retry/pending turn (and add a test for the next-turn-after-narration repeat).
🤖 Prompt for AI Agents