Skip to content

feat(coordination): add remote authority inspection in CLI and App - #9527

Open
Jim-jimu wants to merge 2 commits into
loopx-project:mainfrom
Jim-jimu:feat/remote-authority-inspect
Open

Jim-jimu wants to merge 2 commits into
loopx-project:mainfrom
Jim-jimu:feat/remote-authority-inspect

Conversation

@Jim-jimu

@Jim-jimu Jim-jimu commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Goal And Delivered Outcome

Installed Core includes the remote task client, but operators have no installed command or App action to inspect an existing remote binding. The scheduler's private probe reduces different failures to remote_authority_read_unverified.

This adds loopx remote-authority inspect --goal-id <goal-id> --agent-id <agent-id> [--format json]. It reads the selected registered Goal's configured probe Todo once and reports fixed, safe diagnostics for configuration, local runtime, connectivity, TLS, HTTP, protocol, authentication and scope failures. A verified read exits 0; every unverified result exits 1. Every result explicitly carries execution_admitted: false.

The App exposes the same check in Settings → One Goal → Capability Center → Remote task connection. Opening settings sends no remote request. An explicit click reads the selected Goal's existing bound actor; fixed diagnostics, retry and Goal-scoped result readback complete the journey. The local POST route accepts only goal_id and retains the Chat server's origin guard. Credentials, endpoints and binding values never enter the browser.

Author Declaration

  • Written by: Jim-jimu.

Implemented against

  • Specification and revision: the existing remote_authority_contract.ts, remote_authority_http.ts and opt-in gateway at the base above. There is no separate written specification for the operator command; the request described in this PR is its basis.
Criterion Disposition Implementation Evidence
Installed, explicit read-only entrypoint implemented cli_runtime.py, cli_commands/remote_authority.py Source CLI and clean standalone Core wheel tests
Discoverable App action and result readback implemented Existing Goal settings, Chat route, same inspection owner Packaged success, scope rejection/recovery, network retry, stale-result fencing and narrow-screen settings access
Selected registered Goal and actor only implemented Existing registry/gateway IO; TypeScript inspection owner Invalid local inputs make no HTTPS request
Fixed diagnostics without private values implemented remote_authority_inspection.ts TLS/HTTP/protocol/auth/scope cases and output checks
Preserve command uncertainty and recovery implemented observeRemoteAuthorityCall separates local observations from the wire response Original client tests plus ambiguous-write/recovery parity
No task execution or automatic retry implemented One bounded read; unchanged scheduler gateway Request counts, unchanged local bytes, default-off File/SQLite parity
  • Self-check: reviewed the complete diff, existing protocol decoders, client boundaries, installation ownership and related public PRs. Transport categories and inspection diagnostics remain local to the coordination owner; no shared kernel state or authority vocabulary is replaced.

Scope And Continuation

Complete within this operator-inspection scope. The command consumes an existing binding and environment credential; it does not register/configure Goals, install the service, introduce remote writes, change execution admission or promote a provider. Python reuses the existing gateway for registry/process IO; TypeScript owns validation and interpretation. The legacy probe's verified/unavailable output remains compatible.

The installed client check is an independently testable prerequisite for broader remote onboarding. The focused App inspection journey is included. Physical cross-host operation, service deployment, production capacity and binding-creation/onboarding remain follow-up work under the existing shared-authority direction; this PR does not claim those outcomes.

Validation

  • Tested revision: a8fa269327dc45317071759ce02277929e495477 (including the packaged App inspection journey).
  • Run state: local qualification finished. Automated code review of a8fa269 completed with no new findings. Hosted CI is not green; current holds and queued work are listed below.
  • Input classes: synthetic, public_fixture.
Check kind Result Public-safe evidence / limitation
regression_parity passed The CLI regression fails on base 2302e42 because the command is absent; the same test passes on this change. Legacy gateway File/SQLite behavior and private probe output remain covered.
unit / integration passed npm run test:remote-authority: 9 tests, including real local HTTPS, v0/scoped v1 responses, missing Todo, authentication/scope rejection, HTTP 401/403/503, untrusted TLS, timeout, oversized/truncated/invalid responses, correlation rejection and uncertain-write/recovery parity.
integration passed 42 tests across test_chat_remote_authority_inspection.py, test_chat_goal_configuration_api.py, control_plane/test_chat_goal_configuration_api_contract.py, control_plane/test_remote_authority_inspection.py and control_plane/test_remote_authority_gateway.py. Includes real Chat HTTP → typed inspection → synthetic HTTPS, origin/override refusal, selected bound actor, disabled bindings, safe errors, recovery and byte-for-byte local state parity.
real_entrypoint passed Rebuilt and installed a clean standalone Core wheel from this revision; 5 selected cases passed in tests/test_core_distribution.py (staging, installed identity/help, generated commands and real HTTPS inspection). Invocations run outside the checkout without an editable install.
regression_parity passed The original CLI entrypoint sweep at a2ec5ac passed 348 cases; this follow-up requalified the changed gateway, App API and installed CLI paths above.
packaged_frontend passed npm run build:chat, npm run smoke:remote-authority-inspection and npm run smoke:settings-target. Exercises actual built assets and the real inspection backend; unrelated workspace data uses synthetic browser fixtures. The new smoke is registered in packaged-browser CI shard 2 and passed there on this head.
static passed TypeScript project typecheck; CI-selected Ruff paths plus changed CLI files; strict focused mypy on the App API and gateway using --follow-imports=silent; semantic diff advisory, semantic vocabulary check, RFC-pair check and diff hygiene.
static failed Configured python -m mypy reports 3,997 errors in 404 files on both pristine base and this change. Fresh --no-incremental base/head runs also have identical normalized error multisets: no added or removed local errors. This is disclosed baseline debt, not a passing full-tree typecheck.
integration / static passed Standard loopx canary premerge --from-git-diff --git-diff-base origin/main: 6 direct checks and 19 selected checks passed, including the public-boundary scan; no manual holds.
real_backend not_run HTTPS peers are disposable local synthetic services. No live Cloud/PostgreSQL deployment, physical second host or production capacity qualification.
  • Coverage and gaps: built App assets and the real inspection HTTP/TypeScript owner are qualified against disposable local HTTPS peers. Unrelated workspace data is mocked. This is not a full installed UI-distribution or Windows qualification. Full-tree mypy still has exactly the verified baseline failure multiset. No live Cloud/PostgreSQL or production capacity claim.

  • Hosted CI for a8fa269:

    • Passed: the new remote inspection smoke and packaged-browser shards 2/3; all three Dashboard interaction shards; all three TypeScript shards and coverage; presentation qualification; installed/mixed-writer/recovery stage2c qualification; minimum-Node compatibility; macOS/Windows desktop builds; static checks; DCO, dependency review and site build.
    • Kernel contracts: the broad mypy gate still fails (3,992 errors in 402 files in the hosted run; 3,997/404 in matched fresh local base/head runs). This remains a failing gate, not a passing full-tree typecheck.
    • Core package smoke: the unchanged test_standard_installation_distinguishes_doctor_fingerprint_and_commands still expects success after injecting an unowned module. The same failure occurred before this follow-up and is tracked by #9522.
    • Packaged-browser shard 1: research-record-search times out waiting for the comparison download after its injected failure. Reproduced at the identical scenario/line on this head and pristine base 2302e42 using the original frozen packaged UI. Its research implementation and scenario are unchanged by this PR.
    • Windows PowerShell: an unchanged quota-settlement command-rendering test timed out starting PowerShell after 30 seconds. A single-job rerun was requested, but GitHub refused because the workflow is still running. Retry remains outstanding; no timeout or assertion was weakened.
    • Six full Python shards are waiting in repository-wide concurrency queues. Their outcomes and the Windows retry are not yet qualified.

See validation disclosure guidance.

