Skip to content

reviewer sandbox: a fresh isolated tree per needs job #435

Closed

Description

@tps-flint

Follow-up from #428 (reviewer sandbox build lane).

What is missing

Jobs linked by needs share one worktree. Each job now starts from a verified clean clone with a fresh HOME, temp and cache root, and processes left running by the previous job are killed. Three things still carry over:

  • state changed inside .git/ (refs, objects, index);
  • processes that start their own session and so escape the group kill;
  • host-level state that jobs share.

What the fix would do

  • Give each job its own fresh clone from a read-only source that the host provides, such as a bare clone of the assigned commit, mounted read-only.
  • Give each job a writable, exec-capable scratch area sized for node_modules. The /tmp tmpfs is noexec, so this needs a second host bind or an exec tmpfs.
  • Discard the job's directory afterwards. Ideally the host creates one sandbox container per job, which also isolates processes.
  • Then retire removeCreatedPaths and the cross-job "not fresh" refusal.

Acceptance

Job 1 changes a tracked file, changes .git state and leaves a detached background process. Job 2 sees none of them.

Refs #425, #428.

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

Metadata

Metadata

Assignees

Labels

P2Normal queue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions