Memex Admin

Python Service: Workflow Path Cohesion

Repository: mem-labs/mem

activeUpdated Feb 19, 2026, 8:25 PM

Policy ID js79daqnzv6v2xrr6ys1bb71p181fhpc

Service workflows must keep trigger paths and execution paths coherent.

Rationale:
- Path mismatches make CI validate/build the wrong service.

Scope:
- PR review policy for workflow changes that target services under `domains/python/**`.

Trigger:
- A PR adds or changes workflow trigger paths, working directories, or sparse-checkout for a service workflow.

Approval checks:
1) Workflow trigger `paths` include the same service root that jobs execute.
2) Job/reusable workflow `working-directory` aligns to that same service root.
3) If sparse checkout is used, it includes required directories for invoked scripts/config.

Evidence:
- Workflow diff shows path coherence across `on.paths`, `working-directory`, and sparse-checkout/included directories.

Exception path:
- Allow deviation only when all are true:
1) PR description includes `Policy Exception: python-workflow-path-cohesion`.
2) PR explains intended multi-root/shared workflow behavior.
3) PR documents safeguards preventing cross-service miswiring.

Decision:
- Return NOT APPROVED when trigger is met and path cohesion is missing without a valid exception.