4 Commits

Author SHA1 Message Date
Rene Fichtmueller
a3ed032687 docs: revert speculative vitest pool fix, document as open runner-level issue
Some checks failed
build-verify / build-verify (push) Failing after 11s
build-verify / build-verify (pull_request) Failing after 12s
The forks-pool change didn't fix it (failure went from 1s to 0s, if
anything worse) -- reverting to plain 'npm test' since it's no more or
less broken and is simpler. Documenting this as a known open item needing
someone with actual authenticated Gitea dashboard access, rather than
continuing to guess blindly from outside.
2026-07-16 22:12:08 +02:00
Rene Fichtmueller
db83d77162 ci: constrain vitest to a small fixed fork pool for the CI runner
Some checks failed
build-verify / build-verify (push) Failing after 11s
build-verify / build-verify (pull_request) Failing after 12s
'npm test' (default vitest thread pool) fails in ~1s on this Gitea Actions
runner for no reason reproducible locally (plain run, CI=true, and a fully
fresh rm -rf node_modules && npm ci all pass 215/215). Forcing the forks
pool with a small fixed worker count (min 1, max 2) is a standard fix for
this class of CI-only vitest worker-pool crash.
2026-07-16 22:08:21 +02:00
Rene Fichtmueller
b11eed9cf6 fix: don't fail build-verify/deploy on pre-existing mcp-server tsc exit code
Some checks failed
build-verify / build-verify (push) Failing after 11s
build-verify / build-verify (pull_request) Failing after 12s
Discovered live on Erik just now: 'npm run build' returns exit code 2
because of pre-existing src/mcp-server/index.ts type errors (unrelated to
the server.js/API-server deploy path -- already documented in the
2026-07-16 audit), but with noEmitOnError left at its default (false) it
still correctly emits dist/api/index.js, dist/api/server.js, etc. Both
build-verify.yml and deploy-from-git.sh were treating that non-zero exit
as a hard failure -- the CI run for the previous commit failed on exactly
this, and deploy-from-git.sh's  would have aborted a real deploy
at the same step had I used it instead of manual commands. Now both check
for the specific required output files instead of trusting tsc's exit code.
2026-07-16 21:48:37 +02:00
Rene Fichtmueller
0caf7a271e ci: add build-verify workflow + git-pull-based deploy script
Some checks failed
build-verify / build-verify (push) Failing after 35s
build-verify / build-verify (pull_request) Failing after 12s
Two consecutive PeerCortex deploys today (2026-07-16) broke in the same
way: server.js requires local files (src/backend/config.js,
src/backend/services/smtp.js) that were never actually uploaded to Erik,
because the deploy process was ad-hoc 'cat file | ssh' per-file uploads
with no systematic check that every require() target actually exists on
the target machine. A missing npm dependency (pg) caused the same class
of problem separately.

- .github/workflows/build-verify.yml: runs on every push/PR (Gitea Actions
  already has a working runner for this repo, confirmed via the existing
  .github/workflows/security-scan.yml on the github-import/main branch).
  npm ci, syntax-checks server.js + the other top-level .js files, verifies
  every local require() target resolves to an actual file, typechecks
  (informational for now -- see the step comment for why), builds dist/,
  runs the existing vitest suite. Catches both of today's failures before
  they'd ever reach Erik.

- deploy-from-git.sh: replaces the per-file upload process with a single
  git pull + npm ci + require()-check + syntax-check + build + backup +
  pm2 restart sequence, run manually on Erik. Deliberately NOT wired to a
  Gitea Action with SSH secrets -- Erik hosts many unrelated production
  services and main can contain code that hasn't been live-verified yet,
  so the actual deploy trigger stays a human decision. CI catches
  what's broken; this makes running the fix a single repeatable command
  instead of a manually-assembled file list.
2026-07-16 21:39:21 +02:00