Skip to content

[codex] Preserve MCP artifact content on metadata updates - #3

Merged
datashaman merged 1 commit into
mainfrom
issue-1-mcp-upsert-preserve-content
May 31, 2026
Merged

[codex] Preserve MCP artifact content on metadata updates#3
datashaman merged 1 commit into
mainfrom
issue-1-mcp-upsert-preserve-content

Conversation

@datashaman

Copy link
Copy Markdown
Owner

Summary

Fixes #1.

  • Preserve existing artifact content when MCP UpsertArtifact updates only metadata.
  • Keep explicit empty strings meaningful so callers can still intentionally clear content.
  • Add repo-local agent skill setup docs for issue tracker, triage labels, and domain docs.
  • Add MCP regression coverage for views, Livewire SFCs, layouts, snippets, styles, omitted defaults, and explicit blank content.

Root Cause

UpsertArtifact normalized omitted php, blade, and style fields to empty strings before dry-run/write handling. That made metadata-only updates indistinguishable from explicit content-clearing updates.

Validation

  • php artisan test tests/Feature/EvolveMcpServerTest.php --filter='metadata_only|distinguishes'
  • vendor/bin/pint --dirty --test

Notes

This PR is based directly on main and intentionally does not include the demo blog homepage work from #2.

@datashaman
datashaman marked this pull request as ready for review May 31, 2026 12:56
@datashaman
datashaman merged commit 5cc5d2d into main May 31, 2026
4 of 5 checks passed
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.

MCP UpsertArtifact should preserve existing content on metadata-only updates

1 participant