Skip to content

TestRunAgent_HarnessLoadPipeline fails sporadically due to hardcoded /tmp/repo path #30

Description

@guyoron1

What happens

TestRunAgent_HarnessLoadPipeline intermittently fails with:

"copying project code: creating tarball of \"/tmp/repo\": tar: /tmp/repo:
Cannot open: No such file or directory\ntar: Error is not recoverable:
exiting now\n: exit status 2" does not contain "openshell"

The test hardcodes /tmp/repo as the repo directory passed to runAgent. When /tmp/repo doesn't exist on the machine, the project-code-copying step (which tarballs the repo directory) fails before execution reaches the sandbox availability check. The test expects to hit the openshell error but gets a tar error instead.

The failure is sporadic because /tmp/repo may or may not exist depending on what other processes have run on the machine.

File: internal/cli/run_test.go:162

What should happen

The test should use t.TempDir() for the repo path so it always points to a real, isolated directory. This lets the tar step succeed and execution reach the expected openshell sandbox check.

Context

Encountered locally. The hardcoded path is a test-environment dependency that makes the test non-hermetic.


Mirrored from fullsend-ai#2386

Metadata

Metadata

Assignees

No one assigned

    Labels

    pr-openAn open PR already addresses this issueready-to-codeTriaged and ready for the code agenttype/bugConfirmed defect in existing behavior

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions