Skip to content

feat: ignore configured paths in affected analysis - #5

Merged
calvin-archastro merged 1 commit into
mainfrom
feat/affected-ignore
Jul 21, 2026
Merged

feat: ignore configured paths in affected analysis#5
calvin-archastro merged 1 commit into
mainfrom
feat/affected-ignore

Conversation

@calvin-archastro

@calvin-archastro calvin-archastro commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

What changed

Adds an explicit workspace-level [affected].ignore configuration for excluding repository-relative Git paths before Aster maps changes to projects.

The filter is applied once, immediately after committed and working-tree changes are collected. The same filtered path set now drives project ownership, verbose diagnostics, dry-run file rationale, and --only-affected-files, preventing ignored metadata from leaking into later execution decisions.

Untracked-directory traversal now reports leaf files so fine-grained patterns such as .agents/**/*.md behave consistently. Malformed workspace TOML and invalid affected-ignore globs return contextual errors instead of silently disabling configuration.

The watch integration harness now launches Aster in its own Unix process group. Aster intentionally terminates its process group during shutdown; without test isolation, non-interactive CI shells shared that group and were canceled when the test sent SIGTERM to the child.

Runtime flow

sequenceDiagram
    participant CLI
    participant Config
    participant Git
    participant Filter
    participant Ownership

    CLI->>Config: Load workspace configuration
    Config-->>CLI: Return affected ignore patterns
    CLI->>Git: Collect changed paths
    Git-->>CLI: Return committed and working tree paths
    CLI->>Filter: Remove paths matching configured globs
    alt Paths remain
        Filter-->>Ownership: Forward filtered paths
        Ownership-->>CLI: Return affected projects
    else Every path is ignored
        Filter-->>CLI: Return empty path set
        CLI-->>CLI: Report no projects affected
    end
Loading

Type relationships

classDiagram
    class WorkspaceConfig {
        +AffectedWorkspaceConfig affected
    }
    class AffectedWorkspaceConfig {
        +Vec~String~ ignore
    }
    class AffectedIgnore {
        -GlobSet patterns
        +build config
        +is_ignored path
        +filter paths
    }
    class AffectedDetector {
        +all_affected_files base head
        +uncommitted_changes
    }
    class AffectedCommand {
        +map filtered paths
        +run target
    }

    WorkspaceConfig *-- AffectedWorkspaceConfig
    AffectedIgnore ..> AffectedWorkspaceConfig : builds from
    AffectedCommand --> AffectedDetector : collects paths
    AffectedCommand --> AffectedIgnore : filters paths
Loading

Scope

CLI, Rust library, and integration-test harness only. No service, frontend, database, API, or infrastructure changes.

The diff is one cohesive feature; more than half is focused integration coverage for ownership, dry-run, files-list, rename, untracked-path, and process-cleanup behavior.

Risk assessment

Low to medium. The new configuration is opt-in, so existing valid workspaces retain their current affected-project behavior. Workspace TOML that was already malformed now fails with a clear error instead of silently falling back to defaults. Untracked directories are traversed to leaf files, which improves accuracy but may expose more precise paths to existing affected analysis.

The process-group change is test-only and Unix-gated; non-Unix behavior retains the existing child-kill fallback.

User impact

Repositories can prevent metadata-only or generated-file changes from triggering unrelated project builds:

[affected]
ignore = [".agents/**", ".claude/skills/**"]

Ignored paths no longer appear in verbose output, dry-run rationale, or file-scoped target arguments.

Testing

  • cargo fmt --all -- --check
  • cargo test — 397 unit tests, 58 integration tests, and 3 active watch tests passed; 12 timing/real-monorepo tests intentionally ignored
  • cargo clippy --test watch_tests -- -D warnings
  • cargo clippy --all-targets — passed with pre-existing warnings only
  • Focused unit coverage for workspace config, invalid TOML/globs, and recursive untracked paths
  • Integration coverage for ignored-only root-project changes, mixed ignored and real changes, dry-run/file-list propagation, and rename-boundary behavior
  • Watch child process-group isolation is asserted directly and the focused suite passes under a no-job-control session
  • Exact firstlanding skill PR reproduction with the new binary — 3 paths ignored, 0 changed files retained, and no projects affected
  • Independent design, final diff, and CI-fix reviews found no blockers

Follow-ups and known issues

Firstlanding still needs to adopt the released Aster version, configure its shared-skill paths, and fix its CI gate to derive has_affected from parsed project addresses rather than non-empty human-readable output.

@calvin-archastro
calvin-archastro merged commit f051d4a into main Jul 21, 2026
2 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.

1 participant