RC Release - #1708
Conversation
The mirror backfill's in-sync gate compared MAX(updatedAt) at millisecond resolution. SQLite retains milliseconds, but Sequelize's mysql DATE serialization writes the mirror without a fractional part, so a freshly synced mirror reads back truncated to the whole second (e.g. source .899 vs mirror .000). The gate read that truncation as drift and forced a full re-upsert of large tables (unit, audit) on every restart, even though no rows were missing. Floor both sides to whole seconds before comparing so the check matches the resolution the mirror can hold. A genuine update advances updatedAt to NOW(), crossing a whole-second boundary, so real drift is still detected; the accepted trade-off is a same-second miss that self-heals on the next boundary-crossing write. Covered by unit boundary tests plus V1/V2 integration tests that simulate the mirror's whole-second truncation and assert the gate skips the re-upsert, while a full-second-newer source still triggers a full sync.
Remove ONLY_CADT_SUBSCRIPTIONS_PURGE_GRACE_CYCLES and ORG_PURGE_DELETE_BATCH_SIZE from user-facing config. Neither is a setting operators need to tune: the grace cycle count is a policy constant, and the batch size is an internal lock-contention lever. Grace cycles now default to the existing DEFAULT_PURGE_GRACE_CYCLES (3) in the reconcile util; the tasks stop threading a config value. Batch size is hardcoded via DEFAULT_ORG_PURGE_DELETE_BATCH_SIZE, lowered from 5000 to 1000 so background orglist purges (committed-batch mode) release the SQLite write lock more often. Both remain injectable as function params so tests can exercise multi-batch and multi-cycle behavior.
…ants-v2-rc2 chore: hardcode org purge batch size and grace cycle constants
Clarify current setup guidance and replace stale developer notes with current Socket.IO and DataLayer serving documentation.
…cision fix: compare mirror in-sync gate at whole-second resolution
Point the DataLayer file server URL example at the unified CADT configuration file so it matches the documented APP section.
Make the detected DataLayer file server URL explicit and strip any whitespace from the public IP response before updating config.
Added instructions for using testnet and updated configuration details.
Bumps [joi](https://github.com/hapijs/joi) from 17.13.3 to 17.13.4. - [Commits](hapijs/joi@v17.13.3...v17.13.4) --- updated-dependencies: - dependency-name: joi dependency-version: 18.2.1 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Zachary Brown <z.brown@chia.net> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Refresh within-range npm packages on v2-rc2 and move workflows to actions/checkout@v7. Security-critical direct deps were already patched on this branch (0 npm audit findings).
js-yaml v5 drops the ESM default export, so switch call sites to namespace imports. load()/dump() usage is otherwise unchanged.
Align CLI with config-conventional 21.x. Requires Node >=22, which CADT already satisfies via engines.node >=24.
* docs: refresh README installation guidance Clarify current setup guidance and replace stale developer notes with current Socket.IO and DataLayer serving documentation. * docs: fix CADT config path in quickstart Point the DataLayer file server URL example at the unified CADT configuration file so it matches the documented APP section. * docs: harden public IP quickstart command Make the detected DataLayer file server URL explicit and strip any whitespace from the public IP response before updating config. * Enhance README with testnet usage and config details Added instructions for using testnet and updated configuration details.
Resolve package.json/@babel/register and lockfile conflicts by keeping the PR dependency bumps after commitlint landed on v2-rc2.
js-yaml 5 has no ESM default export; the Docker smoke test runs this inline script with raw Node and failed on the leftover default import.
chore: upgrade js-yaml to 5.2.1
chore: bump remaining easy npm deps and checkout@v7
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 161f6ab. Configure here.
| proxy_set_header X-Real-IP $remote_addr; | ||
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | ||
| proxy_set_header X-Forwarded-Proto $scheme; | ||
| } |
There was a problem hiding this comment.
Nginx proxy breaks Socket.IO
Medium Severity
The new nginx sample proxies all non-/data/ traffic to CADT but never sets WebSocket upgrade headers. Socket.IO namespaces on /v1/ws and /v2/ws therefore fail when clients reach CADT through this reverse proxy.
Reviewed by Cursor Bugbot for commit 161f6ab. Configure here.


Note
Medium Risk
Mirror gate and org-purge batching affect background sync and large org deletes; js-yaml major and broad dependency bumps warrant RC validation, though changes are mostly docs/CI/deps with targeted logic fixes.
Overview
Release-candidate style changes spanning docs, ops, CI, dependencies, and a few runtime fixes.
README is restructured around an Ubuntu Quickstart (apt repos for CADT, Chia, chia-tools, nginx; DataLayer path; API key; systemd). Hardware guidance shifts (e.g. 2 cores / 500 GB disk). Releases link to
Chia-Network/cadt. Diagnostics and disk-space guard move later in the doc; Socket.IO usage is updated for v1/v2 feeds. Config docs dropONLY_CADT_SUBSCRIPTIONS_PURGE_GRACE_CYCLESandORG_PURGE_DELETE_BATCH_SIZEfrom the template narrative (purge grace still defaults internally).Adds
docs/nginx/datalayer.conf(7-day cache on/data/, reverse proxy to CADT on/) and removesdocs/v1-to-v2-upgrade-test-pending-root-analysis.md.Mirror backfill gate compares
MAX(updatedAt)at whole-second resolution so MySQLDATETIMEtruncation no longer forces a full re-upsert on every restart; integration tests cover sub-second vs real drift.Org purge default batch size is 1000 (was 5000); V1/V2
deleteAllOrganizationDatause the constant unless tests passbatchSize. Sync tasks no longer pass config-driven grace/batch overrides.js-yaml is bumped to 5.x with
import * as yamlin config loaders, Docker entrypoint, and test helpers.GitHub Actions use
actions/checkout@v7across release, build, test, and smoke workflows.package.json / lockfile refresh (e.g. body-parser, eslint, commitlint 21.x, mysql2, prettier).
Reviewed by Cursor Bugbot for commit 161f6ab. Bugbot is set up for automated code reviews on this repo. Configure here.