Skip to content

feat(mcp): validate workspace deployment integrity - #56

Open
digitalrisedorset wants to merge 13 commits into
mainfrom
feat/workspace-deployment-validation
Open

digitalrisedorset wants to merge 13 commits into
mainfrom
feat/workspace-deployment-validation

Conversation

@digitalrisedorset

Copy link
Copy Markdown

Summary

Expands validate_workspace from a URL-only check into a deployment-integrity validator driven by the workspace registry.

Changes

  • extract URL validation into WorkspaceUrlValidator
  • add a generic workspace validation issue model
  • validate that every registry entry references a real contract directory and contract file
  • validate the deployed contract with the widget's authoritative WidgetConfigSchema
  • validate release artifacts for each registry widget
    • PHP hosts: hashed IIFE bundle + CSS
    • JavaScript hosts: index.js + CSS
  • keep release checks independent from contract validity so multiple deployment problems can be reported in one run
  • propagate PHP_ENV into the MCP environment and use it to select the correct release-artifact checks
  • make StoreWorkspaceValidator an orchestrator of separate validation concerns

Validation flow

workspace/<store>/registry.json
    ↓
registry entry
    ├── contracts/<widget>/<contract>.json exists
    ├── contract passes widgets/<widget>/src/ConfigSchema.ts
    └── workspace/release/source/<widget>
          ├── PHP: widget-<widget>@<hash>.iife.js
          │        + widget-<widget>.css
          └── JS:  index.js
                   + widget-<widget>.css

Notes

widget aliases in registry entries are respected, so an instance such as quote_form can validate against the contactus widget contract and release artifacts.

I could not execute the repository test suite from the tool environment, so this PR is ready for local/CI review before merge.

This branch has not been deployed

No deployments
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