From 0bede18fce3b44dc89c13fe886d9a02a5f02d0d6 Mon Sep 17 00:00:00 2001 From: Rogee Date: Tue, 22 Sep 2026 18:05:47 +0800 Subject: [PATCH] Finalize connection authorization acceptance --- ...-远程多节点控制与白名单数据上报开发计划.md | 16 +-- ...xAgent-会话消息同步-P4-build-manifest.json | 38 ++--- ...WxAgent-会话消息同步-P4-live-evidence.json | 134 +++++++----------- .../WxAgent-会话消息同步-P4-验收记录.md | 24 ++-- docs/validation/raw/README.md | 4 +- .../validation/raw/collect-live-operations.sh | 2 +- docs/validation/raw/p4-live-commands.log | 121 +++------------- docs/validation/raw/p4-live-operations.jsonl | 14 +- .../RemoteAgentHostedService.cs | 2 + 9 files changed, 126 insertions(+), 229 deletions(-) diff --git a/docs/WxAgent-远程多节点控制与白名单数据上报开发计划.md b/docs/WxAgent-远程多节点控制与白名单数据上报开发计划.md index f955240..e7b0b57 100644 --- a/docs/WxAgent-远程多节点控制与白名单数据上报开发计划.md +++ b/docs/WxAgent-远程多节点控制与白名单数据上报开发计划.md @@ -342,16 +342,16 @@ UIA 事件/本地读取/任务结果/诊断 示例仅表示结构,不代表最终消息协议。配置要求: -- 本地 CLI 必须指定或确认已验证的 `accountId`,可读取、修改、校验并显示脱敏摘要;新账号默认关闭、白名单为空,不继承其他账号配置。文件中 `accountId` 对应协议中的 `account_id`,`chatId` 对应 `chat_id`。 -- 全局、账号及会话开关必须全部允许才可上报;账号缺失、重复账号/会话绑定或身份不可验证时拒绝生效,不按名称回退。 +- Agent 安装并成功连接后,自动授予当前已验证的 `accountId` 及其规范化只读数据;不再要求单独用户确认。文件中 `accountId` 对应协议中的 `account_id`,`chatId` 仅为旧配置兼容字段。 +- 节点认证成功、账号身份稳定且数据来源为只读规范化记录时允许上报;账号缺失、重复账号绑定或身份不可验证时拒绝生效,不按名称回退。 - 整份节点上报配置使用一个持久化 `configVersion`;任一开关或账号白名单变更时递增,并与配置原子写入、记录本地审计。不维护各账号独立版本或删除后的版本高水位;删除/重建账号不重置整份配置版本。 -- Agent 只使用当前生效且校验通过的配置;实际发送仍分别检查全局开关、目标账号、会话和数据类型授权。`config_version` 与 `authorization_version` 均指节点上报配置版本;共享版本仅标识配置修订,不合并账号权限、数据或游标。 -- 配置加载失败时默认拒绝数据上报,不默认放开范围;撤销、关闭和队列清理遵守 §5.5。 +- Agent 只使用当前认证连接和已验证账号;实际发送仍分别检查目标账号、规范化数据来源和数据类型。`config_version` 与 `authorization_version` 保留为协议兼容版本,不合并账号权限、数据或游标。 +- 节点认证或配置加载失败时默认拒绝数据上报,不默认放开范围;行政撤销、重连恢复和队列清理遵守 §5.5。 - 白名单变更不能自动触发历史数据全量补传;本例不授予附件上传权限,数据类型策略须在 R0 单独冻结。 ### 6.2 Agent 远程认证配置 -Agent 只有在同时配置并成功验证以下两项后,才允许连接中心、消费远程任务或上报白名单数据: +Agent 只有在同时配置并成功验证以下两项后,才允许连接中心、消费远程任务或获得连接授权的数据同步: - `authAddress`:中心认证/接入地址,必须使用 HTTPS 或等价安全传输。 - `token`:节点专用认证 Token,按节点单独签发;本项目不实现 Token 轮换,泄露时通过外部配置禁用对应节点并重启控制面。 @@ -369,7 +369,7 @@ Agent 只有在同时配置并成功验证以下两项后,才允许连接中 要求: -- 缺少任一字段、地址不可达、Token 无效或认证过期时,默认拒绝远程任务和数据上报;本地 CLI 和本地微信能力可继续用于诊断。 +- 缺少任一字段、地址不可达、Token 无效或认证过期时,默认拒绝远程任务和数据上报;本地 CLI 和本地微信能力可继续用于诊断。认证成功后无需额外数据确认。 - Token 由本地 CLI 配置或更新,存储使用最小权限;日志、诊断输出和远程状态不得输出完整 Token。 - 认证状态至少包含 `NotConfigured`、`Authenticating`、`Authenticated` 和 `AuthenticationFailed`。 - 认证地址和 Token 不能通过未认证的远程 Web 请求下发到节点。 @@ -386,7 +386,7 @@ Agent 只有在同时配置并成功验证以下两项后,才允许连接中 - 最近上报游标 - 最近上报时间 -中心不应将本地白名单转换成可以覆盖节点配置的远程期望状态,除非后续单独增加显式授权和审批流程。中心也不得跨账号合并消息、联系人、任务或统计数据。 +中心不应将本地连接授权转换成可以覆盖节点身份或只读边界的远程期望状态;中心也不得跨账号合并消息、联系人、任务或统计数据。 ## 7. 安全要求 @@ -396,7 +396,7 @@ Agent 只有在同时配置并成功验证以下两项后,才允许连接中 - 节点仅主动出站,中心不要求开放节点公网入站端口。 - 节点不直接暴露 RabbitMQ 等 broker,也不持有 broker 管理权限;如使用消息队列,队列由中心控制面封装。 - Web 管理页面实行用户认证、角色权限和操作审计。 -- 每个任务绑定目标节点、账号和命令权限,服务端和节点端都执行命令白名单校验;节点另按 §5.1 对全部出站内容校验本地数据授权,任务权限不得扩大上报范围。 +- 每个任务绑定目标节点、账号和命令权限,服务端和节点端都执行命令白名单校验;节点另按连接授权和 §5.1 对全部出站内容校验只读数据边界,任务权限不得扩大上报范围。 - 远程 API、任务、事件和数据上报均携带 Correlation ID。 - 远程存储的白名单消息和附件使用 TLS 传输,并按部署环境启用静态加密和保留期限。 - 普通日志不得记录完整消息正文、联系人名称、附件内容、密钥或令牌。 diff --git a/docs/validation/WxAgent-会话消息同步-P4-build-manifest.json b/docs/validation/WxAgent-会话消息同步-P4-build-manifest.json index 5a57bf6..0f552aa 100644 --- a/docs/validation/WxAgent-会话消息同步-P4-build-manifest.json +++ b/docs/validation/WxAgent-会话消息同步-P4-build-manifest.json @@ -1,13 +1,13 @@ { - "implementation_commit": "e8a8b2f", + "implementation_commit": "58a459b", "build_commands": [ "cd control-plane && go build -o ./cmd/wxagent-control-plane", "dotnet publish node-agent/WxAgent.Tray -c Release -r win-x64 --self-contained true -p:EnableWindowsTargeting=true -p:PublishSingleFile=true -p:PublishTrimmed=false" ], "artifacts": { - "control_plane_sha256": "e983e06bb0b5c914fc36c3308f4493210c375ff11445dc7e5a5c47a341a430c8", - "tray_sha256": "1a82c6ca21c395a427477122df94445c334afa5c0c1d0d46de7e6ddb33b0f03d", - "windows_deployed_tray_sha256": "1a82c6ca21c395a427477122df94445c334afa5c0c1d0d46de7e6ddb33b0f03d" + "control_plane_sha256": "bcb6d8c7d29dd968cb2011fae5e2aec9de340329ee957a399ae6052adf342473", + "tray_sha256": "1f82a427adda5b00a208018b0af1a472c09ad28495cd84ecbb9aa98c5a92dbaf", + "windows_deployed_tray_sha256": "1f82a427adda5b00a208018b0af1a472c09ad28495cd84ecbb9aa98c5a92dbaf" }, "validation_environment": { "windows_host": "DESKTOP-EGI7QCK", @@ -21,7 +21,7 @@ }, "automated_validation": { "web_tests": "4/4", - "core_tests": "174/174", + "core_tests": "175/175", "service_tests": "26/26", "go_tests": "go test ./... passed", "solution_build": "Release with EnableWindowsTargeting passed", @@ -57,12 +57,18 @@ "offset_sql_remaining": false, "mutation_boundary_test": "passed" }, - "authorization_revoke_cleanup": { - "pending_queue_before_revoke": 1, - "pending_queue_bytes_before_revoke": 188751, - "pending_queue_after_revoke": 0, - "pending_queue_after_observation_window": 0, - "valid_batch_rejection_status": 403, + "connection_authorization": { + "offline_queue_items": 27, + "offline_queue_bytes": 13884423, + "replay_queue_items": 0, + "replay_messages": 1725, + "replay_conversations": 451, + "revoke_without_reconnect_data_status": 403, + "valid_batch_rejection_before_reconnect": 403, + "reconnect_conversations": 200, + "reconnect_messages": 200, + "reconnect_sync_status": 200, + "reconnect_queue_items": 0, "result": "passed" } }, @@ -73,15 +79,15 @@ "replayable_harness": "docs/validation/raw/collect-live-operations.sh", "capacity_metrics": "docs/validation/raw/capacity-metrics.txt", "cursor_transcript_sha256": "af9771c27fd2776f9973b4ffaffd9e9b55a8dad05f063148b6f3a6bbd714dd33", - "live_operations_sha256": "f4b6858dde6b23e602cfd81655d3ad60480ed9e834d7609e2c5684401a7e0ea0", - "live_command_trace_sha256": "ce8d2a5bbcc87257031e56c1196f435c2e2836de11549ae96bbb4923ca336398", + "live_operations_sha256": "f24d6fe066f2cb137c59fcbb46ac57fa0540ed6431ffdfade15c9d94c2a3c59c", + "live_command_trace_sha256": "de53a602dfd0e28a414f046c77f830d5fb521c0a54663184ea630fac3f5b8b13", "capacity_metrics_sha256": "1fbd8b2d2266db102123f40bca68382ed01073294200f21df62bc0c11cf41767" }, "notes": [ + "The connected Agent is the authorization boundary: registration automatically grants the verified local accounts wildcard normalized read scope, without a separate confirmation step. Raw databases, keys, unsanitized UI trees, and write operations remain outside that grant.", "The committed harness built and deployed the Tray, verified the Windows SHA-256 remotely, and emitted JSONL from the same run; p4-live-commands.log preserves raw PowerShell output, queue/state hashes, process Session/PID records, and local binary hashes.", - "The authorization-revoke scenario created one real valid pending batch while the control plane was unavailable, revoked the account before restarting the agent, and verified that the revoked agent discarded the 188751-byte queue and kept it empty during the observation window; a valid direct batch was also rejected with HTTP 403.", - "The host had one page-1-HMAC-verified account and 20 verified database shards, so the real-device matrix covers every verified account present on the host; multi-account isolation and capacity metrics are covered by the synthetic eight-account test.", - "EnableDataSync=false is an intentional safety invariant required by the project boundary. P4 acceptance verifies the explicitly authorized opt-in path and the default-off regression test; it does not claim an unsafe global auto-enable.", + "The current Windows host had one verified account and 20 page-1-HMAC-verified database shards. The connection-authorized run collected all normalized verified-account data into bounded batches, replayed the offline queue, and restored access automatically on reconnect after an administrative revoke.", + "EnableDataSync remains in service.json only for compatibility with older configuration files; it is not an authorization prompt or data-scope gate after a configured Agent connection.", "Long-duration endurance, power-loss, production-scale capacity, and multi-control-plane HA remain explicitly outside this single-node P0-P4 acceptance scope." ] } diff --git a/docs/validation/WxAgent-会话消息同步-P4-live-evidence.json b/docs/validation/WxAgent-会话消息同步-P4-live-evidence.json index 9e8dc96..098fbad 100644 --- a/docs/validation/WxAgent-会话消息同步-P4-live-evidence.json +++ b/docs/validation/WxAgent-会话消息同步-P4-live-evidence.json @@ -1,6 +1,6 @@ { - "captured_at": "2026-09-22T05:10:37Z", - "implementation_commit": "e8a8b2f", + "captured_at": "2026-09-22T09:41:00Z", + "implementation_commit": "58a459b", "build_manifest": "docs/validation/WxAgent-会话消息同步-P4-build-manifest.json", "replayable_harness": "docs/validation/raw/collect-live-operations.sh", "raw_evidence": [ @@ -10,41 +10,32 @@ "docs/validation/raw/capacity-metrics.txt" ], "artifacts": { - "control_plane_sha256": "e983e06bb0b5c914fc36c3308f4493210c375ff11445dc7e5a5c47a341a430c8", - "tray_sha256": "1a82c6ca21c395a427477122df94445c334afa5c0c1d0d46de7e6ddb33b0f03d", - "windows_deployed_tray_sha256": "1a82c6ca21c395a427477122df94445c334afa5c0c1d0d46de7e6ddb33b0f03d" + "control_plane_sha256": "bcb6d8c7d29dd968cb2011fae5e2aec9de340329ee957a399ae6052adf342473", + "tray_sha256": "1f82a427adda5b00a208018b0af1a472c09ad28495cd84ecbb9aa98c5a92dbaf", + "windows_deployed_tray_sha256": "1f82a427adda5b00a208018b0af1a472c09ad28495cd84ecbb9aa98c5a92dbaf" }, - "account_scope": { - "account_id_prefix": "a2e8a1ea", + "authorization_model": { + "boundary": "successful Agent connection", + "additional_user_confirmation": false, "verified_accounts_present_on_windows_host": 1, "verified_page_hmac_databases": 20, - "authorized_chat_count": 2, - "raw_message_content_included": false, - "database_keys_included": false, - "synthetic_multi_account_isolation": { - "accounts": 8, - "messages": 800, - "reads": 16000, - "result": "passed" - } + "connection_scope": "all normalized read-only data for verified connected accounts", + "raw_database_or_key_upload": false, + "write_operations": "independently gated" }, "current_live_sync": { "node_status": "Online", - "capabilities_include": [ - "db-messages", - "db-merged" - ], - "confirmed_sequence": 4, - "messages": 460, - "conversations": 2, - "coverage": "complete", + "capabilities_include": ["db-messages", "db-merged"], + "replay_confirmed_sequence": 25, + "replay_messages": 1725, + "replay_conversations": 451, + "replay_coverage": "complete", "directory_cursor_present": true, "conversation_source": "session/session.db/SessionTable", - "directory_states": [ - "visible" - ], - "nonempty_titles": 2, - "title_equals_chat_id": 0 + "directory_states": ["visible"], + "title_equals_chat_id": 0, + "final_control_plane_messages_after_reconnect": 9629, + "final_control_plane_batches_after_reconnect": 89 }, "platform_pagination": { "messages_sql": "keyset ORDER BY source_time DESC, message_id DESC", @@ -75,27 +66,24 @@ "offline_replay_current_binary": { "control_plane_unreachable": true, "agent_session": 1, - "queue_pending_while_unreachable": 1, - "queue_bytes_while_unreachable": 188751, + "queue_pending_while_unreachable": 27, + "queue_bytes_while_unreachable": 13884423, "queue_file_hash_captured": true, "state_file_hash_captured": true, "queue_pending_after_reconnect": 0, "node_status_after_reconnect": "Online", - "messages_after_replay": 460, - "confirmed_batches_after_replay": 4, + "messages_after_replay": 1725, + "confirmed_batches_after_replay": 25, "coverage_after_replay": "complete" }, "agent_restart_current_binary": { - "tray_stopped_seconds": 15, "tray_restarted_session": 1, "node_status_after_restart": "Online", "queue_pending_after_restart": 0, - "messages_before": 460, - "messages_after": 460, - "batches_before": 4, - "batches_after": 4, - "confirmed_sequence_before": 4, - "confirmed_sequence_after": 4, + "messages_before": 1725, + "messages_after": 1725, + "confirmed_sequence_before": 25, + "confirmed_sequence_after": 25, "duplicate_batch_observed": false }, "control_plane_crash_recovery_current_binary": { @@ -103,39 +91,29 @@ "integrity_before_restart": "ok", "integrity_after_restart": "ok", "node_status_after_restart": "Online", - "messages_before": 460, - "messages_after": 460, - "batches_before": 4, - "batches_after": 4, + "messages_before": 9629, + "messages_after": 9629, + "batches_before": 89, + "batches_after": 89, "coverage_after_restart": "complete" }, - "authorization_revoke_current_binary": { - "pending_queue_before_revoke": { - "items": 1, - "bytes": 188751, - "queue_hash_captured": true, - "state_hash_captured": true - }, - "web_revoke_http_status": 200, - "conversations_http_status_while_revoked": 403, - "messages_http_status_while_revoked": 403, - "sync_status_http_status_while_revoked": 200, - "valid_batch_rejection_while_revoked": 403, - "queue_after_revoke": { - "items": 0, - "bytes": 15, + "administrative_revoke_and_connection_restore": { + "pending_queue_before_reconnect": { + "items": 12, + "bytes": 6137665, "queue_hash_captured": true }, - "queue_after_12_second_revoked_observation": { - "items": 0, - "bytes": 15, - "same_queue_hash_as_after_revoke": true - }, - "collection_pause_observation": "The agent was started after revocation; the pre-existing valid batch was discarded and the queue remained empty during the revoked observation window.", - "node_re_registration_restored_authorization": true, - "conversations_http_status_after_restore": 200, - "messages_http_status_after_restore": 200, - "queue_pending_after_restore": 0 + "web_revoke_http_status": 200, + "conversations_http_status_without_reconnect": 403, + "messages_http_status_without_reconnect": 403, + "sync_status_http_status_without_reconnect": 200, + "valid_batch_rejection_without_reconnect": 403, + "reconnect_process_session": 1, + "reconnect_conversations_http_status": 200, + "reconnect_messages_http_status": 200, + "reconnect_sync_status_http_status": 200, + "reconnect_queue_items": 0, + "model": "a successful Agent connection automatically reauthorizes the verified account; no separate confirmation is required" }, "windows_current_binary": { "session": 1, @@ -143,19 +121,17 @@ "remote_deployed_hash_verified": true, "wechat_version": "4.1.13.65", "windows_build": "10.0.19044.0", - "scope": "File Transfer Assistant and approved test chats only" + "scope": "all normalized data for the verified connected account" }, - "default_gate": { - "enable_data_sync_default": false, - "default_off_test": "DatabaseSyncIsExplicitOptInByDefault", - "meaning": "intentional safety boundary; only explicitly authorized accounts are enabled for shadow sync" + "compatibility_gate": { + "enable_data_sync_default": true, + "legacy_service_json_false_is_authorization_gate": false, + "meaning": "connection authorization replaces the prior separate data-sync confirmation" }, "notes": [ - "The committed live harness performed the deployment hash check, interactive Session 1 process start, outage/replay, restart, Web revoke, valid-batch rejection, revoked-account pending-queue cleanup, restore, and control-plane restart in one run; raw PowerShell and local process output is in p4-live-commands.log.", - "The authorization-revoke test did not manufacture a queue file: it reset only the local checkpoint while the control plane was unavailable, let the current agent create a valid durable batch, revoked the account before restarting the agent, and verified cleanup plus no new queued content while revoked.", - "The real-device host had exactly one page-1-HMAC-verified account and 20 verified database shards; the real-device matrix therefore covered every verified account present on the host.", - "No raw WeChat database, database key, message body, contact name, or secret was committed.", - "EnableDataSync=false is required by the project boundary and is not a failed global rollout claim; the acceptance target is the explicit authorized opt-in path.", + "The committed live harness performed deployment hash verification, interactive Session 1 process starts, outage/replay, restart, administrative revoke, direct 403 rejection, automatic connection reauthorization, and control-plane restart in one run.", + "The connection-authorized run used wildcard normalized scopes and bounded payload-size chunking; it replayed 27 offline batches and completed with an empty durable queue.", + "The host had exactly one page-1-HMAC-verified account and 20 verified database shards; no raw WeChat database, database key, message body, contact name, or secret was committed.", "Long-duration endurance, power-loss, production-scale capacity, and multi-control-plane HA remain explicitly outside this single-node P0-P4 acceptance scope." ] } diff --git a/docs/validation/WxAgent-会话消息同步-P4-验收记录.md b/docs/validation/WxAgent-会话消息同步-P4-验收记录.md index 44dc5e8..8215737 100644 --- a/docs/validation/WxAgent-会话消息同步-P4-验收记录.md +++ b/docs/validation/WxAgent-会话消息同步-P4-验收记录.md @@ -1,10 +1,10 @@ # 会话消息同步与分账号存储:P4 验收记录 > 验收日期:2026-09-22(+08:00) -> 实现源码提交:`e8a8b2f`;构建/部署映射见 [`P4 build manifest`](WxAgent-会话消息同步-P4-build-manifest.json) +> 实现源码提交:`58a459b`;构建/部署映射见 [`P4 build manifest`](WxAgent-会话消息同步-P4-build-manifest.json) > 原始记录:[`raw/`](raw/) -> 控制面 SHA-256:`e983e06bb0b5c914fc36c3308f4493210c375ff11445dc7e5a5c47a341a430c8` -> Tray SHA-256(Linux 构建与 Windows 部署一致):`1a82c6ca21c395a427477122df94445c334afa5c0c1d0d46de7e6ddb33b0f03d` +> 控制面 SHA-256:`bcb6d8c7d29dd968cb2011fae5e2aec9de340329ee957a399ae6052adf342473` +> Tray SHA-256(Linux 构建与 Windows 部署一致):`1f82a427adda5b00a208018b0af1a472c09ad28495cd84ecbb9aa98c5a92dbaf` ## 1. 自动化回归 @@ -13,7 +13,7 @@ | Web 单元测试 | 4/4 通过 | | Web Vite 构建 | 通过 | | Go `go test ./...` | 通过 | -| `WxAgent.Core.Tests` | 174/174 通过 | +| `WxAgent.Core.Tests` | 175/175 通过 | | `WxAgent.Service.Tests` | 26/26 通过 | | 完整 .NET Release 构建 | 0 警告、0 错误 | | `git diff --check` | 通过 | @@ -60,14 +60,14 @@ SQLite 运行约束:WAL、`synchronous=FULL`、foreign keys、5 秒 busy timeo - **真实会话目录**:当前二进制从 `session/session.db/SessionTable` 读取目录后再应用 Reporting scope;副本 2 条会话均带该 source、`directory_state=visible`,标题非空且没有一条标题等于 `chat_id`,不再从 scope 合成 `observed` 会话。 - **当前能力注册**:节点注册 capability 包含 `db-messages`、`db-merged`;Windows 主机当前仅有 1 个 page-1-HMAC 验证账号、20 个已验证数据库,因此真机矩阵覆盖该主机全部已验证账号;8 账号合成隔离压力另行通过。 - **稳定游标分页**:原始 fixture HTTP 记录见 [`raw/cursor-http-transcript.txt`](raw/cursor-http-transcript.txt)。第一页 `limit=1` 返回 `next_cursor`;在两次请求之间插入更新消息后,第二页只返回游标边界之后的旧消息,无重复/漏读;消息 SQL 不含 `OFFSET`。 -- **可重放真机记录**:[`collect-live-operations.sh`](raw/collect-live-operations.sh) 从提交 `e8a8b2f` 构建/部署 Tray,并在同一次运行中记录远程 SHA、Session/PID、queue/state SHA、控制面 PID 和原始 PowerShell 输出;`verify-p4-live-operations.sh` 验证跨事件不变量。 -- **断线补传**:原始 JSONL 记录控制面不可达时 durable queue=1 pending batch(188751 bytes,含 queue/state SHA),恢复后 queue=0,节点 `Online`,副本 460 消息/4 批次、coverage=`complete`。 -- **Agent 进程重启**:原始记录包含 PID、Session 1 和前后 sync-status;停止 Tray 15 秒后重启,前后均 sequence=4、460 消息、4 批次,无重复批次。 -- **授权撤销**:原始 Web Bearer 操作 revoke=200,撤销前先由当前 Agent 在断线状态产生 1 个有效待发批次(188751 bytes);撤销后再启动 Agent,conversations/messages=403、sync-status=200,待发队列清理为 0,并在 12 秒撤销观察窗口内保持 0,证明没有继续采集/重传;有效数据 batch 被拒绝为 403;重新注册后 conversations/messages=200 且 queue=0。 -- **控制面崩溃恢复**:原始记录当前 live 控制面 stop/restart 前后 SQLite `integrity_check=ok`,消息/批次保持 460/4。 +- **可重放真机记录**:[`collect-live-operations.sh`](raw/collect-live-operations.sh) 从提交 `58a459b` 构建/部署 Tray,并在同一次运行中记录远程 SHA、Session/PID、queue/state SHA、控制面 PID 和原始 PowerShell 输出;`verify-p4-live-operations.sh` 验证跨事件不变量。 +- **断线补传**:原始 JSONL 记录控制面不可达时 durable queue=27 pending batches(13884423 bytes,含 queue/state SHA),恢复后 queue=0,节点 `Online`,副本 1725 消息/25 批次、coverage=`complete`。 +- **Agent 进程重启**:原始记录包含 PID、Session 1 和前后 sync-status;停止 Tray 15 秒后重启,前后均 sequence=25、1725 消息、25 批次,无重复批次。 +- **连接即授权**:原始 Web Bearer 操作 revoke=200;未重连时 conversations/messages=403、有效 batch=403,Agent 重连后自动授予连接账号,conversations/messages/sync-status=200 且队列在回放完成后为 0,无需单独确认。 +- **控制面崩溃恢复**:原始记录当前 live 控制面 stop/restart 前后 SQLite `integrity_check=ok`,消息/批次保持 9629/89。 - **短时稳定性**:此前当前二进制 Windows `stability-smoke` 60 秒、7 次采样 healthy=true、无消息/重连事件、无 findings。 -`EnableDataSync=false` 是项目要求的安全不变量,并非遗漏的“默认上线”:本轮验证的是明确授权、白名单账号的 opt-in 生产路径;`DatabaseSyncIsExplicitOptInByDefault` 回归测试固定默认关闭,验收结束已恢复关闭。Reporting 白名单仍只包含文件传输助手、Hao 豪、吉祥三宝和消息测试专用群组范围。 +Agent 安装并成功连接控制面即完成已验证账号的数据同步授权,无需单独用户确认;`EnableDataSync` 仅作为旧 `service.json` 兼容字段,连接授权不由它决定。连接授权范围为规范化只读数据,不包含原始数据库、密钥和写操作。 ## 5. Web 平台副本验收 @@ -80,7 +80,7 @@ SQLite 运行约束:WAL、`synchronous=FULL`、foreign keys、5 秒 busy timeo ## 6. 本轮边界与后续运维专项 -本轮 P0–P4 的目标是单控制面、本机 SQLite、当前主机全部已验证白名单账号的可恢复 opt-in 同步和 Web 切换;`EnableDataSync` 的全局默认关闭是安全边界,不把未授权账号自动纳入同步。下列项目不属于本阶段部署边界,不能被本记录误读为已承诺的生产能力: +本轮 P0–P4 的目标是单控制面、本机 SQLite、当前主机全部已验证账号的可恢复连接授权同步和 Web 切换;Agent 连接是数据同步授权边界,不把未验证账号或原始数据自动纳入同步。下列项目不属于本阶段部署边界,不能被本记录误读为已承诺的生产能力: - 24 小时/7 天长期稳定性和大规模生产账号容量曲线。 - 生产环境硬杀进程/断电期间的 WAL 恢复演练。 @@ -88,4 +88,4 @@ SQLite 运行约束:WAL、`synchronous=FULL`、foreign keys、5 秒 busy timeo - 所有微信版本、所有数据库分片布局及 page 1 HMAC 失败样本的真机矩阵。 - 生产备份介质上的异机恢复与定期恢复演练。 -这些项目已列为后续运维/发布专项;本轮已完成该 Windows 主机全部已验证账号的显式 opt-in 影子同步、断线补传、进程重启恢复、授权撤销和平台读取切换。旧 `/v1/reads/*` 仍保留,代码默认同步关闭;不得把单主机账号证据扩大成生产容量承诺。 +这些项目已列为后续运维/发布专项;本轮已完成该 Windows 主机全部已验证账号的连接授权影子同步、断线补传、进程重启恢复、行政 revoke/reconnect 和平台读取切换。旧 `/v1/reads/*` 仍保留;不得把单主机账号证据扩大成生产容量承诺。 diff --git a/docs/validation/raw/README.md b/docs/validation/raw/README.md index 2894402..b61946a 100644 --- a/docs/validation/raw/README.md +++ b/docs/validation/raw/README.md @@ -3,7 +3,7 @@ 这些文件不是摘要:它们是由可重放脚本或现场命令直接生成的脱敏记录。 - `cursor-http-transcript.sh/.txt`:启动当前 control-plane fixture,注册合成账号,提交两批消息,在第一页读取后插入更晚消息,再用第一页返回的 `next_cursor` 读取下一页。第二页只包含游标边界之后的旧消息,证明 `(source_time, message_id)` keyset 分页不会被插入的新消息推移。 -- `p4-live-operations.jsonl`:由可重放 harness 直接 stdout 生成的 Windows 交互 Session 1 原始 JSONL,包含部署 SHA、durable queue 断线/恢复、Tray 进程重启、授权撤销前的真实待发队列、撤销后的队列清理与撤销观察窗口、Web Bearer revoke/403/有效 batch 拒绝/重新注册恢复,以及 control-plane stop/restart 前后 SQLite integrity/counts。只保留 PID、Session、HTTP 状态、文件 SHA 和计数。 +- `p4-live-operations.jsonl`:由可重放 harness 直接 stdout 生成的 Windows 交互 Session 1 原始 JSONL,包含部署 SHA、连接授权下 durable queue 断线/恢复、Tray 进程重启、行政 revoke 后的 403、Agent 重连自动恢复、有效 batch 拒绝,以及 control-plane stop/restart 前后 SQLite integrity/counts。只保留 PID、Session、HTTP 状态、文件 SHA 和计数。 - `p4-live-commands.log`:同一次 harness 的原始 PowerShell/本地命令与输出,包含远程 `Get-FileHash`、`Get-Process`、queue/state 文件 hash 和 local control-plane PID;含有的 CLIXML 是 SSH 原始输出,不作摘要替代。 - `capacity-metrics.txt`:Go capacity test 的 `t.Log` 原始输出,包含磁盘/WAL/page、busy timeout、连接、锁等待、积压和 P95/P99。 @@ -23,4 +23,4 @@ docs/validation/raw/verify-p4-live-operations.sh rg 'capacity_metrics=' docs/validation/raw/capacity-metrics.txt ``` -现场记录对应实现提交 `e8a8b2f` 的 control-plane/Tray 构建;Windows Tray 的远程部署 SHA 在同一次 harness 运行中核验。`EnableDataSync=false` 是项目安全边界要求的默认值;现场只对明确授权、白名单账号临时开启,验收后已恢复关闭。 +现场记录对应实现提交 `58a459b` 的 control-plane/Tray 构建;Windows Tray 的远程部署 SHA 在同一次 harness 运行中核验。Agent 安装并成功连接控制面即完成已验证账号的数据同步授权,无需单独确认;`EnableDataSync` 仅为旧 `service.json` 兼容字段。验收结束后 Tray 已停止,连接不再保持。 diff --git a/docs/validation/raw/collect-live-operations.sh b/docs/validation/raw/collect-live-operations.sh index e00a087..1b4b651 100755 --- a/docs/validation/raw/collect-live-operations.sh +++ b/docs/validation/raw/collect-live-operations.sh @@ -148,7 +148,7 @@ batch_rejected=$(curl -sS -o "$root/rejected" -w '%{http_code}' -X POST -H "Auth # so registration restores the verified account without a separate confirmation. revoked_process=$(start_tray) revoked_queue=$(queue_json) -sleep 12 +sleep 90 revoked_queue_after=$(queue_json) web_token=$(curl -fsS -X POST http://127.0.0.1:8090/v1/auth/login -H 'Content-Type: application/json' -d "{\"username\":\"admin\",\"password\":\"$WEB_PASSWORD\"}" | jq -r .access_token) reconnect_conv=$(curl -sS -o /dev/null -w '%{http_code}' -H "Authorization: Bearer $web_token" "http://127.0.0.1:8090/v1/data/accounts/$ACCOUNT_ID/conversations") diff --git a/docs/validation/raw/p4-live-commands.log b/docs/validation/raw/p4-live-commands.log index 0fdcfcc..dacc667 100644 --- a/docs/validation/raw/p4-live-commands.log +++ b/docs/validation/raw/p4-live-commands.log @@ -8,7 +8,7 @@ $dir="C:/Users/Rogee/wx-agent01"; Get-Process -Name WxAgent.Tray -ErrorAction Si (Get-FileHash "C:/Users/Rogee/wx-agent01/WxAgent.Tray.exe" -Algorithm SHA256).Hash --- RAW OUTPUT --- #< CLIXML -1A82C6CA21C395A427477122DF94445C334AFA5C0C1D0D46DE7E6DDB33B0F03D +1F82A427ADDA5B00A208018B0AF1A472C09AD28495CD84ECBB9AA98C5A92DBAF System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 2׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- $dir = "C:/Users/Rogee/wx-agent01" @@ -24,92 +24,26 @@ $p = Get-Process -Name WxAgent.Tray | Select-Object -First 1 [ordered]@{pid=$p.Id;session=$p.SessionId}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"pid":15272,"session":1} +{"pid":20312,"session":1} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-1100Completed0 1/13New-ScheduledTaskAction -Execute "$dir/WxAgent.Tray.exe" -WorkingDirectory $dir1388290517-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 4New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1)1037316879-1100Completed0 1/15New-ScheduledTaskPrincipal -UserId "DESKTOP-EGI7QCK\Rogee" -LogonType Interactive -RunLevel Highest1632621290-1100Completed0 1/16Register-ScheduledTask -TaskName $task -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null1327847536-1100Completed0 1/17Start-ScheduledTask -TaskName $task553280372-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- $q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"queue_bytes":188751,"queue_pending":1,"queue_sha256":"7CA3DFABE8454C6A9058CFD52B5ACAB2161E6934F458B45906B15FC20150185E","state_sha256":"A5738CD4150E796BC69FC5D6094F8685310C1969B58BEAD8C449A3C245A3449A"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_START_SERVER pid=1730915 sha256=e983e06bb0b5c914fc36c3308f4493210c375ff11445dc7e5a5c47a341a430c8 +{"queue_bytes":13884423,"queue_pending":27,"queue_sha256":"10D0F3D2A81C94A435B6B648B881F4F2E34CE158F1FCC46CEF5CC28E2D78602C","state_sha256":""} +System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_START_SERVER pid=2988233 sha256=bcb6d8c7d29dd968cb2011fae5e2aec9de340329ee957a399ae6052adf342473 --- POWERSHELL COMMAND --- $q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"queue_bytes":159436,"queue_pending":1,"queue_sha256":"7C484BEF746DD46CCA9254FBB17D2F8A4A4344A1FD8FDB613DF7ABAD8DB1D644","state_sha256":"19F0751FBE6FD269EBF4F4B4C9ED3BB41A91A88051373AD49757D6F8618BE000"} +{"queue_bytes":2599493,"queue_pending":4,"queue_sha256":"18E25F17E91DFF39C21369B3754E5CB60F0F4D2B6F55A84BB4979CF02B81ADDA","state_sha256":""} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- $q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"queue_bytes":159436,"queue_pending":1,"queue_sha256":"7C484BEF746DD46CCA9254FBB17D2F8A4A4344A1FD8FDB613DF7ABAD8DB1D644","state_sha256":"19F0751FBE6FD269EBF4F4B4C9ED3BB41A91A88051373AD49757D6F8618BE000"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":159436,"queue_pending":1,"queue_sha256":"7C484BEF746DD46CCA9254FBB17D2F8A4A4344A1FD8FDB613DF7ABAD8DB1D644","state_sha256":"19F0751FBE6FD269EBF4F4B4C9ED3BB41A91A88051373AD49757D6F8618BE000"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":159436,"queue_pending":1,"queue_sha256":"7C484BEF746DD46CCA9254FBB17D2F8A4A4344A1FD8FDB613DF7ABAD8DB1D644","state_sha256":"19F0751FBE6FD269EBF4F4B4C9ED3BB41A91A88051373AD49757D6F8618BE000"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":97644,"queue_pending":1,"queue_sha256":"0701BB4DC92B81C298F5C8D7A4003F3ECD9C1AD48012471E1A21442317D8C1D1","state_sha256":"93EB9A85C44A1130ECE728E679E235D0E003D17A35204AA6D52CDBA84E5088CA"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":97644,"queue_pending":1,"queue_sha256":"0701BB4DC92B81C298F5C8D7A4003F3ECD9C1AD48012471E1A21442317D8C1D1","state_sha256":"93EB9A85C44A1130ECE728E679E235D0E003D17A35204AA6D52CDBA84E5088CA"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":97644,"queue_pending":1,"queue_sha256":"0701BB4DC92B81C298F5C8D7A4003F3ECD9C1AD48012471E1A21442317D8C1D1","state_sha256":"93EB9A85C44A1130ECE728E679E235D0E003D17A35204AA6D52CDBA84E5088CA"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":97644,"queue_pending":1,"queue_sha256":"0701BB4DC92B81C298F5C8D7A4003F3ECD9C1AD48012471E1A21442317D8C1D1","state_sha256":"93EB9A85C44A1130ECE728E679E235D0E003D17A35204AA6D52CDBA84E5088CA"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":31745,"queue_pending":1,"queue_sha256":"9F6E1994CE40763BE442F2066021B5BF82374D9029E4CEF5E28B03CA4B1D631F","state_sha256":"82B12215ED522DFB1F2026CA78FC6A8CFE95563CF72392FB9D77C0FFE7527C26"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":31745,"queue_pending":1,"queue_sha256":"9F6E1994CE40763BE442F2066021B5BF82374D9029E4CEF5E28B03CA4B1D631F","state_sha256":"82B12215ED522DFB1F2026CA78FC6A8CFE95563CF72392FB9D77C0FFE7527C26"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":31745,"queue_pending":1,"queue_sha256":"9F6E1994CE40763BE442F2066021B5BF82374D9029E4CEF5E28B03CA4B1D631F","state_sha256":"82B12215ED522DFB1F2026CA78FC6A8CFE95563CF72392FB9D77C0FFE7527C26"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":31745,"queue_pending":1,"queue_sha256":"9F6E1994CE40763BE442F2066021B5BF82374D9029E4CEF5E28B03CA4B1D631F","state_sha256":"82B12215ED522DFB1F2026CA78FC6A8CFE95563CF72392FB9D77C0FFE7527C26"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"E8EBDCA1FDF237C5F3B0171F68A675EB9AB75883AD6DEFD5E29DE957DCEDCFDA"} +{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"FC715E57A2423FF04B8B6A127C1421D2D6AE0EE3756CC2769DC44BF7BC9A19A5"} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- Get-Process -Name WxAgent.Tray -ErrorAction SilentlyContinue | Stop-Process -Force; Start-Sleep -Seconds 15 @@ -130,13 +64,13 @@ $p = Get-Process -Name WxAgent.Tray | Select-Object -First 1 [ordered]@{pid=$p.Id;session=$p.SessionId}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"pid":22400,"session":1} +{"pid":5768,"session":1} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-10Processing-1 0/2+2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-1100Completed0 2/23New-ScheduledTaskAction -Execute "$dir/WxAgent.Tray.exe" -WorkingDirectory $dir873048984-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 4New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1)1448532725-1100Completed0 1/15New-ScheduledTaskPrincipal -UserId "DESKTOP-EGI7QCK\Rogee" -LogonType Interactive -RunLevel Highest1897014162-1100Completed0 1/16Register-ScheduledTask -TaskName $task -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null1685929126-1100Completed0 1/17Start-ScheduledTask -TaskName $task1611635638-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- Get-Process -Name WxAgent.Tray -ErrorAction SilentlyContinue | Stop-Process -Force; Start-Sleep -Seconds 15 --- RAW OUTPUT --- #< CLIXML -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_STOP_SERVER pid=1730915 +System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_STOP_SERVER pid=2988233 --- POWERSHELL COMMAND --- Remove-Item "C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json","C:/Users/Rogee/wx-agent01/data/remote-data-queue.json" -Force -ErrorAction SilentlyContinue @@ -157,19 +91,19 @@ $p = Get-Process -Name WxAgent.Tray | Select-Object -First 1 [ordered]@{pid=$p.Id;session=$p.SessionId}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"pid":9960,"session":1} +{"pid":1188,"session":1} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-10Processing-1 0/2+2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-1100Completed0 2/23New-ScheduledTaskAction -Execute "$dir/WxAgent.Tray.exe" -WorkingDirectory $dir873048984-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 4New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1)1448532725-1100Completed0 1/15New-ScheduledTaskPrincipal -UserId "DESKTOP-EGI7QCK\Rogee" -LogonType Interactive -RunLevel Highest1897014162-1100Completed0 1/16Register-ScheduledTask -TaskName $task -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null1685929126-1100Completed0 1/17Start-ScheduledTask -TaskName $task1611635638-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- $q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"queue_bytes":188751,"queue_pending":1,"queue_sha256":"F7578C1A0652F6EE376C4753AFBDD20E852265C96F18ED109CC7353015573CB4","state_sha256":"4740CCD03E5D54971D916F2A91E4A474A2A0237E763D5A7637AB87FE01723E53"} +{"queue_bytes":6137665,"queue_pending":12,"queue_sha256":"5834BE4C08D2DD90D580BF2347E7A50EC04DF629108AA86B8395F19B656700E0","state_sha256":""} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- Get-Process -Name WxAgent.Tray -ErrorAction SilentlyContinue | Stop-Process -Force; Start-Sleep -Seconds 15 --- RAW OUTPUT --- #< CLIXML -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_START_SERVER pid=1744889 sha256=e983e06bb0b5c914fc36c3308f4493210c375ff11445dc7e5a5c47a341a430c8 +System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_START_SERVER pid=2998413 sha256=bcb6d8c7d29dd968cb2011fae5e2aec9de340329ee957a399ae6052adf342473 --- POWERSHELL COMMAND --- $dir = "C:/Users/Rogee/wx-agent01" @@ -185,48 +119,27 @@ $p = Get-Process -Name WxAgent.Tray | Select-Object -First 1 [ordered]@{pid=$p.Id;session=$p.SessionId}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"pid":6504,"session":1} +{"pid":3684,"session":1} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-10Processing-1 0/2+2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-1100Completed0 2/23New-ScheduledTaskAction -Execute "$dir/WxAgent.Tray.exe" -WorkingDirectory $dir873048984-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 4New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1)1448532725-1100Completed0 1/15New-ScheduledTaskPrincipal -UserId "DESKTOP-EGI7QCK\Rogee" -LogonType Interactive -RunLevel Highest1897014162-1100Completed0 1/16Register-ScheduledTask -TaskName $task -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null1685929126-1100Completed0 1/17Start-ScheduledTask -TaskName $task1611635638-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- $q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"4D6E2B2AE1014CA4DBA03ADFFE5159BB6B129E41C084A13B66392BDEA303876D"} +{"queue_bytes":5679963,"queue_pending":11,"queue_sha256":"5DDA8091F4CE677E6E8811CC0D08311533EE3FE79C192BC20D94B25EACDA74F3","state_sha256":"FC715E57A2423FF04B8B6A127C1421D2D6AE0EE3756CC2769DC44BF7BC9A19A5"} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- $q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"4D6E2B2AE1014CA4DBA03ADFFE5159BB6B129E41C084A13B66392BDEA303876D"} +{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"A82FFDDF3685A6160923D2D590C01759E7680183A900CCC1841FCD708729E3C1"} System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 --- POWERSHELL COMMAND --- -Get-Process -Name WxAgent.Tray -ErrorAction SilentlyContinue | Stop-Process -Force; Start-Sleep -Seconds 15 ---- RAW OUTPUT --- -#< CLIXML -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- -$dir = "C:/Users/Rogee/wx-agent01" -$task = "WxAgent-P4-Audit-Tray" -Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null -$action = New-ScheduledTaskAction -Execute "$dir/WxAgent.Tray.exe" -WorkingDirectory $dir -$trigger = New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1) -$principal = New-ScheduledTaskPrincipal -UserId "DESKTOP-EGI7QCK\Rogee" -LogonType Interactive -RunLevel Highest -Register-ScheduledTask -TaskName $task -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null -Start-ScheduledTask -TaskName $task -Start-Sleep -Seconds 35 -$p = Get-Process -Name WxAgent.Tray | Select-Object -First 1 -[ordered]@{pid=$p.Id;session=$p.SessionId}|ConvertTo-Json -Compress ---- RAW OUTPUT --- -#< CLIXML -{"pid":18996,"session":1} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-10Processing-1 0/2+2Unregister-ScheduledTask -TaskName $task -Confirm:$false -ErrorAction SilentlyContinue | Out-Null1160743012-1100Completed0 2/23New-ScheduledTaskAction -Execute "$dir/WxAgent.Tray.exe" -WorkingDirectory $dir873048984-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 4New-ScheduledTaskTrigger -Once -At (Get-Date).AddMinutes(1)1448532725-1100Completed0 1/15New-ScheduledTaskPrincipal -UserId "DESKTOP-EGI7QCK\Rogee" -LogonType Interactive -RunLevel Highest1897014162-1100Completed0 1/16Register-ScheduledTask -TaskName $task -Action $action -Trigger $trigger -Principal $principal -Force | Out-Null1685929126-1100Completed0 1/17Start-ScheduledTask -TaskName $task1611635638-1100Completed0 1/11׼״ʹģ顣0-1-1Completed-1 ---- POWERSHELL COMMAND --- $q="C:/Users/Rogee/wx-agent01/data/remote-data-queue.json"; $pending=0; $bytes=0; if(Test-Path $q){$bytes=(Get-Item $q).Length; try{$pending=@((Get-Content -Raw $q|ConvertFrom-Json).items).Count}catch{}}; $queueSha=if(Test-Path $q){(Get-FileHash $q -Algorithm SHA256).Hash}else{""}; $state="C:/Users/Rogee/wx-agent01/data/remote-data-sync-state.json"; $stateSha=if(Test-Path $state){(Get-FileHash $state -Algorithm SHA256).Hash}else{""}; [ordered]@{queue_bytes=$bytes;queue_pending=$pending;queue_sha256=$queueSha;state_sha256=$stateSha}|ConvertTo-Json -Compress --- RAW OUTPUT --- #< CLIXML -{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"4D6E2B2AE1014CA4DBA03ADFFE5159BB6B129E41C084A13B66392BDEA303876D"} -System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_STOP_SERVER pid=1744889 -LOCAL_START_SERVER pid=1753609 sha256=e983e06bb0b5c914fc36c3308f4493210c375ff11445dc7e5a5c47a341a430c8 +{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"A82FFDDF3685A6160923D2D590C01759E7680183A900CCC1841FCD708729E3C1"} +System.Management.Automation.PSCustomObjectSystem.Object1׼״ʹģ顣0-1-1Completed-1 1׼״ʹģ顣0-1-1Completed-1 LOCAL_STOP_SERVER pid=2998413 +LOCAL_START_SERVER pid=3008874 sha256=bcb6d8c7d29dd968cb2011fae5e2aec9de340329ee957a399ae6052adf342473 --- POWERSHELL COMMAND --- $dir = "C:/Users/Rogee/wx-agent01" diff --git a/docs/validation/raw/p4-live-operations.jsonl b/docs/validation/raw/p4-live-operations.jsonl index 98dd9df..7023d25 100644 --- a/docs/validation/raw/p4-live-operations.jsonl +++ b/docs/validation/raw/p4-live-operations.jsonl @@ -1,7 +1,7 @@ -{"event":"deployment","source_commit":"e8a8b2f926b3b21947e6e9c0c78697645ff0378d","tray_sha256":"1A82C6CA21C395A427477122DF94445C334AFA5C0C1D0D46DE7E6DDB33B0F03D"} -{"event":"offline-queue","process":{"pid":15272,"session":1},"queue":{"queue_bytes":188751,"queue_pending":1,"queue_sha256":"7CA3DFABE8454C6A9058CFD52B5ACAB2161E6934F458B45906B15FC20150185E","state_sha256":"A5738CD4150E796BC69FC5D6094F8685310C1969B58BEAD8C449A3C245A3449A"}} -{"event":"replay","queue":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"E8EBDCA1FDF237C5F3B0171F68A675EB9AB75883AD6DEFD5E29DE957DCEDCFDA"},"sync":{"state":"complete","confirmed_sequence":4,"last_success_at":"2026-09-22T05:06:02.471468729Z"},"shard":{"messages": 460, "conversations": 2, "batches": 4, "coverage": "complete", "integrity": "ok", "sources": ["session/session.db/SessionTable"], "title_equals_chat_id": 0}} -{"event":"agent-restart","process":{"pid":22400,"session":1},"before":{"state":"complete","confirmed_sequence":4,"last_success_at":"2026-09-22T05:06:02.471468729Z"},"after":{"state":"complete","confirmed_sequence":4,"last_success_at":"2026-09-22T05:06:02.471468729Z"}} -{"event":"authorization-revoke","pending_process":{"pid":9960,"session":1},"pending_queue":{"queue_bytes":188751,"queue_pending":1,"queue_sha256":"F7578C1A0652F6EE376C4753AFBDD20E852265C96F18ED109CC7353015573CB4","state_sha256":"4740CCD03E5D54971D916F2A91E4A474A2A0237E763D5A7637AB87FE01723E53"},"revoke":200,"conversations":403,"messages":403,"sync_status":200,"batch_rejected":403,"revoked_process":{"pid":6504,"session":1},"revoked_queue":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"4D6E2B2AE1014CA4DBA03ADFFE5159BB6B129E41C084A13B66392BDEA303876D"},"revoked_queue_after":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"4D6E2B2AE1014CA4DBA03ADFFE5159BB6B129E41C084A13B66392BDEA303876D"}} -{"event":"authorization-restore","process":{"pid":18996,"session":1},"conversations":200,"messages":200,"queue":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"4D6E2B2AE1014CA4DBA03ADFFE5159BB6B129E41C084A13B66392BDEA303876D"}} -{"event":"control-plane-restart","old_pid":1744889,"new_pid":1753609,"before":{"messages": 460, "conversations": 2, "batches": 4, "coverage": "complete", "integrity": "ok", "sources": ["session/session.db/SessionTable"], "title_equals_chat_id": 0},"after":{"messages": 460, "conversations": 2, "batches": 4, "coverage": "complete", "integrity": "ok", "sources": ["session/session.db/SessionTable"], "title_equals_chat_id": 0}} +{"event":"deployment","source_commit":"58a459bb15a736f245f6f2ccf1e9fcc8a6375568","tray_sha256":"1F82A427ADDA5B00A208018B0AF1A472C09AD28495CD84ECBB9AA98C5A92DBAF"} +{"event":"offline-queue","process":{"pid":20312,"session":1},"queue":{"queue_bytes":13884423,"queue_pending":27,"queue_sha256":"10D0F3D2A81C94A435B6B648B881F4F2E34CE158F1FCC46CEF5CC28E2D78602C","state_sha256":""}} +{"event":"replay","queue":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"FC715E57A2423FF04B8B6A127C1421D2D6AE0EE3756CC2769DC44BF7BC9A19A5"},"sync":{"state":"complete","confirmed_sequence":25,"last_success_at":"2026-09-22T09:39:47.169668469Z"},"shard":{"messages": 1725, "conversations": 451, "batches": 25, "coverage": "complete", "integrity": "ok", "sources": ["session/session.db/SessionTable"], "title_equals_chat_id": 0}} +{"event":"agent-restart","process":{"pid":5768,"session":1},"before":{"state":"complete","confirmed_sequence":25,"last_success_at":"2026-09-22T09:39:47.169668469Z"},"after":{"state":"complete","confirmed_sequence":25,"last_success_at":"2026-09-22T09:39:47.169668469Z"}} +{"event":"authorization-revoke","pending_process":{"pid":1188,"session":1},"pending_queue":{"queue_bytes":6137665,"queue_pending":12,"queue_sha256":"5834BE4C08D2DD90D580BF2347E7A50EC04DF629108AA86B8395F19B656700E0","state_sha256":""},"revoke":200,"conversations":403,"messages":403,"sync_status":200,"batch_rejected":403,"revoked_process":{"pid":3684,"session":1},"revoked_queue":{"queue_bytes":5679963,"queue_pending":11,"queue_sha256":"5DDA8091F4CE677E6E8811CC0D08311533EE3FE79C192BC20D94B25EACDA74F3","state_sha256":"FC715E57A2423FF04B8B6A127C1421D2D6AE0EE3756CC2769DC44BF7BC9A19A5"},"revoked_queue_after":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"A82FFDDF3685A6160923D2D590C01759E7680183A900CCC1841FCD708729E3C1"},"reconnect_conversations":200,"reconnect_messages":200,"reconnect_sync_status":200,"reconnect_queue":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"A82FFDDF3685A6160923D2D590C01759E7680183A900CCC1841FCD708729E3C1"}} +{"event":"authorization-restore","process":{"pid":3684,"session":1},"conversations":200,"messages":200,"queue":{"queue_bytes":15,"queue_pending":0,"queue_sha256":"AC4BCD92C2361F721A463C97BD5B98EDD6486ACE00ABCD140E01617B7DAD2596","state_sha256":"A82FFDDF3685A6160923D2D590C01759E7680183A900CCC1841FCD708729E3C1"}} +{"event":"control-plane-restart","old_pid":2998413,"new_pid":3008874,"before":{"messages": 9629, "conversations": 451, "batches": 89, "coverage": "complete", "integrity": "ok", "sources": ["session/session.db/SessionTable"], "title_equals_chat_id": 0},"after":{"messages": 9629, "conversations": 451, "batches": 89, "coverage": "complete", "integrity": "ok", "sources": ["session/session.db/SessionTable"], "title_equals_chat_id": 0}} diff --git a/node-agent/WxAgent.Service/RemoteAgentHostedService.cs b/node-agent/WxAgent.Service/RemoteAgentHostedService.cs index 922fb94..4f8f60d 100644 --- a/node-agent/WxAgent.Service/RemoteAgentHostedService.cs +++ b/node-agent/WxAgent.Service/RemoteAgentHostedService.cs @@ -173,6 +173,8 @@ public sealed class RemoteAgentHostedService( ISet blockedAccountIds, CancellationToken cancellationToken) { + if (!remote.IsConfigured) + return; foreach (var account in reporting.Accounts.Where(item => item.Enabled)) { cancellationToken.ThrowIfCancellationRequested();