-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path08_commit_history.feature
More file actions
37 lines (32 loc) · 1.77 KB
/
Copy path08_commit_history.feature
File metadata and controls
37 lines (32 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@core
Feature: Filtered commit history via CLI
The operator inspects perimeter-scoped commit history through the CLI.
Listing uses a GitHub path= prefix derived from read globs on an
allowlisted branch. Showing a commit filters its files; purely
out-of-scope commits are absent / not found.
Agents get the same filtering on MCP tools list_commits / get_commit.
Background:
Given the server is running
And the repository "acme/platform" with the standard fixture
And perimeter "infra" already exists on repo "acme/platform" with read "infra/**"
And branch "mixed-work" is allowed on perimeter "infra"
Scenario: tools/list exposes list_commits and get_commit on the bound MCP URL
When an MCP client calls tools/list on /mcp/infra/mixed-work
Then the tool list contains "list_commits"
And the tool list contains "get_commit"
And the tool list does not contain "list_branches"
And the tool list does not contain "compare"
Scenario: List commits hides purely out-of-scope commits
When the operator lists commits for perimeter "infra" on branch "mixed-work"
Then the commit list contains "c-infra"
And the commit list contains "c-mixed"
And the commit list does not contain "c-pure-out"
Scenario: Show commit shows only in-scope files with omitted_count
When the operator shows commit "c-mixed" for perimeter "infra" on branch "mixed-work"
Then the commit file list contains "infra/aws/a.tf"
And the commit file list does not contain "README.md"
And the output includes omitted_count equal to 1
Scenario: Show a purely out-of-scope commit fails
When the operator shows commit "c-pure-out" for perimeter "infra" on branch "mixed-work"
Then the command fails
And the error message says the commit was not found