158 Commits
Author SHA1 Message Date
macanhhuy d6dddbbc91 chore: remove GCP + GitLab references, migrate to Gitea registry
Build + push image / build-and-push (push) Successful in 1m8s
Replace eu.gcr.io/vnc-development image refs with gitea.saas.vnc.biz/vnciac,
swap gcr-json-key pull secret for gitea-registry, and update CI/deploy docs
from GitLab CI to Gitea Actions.
2026-08-19 17:31:05 +07:00
macanhhuy c8c7431d67 chore: drop GitLab CI config (migrated to Gitea Actions)
Build + push image / build-and-push (push) Successful in 1m14s
2026-08-19 17:22:11 +07:00
macanhhuy 31d1df149a ci: migrate GitLab CI to Gitea Actions (kaniko -> Gitea registry)
Build + push image / build-and-push (push) Successful in 1m3s
2026-08-19 16:17:52 +07:00
Stefan-Sanger 1a9b2262c9 fix(fcm): use dot-call for prosody.events.fire_event so cache invalidation reaches MUC
prosody.events.fire_event is a plain function (event_name, event_data), not
a method. The colon form prosody.events:fire_event(name, data) passed the
events table as event_name, so the lookup found no handlers and the
vnc-fcm-invalidate-notify-cache / vcard-cache signals were silently lost.

mod_vnc_muc_fcm hooks these via module:hook_global (which registers under
the string event name), so its notify_cache was never invalidated cross-host.
A stale empty cache entry for an MUC affiliate (left by an earlier test
before the user had a token) then suppressed FCM pushes to that affiliate,
breaking test_muc_fcm_push_to_offline_member in the full suite.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/11>
2026-07-23 08:40:01 +02:00
Stefan-Sanger 2252b08139 fix(fcm): pass full JID to fcm_notify and use st.clone in MUC handler
fcm_notify splits userName internally via jid_split, so callers were
double-splitting: passing jid_split(to) fed the bare node as userName
and shifted every subsequent argument by one (host→title, resource→body,
…), corrupting all notification payloads. Pass the full JID instead.

In mod_vnc_muc_fcm, replace event.stanza:clone() with st.clone() and
add the util.stanza import for robustness.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/11>
2026-07-22 16:33:17 +02:00
Stefan-Sanger c64346e283 fix: copy vnc_fcm_common.lua to prosody lib root so require works
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/11>
2026-07-22 15:43:40 +02:00
Stefan-Sanger 94ee78f115 refactor(fcm): extract shared FCM logic into vnc_fcm_common.lua
- Extract ~90% duplicated code from mod_vnc_fcm and mod_vnc_muc_fcm
- Add notify_cache (300s) and vcard_cache (600s) with cross-module invalidation
- Hoist getDisplayName before MUC affiliate loop
- Defer MUC affiliate notifications via timer.add_task(0, ...)
- Remove bare_sessions diagnostic scan, dead code, and per-send option lookups
- Fix read-receipt routing and respect MUC lang preference
- Unify stale-token cleanup (NotRegistered/etc.) in both modules

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/11>
2026-07-22 15:07:01 +02:00
Stefan-Sanger ef8c0292d6 fix: convert conditional DO rules on prosody table to triggers
PostgreSQL rejects INSERT ... ON CONFLICT ... DO UPDATE on any table
that has a conditional (WHERE) DO/DO ALSO rule or a non-NOTHING DO
INSTEAD rule, erroring with 'INSERT with ON CONFLICT clause cannot be
used with table that has INSERT or UPDATE rules'. Prosody 13's
mod_storage_sql uses ON CONFLICT upserts against the prosody kv table
whenever prosody_unique_index exists (created by these scripts), so the
five inherited conditional DO rules on prosody (cache_group_avatarids,
update_profile_queue_from_insert/_update, update_muc_remote_name,
update_room_nick_jid_map_remote) broke every kv upsert (vcard, vcard_muc,
muc_remote, config, fcmtoken, ...).

Replace those rules with AFTER INSERT / AFTER INSERT OR UPDATE
row-level triggers, which do not block ON CONFLICT. The two profile-queue
rules merge into one AFTER INSERT OR UPDATE trigger so the UPDATE branch
of an ON CONFLICT upsert is also covered (it fires AFTER UPDATE triggers,
not AFTER INSERT, when the conflict is taken).

Also drop the legacy 0.11.6 update_group_owners rule. It is logically
dead under 13.0.6 (fires on key='_affiliations', which is never written)
but PostgreSQL checks rule existence at plan time, so even a dead
conditional rule blocks ON CONFLICT. Dropping it is mandatory, not
optional as the README previously claimed.

Conversion is added to both prosody-13-new-deployment.sql (fresh
deployments, and the run_new_deployment branch of migrate.sh) and
prosody-13-rules-triggers.sql (the run_rules_triggers branch for
0.11.6->13.0 upgrades), so every helm pre/post-upgrade hook path
reaches the fix. Derived-table INSTEAD upsert rules are unchanged.

Verified against postgres:16: both scripts apply cleanly, pg_rewrite
for prosody returns 0 rows, ON CONFLICT upserts succeed, and triggers
fire on both INSERT and conflict-UPDATE branches; reproduced the
production error by re-adding the legacy rules, then confirmed the
incremental script resolves it. Idempotent re-run safe.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/10>
2026-07-16 06:49:46 +00:00
Stefan-Sanger b49e9bcaa1 fix: guard mod_saslauth against session destroyed during async HTTP auth
mod_auth_http_async blocks the c2s async runner on an HTTP call inside
SASL plain_test. If the client disconnects during that call,
sessionmanager.retire_session nils every session field (incl.
base_type) and marks it destroyed. When the runner resumed,
mod_saslauth crashed at sasl_process_cdata line 94 on
'sasl/'..session.base_type..'/'. Bail out when the session is gone
instead of firing the event and sending a reply to a dead connection.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/9>
2026-07-16 08:38:14 +02:00
Stefan-Sanger dde2e6a0e5 fix: deduplicate prosody table before creating unique index
The pre-upgrade hook failed with "could not create unique index
prosody_unique_index" because the prosody table contained duplicate
rows (same host, user, store, key). Without the unique index,
mod_storage_sql falls back to SELECT-then-INSERT instead of ON
CONFLICT upsert, which races under concurrent writes and inserts
duplicates — most commonly in the fcmtoken map store.

Add a DELETE that removes duplicate rows (keeping the last-written
row per group via ctid ordering) immediately before the CREATE UNIQUE
INDEX in both prosody-13-new-deployment.sql and
prosody-13-migration-once.sql. The DELETE is a no-op when no
duplicates exist, preserving idempotency.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/8>
2026-07-16 06:10:01 +00:00
Stefan-Sanger a4f17e2506 fix: cap WebSocket fragment buffer at configurable max message size
The mod_websocket continuation-frame patch accumulated fragments in an
unbounded dataBuffer with no size limit, fragment count limit, or
timeout. A buggy or malicious client sending endless continuation
frames without FIN could exhaust memory and degrade the entire server.

Add a configurable websocket_max_message_size option (default 2 MB)
that closes the connection with code 1009 ("Message too big") and
resets the buffer when exceeded. Also add wss-perf-analysis.md
documenting the WebSocket performance and drop investigation.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/8>
2026-07-16 06:10:01 +00:00
Stefan-Sanger 1affb3acc3 fix: use Prosody 13 get_room_from_jid API in broadcast/FCM MUC fanout
mod_vnc_broadcast and mod_vnc_fcm accessed the deprecated
prosody.hosts[host].modules.muc.rooms[to] table, removed in Prosody 13,
triggering 'Attempt to read a non-existent global rooms' warnings and
silently breaking MUC affiliation fan-out for broadcasts and push.

Replace with a version-safe get_room_from_jid() helper (rawget fallback
to .rooms for older Prosody), matching the pattern already in
mod_vcard_muc. Guard _affiliations access behind a nil room check.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/7>
2026-07-16 08:00:57 +02:00
Stefan-Sangerandmarge e98f9cf4c9 perf: add global LRU cache to mod_vnc_lastactivity store reads
Add a module-scoped util.cache LRU (lastactivity_cache_size default 5000,
lastactivity_cache_ttl default 300s) in front of the activity_store /
remote_activity_store fallback. Write-through on all set sites
(authentication-success, local last-session unavailable, remote
unavailable) and read-through in both IQ handlers (batch and standard
jabber:iq:last), so repeated last-activity queries for the same contacts
no longer hit the synchronous SQL driver, reducing event-loop blocking.

Also removes dead code (avatar-hash helpers, dumpTable, unused imports,
commented-out debug logging) and the unused remote avatar-update tracking.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/5>
2026-07-16 04:26:15 +00:00
Stefan-Sangerandmarge 658008606a Revert "perf: buffer mod_vnc_lastactivity DB writes and flush periodically"
back to original code for further analysis and improvement

This reverts commit 83e578cb94.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/5>
2026-07-16 04:26:15 +00:00
Stefan-Sanger 256b5fdeb1 fix: create prosody_unique_index on upgraded databases
Prosody 13's mod_storage_sql upgrade path only warns when the index is
missing (it is created only on fresh tables). On DBs upgraded from 0.11.6
the table pre-existed, so the index was never created and has_upsert_index
stayed false, disabling ON CONFLICT upserts and degrading write performance.

Add an idempotent CREATE UNIQUE INDEX IF NOT EXISTS to both the migration
and new-deployment scripts.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/4>
2026-07-15 19:51:02 +02:00
Stefan-Sanger 0fbcd183e3 fix: install lua-unbound to silence DNS resolver fallback warning
Prosody 13 prefers lua-unbound for DNS but the image never installed it,
causing a startup warning and a fallback to the old resolver.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/4>
2026-07-15 19:34:59 +02:00
Stefan-Sanger 386f36d133 fix: use DROP MAPPING instead of deleting from pg_ts_config_map
The pre-upgrade hook failed with 'permission denied for table
pg_ts_config_map' because the migration runs as prosodyDBuser (a
non-superuser), and pg_ts_config_map is a PostgreSQL system catalog that
only superusers can DELETE from.

