-
Notifications
You must be signed in to change notification settings - Fork 355
stack0:feat: add shared contracts and core utility baseline #159
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
base: main
Are you sure you want to change the base?
Changes from 3 commits
cf34a57
4c0e0f3
272e1e6
d1f54fe
295f872
2dc0883
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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,80 @@ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const PROGRESS_UPDATE_INTERVAL = 500; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const HEARTBEAT_INTERVAL = 5000; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Default retry count used by CLI/runtime options. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_MAX_RETRIES = 3; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Legacy alias retained for older modules. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MAX_RETRIES = DEFAULT_MAX_RETRIES; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const UI_LABELS = { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| PLANNING: "[PLANNING]", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| EXECUTION: "[EXECUTION]", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DONE: "[DONE]", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| FAIL: "[FAIL]", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| OK: "[OK]", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const SPINNER_CHARS = ["|", "/", "-", "\\"]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MAX_EXECUTION_TIME = 300000; // 5 minutes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const PROGRESS_POLL_INTERVAL = 2000; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const WATCHER_DEBOUNCE = 250; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const PLANNING_COOLDOWN = 2000; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // CLI Defaults | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_RETRY_DELAY = 5; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_MAX_PARALLEL = 3; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_MAX_REPLANS = 3; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_MAX_ITERATIONS = 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // AI Engine Defaults | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_AI_ENGINE_TIMEOUT_MS = 80 * 60 * 1000; // 80 minutes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const STREAM_HEARTBEAT_INTERVAL_MS = 30000; // 30 seconds without output = potential hang | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Parallel Execution | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const CACHE_TTL_MS = 24 * 60 * 60 * 1000; // 24 hours | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const INITIAL_POOL_SIZE_MULTIPLIER = 1; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MAX_POOL_SIZE_MULTIPLIER = 5; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const PLANNING_CONCURRENCY = 5; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const POOL_INCREMENT = 2; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Progress Monitoring | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MAX_OPERATIONS_HISTORY = 10; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const RECENT_ACTIONS_COUNT = 3; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const FIND_WORKTREE_RETRIES = 20; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MAX_DISPLAYED_ACTIONS = 3; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Sandbox Management | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_MAX_SANDBOX_AGE_MS = 60 * 60 * 1000; // 1 hour | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const SANDBOX_STALE_THRESHOLD_MS = 24 * 60 * 60 * 1000; // 24 hours | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const SANDBOX_BACKGROUND_CLEANUP_DELAY_MS = 5 * 60 * 1000; // 5 minutes | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MS_PER_MINUTE = 60000; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const CLEANUP_DELAY_MS = 5000; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const COPY_BACK_CONCURRENCY = 10; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const SANDBOX_DIR_PREFIX = "agent-"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const SANDBOX_SUFFIX = ""; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_IGNORE_PATTERNS = [ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ".git", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "node_modules", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ".ralphy-sandboxes", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ".ralphy-worktrees", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ".ralphy", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "agent-*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| "sandbox-*", | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| ]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+52
to
+60
Contributor
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.
The list covers version-control and Ralphy-internal directories but omits the most common build artifact directories for TypeScript/JS, Rust, and Python ecosystems. In a mid-size monorepo, these can contain hundreds of thousands of files, making an unfiltered index extremely slow. Add at minimum:
Suggested change
Note: these patterns are currently anchored to workspace root by Prompt To Fix With AIThis is a comment left during a code review.
Path: cli/src/config/constants.ts
Line: 52-60
Comment:
`DEFAULT_IGNORE_PATTERNS` missing common build-output directories
The list covers version-control and Ralphy-internal directories but omits the most common build artifact directories for TypeScript/JS, Rust, and Python ecosystems. In a mid-size monorepo, these can contain hundreds of thousands of files, making an unfiltered index extremely slow.
Add at minimum:
```suggestion
export const DEFAULT_IGNORE_PATTERNS = [
".git",
"node_modules",
".ralphy-sandboxes",
".ralphy-worktrees",
".ralphy",
"agent-*",
"sandbox-*",
// Build artifacts
"dist",
"build",
"out",
".next",
".nuxt",
".svelte-kit",
"target", // Rust/Maven
"__pycache__",
".cache",
"coverage",
".turbo",
];
```
Note: these patterns are currently anchored to workspace root by `globToRegex`. Consider also updating `globToRegex` to support `**/` prefixes for matching nested dependencies (e.g., `packages/app/node_modules`).
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // File Utilities | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const MAX_FILE_SIZE_FOR_HASH = 2 * 1024 * 1024; // 2MB | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const DEFAULT_RECURSION_DEPTH = 5; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Lock Management | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const LOCK_TIMEOUT_MS = 30000; // 30 seconds | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const LOCK_MAX_LOCKS = 5000; // Maximum number of locks | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const LOCK_DIR = ".ralphy/locks"; // Lock directory | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const LOCK_CLEANUP_INTERVAL_MS = 60000; // 1 minute between cleanups | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Path Constants | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const SANDBOX_DIR = ".ralphy-worktrees"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const PLANNING_CACHE_FILE = "planning-cache.json"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| // Hash Store Constants | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const HASH_STORE_DIR = ".ralphy-hashes"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const HASH_STORE_MAX_AGE_MS = 24 * 60 * 60 * 1000; // 24 hours | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const HASH_REFERENCE_SUFFIX = ".hash-ref"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export const ENABLE_HASH_STORE = true; // Feature flag | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -78,6 +78,51 @@ export interface ToolCall { | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export type TelemetryLevel = "anonymous" | "full"; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Full session data for webhook | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| interface WebhookSessionData { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| sessionId: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| engine: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+84
to
+86
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. 🟡 Medium
interface WebhookSessionData {
sessionId: string;
+ timestamp: number;
engine: string;Also found in 1 other location(s)
🚀 Reply "fix it for me" or copy this AI Prompt for your agent: |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| mode: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| cliVersion: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| platform: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalTokensIn: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalTokensOut: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| totalDurationMs: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| taskCount: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| successCount: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| failedCount: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolCalls: { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| toolName: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| callCount: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| successCount: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| failedCount: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| avgDurationMs: number; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| }[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| tags?: string[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Full session details for webhook (full privacy mode) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| interface WebhookSessionDetails { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| prompt?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| response?: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| filePaths?: string[]; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+84
to
+113
Contributor
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.
These two interfaces form the public contract of Export them explicitly:
Suggested change
Prompt To Fix With AIThis is a comment left during a code review.
Path: cli/src/telemetry/types.ts
Line: 84-113
Comment:
`WebhookSessionData` and `WebhookSessionDetails` not exported
These two interfaces form the public contract of `TelemetryWebhookPayload` (as field types `session` and `details`) but are not exported. Consumers that need to work with these fields (e.g., to type-check a webhook handler) cannot declare typed local variables without repeating the shape inline.
Export them explicitly:
```suggestion
export interface WebhookSessionData {
sessionId: string;
engine: string;
mode: string;
cliVersion: string;
platform: string;
totalTokensIn: number;
totalTokensOut: number;
totalDurationMs: number;
taskCount: number;
successCount: number;
failedCount: number;
toolCalls: {
toolName: string;
callCount: number;
successCount: number;
failedCount: number;
avgDurationMs: number;
}[];
tags?: string[];
}
/**
* Full session details for webhook (full privacy mode)
*/
export interface WebhookSessionDetails {
prompt?: string;
response?: string;
filePaths?: string[];
}
```
How can I resolve this? If you propose a fix, please make it concise. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Telemetry webhook payload | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| export interface TelemetryWebhookPayload { | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| event: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| version: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| timestamp: string; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| session: WebhookSessionData; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| details?: WebhookSessionDetails; | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| /** | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| * Telemetry configuration | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| */ | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
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.
DEFAULT_IGNORE_PATTERNSonly matches root-level directoriesThe glob patterns here (e.g.
node_modules,.git) compile to anchored regexes like^node_modules$and^\.git$(seeglobToRegexinfile-indexer.tslines 161–180). This means a top-levelnode_modulesis correctly ignored. However, in monorepos with nested directories — e.g.packages/app/node_modulesorpackages/web/node_modules— the relative paths likepackages/app/node_moduleswill not match^node_modules$, causing the entire nested dependency tree to be indexed, resulting in severe performance degradation and bloated cache.The patterns need a
**/prefix to match at any depth:Prompt To Fix With AI