tech-debt: extract shared 'declared paths' helper for PathGuard validation (tx execute_plan + mcp) · Issue #762 · patchloom/patchloom · GitHub
Skip to content

tech-debt: extract shared 'declared paths' helper for PathGuard validation (tx execute_plan + mcp) #762

Description

@SebTardif

From improve cycle post #760 (PathGuard/execute_plan batch #755+).

Duplication between:

  • tx.rs upfront guard block in execute_plan_direct (large match on Operation for primary + dest paths, glob pattern, special PatchApply None, ast cfg).
  • mcp.rs test-only validate_operation_paths (similar match, plus patch parse).

Also related smells cleaned in this cycle (vestigial _guard, dummy).

Recommended: small helper in plan.rs or ops (e.g. fn declared_paths(op: &Operation) -> Vec<&str> or richer for src/dest).

Affects future ops and guard consistency for library plans.

See current code on improve branch fix/improve-guard-ast-cfg-20260622 (and original in 7230889).

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debtFollow-up engineering work and deferred repo improvements

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions