Skip to content

Emit artifact diagnostics bundles#391

Merged
chubes4 merged 1 commit into
mainfrom
feat/artifact-diagnostics-contract
May 31, 2026
Merged

Emit artifact diagnostics bundles#391
chubes4 merged 1 commit into
mainfrom
feat/artifact-diagnostics-contract

Conversation

@chubes4
Copy link
Copy Markdown
Collaborator

@chubes4 chubes4 commented May 31, 2026

Summary

  • Add a generic wp-codebox/artifact-diagnostics/v1 contract for normalized runtime/artifact diagnostics.
  • Emit files/diagnostics.json in every Codebox artifact bundle and reference it from manifest, metadata, review evidence, and returned artifact paths.
  • Export buildArtifactDiagnostics() so downstream consumers can normalize observation diagnostics without product-specific packet scripts.

Testing

  • npm run build
  • node --input-type=module -e 'import assert from \"node:assert/strict\"; import { buildArtifactDiagnostics } from \"./packages/runtime-playground/dist/index.js\"; const diagnostics = buildArtifactDiagnostics([{ id: \"obs-1\", type: \"import-report\", observedAt: \"2026-01-01T00:00:00.000Z\", data: { diagnostics: [{ diagnostic_id: \"layout-gap-1\", type: \"layout_fidelity_gap\", severity: \"warning\", message: \"Grid lost\", path: \"index.html\", selector: \".hero\", refs: [{ path: \"files/import-report.json\", kind: \"import-report\" }], source_report: { html: { element_count: 8 } } }] } }]); assert.equal(diagnostics.schema, \"wp-codebox/artifact-diagnostics/v1\"); assert.equal(diagnostics.status, \"reported\"); assert.equal(diagnostics.summary.warning, 1); assert.equal(diagnostics.diagnostics[0].id, \"layout-gap-1\"); assert.equal(diagnostics.diagnostics[0].details.source_report.html.element_count, 8); console.log(\"artifact diagnostics contract smoke passed\")'
  • node packages/cli/dist/index.js run --mount ./examples/simple-plugin:/wordpress/wp-content/plugins/simple-plugin --command wordpress.run-php --arg code='echo \"diagnostics smoke\";' --artifacts "$tmpdir" --json plus assertions for diagnosticsPath, metadata.artifacts.diagnostics, and review.evidence.diagnostics
  • npm run release:package
  • npm run package-distribution-smoke

Notes

  • npm run artifact-contract-smoke was attempted but did not return within 10 minutes in this environment. The targeted artifact bundle diagnostics smoke passed.
  • An initial parallel run of package-distribution-smoke and release:package conflicted in dist/release/.../playwright; rerunning sequentially passed.

AI assistance

  • AI assistance: Yes
  • Tool(s): OpenCode (openai/gpt-5.5)
  • Used for: Implemented the generic artifact diagnostics contract, bundle emission, and smoke assertions under Chris's direction on Codebox/Homeboy/SSI ownership boundaries.

@chubes4 chubes4 merged commit 529d79a into main May 31, 2026
@chubes4 chubes4 deleted the feat/artifact-diagnostics-contract branch May 31, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant