Hermes 284313f908
Some checks are pending
Bidi Control Character Guard / bidi-control-guard (push) Waiting to run
Circular Dependency Check / Check for new circular dependencies (push) Waiting to run
Citus Migration Smoke / Combined migrations on single-node Citus (push) Waiting to run
E2E Fresh Install Tests / fresh-install-e2e (push) Waiting to run
ext-v2 guardrails / Run ext-v2 guard and ESLint (push) Waiting to run
Integration Tests / Check for relevant changes (push) Waiting to run
Integration Tests / ${{ (github.event_name == 'schedule' || github.event.inputs.suite == 'full') && 'Full integration suite' || 'Tier-1 integration subset' }} (push) Blocked by required conditions
Mobile checks / Mobile lint + typecheck (push) Waiting to run
Mobile checks / Mobile unit tests (push) Waiting to run
Mobile checks / Mobile dependency audit (report) (push) Waiting to run
Mobile checks / Mobile reproducibility checks (push) Waiting to run
Secrets guard (env backups) / Ensure no tracked env backup files (push) Waiting to run
Temporal Readiness / fast-readiness (push) Waiting to run
Temporal Readiness / docker-parity (push) Waiting to run
TypeScript Type Check / Nx affected typecheck (push) Waiting to run
Unit Tests / Skipped-test budget (push) Waiting to run
Unit Tests / Nx affected unit tests (push) Waiting to run
Unit Tests / Server unit coverage (informational) (push) Waiting to run
Validate Tenant Management Schema / Check for relevant changes (push) Waiting to run
Validate Tenant Management Schema / Validate Tenant Management Schema (push) Blocked by required conditions
EE Workflows Build Guard / ee-workflows-build-guard (push) Waiting to run
Initial import of AlgaPSA codebase from PSA server
Excluded: .git, node_modules, secrets/, compose.env, assemblyscript tgz

Source: /opt/alga-psa on psa.joliet.tech
2026-06-22 16:12:17 -05:00

3.1 KiB

Scratchpad — Workflow E2E: Ticket Created → Add Comment

  • Plan slug: workflow-e2e-ticket-comment
  • Created: 2026-01-01

Decisions

  • (2026-01-01) Use TICKET_CREATED as the trigger and tickets.add_comment as the single action to prove end-to-end runtime + worker wiring.
  • (2026-01-01) Prefer DB-backed assertions (comments + workflow_runs) to avoid flaky UI-only timing.
  • (2026-01-01) Start Playwright workflow deps via Docker Compose (postgres + redis + workflow worker).

Discoveries / Constraints

  • (2026-01-01) Ticket creation publishes TICKET_CREATED with payload including ticketId (see server/src/lib/adapters/serverEventPublisher.ts).
  • (2026-01-01) Ticket comments are stored in comments table, column note (see shared/models/ticketModel.ts).
  • (2026-01-01) Workflow runtime v2 tables include workflow_runtime_events + workflow_runs (see server/migrations/20251221090000_create_workflow_runtime_v2_tables.cjs).
  • (2026-01-01) Playwright global setup already starts a MinIO test container via Docker Compose (docker-compose.playwright.yml).
  • (2026-01-01) WorkflowDesigner.tsx supports Playwright overrides via window.__ALGA_PLAYWRIGHT_WORKFLOW__ for deterministic UI testing.
  • (2026-01-01) Workflow events are published to the Redis stream workflow:events:global (default event channel) and must be ingested into runtime v2 tables to start runs.
  • (2026-01-01) A v2 ingestor worker exists at services/workflow-worker/src/v2/WorkflowRuntimeV2EventStreamWorker.ts and uses consumer group WORKFLOW_RUNTIME_V2_EVENT_CONSUMER_GROUP (default workflow-runtime-v2) to avoid competing with existing workflow processors.
  • (2026-01-01) Runtime v2 action.call uses config.saveAs as an assignment path; unscoped values like tickets.addCommentResult must be normalized (we treat unscoped values as vars.<value>).
  • (2026-01-01) Ticket comments UI defaults to the "Client" tab (non-internal only); tests should click "All Comments" before asserting comment text to avoid internal/public default mismatches.
  • (2026-01-01) To keep the Playwright docker deps running for inspection, set PW_KEEP_DEPS=true (skips ee/server/playwright.global-teardown.ts).

Commands / Runbooks

  • Pick isolated ports for a dedicated Playwright env:
    • python3 /Users/roberisaacs/.codex/skills/alga-test-env-setup/scripts/detect_ports.py --env-num 2
  • Generate dedicated secrets for Playwright deps:
    • python3 /Users/roberisaacs/.codex/skills/alga-test-env-setup/scripts/generate_secrets.py --secrets-dir ./secrets-playwright --force
  • Run Playwright tests (EE):
    • cd ee/server && npx playwright test
  • Debug worker (dev stack):
    • docker logs -f <compose-project>-workflow-worker-1

Open Questions

  • Do we want the Playwright compose worker to run only the v2 ingestor + runtime, or should it also run legacy workflow processors?
  • Should v2 ingestion require payload_schema_ref match, or should it apply trigger payload mapping before validation?
  • Are there any missing/unstable selectors in the workflow designer that should be promoted to data-automation-id?