Frontend / Visual Evidence

  • Journey: select an editable local Goal in existing settings, explicitly check the bound remote task, read a verified/unverified result, correct service access and retry. The entrypoint stays unavailable for foreign/read-only Goals through the existing settings target guard.
  • First viewport: Goal identity and one check action lead; fixed result/remediation follows, diagnostic reason details are collapsed, and the existing capability editor remains reachable.
  • Preview: actual packaged Chat bundle served by the real local Chat handler. The inspection route is not mocked; workspace status/configuration fixtures and the HTTPS peer are synthetic.
  • States checked: no request on discovery, busy/disabled control, verified read, scope denial, recovery, network failure/retry, Goal switch during an in-flight response, and unchanged local authority files.
  • Visual inspection: desktop 1440×1000 and narrow 390×844; the narrow editor remains scrollable and interactive after the inspection result expands.
  • Before capture: CI artifact chat-bundle-351d4063462031c236ca2bc1efb645310f2efcf2 from the original PR merge tree (the CLI-only UI). After capture: source tree a8fa269, built with npm run build:chat.
  • Evidence files: before-desktop.png, before-narrow.png, success-desktop.png, denied-desktop.png, denied-narrow.png, settings-narrow.png. All contain synthetic data. The durable smoke recreates the after views. Download the actual CI screenshots from merge tree 9d19197c87f4f4f83c13c3c3828cf472ca5cfce0 (retained until 2026-12-04).
  • Attachment limitation: local before/after captures have been inspected, but inline upload to this description is blocked by the browser extension's file-upload permission. No screenshot pack has been committed just to embed it. Inline visual evidence remains outstanding; the CI screenshot artifact linked above is available and the packaged test passed.
  • Review disposition: the missing frontend finding in the original thread and review is addressed by this follow-up. The new automated review completed with no findings for a8fa269. The independent exact-head re-review confirmed the original App journey is fixed and verified the packaged read, denial and retry flow. Its remaining REQUEST_CHANGES item is the missing inline screenshots; the upload permission limitation is documented above.

Type of Change

  • New feature
  • Documentation update
  • Test update
  • Bug fix
  • Breaking change
  • Refactoring (no functional changes)

LoopX Area

  • Control plane (goals, todos, quota, scheduler, registry, runtime)
  • Benchmark boundary (adapters, runners, verifiers, scoring, evidence)
  • Capability or extension (providers, adapters, skills)
  • Public docs or presentation surface (README, protocols, dashboard)
  • Build, packaging, installer, or CI
  • Host or runtime integration

Technical Direction

Shared Goal Authority and cross-host coordination: installed CLI and App inspection of existing bindings, preserving the Core/client and Cloud/server boundary established by #9223.

Shared-authority RFC fixture impact

  • Production-scale fixture schema: unchanged; no promotion qualification claimed.
  • Semantic dimensions: new operator diagnostics; existing read/write/recovery wire packets, scheduler routing, authority state and admission remain unchanged.
  • Provider conformance arms: existing File/SQLite default-off gateway regression; synthetic HTTPS client fixtures. No new server-side provider implementation.
  • Legacy/file/PostgreSQL three-arm rehearsal: N/A for this client-only inspection slice; no provider promotion, runtime-routing or compatibility-projection change.

Boundary Checklist

  • No private state, credentials, raw traces, internal links or local machine paths in the diff or public description.
  • No duplication of maintainer-owned benchmark work.
  • Scoped to the operator-inspection request.
  • No paired RFC changed; bilingual diff check passed.
  • Shipped App journey and packaged failure/recovery test included.
  • Inline screenshot attachments (upload permission limitation documented above).
  • Every commit includes a DCO Signed-off-by trailer.

Signed-off-by: Jim-jimu <49069997+bmh201708@users.noreply.github.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T17:20:07.374699Z a8fa269 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a2ec5ac3c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread loopx/cli_commands/remote_authority.py Resolved

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

动机 / Motivation

已配置远端绑定的 Goal 负责人需要检查当前 Agent 能否读到指定 Todo。旧版缺少公开的检查命令,周期守卫只返回笼统的读取失败。同一个 Goal 先完成一次读取,再由服务端拒绝作用域。维护者需要辨别远端拒绝和网络问题。候选的已安装 Core 能从 CLI 发起一次读取,分别显示成功、作用域拒绝、HTTP 异常和协议异常。范围是检查既有绑定及回读诊断,服务部署、绑定迁移和执行准入仍由原有流程负责。

改动思路 / Approach

注册表提供已选 Goal 与 Agent 的绑定。Python 负责进程和注册表 IO,TypeScript 验证请求并解释响应。HTTP adapter 保留既有 wire 结果,诊断只消费独立的传输观察。 单改已有私有探针会把交互诊断混进周期守卫。显式检查让人按需操作,同时保留统一的 HTTPS client。用既有 Goal 绑定与 wire decoder 提供单次诊断,沿原有 App Goal 页面补齐操作入口。

具体改动 / Changes

精确提交 a2ec5ac3c43b8082db95656f382aafe12a6f7284,对照 2302e42d9cad35a8a4150e24496ffecfbfdce8cb。15 个文件增加 713 行、删除 37 行。两个 CLI 派发入口、帮助和文档提供给操作者。私有 bridge 增加检查分支,现有探针继续使用原有输出。Python、TypeScript 和安装测试覆盖从入口到回读的各层。remote-authority 参考

关键代码讲解

  • handle_remote_authority_command。把选定 Goal 与 Agent 交给检查入口,输出 JSON 或文字和退出状态。 源码
  • inspect_remote_authority。选定注册表条目,仅经 stdin 给私有 Node bridge 传所需绑定。 源码
  • inspectRemoteAuthority。检查启用、注册 actor 和绑定,再发一次只读请求并产生固定 reason code。 源码
  • observeRemoteAuthorityCall。保留相关联的 wire response,同时给诊断提供本地 HTTPS 故障类别。 源码

scoped-read 已实现。原远端 wire decoder 继续校验响应关联性,诊断输出是新增的本地状态集合。shipped-frontend-journey 尚缺,现有 Goal App 配置 API 和能力编辑器均无调用。 共享 Goal RFC · 前端交付规范

对主干的风险 / Risks

同一隔离 HTTPS 服务上,base 的公开命令退出 2。旧私有探针在 base/head 的四种输入上返回相同 JSON。候选 Core 的四次检查均只发一个 read,本地文件逐字节不变。无绑定的第二 Goal 返回 disabled 且发出零请求。作用域拒绝、HTTP 401 和无效响应分别退出 1 并输出固定 reason code。CLI 保留 TLS 验证,输出省略绑定、Todo 内容和凭据。19 项 Python 聚焦回归和 9 项 TypeScript 测试通过,基线共有 4 项 Python 与 7 项 TypeScript 对照通过。Core 构建、安装、帮助和命令发现共 4 项通过。 源码入口扩展组 367 项通过,包含前述 19 项。TypeScript typecheck、聚焦 strict mypy、Ruff 和 git diff --check 通过。 实测只使用本机的合成 HTTPS 服务。线上 Cloud、异机、Windows 和托管 CI 未验证。

语义与 CI 对齐

[P2] 已配置远端绑定的 App 缺少检查路径。 CLI 与 Core wheel 能执行检查,但是 App 的配置路由与现有 Goal 能力页均没有调用或呈现其结果。 现有交付规范要求在前端完成发现、授权操作、错误反馈及读回。后续的全量 App onboarding 与这个已配置 Goal 的单次操作是两个不同的验收项。在现有 Goal 页面接入一次显式的只读检查,复用同一检查服务和固定诊断。用打包 App 的成功、失败和重试读回完成验收。 配置路由 · Goal 能力页 · 已有同头讨论

我的整体评价 / Verdict

REQUEST_CHANGES。 CLI 的真实安装及旧探针兼容已经验证。已有绑定的 App 用户仍缺少可发现的检查入口、授权触发、失败反馈和结果回读。 现有执行、租约与调度语义保持,使用者在 App 上仍无法完成这次诊断。复评以同一检查 owner 的打包操作、失败和恢复为准。

English verdict: REQUEST_CHANGES at a2ec5ac. Installed Core verifies the scoped read and leaves the existing probe behavior intact. The required shipped App journey for an already configured Goal is missing.

