feat(phase21): world echo lore drawer, verify gate, and memory recall fixes#10
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 55 minutes and 35 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (44)
📝 WalkthroughWalkthroughThis PR delivers three parallel workstreams: (1) a web frontend "Discoveries" drawer tab backed by a new ChangesWeb Frontend: Lore Discovery Tab + Dialogue Streaming
Agent Worker: Recall Merge, Memory Pipeline, and HTTP Client
E2E Scripts, Benchmarking, and GSD Review Tooling
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 9
🧹 Nitpick comments (4)
scripts/assert-refusal-markers-parity.mjs (1)
1-8: 💤 Low valueAdd shebang for consistency with other scripts.
This script lacks the
#!/usr/bin/env nodeshebang thatverify-overlay-streaming.mjsand other scripts in this directory have, which prevents direct execution.Proposed fix
+#!/usr/bin/env node /** * Compare JS REFUSAL_MARKERS (e2e-memory-helpers) vs Python recall_merge._REFUSAL_MARKERS. * Exit 1 on mismatch — run in CI / before verify:phase20. */🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/assert-refusal-markers-parity.mjs` around lines 1 - 8, The script assert-refusal-markers-parity.mjs is missing the shebang line at the beginning of the file. Add #!/usr/bin/env node as the first line before the JSDoc comment block to enable direct execution of this script, consistent with other script files in the same directory like verify-overlay-streaming.mjs.scripts/lib/gsd-review-merge.mjs (1)
114-146: 💤 Low valueConsider using a proper YAML parser for frontmatter manipulation.
The regex-based YAML parsing (lines 115-127 for
reviewers:array, line 134 forreviewers_failed:removal) is tailored to the format this code generates and works correctly for that case. However, it's fragile:
- The array parser assumes inline YAML
[item, item]format and won't handle multi-line arrays.- The
reviewers_failedregex requires exactly 2-space indentation and non-empty line content.If the frontmatter format diverges or is hand-edited, the regex may silently fail to match or incorrectly parse. A proper YAML library would be more robust.
That said, for a closed-loop script that only manipulates files it creates, the current approach is acceptable.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/lib/gsd-review-merge.mjs` around lines 114 - 146, Replace the regex-based YAML frontmatter manipulation with a proper YAML parser to handle the reviewers array parsing and modifications. Instead of using the regex pattern to extract and parse the reviewers array (splitting by comma, trimming, and removing quotes), parse the frontmatter YAML object directly, manipulate the reviewers array property, and serialize it back. Similarly, replace the regex-based removal and addition of the reviewers_failed section by directly modifying the YAML object's reviewers_failed property. Apply the same approach to the reviewed_at timestamp update. This makes the code more robust to format variations and hand-edited frontmatter while maintaining the same functionality.scripts/verify-phase21.mjs (1)
127-135: ⚡ Quick winAvoid duplicating
loadPlaywright()— import from shared library.The
speak-browser-stack.mjslibrary (already imported on line 22) exports a more robustloadPlaywright()with three fallback paths. The local implementation here only tries one path before throwing.♻️ Proposed refactor
+import { + loadPlaywright, + gameServerHttpBase, + loadRootEnv, +} from "./lib/speak-browser-stack.mjs"; -import { gameServerHttpBase, loadRootEnv } from "./lib/env.mjs"; ... (remove lines 127-135) -async function loadPlaywright() { - const pwEntry = resolve(root, "scripts", ".pw-deps", "node_modules", "playwright", "index.mjs"); - const pw = await import(pathToFileURL(pwEntry).href); - const chromium = pw.chromium ?? pw.default?.chromium; - if (!chromium) { - throw new Error("playwright not installed — cd scripts/.pw-deps && npm install"); - } - return chromium; -}🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/verify-phase21.mjs` around lines 127 - 135, The `loadPlaywright()` function is being duplicated locally when a more robust version already exists in the `speak-browser-stack.mjs` library that's imported at the top of the file. Remove the local `loadPlaywright()` function definition (the entire async function block from line 127-135) and instead use the imported `loadPlaywright()` from `speak-browser-stack.mjs`, which handles multiple fallback paths instead of just one.workers/agent-worker/src/main.py (1)
108-123: ⚡ Quick winRemove unreachable code at lines 122-123.
The retry logic correctly handles up to 3 attempts with exponential backoff for retryable errors (502/503/504). However, lines 122-123 are unreachable because:
- Successful responses return at line 116
- Retryable errors on the final attempt (attempt 2) raise at line 119 due to
attempt >= 2- Non-retryable errors raise immediately at line 119
🧹 Proposed cleanup to remove dead code
for attempt in range(3): res = client.post(url, json=payload, headers=headers, timeout=10.0) try: res.raise_for_status() return except httpx.HTTPStatusError as exc: if exc.response.status_code not in retryable or attempt >= 2: raise last = exc time.sleep(1 + attempt) - if last is not None: - raise last🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@workers/agent-worker/src/main.py` around lines 108 - 123, The code at the end of the retry logic (the if last is not None: raise last block) is unreachable because all code paths either return successfully at the raise_for_status() call, raise an exception during error handling when attempt >= 2, or raise immediately for non-retryable errors. Remove the unreachable code block that follows the for loop in the retry logic to clean up the dead code.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@apps/web/src/index.css`:
- Around line 217-219: Replace the raw CSS rule for
`.dialogue-overlay__last-line--streaming` with Tailwind 4 utility classes or
patterns instead of using plain CSS color-mix syntax. The color-mixing behavior
defined in the style block should be converted to use Tailwind 4's color
utilities and theme variables, following the repository's styling standard that
requires all CSS/SCSS files to use Tailwind CSS 4.x for UI styling. Apply the
same conversion approach to the other affected style blocks at lines 830-837 and
1708-1748.
In `@docs/ISSUE-LOG.md`:
- Around line 155-161: The guardrails list in the main section has a missing
entry - it jumps from guardrail `#76` directly to `#78`, skipping `#77`. Guardrail `#77`
about "social JSON parse 失败" is currently misplaced at line 1112 in the "## 记录"
section instead of being in the main guardrails section. Locate this guardrail
entry and move it to its correct sequential position between guardrail `#76` and
the current `#78` in the main guardrails list to restore the proper numbered
sequence (75, 76, 77, 78, 79, 80, 81, 82).
In `@packages/shared/src/speakIntent.ts`:
- Around line 55-58: The move-intent regex patterns in the speakIntent.ts file
are missing several patterns that exist in the Python worker classifier at
workers/agent-worker/src/graph/action_intent.py, specifically patterns for
`找一下`, `麻烦…去`, and `您去一下`. To fix this cross-layer intent drift, review the
regex patterns in the Python worker classifier file and add the missing patterns
to the corresponding move-intent regex patterns in speakIntent.ts (in the
section containing patterns like `/找你有事|有事找|.../, /(去|到|往).{0,8}(那边|那里|那儿)/,
etc.`) to ensure both layers classify intents consistently for the same
messages.
In `@scripts/benchmark-speak-browser.mjs`:
- Around line 223-237: The OVERLAY_NPC_REPLY constant contains two non-existent
CSS selectors (.dialogue-overlay__npc-text and .dialogue-overlay__line--npc)
that will never match DOM elements. Replace these selectors with .message--npc,
which is the canonical selector used in scripts/lib/speak-browser-round.mjs and
exists in DialogueBar.tsx and MessageList.tsx. Additionally, review the
THINKING_LOCATOR constant to ensure its selectors (.dialogue-overlay__thinking
and .dialogue-bar__summary-text--thinking) align with the canonical
.message--thinking selector from speak-browser-round.mjs. If the benchmark
intentionally targets different DOM locations, document this discrepancy with a
comment and verify those selectors actually exist in the DOM; otherwise, align
both locators to use the canonical selectors.
In `@scripts/lib/playtest-findings-patch.mjs`:
- Around line 47-81: The regex replacements are fragile because they assume
specific section markers exist without validating them first. Before each
md.replace() call, verify that the expected markers or delimiters exist in the
markdown string. For the three replacements targeting the Status line, the
Playtest scorecard section with the "## Benchmark p50/p95" delimiter, and the
Note section with the "**LOCK rule:**" delimiter, add checks using includes() or
a regex test to ensure these markers are present. If a marker is missing, either
skip that replacement or throw an informative error rather than silently failing
or corrupting the file.
In `@scripts/lib/speak-browser-stack.mjs`:
- Around line 46-48: The error message in the throw statement that handles the
case when playwright is not installed currently instructs users to run npm
install, but the monorepo uses pnpm for package management. Update the error
message in the throw statement (around the playwright not installed check) to
replace "npm install" with "pnpm install" to align with the monorepo's coding
guidelines.
In `@scripts/verify-phase20.mjs`:
- Around line 89-105: The conditional validation in the healthOk function for
the "game-server" label at line 98 uses AND operators which only throws an error
when all three conditions are simultaneously true. This logic is inverted—it
should throw an error if the service is not "game-server" OR if both status and
ok do not indicate success. Change the AND operators to OR in the condition
checking body.service !== "game-server" && body.status !== "ok" && body.ok !==
true so that the validation properly rejects responses where service is not
"game-server" or where the health indicators do not show success.
In `@workers/agent-worker/src/graph/action_intent.py`:
- Line 26: The regex pattern in the move-intent regex at line 26 includes a bare
`找一下` which is too generic and matches non-movement requests, causing incorrect
intent classification. Remove or refine the `找一下` pattern to be more specific to
movement contexts, ensuring it only matches when actually referring to physical
movement or searching actions. Apply the same fix to the similar pattern at line
197 to maintain consistency across the codebase.
In `@workers/agent-worker/tests/test_llm_social_memory.py`:
- Line 26: The assertion in the test is too permissive because checking for a
generic "reply" string will pass even if the explicit reply-first instruction is
missing. Tighten the assertion by removing the overly broad "reply" check and
instead verify the presence of a more specific pattern that directly confirms
the reply-first instruction contract is explicitly documented in the system
prompt. This ensures the test reliably catches regressions if someone removes or
changes the actual reply-first instruction.
---
Nitpick comments:
In `@scripts/assert-refusal-markers-parity.mjs`:
- Around line 1-8: The script assert-refusal-markers-parity.mjs is missing the
shebang line at the beginning of the file. Add #!/usr/bin/env node as the first
line before the JSDoc comment block to enable direct execution of this script,
consistent with other script files in the same directory like
verify-overlay-streaming.mjs.
In `@scripts/lib/gsd-review-merge.mjs`:
- Around line 114-146: Replace the regex-based YAML frontmatter manipulation
with a proper YAML parser to handle the reviewers array parsing and
modifications. Instead of using the regex pattern to extract and parse the
reviewers array (splitting by comma, trimming, and removing quotes), parse the
frontmatter YAML object directly, manipulate the reviewers array property, and
serialize it back. Similarly, replace the regex-based removal and addition of
the reviewers_failed section by directly modifying the YAML object's
reviewers_failed property. Apply the same approach to the reviewed_at timestamp
update. This makes the code more robust to format variations and hand-edited
frontmatter while maintaining the same functionality.
In `@scripts/verify-phase21.mjs`:
- Around line 127-135: The `loadPlaywright()` function is being duplicated
locally when a more robust version already exists in the
`speak-browser-stack.mjs` library that's imported at the top of the file. Remove
the local `loadPlaywright()` function definition (the entire async function
block from line 127-135) and instead use the imported `loadPlaywright()` from
`speak-browser-stack.mjs`, which handles multiple fallback paths instead of just
one.
In `@workers/agent-worker/src/main.py`:
- Around line 108-123: The code at the end of the retry logic (the if last is
not None: raise last block) is unreachable because all code paths either return
successfully at the raise_for_status() call, raise an exception during error
handling when attempt >= 2, or raise immediately for non-retryable errors.
Remove the unreachable code block that follows the for loop in the retry logic
to clean up the dead code.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 7f18d4ca-bd58-4af2-9bf9-f1fe551dd23e
📒 Files selected for processing (71)
apps/game-server/src/ambient/zone-wander.test.tsapps/game-server/src/ambient/zone-wander.tsapps/web/src/ChatPage.tsxapps/web/src/components/DialogueBar.tsxapps/web/src/components/DialogueOverlay.test.tsapps/web/src/components/DialogueOverlay.tsxapps/web/src/components/DiscoveredLorePanel.test.tsapps/web/src/components/DiscoveredLorePanel.tsxapps/web/src/components/JournalQuestStrip.test.tsapps/web/src/components/JournalQuestStrip.tsxapps/web/src/components/PhaserGame.tsxapps/web/src/components/ShellDrawer.test.tsapps/web/src/components/ShellDrawer.tsxapps/web/src/hooks/useChunkLore.test.tsapps/web/src/hooks/useChunkLore.tsapps/web/src/hooks/useColyseusRoom.tsapps/web/src/index.cssdocs/ISSUE-LOG.mdeslint.config.jspackage.jsonpackages/shared/src/speakIntent.test.tspackages/shared/src/speakIntent.tsscripts/assert-refusal-markers-parity.mjsscripts/benchmark-speak-browser.mjsscripts/gsd-review-providers.mjsscripts/lib/agent-verify-map.mjsscripts/lib/dialogue-engage.mjsscripts/lib/e2e-memory-helpers.mjsscripts/lib/gsd-openai-review.mjsscripts/lib/gsd-review-merge.mjsscripts/lib/gsd-review-providers-config.mjsscripts/lib/playtest-findings-patch.mjsscripts/lib/speak-browser-round.mjsscripts/lib/speak-browser-stack.mjsscripts/playtest-speak-sla.mjsscripts/verify-overlay-streaming.mjsscripts/verify-phase15.mjsscripts/verify-phase19.mjsscripts/verify-phase20.mjsscripts/verify-phase21.mjsworkers/agent-worker/src/collective/schemas.pyworkers/agent-worker/src/collective/social_turn.pyworkers/agent-worker/src/config.pyworkers/agent-worker/src/graph/action_intent.pyworkers/agent-worker/src/graph/ambient_intent.pyworkers/agent-worker/src/graph/casual_fast_lane.pyworkers/agent-worker/src/graph/lore_loop.pyworkers/agent-worker/src/graph/memory_quote.pyworkers/agent-worker/src/graph/nodes/llm_social_turn.pyworkers/agent-worker/src/graph/npc_loop.pyworkers/agent-worker/src/graph/recall_merge.pyworkers/agent-worker/src/graph/social_edge_fast_lane.pyworkers/agent-worker/src/http_json.pyworkers/agent-worker/src/llm/factory.pyworkers/agent-worker/src/main.pyworkers/agent-worker/src/memory/client.pyworkers/agent-worker/tests/test_action_intent.pyworkers/agent-worker/tests/test_casual_fast_lane.pyworkers/agent-worker/tests/test_fetch_state_and_memory.pyworkers/agent-worker/tests/test_http_json.pyworkers/agent-worker/tests/test_llm_social_memory.pyworkers/agent-worker/tests/test_load_memory_recall_fallback.pyworkers/agent-worker/tests/test_memory_client.pyworkers/agent-worker/tests/test_memory_quote.pyworkers/agent-worker/tests/test_npc_loop_mock.pyworkers/agent-worker/tests/test_npc_social_order.pyworkers/agent-worker/tests/test_recall_merge.pyworkers/agent-worker/tests/test_social_stream_extract.pyworkers/agent-worker/tests/test_social_turn.pyworkers/agent-worker/tests/test_speak_intent.pyworkers/agent-worker/tests/test_tool_gate.py
💤 Files with no reviewable changes (3)
- apps/web/src/components/JournalQuestStrip.test.ts
- apps/web/src/components/JournalQuestStrip.tsx
- apps/web/src/components/PhaserGame.tsx
| .dialogue-overlay__last-line--streaming { | ||
| color: color-mix(in srgb, var(--shell-ink) 92%, var(--shell-accent)); | ||
| } |
There was a problem hiding this comment.
Move new UI styling to Tailwind 4 patterns instead of raw CSS.
These newly added style blocks are implemented as plain CSS rules, which conflicts with the repository styling standard for CSS/SCSS files.
As per coding guidelines, **/*.{css,scss}: Use Tailwind CSS 4.x for UI styling.
Also applies to: 830-837, 1708-1748
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@apps/web/src/index.css` around lines 217 - 219, Replace the raw CSS rule for
`.dialogue-overlay__last-line--streaming` with Tailwind 4 utility classes or
patterns instead of using plain CSS color-mix syntax. The color-mixing behavior
defined in the style block should be converted to use Tailwind 4's color
utilities and theme variables, following the repository's styling standard that
requires all CSS/SCSS files to use Tailwind CSS 4.x for UI styling. Apply the
same conversion approach to the other affected style blocks at lines 830-837 and
1708-1748.
Source: Coding guidelines
| r"来这边|这边(儿)?|来一趟|过来一趟|来一下|叫你来|让你来|你来|你来不", | ||
| r"找你有事|有事找|传话|叫你去|你去不|你去吗|去不去|你去一趟|你去一下", | ||
| r"找你有事|有事找|有事情找|事情找|传话|叫你去|你去不|你去吗|去不去|你去一趟|你去一下", | ||
| r"(?<![有])找你|找一下", |
There was a problem hiding this comment.
Avoid bare 找一下 in move-intent regex; it over-triggers movement.
找一下 is not movement-specific and will match many non-move requests, which can incorrectly classify intent as physical and inject unintended move tool calls.
Suggested tightening
- r"(?<![有])找你|找一下",
+ r"(?<![有])找你|找你一下",
...
- r"旁边|附近|旁白|那边|那里|那儿|去找|去找她|去找他|找你有事|有事找|传话|叫你去|(?<![有])找你|找一下",
+ r"旁边|附近|旁白|那边|那里|那儿|去找|去找她|去找他|找你有事|有事找|传话|叫你去|(?<![有])找你|找你一下",Also applies to: 197-197
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@workers/agent-worker/src/graph/action_intent.py` at line 26, The regex
pattern in the move-intent regex at line 26 includes a bare `找一下` which is too
generic and matches non-movement requests, causing incorrect intent
classification. Remove or refine the `找一下` pattern to be more specific to
movement contexts, ensuring it only matches when actually referring to physical
movement or searching actions. Apply the same fix to the similar pattern at line
197 to maintain consistency across the codebase.
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/uat-phase21-playwright.mjs`:
- Around line 49-56: The script uses Node.js and browser runtime globals like
process, console, fetch, and setTimeout without declaring them, causing ESLint
no-undef violations throughout the file. Add a file-level ESLint global
declaration comment at the very top of the scripts/uat-phase21-playwright.mjs
file (before any code) to declare all these globals, including process, console,
fetch, setTimeout, and any other browser-context symbols used in callbacks. This
minimal change will resolve the lint failures without requiring additional
ESLint configuration changes.
- Around line 294-305: The npcMoved check is comparing current NPC grid
positions against the player's pre-move grid position (gridBefore), which
produces false positives since the player has moved. Instead, you need to
capture the NPC positions before the player speaks (similar to how gridBefore
captures player position), then after movement compare the current NPC positions
against those captured before positions. Modify the code to first evaluate and
store the NPC sprite positions before the speak action occurs, then later
compare the current NPC positions against those stored positions to accurately
detect if NPCs actually moved.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 81b46585-4ee7-4d2a-a9eb-3b1e6f649af9
📒 Files selected for processing (6)
package.jsonscripts/lib/dialogue-engage.mjsscripts/lib/uat-phase21-helpers.mjsscripts/uat-phase21-playwright.mjsscripts/verify-phase13.mjsscripts/verify-phase21.mjs
🚧 Files skipped from review as they are similar to previous changes (2)
- scripts/lib/dialogue-engage.mjs
- package.json
| const webBase = process.env.WEB_URL || "http://localhost:5173"; | ||
| const roomId = process.env.UAT_PHASE21_ROOM_ID || `uat-p21-${Date.now()}`; | ||
| const webUrl = `${webBase}${webBase.includes("?") ? "&" : "?"}room=${encodeURIComponent(roomId)}`; | ||
| const speakTimeoutMs = Math.max(90_000, e2eSpeakTimeoutMs()); | ||
| const E2E_LORE_TIMEOUT_MS = Number.parseInt(process.env.E2E_LORE_TIMEOUT_MS || "", 10) || 240_000; | ||
| const RUN_VERIFY_GATES = process.env.RUN_VERIFY_GATES !== "0"; | ||
| const RUN_VERIFY_PHASE13 = process.env.RUN_VERIFY_PHASE13 !== "0"; | ||
| const VERIFY_GATE_QUIET_MS = Number.parseInt(process.env.VERIFY_GATE_QUIET_MS || "", 10) || 45_000; |
There was a problem hiding this comment.
Fix no-undef globals for this Node+Playwright script to unblock lint.
ESLint is flagging runtime globals used here (process, console, fetch, setTimeout, plus browser-context symbols used in callbacks). If lint is required in CI, this script currently won’t pass.
Suggested minimal file-level fix
+/* eslint-env node, browser */
/**
* Phase 21 UAT — World Echo (SOLO-02/03) Playwright automation.
*Also applies to: 79-79, 95-95, 114-114, 327-327, 337-337, 394-394, 407-407, 448-448
🧰 Tools
🪛 ESLint
[error] 49-49: 'process' is not defined.
(no-undef)
[error] 50-50: 'process' is not defined.
(no-undef)
[error] 53-53: 'process' is not defined.
(no-undef)
[error] 54-54: 'process' is not defined.
(no-undef)
[error] 55-55: 'process' is not defined.
(no-undef)
[error] 56-56: 'process' is not defined.
(no-undef)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/uat-phase21-playwright.mjs` around lines 49 - 56, The script uses
Node.js and browser runtime globals like process, console, fetch, and setTimeout
without declaring them, causing ESLint no-undef violations throughout the file.
Add a file-level ESLint global declaration comment at the very top of the
scripts/uat-phase21-playwright.mjs file (before any code) to declare all these
globals, including process, console, fetch, setTimeout, and any other
browser-context symbols used in callbacks. This minimal change will resolve the
lint failures without requiring additional ESLint configuration changes.
Source: Linters/SAST tools
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/verify-phase21.mjs`:
- Line 8: The `URLSearchParams` used on line 89 is not imported, causing an
ESLint `no-undef` error. Add `URLSearchParams` to the import statement on line 8
where `fileURLToPath` is imported from `node:url` so that both symbols are
available in the file.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 87a3f475-ffc7-4e61-a4b1-36898f87a7a7
📒 Files selected for processing (15)
docs/ISSUE-LOG.mdeslint.config.jspackages/shared/src/speakIntent.test.tspackages/shared/src/speakIntent.tsscripts/benchmark-speak-browser.mjsscripts/lib/e2e-memory-helpers.mjsscripts/lib/playtest-findings-patch.mjsscripts/lib/speak-browser-round.mjsscripts/lib/speak-browser-stack.mjsscripts/lib/uat-phase21-helpers.mjsscripts/uat-phase21-playwright.mjsscripts/verify-phase20.mjsscripts/verify-phase21.mjsworkers/agent-worker/src/main.pyworkers/agent-worker/tests/test_llm_social_memory.py
💤 Files with no reviewable changes (1)
- workers/agent-worker/src/main.py
🚧 Files skipped from review as they are similar to previous changes (12)
- eslint.config.js
- packages/shared/src/speakIntent.ts
- workers/agent-worker/tests/test_llm_social_memory.py
- scripts/lib/speak-browser-stack.mjs
- scripts/verify-phase20.mjs
- scripts/lib/playtest-findings-patch.mjs
- scripts/lib/speak-browser-round.mjs
- scripts/lib/e2e-memory-helpers.mjs
- scripts/uat-phase21-playwright.mjs
- scripts/benchmark-speak-browser.mjs
- scripts/lib/uat-phase21-helpers.mjs
- docs/ISSUE-LOG.md
| * Replaces Phase 15 journal-quest-strip gate with lore-discover-toast + drawer「已发现」. | ||
| */ | ||
| import { dirname, resolve } from "node:path"; | ||
| import { fileURLToPath } from "node:url"; |
There was a problem hiding this comment.
Fix ESLint no-undef for URLSearchParams.
Line 89 uses URLSearchParams, and the current lint run flags it as undefined.
Suggested surgical diff
-import { fileURLToPath } from "node:url";
+import { fileURLToPath, URLSearchParams } from "node:url";Also applies to: 89-89
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@scripts/verify-phase21.mjs` at line 8, The `URLSearchParams` used on line 89
is not imported, causing an ESLint `no-undef` error. Add `URLSearchParams` to
the import statement on line 8 where `fileURLToPath` is imported from `node:url`
so that both symbols are available in the file.
Source: Linters/SAST tools
… fixes Ship DiscoveredLorePanel in the shell drawer, remove JournalQuestStrip, and add verify:phase21 for chunk lore, drawer history, and reload recall. Harden worker memory for E2E: disable httpx system proxy on localhost, persist player lines before emit done, retry recent-memory fetches, and fall back to recency when embed recall misses after reload. Fixes ISSUE-055 Co-authored-by: Cursor <cursoragent@cursor.com>
Extract shared lore/explore helpers, add uat:phase21:playwright with worker quiet period, and fix verify:phase13 canvas focus after immersive shell changes. Co-authored-by: Cursor <cursoragent@cursor.com>
Align speakIntent relay patterns with worker, fix overlay selectors and P21-06 NPC grid checks, tighten verify health/banner polling, and document ISSUE-053 guardrail #77. Co-authored-by: Cursor <cursoragent@cursor.com>
2dafb8c to
7e0311a
Compare
Co-authored-by: Cursor <cursoragent@cursor.com>
Summary
DiscoveredLorePanelin shell drawer (history tab), chunk-lore hook/toast wiring, remove legacyJournalQuestStrip.verify:phase21E2E gate: memory seed → chunk cross → lore toast → drawer discoveries → move speak → rude banner → reload recall +npc-memory-callback;verify:phase15delegates to shared memory helpers.httpxtrust_env=Falsefor localhost game-server; syncappend_player_memorybefore emitdone; retryfetch_recent_memories; recency fallback when embed recall misses after reload.Test plan
pnpm --filter @aetherlife/game-server testpnpm --filter @aetherlife/web testcd workers/agent-worker && LLM_MOCK=1 uv run pytest -q(245 passed)pnpm verify:phase21(real LLM,pnpm dev:stack, ~107s)pnpm verify:phase20(memory/speak trust regression)Made with Cursor
Summary by CodeRabbit
Release Notes