Replace the direct 'delete from pg_ts_config_map where ...' with the
equivalent non-superuser DDL 'ALTER TEXT SEARCH CONFIGURATION ... DROP
MAPPING IF EXISTS FOR <token types>', enumerating every token type the
block re-adds. Verified against postgres:15 as a non-superuser role: the
DELETE reproduces the exact error, DROP MAPPING IF EXISTS succeeds, and
the drop+re-add round-trip is idempotent across repeated runs.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:12 +02:00
Stefan-Sanger b51bc373d3 fix: set non-LoadBalancer services to ClusterIP
The http (5280), telnet (5582), and web2 (8080) Services were hardcoded
as NodePort, exposing them on every node's IP. Only s2s (5222/5269)
needs external exposure and remains LoadBalancer. Switch the three
internal services to ClusterIP so they are reachable only via ingress or
within the cluster. Also update the unused service.type value in
values.yaml to ClusterIP so NOTES.txt lands in the port-forward branch
instead of the stale NodePort branch.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:12 +02:00
Stefan-Sanger 1ed6a4c129 fix: keep DB migration hook logs inspectable after deployment
Switch hook-delete-policy from hook-succeeded to before-hook-creation on
both the pre-upgrade and post-upgrade migration Jobs. hook-succeeded
deleted the Job immediately on success, making post-deploy log
inspection impossible. before-hook-creation keeps the most recent run's
Job and logs around (inspectable via kubectl logs job/<name>) and only
removes the previous Job when the next deployment fires the hook,
avoiding name conflicts and accumulation.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:12 +02:00
Stefan-Sanger 35161b9b6d fix: resolve 3 in-container test failures in CI compose run
1. REST 404 "Unknown host: prosody": the tester reaches prosody by
   service name (http://prosody:5280), so aiohttp sends Host: prosody,
   which Prosody rejects as an unknown vhost. The auto host-header
   heuristic only overrides for IP/localhost. Set REST_HOST_HEADER=
   example.com explicitly in the tester env so HTTP routing lands on the
   example.com VirtualHost that serves mod_http_rest /rest.

2. healthcheck.sh not found: the static test_04_infra checks resolve
   ../config/healthcheck.sh (= /config/healthcheck.sh) but the tester
   image only ships /tests. Mount ./config:/config:ro so the path
   resolves inside the container.

3. telnet non-loopback banner: read only 256 bytes, capturing just the
   ASCII-art top and never the literal "Prosody" text. Bump to 1024 to
   match test_04_infra.test_telnet_banner, which passes with the larger
   read.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:12 +02:00
Stefan-Sanger 51504f8a6f fix: correct pytest paths for tester container
The tester container uses WORKDIR /tests, so 'tests/pytest.ini' resolves
to /tests/tests/pytest.ini which does not exist, causing FileNotFoundError
in CI. Use paths relative to /tests (pytest . -c pytest.ini) for all
in-container invocations: CI job, Makefile target, tester image CMD, and
docs. Host-run scripts are unchanged (they run from repo root).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:12 +02:00
Stefan-Sanger e1c78e7358 feat: add pre-upgrade and post-upgrade DB migration hooks
Dockerfile: add postgresql-client and bake db-customization/ SQL scripts
into the image at /vnc/db-customization/.

config/migrate.sh: detection + migration script with two modes:
- pre-upgrade: runs idempotent prosody-13-new-deployment.sql on 13.0.x
  databases; skips 0.11.6 (unsafe pre-upgrade) and new deployments.
- post-upgrade: waits for Prosody table, then runs the appropriate
  scripts — full 0.11.6->13.0.6 migration (rules-triggers + migration-once
  + new-deployment) or idempotent drift correction for 13.0.x.

Helm chart: two Job templates (db-migration-pre-upgrade.yaml,
db-migration-post-upgrade.yaml) gated by dbMigration.enabled (default
true). Both reuse the Prosody image and DB credentials from existing
values. backoffLimit: 0, hook-delete-policy: hook-succeeded.

Also tracks the db-customization SQL files (previously untracked, now
referenced by the Dockerfile ADD).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:59:09 +02:00
Stefan-Sanger 86fdfbb986 docs: add database state detection guide to db-customization README
Adds a detection query set and decision tree to determine from the
database itself whether it is a new deployment, an unmigrated 0.11.6
database, an upgraded 0.11.6 database, or a clean 13.0 state — and which
script to run in each case.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger ea043d759c docs: add README for db-customization scripts
Documents which SQL script to run for new deployments vs existing 0.11.6
database upgrades, ordering prerequisites, and what changed in the MUC
storage layout between 0.11.6 and 13.0.6.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 8392402301 docs: expand README with repo overview and deployment method
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 83e578cb94 perf: buffer mod_vnc_lastactivity DB writes and flush periodically
The store :set() calls go through mod_storage_sql (LuaDBI), a blocking C
client. These hooks fire on the presence/auth hot path, so inline writes
stall the event loop under presence storms. Buffer writes in memory and
flush every 5 seconds (configurable via vnc_lastactivity_flush_interval).
The IQ handlers already read from in-memory map/remote_act_cache first,
so read consistency is preserved. Final flush on server-stopping and
host-deactivating prevents data loss on graceful shutdown.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger efa6e73364 fix: pin http-server sidecar version
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger a2f46c99bc fix: re-add WebSocket continuation-frame support for fragmented messages
Prosody 13.0.6 removed continuation-frame (fragmented-message) support
from mod_websocket — validate_frame hard-rejects any frame with FIN=false
(close code 1003). VNCtalk clients fragment large WebSocket messages
(e.g. vCard sets with avatars >~64 KB), so the connection is silently
reset. The rejection fires on the partial-frame validation path before
handle_frame is reached, and websocket_close() does not log, so nothing
appears in prosody debug logs.

This patch removes the blanket FIN=false rejection from validate_frame
and restores the dataBuffer fragment-accumulation logic from 0.11.6 in
handle_frame: text frames (0x1) with FIN=false start a buffer,
continuation frames (0x0) append, and concatenated data is returned
only when FIN=true arrives.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger bc5b550d9c feat: make smacks_max_unacked_stanzas configurable via env var
Default to 5 (upstream default) when SMACKS_MAX_UNACKED_STANZAS is unset.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 2a79ed2103 chore: remove unused mod_auth_any auth provider
mod_auth_any is never enabled in the config (auth is internal_hashed,
http_async, or anonymous) and nothing references it.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 5179be85a0 chore: remove unused mod_vnc_fcm_hin and mod_vnc_muc_fcm_hin modules
Neither _hin variant is enabled in the config (the active push modules
are mod_vnc_fcm for 1:1 and mod_vnc_muc_fcm for MUC). Drop the dead
files and update AGENTS.md to reference the active modules.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 913c6be84f test: add REST_HOST_HEADER to send Host override only for direct prosody URLs
Always sending Host: <xmpp domain> to /rest broke when REST was fronted
by an ingress (TLS hostname mismatch -> 431). Add a --rest-host-header
option (REST_HOST_HEADER env, default 'auto') that sends the XMPP domain
Host only for IP/localhost URLs where prosody needs it for vhost routing;
'none' disables, any other value is sent verbatim. Documents the option
in tests/README.md.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 5dca59c4c1 fix(dockerfile): verify prosody source tarball SHA256 on download
Pin the version and expected SHA256 as build ARGs and verify the
download with sha256sum -c so a tampered or corrupt source download
fails the build loudly. Also drops the noisy tar -v and removes the
tarball after extraction.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger fa5220906e ci: add test stage running docker-compose suite on non-main branches
Bumps the base image to docker:24.0 (needed for Usage:  docker compose [OPTIONS] COMMAND

Define and run multi-container applications with Docker

Options:
      --all-resources              Include all resources, even those not
                                   used by services
      --ansi string                Control when to print ANSI control
                                   characters ("never"|"always"|"auto")
                                   (default "auto")
      --compatibility              Run compose in backward compatibility mode
      --dry-run                    Execute command in dry run mode
      --env-file stringArray       Specify an alternate environment file
  -f, --file stringArray           Compose configuration files
      --parallel int               Control max parallelism, -1 for
                                   unlimited (default -1)
      --profile stringArray        Specify a profile to enable
      --progress string            Set type of progress output (auto,
                                   tty, plain, json, quiet)
      --project-directory string   Specify an alternate working directory
                                   (default: the path of the, first
                                   specified, Compose file)
  -p, --project-name string        Project name

Management Commands:
  bridge      Convert compose files into another model

Commands:
  attach      Attach local standard input, output, and error streams to a service's running container
  build       Build or rebuild services
  commit      Create a new image from a service container's changes
  config      Parse, resolve and render compose file in canonical format
  cp          Copy files/folders between a service container and the local filesystem
  create      Creates containers for a service
  down        Stop and remove containers, networks
  events      Receive real time events from containers
  exec        Execute a command in a running container
  export      Export a service container's filesystem as a tar archive
  images      List images used by the created containers
  kill        Force stop service containers
  logs        View output from containers
  ls          List running compose projects
  pause       Pause services
  port        Print the public port for a port binding
  ps          List containers
  publish     Publish compose application
  pull        Pull service images
  push        Push service images
  restart     Restart service containers
  rm          Removes stopped service containers
  run         Run a one-off command on a service
  scale       Scale services
  start       Start services
  stats       Display a live stream of container(s) resource usage statistics
  stop        Stop services
  top         Display the running processes
  unpause     Unpause services
  up          Create and start containers
  version     Show the Docker Compose version information
  volumes     List volumes
  wait        Block until containers of all (or specified) services stop.
  watch       Watch build context for service and rebuild/refresh containers when files are updated

Run 'docker compose COMMAND --help' for more information on a command. v2) and
adds a test:compose job that builds the stack, waits for prosody health,
runs the slixmpp suite in the tester container, and emits a junit report.
Runs on merge_request_event and non-main branch pipelines.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger e19cc05403 feat(helm): mount credentials from Secret and set per-container resources
- chart: add secretEnv (existingSecret + keys) rendered as secretKeyRef in
  both containers; add resourcesProsody/resourcesSidecar defaults with
  dedicated requests and limits via a containerResources helper
- argo: move prosodyDBpass/fcmApiKey/fileShareSecret/avatarUploadPass out of
  env into secretEnv referencing a prosody-secrets Secret; set dedicated
  resource requests+limits per container
- argo: add prosody-secrets.example.yaml ArgoCD Application (with a warning
  to use Sealed Secrets / External Secrets / SOPS instead of plaintext)
- chart fixes: bump stale appVersion 0.11.6 -> 13.0.6; fix malformed service
  block in values.yaml

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 3918ec59e9 fix: add example app template for argocd
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 2ae1f8e480 import helm chart
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 5572902aac docs: reconcile AGENTS.md with Prosody 13.0.6 + Lua 5.4 and current tooling
Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 33d17d53cc feat: add PROSODY_DEBUG env var for debug logging
Set PROSODY_DEBUG=true to switch the prosody.log level from info to
debug. This makes stanza-too-large rejections and XML parse errors
visible — both are logged at debug level and otherwise invisible.

Usage in k8s:
  env:
  - name: PROSODY_DEBUG
    value: "true"

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger d51c68c0b4 feat: add C2S/S2S_STANZA_SIZE_LIMIT env vars (default 5MB)
Add c2s_stanza_size_limit and s2s_stanza_size_limit to the config
template, backed by C2S_STANZA_SIZE_LIMIT and S2S_STANZA_SIZE_LIMIT
env vars. Both default to 5242880 (5MB) when unset, set in startup.sh.
The compose harness sets them explicitly.

Prosody 13.0.6 defaults are 256KB (c2s) and 512KB (s2s), which are too
small for large file-transfer invitations and Jitsi meet sessions.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 5604170914 docs: add comprehensive Prosody 13.0.6 test run report
Combined results from compose harness (80 passed, 6 skipped) and external
deployment (50 passed, 36 skipped). 81 unique tests passed across both
runs, 0 failures. 5 remaining skips are config/infrastructure prerequisites,
not regressions. All 81 passed tests described with what they verify.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger aa822329dd test: carbon-copied REST test uses same-bare-JID second resource
The test was skipping because it depended on the second_client fixture,
which uses XMPP_JID2 (a distinct account). Carbons require both
resources to share the same bare JID.

Rewrite to create a second VNCXmppClient inline with the same bare JID
as xmpp_client but a different resource (/carbon-<random>), so the test
runs regardless of whether XMPP_JID2 is configured or distinct.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 015c554d30 docs: add M3 test run report
Compose harness: 80 passed, 6 skipped, 0 failed.
External deployment: 61 passed, 25 skipped, 0 failed.
All skips are infrastructure prerequisites, not M3 regressions.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger b87e6b790d feat: run-all-tests.sh auto-starts PG tunnel and telnet port-forward
Check if the SSH tunnel to PostgreSQL (port 14322) and the kubectl
port-forward for telnet (port 5582) are active before running the
testsuite. Start them automatically if missing. Clean up the
kubectl port-forward on exit if we started it.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 26e7512b24 feat: upgrade Prosody 0.12.6 → 13.0.6 (milestone 3)
Bump Dockerfile to prosody-13.0.6; all 8 patches re-ported against 13.0.6.

Re-ported patches (3 changed, 5 applied with offset):
- hidden.lib.patch: 13.0 uses module:may() instead of um_is_admin; changed
  to 'if restrict_public then' (same intent: hide option for everyone)
- mod_muc.patch: 13.0 added restrict_pm between register and
  presence_broadcast; updated hunk 1 context
- mod_muc_unique.patch: 13.0 uses 'require "prosody.util.stanza"'
  (namespaced); updated context
- muc.lib, mod_carbons, mod_mam, mod_muc_mam, register.lib: applied
  with line offsets, no re-port needed

Config changes:
- Remove mod_posix from modules_enabled (13.0 absorbed signal handling,
  pidfile, and run_as_root check into core util/startup.lua)
- Move pubsub from modules_enabled to Component (13.0 requires pubsub
  to be loaded as a component, not a module)

Test fix:
- test_muc_fcm_push_to_offline_member: wait for count=2 captures instead
  of 1 — mod_vnc_muc_fcm pushes to ALL affiliated members (including
  sender, because it can't see main-host sessions from the MUC
  component); the test was racing on which push arrived first

Verified: prosodyctl check config passes; compose-harness testsuite
green (80 passed, 6 skipped, 0 failed).

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 7a369a489e docs: mark M2 complete — external testsuite passed
Update M2 status to reflect both compose-harness (80 passed, 6 skipped,
0 failed) and external testsuite results (48 passed, 30 skipped — all
skips are infrastructure prerequisites). test_vcard_fallback now skipped
pending mod_vnc_vcard_fallback enablement.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 3ed7aba56b feat: add run-all-tests.sh — single-invocation external testsuite
Same env vars as run-tests.sh but runs all test files in one pytest
call for a unified summary. Use run-tests.sh for selective per-file
runs.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger c1b46d2814 revert: keep run-tests.sh with per-file pytest invocations
Revert to the original per-file invocation style — it allows running
tests selectively by commenting out individual lines.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 7f7c087c16 test: skip test_vcard_fallback (mod_vnc_vcard_fallback not enabled in config)
The module exists in vnctalk/ but is not listed in modules_enabled in
the config template. The test previously passed on external deployments
by coincidence — the test users already had vCards with FN from real
usage. On the compose harness with a fresh DB, the test fails because
nothing generates a vCard.

Add @pytest.mark.skip with a reason pointing to the missing module.
Simplify run-tests.sh to a single pytest invocation (was 12 separate
calls). Update m1-manual-tasks.md §3.5 to reflect the skip.

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00
Stefan-Sanger 43a9d7ec57 feat: add run-compose-tests.sh — one-command compose harness testsuite
Brings up the docker-compose stack (postgres + mocks + prosody), waits
for prosody to become healthy, and runs the full pytest suite with all
env vars set so tests that need MOCK_URL, PG, BOSH/WS, telnet, etc. are
not skipped.

Auto-detects if port 5582 is already in use (e.g. kubectl port-forward)
and remaps the telnet host port to 5583 via the TELNET_HOST_PORT env var
in docker-compose.yml.

Usage:
  ./run-compose-tests.sh              # up + test + down
  ./run-compose-tests.sh --no-down    # leave stack running
  ./run-compose-tests.sh --down       # just tear down

Part-of: <http://gitlab.vnc.biz/uxf/vnctalk-prosody/-/merge_requests/3>
2026-07-15 17:58:02 +02:00