test: add comprehensive test suite for Phase 2A event bridge
This commit is contained in:
@@ -27,6 +27,7 @@ MACP Phase 1 writes structured lifecycle events to `.mosaic/orchestrator/events.
|
||||
3. `mosaic macp watch [--webhook] [--once]` CLI support using `.mosaic/orchestrator/config.json`.
|
||||
4. Stdlib-only verification of watcher polling, webhook delivery, Discord formatting, CLI watch behavior, and cursor persistence.
|
||||
5. Developer documentation and sitemap updates covering the Phase 2A event bridge.
|
||||
6. A repo-local unittest suite under `tests/` that covers watcher polling/cursor behavior, webhook delivery logic, and Discord formatting.
|
||||
|
||||
### Out of Scope
|
||||
|
||||
@@ -69,6 +70,7 @@ MACP Phase 1 writes structured lifecycle events to `.mosaic/orchestrator/events.
|
||||
3. Discord formatter returns expected concise strings for the required task lifecycle event types and a usable batch summary.
|
||||
4. `mosaic macp watch --once` processes events from a bootstrapped repo state without error and honors `--webhook`.
|
||||
5. Cursor persistence prevents replay on a second run and resets safely when the events file is truncated.
|
||||
6. `python3 -m unittest discover -s tests -p 'test_*.py' -v` passes with stdlib-only tests for the Phase 2A event bridge modules.
|
||||
|
||||
## Constraints and Dependencies
|
||||
|
||||
@@ -88,7 +90,7 @@ MACP Phase 1 writes structured lifecycle events to `.mosaic/orchestrator/events.
|
||||
## Testing and Verification Expectations
|
||||
|
||||
1. Baseline checks: Python bytecode compilation/import validation for new modules and shell syntax validation for `bin/mosaic-macp`.
|
||||
2. Situational tests: temporary orchestrator state exercising watcher polling, callback filtering, webhook POST capture, CLI one-shot watch execution, and cursor persistence across repeated runs.
|
||||
2. Situational tests: temporary orchestrator state exercising watcher polling, callback filtering, webhook POST capture/mocking, formatter sanitization, CLI one-shot watch execution, and cursor persistence across repeated runs.
|
||||
3. Evidence format: command-level results recorded in the scratchpad and summarized against acceptance criteria.
|
||||
|
||||
## Milestone / Delivery Intent
|
||||
|
||||
Reference in New Issue
Block a user