Skip to content

Timed-out environment setup clears its workspace quarantine marker #211

Description

@danny-avila

Summary

Environment setup arms the durable workspace mutation guard before execution, but calls guard.clear("setup") immediately after execute() returns and before checking result.timedOut or a non-zero exit code.

Impact

A timed-out setup may leave a partially mutated workspace. The CLI then clears the durable quarantine marker, throws a setup failure, and permits the next restart to run setup again without requiring operator inspection. This contradicts the documented guarantee that crashes or uncertain termination retain quarantine.

Relevant code

  • packages/code/src/cli.ts: setup calls guard.clear("setup") before testing result.exitCode !== 0 || result.timedOut
  • packages/code/README.md: setup crash or uncertain termination must retain the quarantine marker

Suggested direction

Clear the guard only after a definitely clean successful result. Retain quarantine for timeouts and other ambiguous outcomes, with a regression test that confirms the marker survives a timed-out setup.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions