Automattic / Automattic/wp-codebox

Reduce artifact bundles to a minimal kernel with typed evidence refs

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

Description

Parent: #2429

## Problem

Artifact bundles currently encode manifest integrity, metadata, events, commands, observations, logs, mounted inputs and outputs, diffs, changed files, patches, review summaries, tests, runtime references, replay indexes, replay status, snapshots, browser evidence, and workflow-specific projections.

Many are useful evidence types, but treating every projection as part of the mandatory artifact protocol couples the runtime to reviewer, replay, benchmark, browser, agent, and product concerns. It also creates repeated result-normalization code across CLI and WordPress surfaces.

## Desired shape

Define a small mandatory artifact kernel:

- immutable bundle identity and file manifest;
- runtime, input, policy, and tool provenance;
- canonical workspace delta;
- normalized command/step result records;
- redaction/integrity verification status;
- typed references to optional evidence.

Replay, browser, tests, benchmark, fuzz, review, and product-specific evidence should be optional typed artifacts referenced by the kernel. The runtime should not duplicate those projections into several top-level envelopes.

## Acceptance criteria

- One minimal artifact-kernel schema is sufficient for every successful, failed, interrupted, and no-op run.
- Optional evidence is discoverable through typed references without mandatory placeholder fields.
- Workspace changes have one canonical representation; patches and reviewer summaries are derived views.
- Bundle verification validates the kernel and referenced evidence without knowing every extension schema.
- CLI, PHP, and Homeboy consume the same artifact result projection.
- Existing bundles needed for persisted compatibility remain readable through a bounded migration reader; new writes use only the canonical format.
- Redundant artifact result DTOs and normalization paths are removed after consumer migration.

## AI assistance

- **Model:** OpenAI gpt-5.6-sol
- **Tool:** OpenCode
- **Used for:** Inspected the documented artifact lifecycle and implementation surface and drafted the minimal kernel plus extension-evidence contract under Chris Huber's direction.

Contributor guide

No contributing guide indexed for this repository

Research direction

No files or tests are named. Start by reading the documented artifact lifecycle and implementation surface referenced in the issue, then trace the CLI, PHP, and Homeboy consumers. Done means the acceptance criteria hold: one canonical kernel, typed optional evidence, bounded compatibility reads, and no redundant result DTOs or normalization paths.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, typescript
Domain
backend-api-design, cli, devtools
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.