Skip to content

feat: add E2E smoke tests, CORS for dev, and admin layout fixes#3

Open
leno23 wants to merge 1 commit into
mainfrom
feat/e2e-smoke-and-dev-cors
Open

feat: add E2E smoke tests, CORS for dev, and admin layout fixes#3
leno23 wants to merge 1 commit into
mainfrom
feat/e2e-smoke-and-dev-cors

Conversation

@leno23
Copy link
Copy Markdown
Owner

@leno23 leno23 commented May 26, 2026

Summary

  • Add CORS middleware for non-production environments so the browser admin console can call the gateway API during local development
  • Fix admin shell full-height layout, loading state styling, and content scroll behavior
  • Add Playwright API/UI smoke tests with npm scripts and README documentation
  • Update gateway default port to 8081 in .env.example and ignore Playwright artifacts

Test plan

  • Start Postgres/Redis and gateway on http://127.0.0.1:8081
  • Run npm run dev in frontend/
  • Run npm run test:e2e and verify API + UI smoke tests pass
  • Manually verify admin console layout fills viewport and sidebar/content scroll correctly

Made with Cursor

- Add CORS middleware (non-production) for browser admin console
- Fix admin shell full-height layout and loading state styling
- Add Playwright API/UI smoke tests with npm scripts
- Update gateway default port to 8081 in .env.example
@ecc-tools
Copy link
Copy Markdown

ecc-tools Bot commented May 26, 2026

Analyzing 200 commits...

@ecc-tools
Copy link
Copy Markdown

ecc-tools Bot commented May 26, 2026

Analysis Complete

Generated ECC bundle from 1 commits | Confidence: 55%

View Pull Request #4

Repository Profile
Attribute Value
Language TypeScript
Framework Not detected
Commit Convention conventional
Test Directory mixed
Changed Files (15)
Metric Value
Files changed 15
Additions 296
Deletions 10

Top hotspots

Path Status +/-
frontend/package-lock.json modified +64 / -0
frontend/e2e/ui.smoke.spec.ts added +60 / -0
frontend/e2e/api.smoke.spec.ts added +50 / -0
frontend/playwright.config.ts added +35 / -0
backend/internal/middleware/cors.go added +27 / -0

Top directories

Directory Files Total changes
frontend 6 122
frontend/e2e 2 110
backend/internal/middleware 1 27
frontend/app 2 24
frontend/components 1 16
Analysis Depth Readiness (commit-history, 21%)

ECC Tools uses this to decide whether recommendations should stay at commit-history/setup guidance or expand into CI, security, harness, reference-set, AI-routing, and team backlog work.

Area Status Evidence / Next Step
Commit history Partial 1 commits sampled
CI/CD signals Ready frontend/playwright.config.ts
Security evidence Missing Add AgentShield, audit, SARIF, SBOM, or security review evidence so recommendations can cover security posture.
Harness configuration Missing Add Claude, Codex, OpenCode, Zed, dmux, MCP, plugin, or cross-harness config evidence for harness-agnostic recommendations.
Reference/eval evidence Missing Add fixtures, golden traces, reference sets, or evaluator benchmarks so deeper recommendations have regression evidence.
AI routing and cost controls Missing Add model-routing, budget, usage, or cost-control files before relying on AI-heavy automation recommendations.
Team handoff and project tracking Missing Add roadmap, runbook, project, Linear, or follow-up tracking docs so generated work can land in a team queue.
Reference Set Readiness (0/7, 0%)
Area Status Evidence / Next Step
Deep analyzer corpus Missing Add analyzer fixture, golden, benchmark, or reference-set files that can catch analyzer regressions.
RAG/evaluator comparison Missing Add retrieval or evaluator reference-set comparison fixtures with expected ranking behavior.
PR salvage/review corpus Missing Add stale-PR, review-thread, reopen-flow, or salvage reference cases for queue cleanup automation.
Discussion triage corpus Missing Add public discussion triage fixtures, golden cases, or reference sets for informational, answered, and no-response classifications.
Harness compatibility Missing Add cross-harness, adapter-compliance, or harness-audit evidence for Claude, Codex, OpenCode, Zed, dmux, and agent surfaces.
Security evidence Missing Attach security evidence such as SBOMs, SARIF, audit reports, or AgentShield evidence packs.
CI failure-mode evidence Missing Add captured CI failure logs, dry-run fixtures, or troubleshooting docs for common workflow failure modes.
Likely Future Issues (3)
Severity Signal Why it may show up
HIGH Auth or permission changes may ship without security regression coverage 1 auth/permission paths changed; 0 auth-focused integration or e2e tests changed
HIGH Security-sensitive changes may ship without scanner evidence 1 security-sensitive paths changed; 0 security scanner or security-focused validation artifacts changed
MEDIUM CI workflow changes may ship without failure-mode evidence 1 CI/test-runner paths changed; 0 CI failure-mode evidence artifacts changed
  • Auth or permission changes may ship without security regression coverage: The PR changes auth, session, middleware, or permission-sensitive files without touching any obvious auth-focused integration or end-to-end tests.
  • Security-sensitive changes may ship without scanner evidence: The PR touches billing, secrets, auth, webhooks, agent, or CI-sensitive surfaces without adding obvious security scanner, code scanning, or security-focused validation evidence.
  • CI workflow changes may ship without failure-mode evidence: The PR changes CI workflows or test-runner entrypoints without touching CI failure fixtures, captured logs, troubleshooting notes, or regression evidence.
