Repository navigation
Conversation
Coverage Results 📊✅ Patch coverage is 100.00% (64 of 64 changed executable lines covered; target 80%). Changed files with executable lines (3)
Coverage diff@@ Coverage Diff @@
## main #2003 +/-##
==========================================
+ Coverage 85.85% 85.87% +0.02%
==========================================
Files 338 338 —
Tracked lines 52914 52971 +57
Branches 44616 44704 +88
==========================================
+ Hits 45429 45486 +57
Misses 7485 7485 —
- Partials 4625 4630 +5Generated by Coverage Action |
| !( | ||
| headerPath === result.path && | ||
| later.path.startsWith(`${headerPath}/`) | ||
| ) |
There was a problem hiding this comment.
Bug: The project path conflict check incorrectly rejects valid subdirectory reminders if the initial project path was set by a reminder instead of a header, as headerPath is undefined.
Severity: MEDIUM
Suggested Fix
The exemption logic should be updated to allow subdirectories of the established project path, regardless of whether it was set by a header or an initial reminder. The check should validate that the later path is a subdirectory of result.path, not just headerPath. A simple fix would be to check if later.path.startsWith(${result.path}/).
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: packages/gateway/src/side-channel.ts#L126-L129
Potential issue: In `getRequestProjectPath`, the logic for handling project path
conflicts in subsequent messages contains a flaw. The exemption for subdirectories is
only applied when an explicit `x-lore-project` header is present. If the initial project
path is established by a reminder in the first message (making `headerPath` undefined),
the exemption condition `headerPath === result.path` will always fail. This causes the
system to incorrectly throw a `ProjectPathConflictError` when a later message
legitimately refers to a subdirectory of the established project, which should be a
valid operation.
Summary
Claude Code 2.1.289 sends coding turns with no project path in the system field. Lore classifies them as side channels and skips memory and persistence. This change recognizes the project instruction file in the first user message's opening system reminder for tool-bearing coding turns.
Changes
Validation
Five relevant suites: 306 tests passed. UI: 823 tests passed. Typecheck, lint, formatting, and gateway bundle passed; three real-boundary cases passed 10 repeated runs. The full local test run timed out with an embedding model initialization failure; exact-head CI is required. Metadata-only confirmation of the first text block's reminder placement and classifier tool count is still pending; no request bodies, paths, or tokens were collected.