Skip to content

test(agentflare-shim): cover in_scoped_project's home-boundary walk-up - #280

Merged
getappz merged 2 commits into
masterfrom
test/agentflare-shim-home-boundary-coverage
Jul 20, 2026
Merged

test(agentflare-shim): cover in_scoped_project's home-boundary walk-up#280
getappz merged 2 commits into
masterfrom
test/agentflare-shim-home-boundary-coverage

Conversation

@getappz

@getappz getappz commented Jul 20, 2026

Copy link
Copy Markdown
Owner

Ports test coverage from the closed/superseded PR #278 (feat/lean-ctx-winshim-227) — the feature itself landed via #279 with a different implementation, but these 4 unit tests for in_scoped_project's home-boundary walk-up were never carried over. Cherry-picked from 3315c3e.

Summary by CodeRabbit

  • Tests
    • Added unit test coverage for project-scope detection when a marker exists in the current directory or an ancestor.
    • Added regression tests to ensure directory traversal stops at the configured home boundary, preventing unintended marker detection.
    • Added coverage confirming directories are not considered scoped when no reachable marker exists within the bounded search.

Non-trivial branching logic (project-marker walk-up, stopping at home
so ~/.agentflare's own dir never false-positives as a project marker --
a real bug already found once on the bash-function prototype of this
same idea) shipped with zero test coverage.
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 3da53412-6302-4fa0-9bef-c3a7017e28ef

📥 Commits

Reviewing files that changed from the base of the PR and between aca8f47 and 9d3cbff.

📒 Files selected for processing (1)
  • crates/agentflare-shim/src/main.rs
🚧 Files skipped from review as they are similar to previous changes (1)
  • crates/agentflare-shim/src/main.rs

📝 Walkthrough

Walkthrough

Added filesystem-based unit tests for in_scoped_project, covering marker detection in the start directory and ancestors, home-boundary traversal, and unreachable markers.

Changes

Scoped project detection

Layer / File(s) Summary
Scoped project validation
crates/agentflare-shim/src/main.rs
Adds four temporary-directory tests covering start-directory and ancestor markers, the provided home boundary, and non-scoped results when no marker is reachable.

Estimated code review effort: 2 (Simple) | ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description omits the required Summary, Test plan, and Notes for reviewers sections from the template. Add the required sections: Summary, Test plan with checkboxes, and Notes for reviewers with risk areas and backwards compatibility.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly names the shim and the specific in_scoped_project walk-up coverage being added.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/agentflare-shim-home-boundary-coverage

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

Agentflare-Agent: claude-code_2-1-215_agent
Agentflare-Branch: test/agentflare-shim-home-boundary-coverage
@getappz
getappz merged commit 2ab2dd0 into master Jul 20, 2026
17 checks passed
@getappz
getappz deleted the test/agentflare-shim-home-boundary-coverage branch July 20, 2026 17:51
getappz added a commit that referenced this pull request Jul 20, 2026
Agentflare-Agent: claude-code_2-1-215_agent
Agentflare-Branch: item-185-asset-store-migration
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