Suggested Follow-up Work (3)
Type Suggested title Targets
PR test: add auth coverage for backend/internal/middleware/cors.go backend/internal/middleware/cors.go
PR security: add scanner evidence for backend/internal/middleware/cors.go backend/internal/middleware/cors.go
PR ci: add failure-mode evidence for frontend/playwright.config.ts frontend/playwright.config.ts
  • test: add auth coverage for backend/internal/middleware/cors.go: Backfill auth or permission regression coverage before another access-control change lands on the touched surface.
  • security: add scanner evidence for backend/internal/middleware/cors.go: Backfill explicit scanner or code-scanning evidence before another security-sensitive change lands on the touched surface.
  • ci: add failure-mode evidence for frontend/playwright.config.ts: Backfill CI failure-mode evidence before another workflow or test-runner change lands on the touched surface.

Copy-ready bodies

test: add auth coverage for backend/internal/middleware/cors.go

## Summary
- Add auth, session, or permission regression coverage for the recently changed security-sensitive surface.

## Why
- Backfill auth or permission regression coverage before another access-control change lands on the touched surface.

## Touched paths
- `backend/internal/middleware/cors.go`

## Validation
- Add or extend integration / e2e coverage for the changed auth, session, middleware, or permission surface.
- Exercise allowed and denied flows, invalid or expired credentials, or equivalent access-control boundary cases.

security: add scanner evidence for backend/internal/middleware/cors.go

## Summary
- Add security scanner or code-scanning evidence for the recently changed security-sensitive surface.

## Why
- Backfill explicit scanner or code-scanning evidence before another security-sensitive change lands on the touched surface.

## Touched paths
- `backend/internal/middleware/cors.go`

## Validation
- Run or add the relevant security scanner, code scanning, secret scanning, or dependency/security review check for the touched surface.
- Attach the scanner output, SARIF/code-scanning result, or focused security regression test to the follow-up PR.
- Confirm the changed auth, billing, webhook, secret-handling, agent, or CI surface has an explicit pass/fail gate.

ci: add failure-mode evidence for frontend/playwright.config.ts

## Summary
- Add CI failure-mode evidence for the recently changed workflow or test-runner surface.

## Why
- Backfill CI failure-mode evidence before another workflow or test-runner change lands on the touched surface.

## Touched paths
- `frontend/playwright.config.ts`

## Validation
- Add or update a CI failure fixture, captured failing log, troubleshooting note, workflow dry-run evidence, or regression test for the changed CI/test-runner behavior.
- Run the affected workflow or test-runner entrypoint locally or in CI and record pass/fail evidence.
Generated Instincts (14)
Domain Count
git 3
code-style 9
testing 2

After merging, import with:

/instinct-import .claude/homunculus/instincts/inherited/ai-api-gateway-instincts.yaml

Files

  • .claude/ecc-tools.json
  • .claude/skills/ai-api-gateway/SKILL.md
  • .agents/skills/ai-api-gateway/SKILL.md
  • .agents/skills/ai-api-gateway/agents/openai.yaml
  • .claude/identity.json
  • .codex/config.toml
  • .codex/AGENTS.md
  • .codex/agents/explorer.toml
  • .codex/agents/reviewer.toml
  • .codex/agents/docs-researcher.toml
  • .claude/homunculus/instincts/inherited/ai-api-gateway-instincts.yaml

ECC Tools | Everything Claude Code

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e1f8368fe9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@@ -0,0 +1,35 @@
import { defineConfig, devices } from "@playwright/test";

const gatewayBase = process.env.GATEWAY_BASE_URL ?? "http://127.0.0.1:8081";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use backend default port for smoke-test gateway URL

Set the default GATEWAY_BASE_URL to match the backend’s default listener (HTTP_ADDR is :8080 in backend/internal/config/config.go), otherwise npm run test:e2e fails in the normal local setup when no override is provided. With the current default of http://127.0.0.1:8081, every API smoke request targets the wrong port unless users remember to reconfigure either the backend or env vars first.

Useful? React with 👍 / 👎.

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