Skip to content

test(session): scrub inherited git guard PATH for standalone session fixtures #3048

Description

@aider4ryder

Reproduction

From a CSA csa run session:

just test-f "/soft_limit|writer_default_projection|host_memory_reviewer_guidance|writer_soft_limit_preflight|setrlimit|cgroup|projection|detect|resolved/"

The filtered run reaches cli-sub-agent::session_summary_visibility::session_result_summary_surfaces_pre_exec_soft_limit_admission_result and fails three times before the rest are cancelled.

session: git init failed: CSA git-guard: blocked command: git <command>
Use a hermetic local bare fixture under $CSA_SESSION_DIR/git-fixtures and push to its direct canonical path or file:// URL.

Evidence

crates/cli-sub-agent/tests/session_summary_visibility.rs:52-80 defines CsaEnvGuard::clear(), which removes only CSA_*. The current run still inherits the CSA-injected git wrapper via PATH, so csa_session::create_session() at line 164 cannot initialize its temporary project. The test file is unchanged in main...HEAD.

CSA session: 01KZPP75NFGGQ0AMGSJY69ZV7V
Session dir: /home/obj/.local/state/cli-sub-agent/home/obj/project/github/RyderFreeman4Logos/cli-sub-agent/sessions/01KZPP75NFGGQ0AMGSJY69ZV7V
Command exit: 100

Expected

Standalone session-fixture tests can create their temporary Git repository under CSA without weakening the production git-push guard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions