Repository navigation
feat: add community deployment reporting - #4127
Conversation
rogercloud
left a comment
There was a problem hiding this comment.
Summary
This PR adds community deployment reporting with a persistent deployment ID, one installation event, and daily heartbeats, scheduled through Celery or a tracked web-process loop. It shares durable retry state across both modes and documents the opt-out, but the Compose edition setting is propagated only to the worker and scheduler, not the backend that reports when Celery is disabled.
Blocking: yes — recommended event: COMMENT
Approach
Sound. The single deployment-scoped state machine and shared reporter fit the two scheduling modes without adding a separate job/outbox subsystem. No macro-architecture concern was established.
Findings
[major] Compose does not pass the edition to the no-Celery reporter — Blocking: yes
File: docker-compose.yml:109
Trigger: A supported Compose invocation supplies XAGENT_DEPLOYMENT_EDITION=enterprise through the shell and sets XAGENT_CELERY_ENABLED=false, while .env has no edition override and no telemetry opt-out. The new interpolation forwards the edition to worker and scheduler, but the backend's explicit environment list omits it; env_file: .env does not forward a shell-only value. The backend therefore reads the default community edition, and the no-Celery local reporter is admitted.
Impact and contract: The backend can send installation and heartbeat requests to the external collector for an explicitly enterprise deployment, violating the PR's force-off contract. The reporter checks its own edition and opt-out settings, but that guard cannot enforce the intended edition when Compose omits the value from the process that owns reporting. An edition in .env, an installed SaaS package, or an explicit telemetry opt-out suppresses this particular path, but none is required by the supported shell-override scenario.
Fix: Add XAGENT_DEPLOYMENT_EDITION=${XAGENT_DEPLOYMENT_EDITION-community} to backend.environment as well, so every Compose service that can report receives the deployment edition.
[minor] Opt-out instructions omit the backend recreation path — Blocking: no
Files: README.md:144 and example.env:33–34 (one documentation root)
Trigger: A Compose deployment runs with XAGENT_CELERY_ENABLED=false; an operator sets XAGENT_COMMUNITY_TELEMETRY_ENABLED=false in .env and follows the new instruction to recreate only the worker and scheduler. In this mode the backend owns the reporter.
Impact and contract: The backend retains its original process environment because changing .env does not mutate an existing container; it continues reporting even though the operator followed the documented opt-out. The opt-out check reads the backend process environment, and recreating that backend would apply the flag through its existing env_file; this is not a separate runtime-guard defect. The two affected instructions in the README and example environment file share the same cause and correction.
Fix: Update both occurrences to include backend among the services to recreate, or explain that the backend must be recreated when Celery is disabled.
Verification limitations
This review was static: no tests, builds, linters, Compose rendering, service starts, or live telemetry requests were run. The supplied preflight records 8 successful and 10 skipped checks; this is not a fully passing CI run. Receiver source compatibility was checked at a pinned revision, but production endpoint availability and deployment behavior were not verified. The complete PR review, conversation, and inline-history exports were empty, and no linked issues were listed.
Blocking status & recommended decision
Blocking: yes — recommended event: COMMENT. This PR is authored by qinxuye, so the blocker is reported with COMMENT, not REQUEST_CHANGES.
Blocking issue:
docker-compose.yml:109— major: a shell-configured enterprise deployment can send community telemetry from the backend in no-Celery mode. [new]
rogercloud
left a comment
There was a problem hiding this comment.
Summary
Adds default-on community deployment reporting with a persistent deployment ID, a post-setup installation event, and one heartbeat per UTC day, using durable state for retry identity. A shared reporter runs through Celery or a tracked web-process loop, while enterprise, SaaS, and explicit opt-out settings suppress reporting. The reporting paths and opt-out behavior are documented for operators.
Blocking: no — recommended event: APPROVE
Update summary
The single new commit, 60212a9c, forwards XAGENT_DEPLOYMENT_EDITION to the Compose backend and updates the opt-out instructions in README.md and example.env to direct operators to recreate the backend when Celery is disabled. It also adds a regression test asserting edition propagation to the backend, worker, and scheduler.
Approach
Independent design assessment: sound. The durable deployment-scoped reporter and shared state machine fit the two scheduling modes without duplicating reporting behavior or introducing unnecessary infrastructure. The backend now receives the edition policy alongside the worker and scheduler; no design-level concern was established.
Prior-review checklist
| Canonical root | Prior sources | Status and occurrence evidence |
|---|---|---|
| H01 — Compose edition propagation | Prior review body (docker-compose.yml:109); inline comment (docker-compose.yml:110, original line 109) |
FIXED. The body occurrence's backend omission is fixed by the edition interpolation in docker-compose.yml:53; the worker and scheduler also receive it at lines 110 and 145. The inline occurrence is the same root and is fixed by that backend entry. tests/test_docker_runtime_defaults.py:38-47 asserts the setting exists for all three reporting services. |
| H02 — No-Celery opt-out documentation | Prior review body (README.md:144, example.env:33-34); inline comment (README.md:144, original line; also requested example.env) |
FIXED. The body occurrence is addressed in both files: README.md:146 and example.env:34-35 now direct operators to recreate the backend when Celery is disabled. The inline occurrence requested the same backend guidance in both locations and is likewise addressed. The inline thread had no replies. |
New findings
None confirmed.
Verification limits
- This was a static review. Tests, builds, linters, formatting, Compose rendering or execution, reporting requests, and deployment checks were not run.
- CI status was informational: 8 checks succeeded and 10 were skipped; skipped checks are not treated as passing verification.
- Sender compatibility was inspected against the pinned SaaS receiver source revision
3084044b4608c1532bb8c536efc747a8bef5d1b3. This does not establish which receiver revision is deployed or verify live acceptance, delivery, or operational reachability.
Blocking status & recommended decision
Blocking: no. No confirmed blocking findings remain. Recommended event: APPROVE.
Changes
XAGENT_COMMUNITY_TELEMETRY_ENABLED=falseto opt out.enterpriseand installations with the SaaS package, including tasks already queued.Validation
xagentCLI without Celery against the existing SaaS ingestion route. Verified default reporting with no edition or telemetry flags, opt-out, same-day restart deduplication, and zero requests with opt-in forced on for enterprise and SaaS.docker compose config.