Skip to content

query_methodology: cwd doesn't slug-normalize Windows absolute paths to existing domain #18

@PSGSupport

Description

@PSGSupport

Summary

query_methodology(cwd=\"C:/Users/michael.crawford\") returns a hollow profile (coldStart=false, but every profile field empty) even when list_domains shows the matching domain exists with 18 sessions and confidence 0.36.

Reproducer

list_domains() →
  [{id: \"c--users-michael-crawford\", sessions: 18, confidence: 0.36, ...}, ...]

query_methodology(cwd: \"C:/Users/michael.crawford\") →
  { domain: null,
    coldStart: false,
    style: {},
    entryPoints: [],
    recurringPatterns: [],
    blindSpots: [],
    message: \"Domain \\\"None\\\" detected but no profile built yet\" }

query_methodology(project: \"c--users-michael-crawford\") →
  { domain: \"c--users-michael-crawford\",
    hotMemories: [...],   # populated
    style: {},            # still empty
    entryPoints: [],      # still empty
    ... }

So there are actually two related problems:

  1. The cwd→domain classifier doesn't map Windows-style absolute paths (C:/Users/foo, C:\Users\foo) to the existing domain slug (c--users-michael-crawford). It probably handles POSIX paths only.
  2. Even when the correct project= slug is passed and hotMemories populates, the profile body fields (style, entryPoints, recurringPatterns, blindSpots) remain empty despite rebuild_profiles({force: true}) having run successfully and list_domains reporting non-zero confidence and dominantMode: mixed. So the profile body materialization is partially broken too — possibly a separate issue.

Suggested fix

For the path normalization side: in shared/project_ids.py (path ↔ project ID ↔ label ↔ domain ID conversion), accept Windows-style paths — strip drive letter, replace backslashes with forward slashes before slugification, or detect the existing slug pattern by canonicalizing both sides.

The hollow-profile-body issue likely needs separate investigation in the profile_assembler / profile_builder pipeline.

Environment

  • Cortex 3.14.5, Docker install
  • Host: Windows 11
  • Calls made from Claude Code on Windows where cwd is C:/Users/michael.crawford

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions