Files
element-call/.gitea/workflows/ci.yml
T
Lotus CIandClaude Opus 4.8 29592fbb18
CI / Build embedded bundle (push) Successful in 1m20s
CI / Publish to Gitea npm registry (push) Has been skipped
lotus(#1): fix restart-silence (A7), 48kHz ctx; protocol + CI hardening
Denoise deep-review (CRITICAL): restart() read opts.audioContext, which
LiveKit does NOT pass on restart — so reconnect (the A7 scenario) and mic
device-switch threw after stopping the old track, leaving the mic SILENT
(A7 reintroduced). Fix:
- Processor owns a dedicated 48kHz AudioContext (sapphi worklets require
  48kHz; H1), reused across restart, closed on destroy.
- restart() never throws and never leaves a stopped track on the sender:
  builds the new graph first, then disposes the old; on failure degrades
  to RAW mic audio rather than silence.
- Cache wasm per URL (no re-fetch each reconnect); gate threshold default
  -45 and accept an explicit 0 (M2); document the cross-repo asset contract.

Protocol audit:
- Non-silent warning when an unsupported denoise model (dtln/deepfilternet)
  is requested instead of silent rnnoise fallback (F3).
- Correct the call_state enum comment (immediate error-reply, not 10s) (F2).

Build/CI audit:
- Stamp VITE_APP_VERSION in CI; document the vX.Y.Z-lotus.N version scheme.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-30 00:15:59 -04:00

125 lines
4.7 KiB
YAML

name: CI
# Build + publish the Lotus fork of Element Call's embedded web bundle.
# Models LotusGuild/cinny's .gitea/workflows/ci.yml. Web bundle only, so
# Linux-only (the Windows worker is for cinny-desktop / Tauri, not needed here).
#
# - PRs and pushes to `lotus` -> build + smoke-check the embedded dist
# - Pushes of a tag `v*` -> build + publish @lotusguild/element-call-embedded
# to the Gitea npm registry
#
# Versioning mirrors upstream: the in-repo package.json stays 0.0.0; the
# published version is derived from the git tag at publish time.
on:
push:
branches: [lotus]
tags: ['v*']
pull_request:
branches: [lotus]
env:
# element-call's build:full sets 16384 already; keep parity for safety.
NODE_OPTIONS: '--max-old-space-size=16384'
# Stamp the build so analytics/rageshakes aren't labelled "dev".
VITE_APP_VERSION: ${{ github.ref_name }}
jobs:
build:
name: Build embedded bundle
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version' # Node 24
# registry-url wires up the Gitea-scoped registry + auth for publish
registry-url: 'https://code.lotusguild.org/api/packages/LotusGuild/npm/'
scope: '@lotusguild'
- name: Enable corepack (pnpm from packageManager field)
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build embedded
# build:embedded writes to the repo-root dist/ (vite default outDir).
# Stage it into embedded/web/dist — the publish template's "files" entry
# — so the smoke-check and npm publish both see the bundle.
# (embedded/web/dist is gitignored, hence the explicit copy.)
run: |
pnpm run build:embedded
rm -rf embedded/web/dist
cp -r dist embedded/web/dist
- name: Smoke-check output
run: |
test -f embedded/web/dist/index.html
test -d embedded/web/dist/assets
echo "### Embedded bundle" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
du -sh embedded/web/dist >> "$GITHUB_STEP_SUMMARY"
ls embedded/web/dist >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
# NOTE: no actions/upload-artifact step — v4 requires GitHub's artifact
# backend, which the Gitea act_runner does not implement (it fails with
# exit 1). The publish job rebuilds from source anyway, so the artifact
# was only a convenience; re-add a Gitea-compatible action here if per-run
# dist downloads are ever needed.
publish:
name: Publish to Gitea npm registry
needs: build
# Only on a version tag push, never on PRs.
if: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
registry-url: 'https://code.lotusguild.org/api/packages/LotusGuild/npm/'
scope: '@lotusguild'
- name: Enable corepack
run: corepack enable
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build embedded
# build:embedded writes to the repo-root dist/ (vite default outDir).
# Stage it into embedded/web/dist — the publish template's "files" entry
# — so the smoke-check and npm publish both see the bundle.
# (embedded/web/dist is gitignored, hence the explicit copy.)
run: |
pnpm run build:embedded
rm -rf embedded/web/dist
cp -r dist embedded/web/dist
- name: Set published version from tag
working-directory: embedded/web
# Versioning scheme: reserve bare vX.Y.Z for upstream-parity points only
# (e.g. v0.20.1 == upstream 0.20.1). For Lotus-only iterations on top of
# an upstream base, tag a semver prerelease — v0.20.1-lotus.1, -lotus.2,
# … — so we never collide with an already-published upstream-parity
# version on the registry.
run: |
TAG="${GITHUB_REF_NAME#v}" # v0.20.1-lotus.1 -> 0.20.1-lotus.1
npm version "$TAG" --no-git-tag-version --allow-same-version
- name: Publish
working-directory: embedded/web
env:
NODE_AUTH_TOKEN: ${{ secrets.GITEA_NPM_TOKEN }}
run: npm publish --access public