Signed-off-by: Jim-jimu <49069997+bmh201708@users.noreply.github.com>
@Jim-jimu
Jim-jimu requested a review from maxliux5 as a code owner November 27, 2026 17:07
@Jim-jimu Jim-jimu changed the title feat(cli): add read-only remote authority inspection feat(coordination): add remote authority inspection in CLI and App Nov 27, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

[P2] 设置页改动缺少正文首屏证据。 当前 PR 正文缺少内嵌首屏,读者无法在 PR 核对新入口和失败状态的真实布局。 请把实际首屏的公开安全截图直接内嵌到 PR 正文,标明精确提交、打包构建和合成数据范围,并带上桌面与窄屏对照。 首屏证据要求

动机 / Motivation

在 Core 或 App 维护已配置远程 Goal 的用户需要区分连接可读、权限被拒和重试结果。 上一轮只有 CLI 路径,App 的 Goal 设置无法完成连接检查。 Capability Center 已能手动检查当前 Goal,展示读验证、拒绝、诊断和重试。Core 与 App 复用现有远程权威读取所有者。 本项交付范围为已配置远程连接的只读检查和回显。

改动思路 / Approach

CLI 与 App 的同 Goal API 复用 typed inspection 和原远端只读路由。App 通过请求序号隔离切换 Goal 后的迟到响应。 本项交付范围为已配置远程连接的只读检查和回显。 服务仍判定同 Goal 的只读范围,返回成功不准入执行,也不写本地 Goal 或 Todo。

具体改动 / Changes

审查精确提交 a8fa269327dc45317071759ce02277929e495477,GitHub 比较基线 2302e42d9cad35a8a4150e24496ffecfbfdce8cb。26 个文件增加 1147 行、删除 40 行,覆盖只读检查、Core CLI、App、文档和隔离验收。 app-connection-journey App 入口可发现,能读回成功与失败并重试,已验证。first-viewport-inline PR 正文内嵌已构建界面的首屏图,待补齐。 验收依据

关键代码讲解

  • GoalRemoteAuthorityInspection。显式按钮触发检查,返回状态和可展开诊断。 源码
  • inspect_remote_authority。解析原绑定与 Agent 后,调用共享远端所有者。 源码
  • inspectRemoteAuthority。返回同一类型的诊断和执行边界。 源码

对主干的风险 / Risks

从实际打包 App 打开已填充的 Capability Center,确认原编辑器旁出现连接检查。合成 HTTPS 连续返回可读、拒绝和恢复,页面给出对应状态和重试按钮。浏览器共发出四次只读检查,注册与运行根保持原样。实装 Core 独立测试覆盖成功、权限拒绝、HTTP 错误与响应不可验证。 部署环境未启用时保留本地 File/SQLite 调度。绑定作用域拒绝在真实测试边界显示可操作诊断,重试恢复读取。PR 正文明确列出截图缺项,文中只有文件名说明,未内嵌首屏。 独立构建 App 和 Core 2.4.1 wheel,42 项 Python API 与 gateway 检查、9 项 TypeScript 原生传输检查、2 项实装 Core 检查,以及 Chrome 的成功、拒绝、恢复与桌面/窄屏检查均完成。 本地浏览器接入合成 HTTPS,设置页的其他数据来自合成配置,连接检查走真实后端。远端服务、远端 CI 和已发布截图仍未验证。

我的整体评价 / Verdict

REQUEST_CHANGES。 Capability Center 已能手动检查当前 Goal,展示读验证、拒绝、诊断和重试。Core 与 App 复用现有远程权威读取所有者。 桌面 1440 和窄屏 390 均复查了首屏、展开诊断和拒绝状态,桌面原编辑器及下方恢复区仍可见。 PR 正文缺少内嵌首屏截图,外部读者尚不能复核上述画面。 原缺少 App 路径的功能问题已在新提交复验通过。请把实际首屏的公开安全截图直接内嵌到 PR 正文,标明精确提交、打包构建和合成数据范围,并带上桌面与窄屏对照。

English verdict: REQUEST_CHANGES at a8fa269. The packaged App now completes the original read, denial and retry journey. The PR description still needs inline first-viewport evidence with the revision and build/data boundary.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants