Skip to content

fix(agent): allow trailing catalog directory paths - #201

Merged
khaliqgant merged 1 commit into
mainfrom
fix/guardian-trailing-directory-paths
Jul 25, 2026
Merged

fix(agent): allow trailing catalog directory paths#201
khaliqgant merged 1 commit into
mainfrom
fix/guardian-trailing-directory-paths

Conversation

@khaliqgant

@khaliqgant khaliqgant commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

  • accept exactly one trailing slash on otherwise safe repository-relative Factory guardian catalog paths
  • continue rejecting absolute paths, backslashes, dot/parent segments, and doubled interior slashes
  • validate all 308 features from the checked-in production manifest, including src/environments/, src/triage/, src/fleet/, and src/writeback/

Production failure

The first post-#200 hourly cycle failed closed before Slack with:

Factory guardian catalog path escapes the repository: src/environments/

The path guard treated the terminal empty segment from a legitimate directory path as traversal.

RED-first evidence

Before the runtime change, the focused suite was 45 pass / 2 fail. Both new tests failed on src/environments/: the production-shaped fixture and the full checked-in production manifest.

GREEN evidence

  • guardian + manifest contract: 53/53
  • production build: GREEN
  • Prettier + diff check: GREEN
  • full local suite: 1399/1401; the only failures are unrelated src/cli/fleet-launcher.test.ts temp-fixture resolution of esbuild under local Node 26. CI is the authoritative clean-environment gate.

Safety

The change strips one terminal slash only for validation. src//nested, src/../outside, /absolute/path, backslashes, and . remain rejected. No deploy or merge is performed by this PR.


Summary by cubic

Allow a single trailing slash in repository-relative catalog directory paths for the Factory feature guardian. Fixes false “path escapes the repository” errors (e.g., src/environments/) and unblocks the production cycle.

  • Bug Fixes
    • Strip one trailing slash during validation; still reject absolute paths, backslashes, dot/parent segments, and doubled interior slashes.
    • Add tests to accept src/environments/ and validate all 308 locations from the checked-in production manifest; include negative cases for unsafe paths.

Written for commit 523710e. Summary will update on new commits.

Review in cubic

@cursor

cursor Bot commented Jul 25, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@coderabbitai

coderabbitai Bot commented Jul 25, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@khaliqgant, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 12 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 6a540047-c219-4e25-84d8-90352408342a

📥 Commits

Reviewing files that changed from the base of the PR and between f7d1ebd and 523710e.

📒 Files selected for processing (2)
  • .agentworkforce/agents/factory-feature-guardian/agent.test.ts
  • .agentworkforce/agents/factory-feature-guardian/agent.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/guardian-trailing-directory-paths

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@khaliqgant
khaliqgant merged commit 3d669ce into main Jul 25, 2026
7 checks passed
@khaliqgant
khaliqgant deleted the fix/guardian-trailing-directory-paths branch July 25, 2026 22:17
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.

1 participant