Automattic / Automattic/wp-codebox

Prevent checkpoint snapshots from recursively capturing artifact directories

Open
#2,040 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
16
Forks
4
Avg merge
59m
Merged PRs (30d)
131

Description

## Problem

A recipe runtime whose `artifactsDirectory` is inside the working tree creates checkpoint snapshot artifacts under that directory. Restoring those checkpoints materializes the configured artifact tree into the runtime snapshot payload; later artifact collection emits a nested `artifacts/...` tree containing sibling runs, manifests, request-worker files, and snapshots. Parent bundle verification then reports those files as orphaned.

## Evidence

Confirmed while completing #2017 with one immutable checkpoint baseline per campaign. The final finding bundle's manifest correctly lists all six adversarial nested bundles, but `artifacts verify --bundle ` reports the recursively captured `artifacts/wordpress-adversarial-vulnerable/...` tree and checkpoint snapshots as orphaned. The standalone artifact verifier smoke passes.

## Expected

Checkpoint snapshot capture/restore must exclude host artifact storage by construction. Do not solve this with post-hoc deletion; preserve snapshot restore semantics and manifest integrity.

Refs #2017

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by tracing checkpoint snapshot capture and restore when artifactsDirectory is inside the working tree, then follow how artifact collection builds the final bundle. Reproduce the scenario from the issue and run `artifacts verify --bundle `; done means host artifact storage is excluded without post-hoc deletion, while snapshot restore semantics and manifest integrity remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, devtools
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.