Skip to content

fix(ci): restore memory CODEOWNERS coverage - #3595

Open
GautamSharma99 wants to merge 1 commit into
letta-ai:mainfrom
GautamSharma99:fix/codeowners-memory-paths
Open

fix(ci): restore memory CODEOWNERS coverage#3595
GautamSharma99 wants to merge 1 commit into
letta-ai:mainfrom
GautamSharma99:fix/codeowners-memory-paths

Conversation

@GautamSharma99

Copy link
Copy Markdown

Summary

Fixes #3585.

The memory filesystem and git implementation entries in .github/CODEOWNERS still referenced pre-rename camelCase filenames. GitHub silently ignored those unmatched paths, so changes to durable memory storage could bypass the intended @letta-ai/system-prompt-owners review request.

This PR restores the ownership rules and adds a repository check that catches stale literal CODEOWNERS paths after future moves or renames.

Ownership changes

Replaced the stale entries with the current implementation paths:

  • /src/agent/memory-filesystem.ts
  • /src/agent/memory-git.ts

Also added the deliberately scoped rule:

  • /src/agent/memory-git-*.ts

That rule covers the extracted git implementation modules currently owned with the core implementation:

  • memory-git-config-lock.ts
  • memory-git-hooks.ts
  • memory-git-signing.ts

It does not sweep in dot-named tests such as memory-git.auth.test.ts or memory-git.retry.test.ts.

Regression prevention

Added scripts/check-codeowners-paths.js and wired it into bun run check as the new CODEOWNERS paths gate.

The validator:

  • parses non-comment CODEOWNERS entries with source line numbers;
  • verifies literal root-relative files and directory rules against the repository tree;
  • supports unanchored literal names by looking for an exact filename anywhere in the tree;
  • skips supported * and ? glob rules instead of incorrectly requiring them to name one literal path;
  • compares exact directory-entry spelling instead of relying on existsSync(), so case mistakes fail even on case-insensitive macOS filesystems;
  • excludes .git and node_modules while walking the tree;
  • reports each stale entry as .github/CODEOWNERS:<line>: <pattern> does not exist.

Bracket ranges are intentionally not classified as valid CODEOWNERS globs because GitHub CODEOWNERS does not support that gitignore feature.

Tests

Added five Node test-runner cases covering:

  • existing root-relative files and directories;
  • stale literal paths with accurate line numbers;
  • supported glob skipping;
  • unanchored literal names below the repository root;
  • exact-case enforcement on case-insensitive filesystems.

The package-level check:codeowners command runs both the validator tests and validation of the real .github/CODEOWNERS file.

Validation completed:

  • bun run check:codeowners — 5 passed, 0 failed; 11 literal paths checked and 1 glob skipped
  • bun run check — all 13 checks passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Stale CODEOWNERS paths bypass memory implementation owner review

1 participant