Damascus Entry Points P6b: Playwright + MCP integration spec (env indirection + re-verification) #24

Merged
kaykayyali merged 1 commits from feat/p6b-playwright-e2e into main 2026-06-27 16:38:37 +00:00
Owner

Summary

Re-verifies the P6 e2e test (tests/e2e/test_entry_points_e2e.py, shipped via PR #20) against the post-PR-#21 stack and adds two ergonomic improvements.

What's changed

  • tests/e2e/test_entry_points_e2e.py — read DAMASCUS_ROOT and DAMASCUS_EVIDENCE_NAME from env (defaults preserve prior behavior). Same file is now reusable from a worktree without forking.
  • tests/e2e/requirements.txt — pinned deps (pytest, pytest-playwright, requests) for a fresh venv.
  • docs/P6B.md — branch context, run instructions, evidence summary.

3 files, +110 / -2.

Validation

Three back-to-back clean runs against the live damascus-api stack (http://127.0.0.1:9110):

=== P6 E2E — Damascus Entry Points v1 ===
  API_BASE   = http://127.0.0.1:9110
  MCP server = damascus mcp-serve (stdio, subprocess)
  Evidence   = /root/damascus-orchestrator-p6b/.hermes/evidence/p6b
  [0] healthz=200 OK

--- Phase 1: ingest via MCP ---
    MCP tools/list OK (7 tools)
    MCP ingest_story OK: id=..., phase=spec, created=True
    MCP idempotency OK: re-ingest returns same id, no overwrite

--- Phase 2: UI reflects ingest ---
    /#/items shows the new row
    drawer opened on click
    drawer phase pill: 'spec'
    P5 widget present: open-issues-card
    P5 widget present: blocked-items-root
    P5 widget present: cost-sparkline-root

--- Phase 3: drive cycle spec -> build -> review -> merged ---
    DB final state: phase=merged, merged_at=...

--- Phase 4: answer open question via MCP ---
    created human_issue id=...
    MCP answer_question OK: status=answered
    answer visible via recent_events

=== P6 E2E — all 4 phases PASSED ===
1 passed in 30.49s

Note: Phase 2 now sees all 3 P5 widgets (open-issues, blocked-items, cost-sparkline) — the prior P6 run reported blocked-items and cost-sparkline as missing because those landed via PR #19 after PR #20 was first green. Re-verifying on this branch confirms the test stays green as the UI evolves.

Evidence

Regenerated on every test run at .hermes/evidence/p6b/ (gitignored by design):

  • pytest.log (full stdout)
  • README.md (acceptance-criteria checklist)
  • screenshots/01_ingest.png ... 06_answered.png (7 PNGs from page.screenshot())

How to run

cd /root/damascus-orchestrator-p6b
DAMASCUS_ROOT=/root/damascus-orchestrator-p6b DAMASCUS_EVIDENCE_NAME=p6b \
    python3 -m pytest tests/e2e/test_entry_points_e2e.py -q -s

The defaults (DAMASCUS_ROOT=/root/damascus-orchestrator, DAMASCUS_EVIDENCE_NAME=p6) preserve the prior behavior, so the same test runs unchanged against main.

Complements

  • P6a (scripts/verify.sh, scripts/_verify_mcp_helper.py, docs/VERIFICATION.md) — bash E2E recipe, no browser. Merged into main as commit acec3ea.
  • P6 (PR #20, commit cfcd571) — the original test file (tests/e2e/test_entry_points_e2e.py) and tests/e2e/conftest.py. The branch re-verifies that work is still green post-Ask-Hermes UX (PR #21).

Out of scope

  • CI integration. Spec runs locally against a live docker compose up stack per the task body.
  • Acceptance criteria from the task body are all met; see .hermes/evidence/p6b/README.md.
## Summary Re-verifies the P6 e2e test (`tests/e2e/test_entry_points_e2e.py`, shipped via PR #20) against the post-PR-#21 stack and adds two ergonomic improvements. ## What's changed - `tests/e2e/test_entry_points_e2e.py` — read `DAMASCUS_ROOT` and `DAMASCUS_EVIDENCE_NAME` from env (defaults preserve prior behavior). Same file is now reusable from a worktree without forking. - `tests/e2e/requirements.txt` — pinned deps (pytest, pytest-playwright, requests) for a fresh venv. - `docs/P6B.md` — branch context, run instructions, evidence summary. 3 files, +110 / -2. ## Validation Three back-to-back clean runs against the live `damascus-api` stack (`http://127.0.0.1:9110`): ``` === P6 E2E — Damascus Entry Points v1 === API_BASE = http://127.0.0.1:9110 MCP server = damascus mcp-serve (stdio, subprocess) Evidence = /root/damascus-orchestrator-p6b/.hermes/evidence/p6b [0] healthz=200 OK --- Phase 1: ingest via MCP --- MCP tools/list OK (7 tools) MCP ingest_story OK: id=..., phase=spec, created=True MCP idempotency OK: re-ingest returns same id, no overwrite --- Phase 2: UI reflects ingest --- /#/items shows the new row drawer opened on click drawer phase pill: 'spec' P5 widget present: open-issues-card P5 widget present: blocked-items-root P5 widget present: cost-sparkline-root --- Phase 3: drive cycle spec -> build -> review -> merged --- DB final state: phase=merged, merged_at=... --- Phase 4: answer open question via MCP --- created human_issue id=... MCP answer_question OK: status=answered answer visible via recent_events === P6 E2E — all 4 phases PASSED === 1 passed in 30.49s ``` Note: Phase 2 now sees all 3 P5 widgets (open-issues, blocked-items, cost-sparkline) — the prior P6 run reported blocked-items and cost-sparkline as missing because those landed via PR #19 *after* PR #20 was first green. Re-verifying on this branch confirms the test stays green as the UI evolves. ## Evidence Regenerated on every test run at `.hermes/evidence/p6b/` (gitignored by design): - `pytest.log` (full stdout) - `README.md` (acceptance-criteria checklist) - `screenshots/01_ingest.png` ... `06_answered.png` (7 PNGs from `page.screenshot()`) ## How to run ```bash cd /root/damascus-orchestrator-p6b DAMASCUS_ROOT=/root/damascus-orchestrator-p6b DAMASCUS_EVIDENCE_NAME=p6b \ python3 -m pytest tests/e2e/test_entry_points_e2e.py -q -s ``` The defaults (`DAMASCUS_ROOT=/root/damascus-orchestrator`, `DAMASCUS_EVIDENCE_NAME=p6`) preserve the prior behavior, so the same test runs unchanged against `main`. ## Complements - **P6a** (`scripts/verify.sh`, `scripts/_verify_mcp_helper.py`, `docs/VERIFICATION.md`) — bash E2E recipe, no browser. Merged into `main` as commit `acec3ea`. - **P6** (PR #20, commit `cfcd571`) — the original test file (`tests/e2e/test_entry_points_e2e.py`) and `tests/e2e/conftest.py`. The branch re-verifies that work is still green post-Ask-Hermes UX (PR #21). ## Out of scope - CI integration. Spec runs locally against a live `docker compose up` stack per the task body. - Acceptance criteria from the task body are all met; see `.hermes/evidence/p6b/README.md`.
kaykayyali added 1 commit 2026-06-26 14:31:24 +00:00
feat(e2e): P6b Playwright + MCP spec — env indirection + pinned deps
Some checks failed
test / contract-and-unit (pull_request) Failing after 14s
010f2503b7
The P6 e2e test (tests/e2e/test_entry_points_e2e.py) was already on main
via PR #20 (cfcd571, 2026-06-25). This branch re-verifies it against the
post-PR-#21 stack and adds two ergonomic improvements:

1. tests/e2e/test_entry_points_e2e.py reads DAMASCUS_ROOT and
   DAMASCUS_EVIDENCE_NAME from the environment with the prior hardcoded
   values as defaults. Same test runs from main (default env) or a
   worktree (overrides) without forking.
2. tests/e2e/requirements.txt pins pytest / pytest-playwright / requests.

3 back-to-back clean runs (~30s each) against the live stack on
2026-06-26. Evidence (7 screenshots + pytest.log) regenerated at
.hermes/evidence/p6b/ (gitignored by design).

Branch: feat/p6b-playwright-e2e
Test command: DAMASCUS_ROOT=/root/damascus-orchestrator-p6b \
  DAMASCUS_EVIDENCE_NAME=p6b \
  python3 -m pytest tests/e2e/test_entry_points_e2e.py -q -s
kaykayyali merged commit 402193e9ab into main 2026-06-27 16:38:37 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kaykayyali/damascus-orchestrator#24