Commit Graph

4 Commits

Author SHA1 Message Date
Your Name fc8071b7aa fix: issue triage -- #155 #156 #154 #25, CI hardening, E2E improvements
Issue fixes:
- #155: /api/browse/playlists/parse now handles YouTube/YouTube Music URLs
- #156: stop passing album MBID to verifyArtistName (was calling MB /artist/{id}
  with an album MBID, always 404d); fix spotify trackCount stale value
- #154: remove hardcoded port-3030 detection from getApiBaseUrl -- now returns
  relative URLs by default so any host:port mapping works
- #25 (partial): fix spotify playlist trackCount to use tracks.length instead of
  stale playlist.tracks.total after pagination

Dead code / quality:
- Remove unused rootFolderPath param from processDownload + call sites
- Remove unused req params in route handlers (prefix _req)
- Remove dead push condition from integration.yml job gate
- Remove dead baseUrl constructor param and private field from ApiService
- Fix LibraryTabs hover effect: remove inline style={{ opacity: 0.1 }} that
  overrode Tailwind group-hover; change to group-hover:opacity-10
- Fix mobile tab centering in LibraryTabs (add justify-center)

CI security:
- Mask TEST_PASS before writing to GITHUB_ENV in all three workflow files
- Add missing concurrency block to nightly.yml
- Add username validation + remove credential echo in create-e2e-user.sh
- Fix global.setup.ts error message to mention .env.test

E2E:
- Fix vibe test race condition: replace Promise.race + transient text with
  stable trackCount.or(noData) assertion
- Fix security test flakiness: toBe(beforeCount) -> not.toBeGreaterThan for
  playlist count check (parallel tests can delete playlists concurrently)
- Fix global.setup.ts error message to reference .env.test file

Vibe map:
- Increase cluster label size (13->15 / 10->12 px) and opacity (50->70 / 35->50)
  for slightly better readability
2026-03-17 10:04:03 -05:00
Your Name ec40c235bb fix: generate random E2E credentials at runtime -- no hardcoded passwords in source
Each CI run generates a fresh random password with openssl rand, writes it to
GITHUB_ENV, and passes it to both create-e2e-user.sh and Playwright. The test
user is ephemeral (container torn down after the run) but the password is now
unique per run and never committed to source.

Previously KimaE2ETest2026! was hardcoded as a fallback -- an admin account
backdoor anyone with repo access could exploit on a production instance that
had run the setup script.
2026-03-16 22:54:31 -05:00
Your Name 9083835bfd chore: v1.7.0 -- vibe galaxy, CI pipeline, enrichment hardening, PWA, preprod sweep
- Bump frontend and backend to 1.7.0
- Update CHANGELOG with full 1.7.0 release notes
- Remove vibe-test dev prototype page and unused R3F components
  (VibeUniverse, TrackCloud, TrackTooltip, universeUtils)
- Fix stale audio.completed counter: flush live DB count at isFullyComplete
  transition -- counter was frozen at last audioQueued > 0 cycle value
- Add GitHub Actions CI pipeline: lint/typecheck, unit tests, security scan,
  E2E predeploy, nightly Docker build and push to Hub + GHCR
- Add E2E enrichment cycle spec with 55-min timeout and memory monitoring script
- Add E2E vibe spec covering map, song path, search, alchemy, similar tracks
- PWA hardening: offline fallback, update banner, WCO, manifest fixes
- Production readiness: OOM memory caps in both compose files, DoS/SSRF/auth fixes
- Remove double-auth in systemSettings (requireAdmin already enforces auth)
- Fix mobile vibe page full-height rendering, vibe map timer leak, abort signal wiring
- Fix E2E test helpers: graceful skip with waitFor + try/catch for empty-library CI
- Fix create-e2e-user.sh: admin role, bcrypt shell expansion, psql heredoc quoting
2026-03-16 18:25:08 -05:00
Your Name d6e414f2d1 ci: add full test suite and GitHub Actions CI agents
- Rewrite pr-checks.yml: typecheck (frontend + backend), backend unit
  tests (Jest, webhookEventStore excluded), dep audit, Docker build gate
- Add integration.yml: Docker stack + Playwright e2e on push to main or
  run-e2e label (predeploy, queue, playlists, api-contracts, security)
- Add nightly.yml: full Playwright suite at 03:00 UTC, opens GH issue on
  failure
- Add security.yml: npm audit blocking on critical + security.spec.ts
  against Docker stack on PRs and weekly

New tests:
- security.spec.ts: IDOR, XSS, unauthenticated access, input validation,
  mass assignment (12 tests, all verified against localhost:3030)
- api-contracts.spec.ts: auth shapes, CRUD contracts, library/search
  validation, health check (15 tests, all verified)
- playlists.spec.ts, queue.spec.ts: functional e2e tests
- global.setup.ts: shared auth token setup

Backend fixes:
- Fix discoverySeeding tests: add _max.playedAt to recentPlays mocks,
  sync getFallbackSeedArtists mock to new artist.findMany+albums path,
  add unavailableAlbum to Prisma mock factory
- Fix enrichmentStateMachine tests: add clearGate to mock, update
  orphaned-audio assertion to match new where clause
- Add p-queue.cjs CJS mock + moduleNameMapper (pure ESM incompatible
  with Jest CJS runner)
- Add typecheck scripts to frontend/backend package.json

scripts/create-e2e-user.sh: fix bcrypt hash corruption by passing
password via Docker -e env var instead of shell interpolation
2026-03-16 10:42:20 -05:00