Skip to content

feat: add policy testing and simulation sandbox (Issue #2226)#3618

Open
hughhennelly wants to merge 1 commit intoIBM:mainfrom
hughhennelly:issue-2226-v2
Open

feat: add policy testing and simulation sandbox (Issue #2226)#3618
hughhennelly wants to merge 1 commit intoIBM:mainfrom
hughhennelly:issue-2226-v2

Conversation

@hughhennelly
Copy link
Copy Markdown

Related Issue

Closes #2226
Continuation of #3193 (rebased onto latest main)

Summary

Complete implementation of the policy testing and simulation sandbox for MCP Context Forge.

What's included:

  • Backend Service: Sandbox service with SQLAlchemy DB integration (PolicyDraft, SandboxTestSuite models)
  • API Endpoints: REST endpoints at /api/sandbox/* for test management, batch execution, regression testing
  • Admin UI: Dashboard, simulation runner, test case manager, batch runner, regression testing pages
  • Database: Alembic migration for sandbox tables
  • Security: Depends(get_current_user) on all mutation endpoints, input validation
  • Error Handling: Graceful PDP error handling
  • Documentation: Dedicated sandbox.md and api-usage.md with curl examples
  • Tests: 124 passing (unit, integration, Playwright)
  • Bug Fix: Resolved double-prefix routing issue in sandbox APIRouter

All lint checks (black, isort, flake8, ruff) pass. Verified locally with make dev.

Signed-off-by: Hugh Hennelly hennellh@tcd.ie

@hughhennelly
Copy link
Copy Markdown
Author

This PR replaces #3193 (rebased onto latest main per maintainer guidance). All review feedback from @brian-hussey has been addressed and verified locally — see #3193 conversation for details.

@hughhennelly
Copy link
Copy Markdown
Author

PR history for Issue #2226:

@brian-hussey brian-hussey added the tcd SwEng Projects label Mar 13, 2026
@crivetimihai crivetimihai added this to the Release 1.2.0 milestone Mar 14, 2026
Implements comprehensive policy testing sandbox with:
- Backend service with DB integration (PolicyDraft, SandboxTestSuite models)
- API endpoints for test management, batch execution, regression testing
- Admin UI with dashboard, simulation runner, test case manager
- Alembic migration for sandbox tables
- Auth on mutation endpoints, input validation, PDP error handling
- Dedicated docs (sandbox.md, api-usage.md)
- Expanded test suite (unit, integration, Playwright)

Closes IBM#2226

Signed-off-by: Hugh Hennelly <hennellh@tcd.ie>
@crivetimihai crivetimihai added the COULD P3: Nice-to-have features with minimal impact if left out; included if time permits label Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

COULD P3: Nice-to-have features with minimal impact if left out; included if time permits tcd SwEng Projects

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE][POLICY]: Policy testing and simulation sandbox

3 participants