Repository navigation
Conversation
|
Thanks for the substantial work here. The overall architecture is heading in the right direction: the Server retains the single Agent Loop and durable invocation ledger, while the Runner owns credentials, provider transport, dispatch fencing, and terminal custody. However, I do not think this PR is ready to merge yet. I found three blocking issues: 1. Friendly model names are confused with provider model IDs
After setup, however, the TUI searches the catalog using entry.name.eq_ignore_ascii_case(&model_name)For a normal configuration such as: the model can be saved, probed, and published successfully, but the TUI will fail to find it, time out after 12 seconds, and not select it. Please carry the friendly/display name separately in the binding projection and complete setup using a stable binding or Offering identity—not a name lookup. This is also necessary to avoid selecting the wrong model when two Runners publish the same name. 2. The multi-terminal Runner lifecycle does not satisfy the stated isolation contractEvery interactive CLI invocation starts a new Environment credentials are attached only inside the process that successfully owns the inference host; there is no IPC path for another terminal to attach its own credential to that host. Consequently, two terminals using different values for the same environment-variable name may either:
That violates UX-07 and may cross provider-account or billing boundaries. This needs either:
Simply spawning one child per CLI while sharing the same Runner identity and exclusive journal is not sufficient. 3. The TUI performs a real provider request without an explicit pre-submit choiceThe setup form says: but submission automatically calls Even though the request is small, it may still incur cost or trigger provider-side audit activity. This also conflicts with UX-03 in the design document. The form should explicitly offer:
Additional implementation concerns
The durable execution internals are otherwise thoughtfully designed: exact-attempt authority is persisted before provider I/O, the Runner writes a local fence before dispatch, terminal evidence remains in custody until Server ACK, uncertain delivery is represented explicitly, and the queues/artifacts/journals are bounded. My recommendation is Request changes until the three blocking issues above are fixed. At minimum, please add end-to-end tests covering:
|
|
Follow-up review after Thanks for the two follow-up commits. They address several points from the previous review well:
I re-reviewed the updated implementation beyond those original findings. I still recommend Request changes, primarily for the first two issues below. P0 — the provider credential is inside the general tool-execution environmentThe managed Runner is spawned without Foreground This violates the central boundary that provider credentials never reach Server/model context, and also conflicts with the design gate that an inference-only Runner must not expose shell access. Please put inference credentials in an inference-only process/slot that the general tool executor cannot read, and clear/allowlist the environment of every tool subprocess. Add an end-to-end canary test proving that a Server-issued P1 — a random Runner identity per CLI launch defeats durable recovery and accumulates permanent offline OfferingsEach CLI invocation now creates
Consequences:
This needs a stable recoverable host/journal identity plus attachment-scoped credentials, or an explicit persisted attachment identity with a real retirement/GC protocol. A new random durable identity on every process start should not be the lock/isolation mechanism. Shutdown should also drain/reconcile outstanding inference custody rather than relying only on P1 — direct
|
|
Follow-up pushed on the existing PR branch: 01e1023. This is a verified hardening slice, not a claim that the full release/SaaS acceptance gates are complete.
Local verification: 151 targeted tests passed, including 10 MatrixOne service integration tests and the real ledger-to-Runner-custody required-compaction test. Relevant library/binary clippy with Still open before merge/release: stable shared local-host/journal recovery across CLI restart and attachment lifetime; true live Runner preview/streaming; exact Offering persistence in the causal resume projection; and measured 100/500/1,000-session throughput, tail-latency, memory and noisy-tenant fairness. These limits are recorded explicitly in |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-review of exact commit f1058fb5144a50cf89e2925928778d9e7745be14. Recommendation: address the two P2 findings below before merging. Submitting COMMENT because the connected account is the PR author.
This revision materially improves the earlier architecture. The managed host has a persisted installation identity and journal, uses inference-only dispatch, and receives environment credentials through per-terminal IPC leases after owner/installation checks. Startup clears the inherited environment; the inference-only connection rejects tool requests before entering the tool-executor path. Acknowledged environment-binding disables also remove the ephemeral local publication entries. Direct model selection now resolves exact catalog identities and rejects ambiguous names, and Save without test accurately says that neither testing nor selection occurred.
I traced the shared-host attach/detach/reconnect lifecycle, journal publication/fence/custody handling, model selection/setup, causal Offering restoration, and bounded preview/continuation coordinator. The architecture retains one durable execution owner. The new subprocess regression meaningfully covers token rotation in the same child, output before provider completion, crash before terminal ACK, and same-journal custody replay with one provider request. I inspected that test; I did not execute it locally.
Two setup-to-execution mismatches remain:
- P2: an accepted full Chat Completions endpoint is probed correctly but has
/chat/completionsappended again during real Runner dispatch. - P2: the explicit local probe constructs a different token-limit wire contract from admitted inference, rejecting otherwise valid OpenAI o-series configurations.
Both are detailed inline. Please test the actual setup/check-to-dispatch boundary against a strict local provider, including path/query preservation and model-specific request validation. Separate passing tests of the probe and executor do not catch these disagreements.
Validation and limits:
- Locally executed
python3 -m unittest discover -s scripts/schema -p 'test_*.py': 47 passed; the CI-script suite: 60 passed. - Downloaded the current services/turn-core/plan CI job log: 5,931 tests passed, including Runner waiter bounds and the test preventing implicit selection of Runner credentials. These are CI results, not local Rust executions.
- At the latest check, runtime, CLI non-edge, core/bridge and both online lanes were still running; Static Checks was also in progress. No claim that complete CI is green.
- Cargo/Rust and a disposable MatrixOne service are unavailable locally. The findings are source-traced; the o-series restriction was checked against OpenAI's official generated API contract. No paid-provider request, installed CLI/TUI/Server journey, cross-pod deployment, or performance benchmark was run. The PR's documented cross-pod preview, platform and performance release gates remain separate from this review.
| let mut endpoint = reqwest::Url::parse(&model.base_url) | ||
| .map_err(|_| InferenceHostError::InvalidRequest)?; | ||
| endpoint.set_path(&format!( | ||
| "{}/chat/completions", |
There was a problem hiding this comment.
[P2] Use the same endpoint normalization for checking and dispatch
A saved base_url ending in /v1/chat/completions is accepted by LocalModelDefinition::validate. The CLI deliberately supports this form: chat_completions_endpoint leaves it unchanged, and provider_endpoint_is_derived_without_rewriting_query_or_duplicating_path explicitly asserts that behavior (including a query string).
This dispatch path always appends the suffix. For https://provider.example/v1/chat/completions?api-version=1, Test and use probes the correct endpoint, but the first admitted inference sends to /v1/chat/completions/chat/completions?api-version=1. A normal provider returns 404 despite setup having reported success.
Extract one local endpoint-construction owner shared by probe and dispatch, or reject the full-endpoint form consistently before saving. Add a test that saves the full endpoint, runs the real check, then dispatches an admitted request against the same strict fixture; assert identical path/query and exactly one provider call per explicit action.
There was a problem hiding this comment.
Addressed in 5bfd47e. Probe and InferenceHost dispatch now use one endpoint normalizer in astra-inference-adapter; full endpoints are not appended again and query parameters are preserved. The new saved_endpoint_probe_and_granted_dispatch_share_strict_wire_contract test saves through the actual local setup path, runs the real check, and dispatches through the real InferenceHost with a fixture grant to the same strict local HTTP provider. It covers both base and full endpoints, exact encoded query preservation, successful terminal custody, and exactly one HTTP request per explicit action. Additional endpoint cases cover trailing slashes, encoded path segments, and malformed URLs. All 10 local model tests passed. This is a local setup-to-host regression with synthetic grant/provider, not a claim of a full installed Server journey.
| &serde_json::json!({ | ||
| "model": definition.model, | ||
| "messages": [{"role": "user", "content": "Reply with OK."}], | ||
| "max_tokens": definition.max_output_tokens.min(4), |
There was a problem hiding this comment.
[P2] Align the explicit probe with the admitted request's token contract
The probe always sends max_tokens, while prepare_runner_request uses the canonical OpenAI request builder and emits max_completion_tokens. OpenAI's generated Chat Completions API contract explicitly says that max_tokens is incompatible with o-series models. Thus configuring an o-series model with a valid endpoint/key makes astra model check and TUI Test and use fail at request validation, even though the normal inference builder uses the accepted field.
Use a shared declared wire contract for the probe and admitted execution while retaining a small explicit budget and the no-retry behavior. Do not generalize one provider's dialect to every compatible endpoint. The existing stream-probe fixture matches method/path but does not validate these body fields, so it cannot detect this failure. Add a strict o-series case that rejects max_tokens and accepts the correct bounded request, plus invalid-key/model cases. This finding is based on source and the official contract; no live paid-provider request was made.
There was a problem hiding this comment.
Addressed in 5bfd47e. The probe and canonical OpenAI request builder now share the declared max_completion_tokens field setter. The probe remains bounded to min(configured limit, 4), including reasoning, with no retry or dialect fallback. The strict setup/check-to-host fixture rejects max_tokens, an invalid model, an invalid key, and an incorrect budget; error cases verify exactly one request and unchanged saved configuration. A separate regression exercises actual prepare_runner_request for o3 and verifies the same four-token field without max_tokens or temperature. Documentation explicitly scopes this local profile: legacy-only max_tokens endpoints are not certified, and a short stream check does not certify answer quality or tools. Verification: 10 model tests plus 26 Runner-related tests passed; 1 live-MatrixOne test was skipped. Four affected crates passed all-target clippy with -D warnings; format and diff checks passed. No paid-provider calls and no CI wait.
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-review of exact commit 799325413155067941fc8b8fd4dba44894dbfd2e. COMMENT because the connected account, XuPeng-SH, is the PR author. Please address the two P2 findings inline before merging.
This review covered the 12 commits since cb2dd30, including the new local readiness projection, removal of superseded Runner paths, lease handoff/settlement and Linux/Darwin identity authorities. The earlier endpoint and token-field findings remain fixed. Positive changes include rejecting probe success without semantic/terminal stream evidence, fencing stale probe persistence against model replacement, retaining leases through cancellation-sensitive handoff, and adding a logical owner/session identity alongside lexical/canonical paths. The new Linux identity-race tests have passing CI evidence; that does not establish Darwin correctness.
New findings:
- Local provider verification is shared by model definition, while environment credentials are terminal-local. A check using one terminal's credential is incorrectly projected as verification of another terminal's credential; a failure in one terminal also marks the other terminal's model as needing repair.
- The macOS-only HashSet use has an unconditional import, causing the current Linux strict lint gate to fail. This is observed in the current head's CI, not inferred from an earlier run.
Validation:
- Downloaded the current services/turn-core/plan log (job 102232164946): 5,969 passed, 377 skipped. Passing tests include execution_lease_lock_inode_replacement_cannot_create_a_second_executor, session_execution_identity_preserves_symlink_parent_dir_semantics, and session_execution_lease_fails_closed_if_identity_retargets_before_open.
- Downloaded the current Static Checks log (job 102231971563): make lint failed with unused import HashSet at session_journal.rs:19 under -D warnings.
- The readiness finding is source-traced through check_definition, persist_probe_state, credential_availability and local_model_status; no live paid-provider or installed two-terminal reproduction was executed.
- No local Cargo/Rust toolchain was available on PATH. I did not rerun unaffected Python suites, a MatrixOne deployment, macOS device-range/kqueue tests, or performance benchmarks. The broader Test Suite was still running at the latest check. Author-reported verification in the PR body is not presented as independently executed evidence.
- Rechecked the head immediately before submission; it remained 7993254.
| } | ||
| match &definition.probe { | ||
| LocalModelProbeState::NotRun => "ready_for_check", | ||
| LocalModelProbeState::Passed { .. } => "ready", |
There was a problem hiding this comment.
[P2] Bind readiness evidence to the credential actually tested
For an Environment credential, credential_availability only checks that this process has a nonempty variable. The Passed/Failed probe is persisted in the shared owner-scoped model definition and checked only against binding_revision, which does not change when different terminals export different values for the same variable. Thus terminal A can run KEY=valid astra model local check work, then terminal B running with KEY=invalid gets status=ready, provider_probe=stream_verified, and select it with /model without its credential ever being checked. B's failed check also overwrites A's readiness. This contradicts the per-terminal credential boundary and the documented material-bound probe evidence; it is not a provider-I/O credential leak.
Scope verification to the actual terminal/material identity, or treat persisted environment-backed results as historical diagnostics and require an explicit check before presenting the current material as verified. Do not persist raw credential material or silently trigger another billable probe. Add public check/list tests with two processes sharing one configuration and different environment keys, plus rotation without editing the model definition.
| @@ -16,14 +16,17 @@ use serde::{Deserialize, Serialize}; | |||
| use sha2::{Digest, Sha256}; | |||
| use std::borrow::Cow; | |||
| use std::cell::RefCell; | |||
| use std::collections::{HashMap, VecDeque}; | |||
| use std::collections::{HashMap, HashSet, VecDeque}; | |||
There was a problem hiding this comment.
[P2] Gate the Darwin-only HashSet import
HashSet is used by ACTIVE_DARWIN_SESSION_EXECUTION_KEYS behind cfg(target_os = "macos"), but this import is unconditional. The current Linux Static Checks job fails here with unused import: HashSet under -D warnings, and make lint exits 101. Move HashSet into a matching cfg-gated import (or qualify its Darwin-only use) and rerun the strict Linux lint gate.
|
Follow-up at
Local verification passed: 34 credential tests, 21 local-model tests, the TUI projection test, affected clippy with |
XuPeng-SH
left a comment
There was a problem hiding this comment.
Deep re-review of exact commit d9068d4d9d66ac997cdf3c3533b5cc767f3be81f, covering the four commits since 799325413155067941fc8b8fd4dba44894dbfd2e and their surrounding readiness, credential-store and TUI paths. COMMENT because the connected account, XuPeng-SH, is the PR author.
Both previous P2 findings are addressed. I have not confirmed a new blocking defect in this revision.
- Readiness evidence is now bound to the credential material used by the actual probe. Status recomputes that identity for the current terminal, so another terminal's successful check cannot certify a different environment credential. Legacy authenticated evidence without a fingerprint becomes stale.
- The persisted fingerprint uses a private local HMAC key rather than a plain hash of potentially low-entropy credentials. Key generation is part of the evidence identity; losing or rotating that key invalidates old observations and permits recovery instead of permanently preserving unverifiable results.
- Before persisting a result, the implementation checks the current model binding and credential/key identity. This rejects delayed observations after replacement, removal or key rotation. Configuration revision checks protect the write against concurrent configuration changes.
- A failed check for different credential material preserves another terminal's known observation within the same key generation. The failing terminal remains stale/ready-for-check rather than borrowing the successful state. This is a deliberate single-observation tradeoff: the immediate check reports the error, while the shared listing does not retain a separate failure history for each terminal.
- Linux now conditionally imports the macOS-only HashSet; the current Static Checks workflow passes.
The new unhappy-path tests exercise materially different credentials, an HTTP 401, missing fingerprint-key recovery, and a delayed old-generation response after a newer successful check. I also checked how these persistence outcomes reach CLI/TUI messages and how candidate testing continues to preserve saved configuration on failure.
Validation:
- Downloaded the current CLI non-edge job log: 4,097 passed, 992 skipped in its main filtered run. It explicitly records PASS for environment_probe_evidence_is_scoped_to_current_terminal_material, delayed_probe_from_old_key_cannot_overwrite_new_generation, and the existing binding replacement/removal tests.
- The current Test Suite (34289750593), Static Checks (34289750569), and PR Title (34289750598) workflows report success. These are current-head GitHub CI results, not local Rust executions or a claim that skipped tests ran.
- The terminal-material regression simulates terminal environments within one process; it is not an installed two-process integration test. The delayed old-generation failure traverses the mock HTTP request, while the old-success rejection also uses a direct persistence assertion. A real two-process test with independent environments would strengthen this boundary.
- No local Cargo/Rust execution, paid-provider call, installed CLI/TUI journey, macOS device/lease test, cross-pod deployment or performance benchmark was run in this re-review. The broader release gates remain separate.
- Immediately before submission, the live head remained d9068d4 and no review of this head was present in the retrieved review history.
|
Follow-up at
The existing key-rotation/late-result and TUI error-projection fixes remain unchanged. Local verification now includes 34 credential tests, 23 local-model tests (including the child-process regression), affected clippy, format and diff checks. |
Incremental design and size audit (head a0b2162)I reviewed the complete diff against main with an explicit check for duplicated legacy implementation.
One safe duplication was found and consolidated in this head: TUI and prepare_from_tui now share one canonical local-model definition builder and validator. The follow-up also explicitly cleans a protected secret when validation fails before a candidate can own it. Local verification: 24 local-model tests, 8 TUI setup tests, strict CLI clippy, formatting, and diff checks passed. CI was not awaited. Possible follow-ups, intentionally not mixed into this PR: split very large test and design files; consider a shared private-file primitive only after confirming platform and error semantics; and revisit small CLI/TUI status-projection helpers. I did not find a safe deletion of a production authority or compatibility path in this review. |
XuPeng-SH
left a comment
There was a problem hiding this comment.
评审结论:REQUEST_CHANGES(2 项 P2)。当前认证身份 XuPeng-SH 是本 PR 作者,按授权使用 COMMENT 记录此结论。实际代码评审:GPT-6 Astra / xhigh。
提交前核验(2026-10-14T06:01:46.053Z):PR 为 OPEN,head 为 a0b216249ceefcb3d48d718188976a34e6d430c6;完整 CI 与下文证据一致,适用检查全部通过;没有新增可见实质评审。当前与 main 有冲突,未修复冲突,也未将历史 CI 视为当前 main 上的合并验证。以下保留完整发现、验证范围与限制。
PR #712 独立深度评审
建议结论:REQUEST_CHANGES。当前 head 保留两项可行动的 P2,分别涉及重启后未决 attempt 的容量回收,以及删除已完成会话后的终态重播隔离。未修改产品代码。
评审对象与当前状态
- PR:matrixorigin/Astra #712。
- 精确 head:
a0b216249ceefcb3d48d718188976a34e6d430c6。 - PR API 的 base:
a6406dc452c3bf1acf166e9ab8ee970c6a071625。 - 本地
merge-base(base, head):a6406dc452c3bf1acf166e9ab8ee970c6a071625。 - 核验时 main:
83c0281d16e21a7d0ce6337a0c2604f3f9a41b34;merge-base(main, head)同为a6406dc452c3bf1acf166e9ab8ee970c6a071625。PR API base 与当前 main 是不同提交。 - 最终状态核验:2026-10-14 05:38:27 UTC,来自 clock 工具实际返回;PR OPEN、非 draft、head 未变,
mergeable=false、mergeable_state=dirty。冲突仅记录,未修复。最终再次刷新 PR、all/latest checks、statuses、head workflows、reviews、issue comments 与 main,均与完整分页快照一致。 - 变更规模:147 个文件,新增 34,120 行、删除 2,411 行。下文明确覆盖策略,不表示 147 个文件均逐行验证。
- 全部实际评审由被指定的 GPT-6 Astra / xhigh 完成,未切换模型或转交其他模型。
[P2] 为旧进程缺失记录的未决 attempt 补齐有界、权威的容量退役路径
建议 inline 位置:runner.rs:1234–1245。
当 Server 已提交 delivery claim、Runner 尚未持久化本地 fence 时进程退出,同一 journal 的新进程不会拥有该 attempt 的记录。新 boot 不能执行旧 grant,这是正确的防重约束;但当前恢复链也没有把这类未决 attempt 从“占用执行容量”转换到“保留未知结果/费用责任、执行权已退役”的有界路径。
可达链条如下:
- claim 在事务中写入并提交,先于远端 Runner durable fence。重启后注册的新 boot 与 grant 不同,can_start 因 boot 不符为 false,旧 attempt 只会进入 reconciliation。
- Runner 对缺失记录返回 Unknown;只有当前 boot 的过期 grant 才能补写 no-start。仓库现有 expired_queued_grant_reconciliation_seals_only_current_incarnation_no_start 测试 明确保留 old-boot Unknown,且不发出结果消息。启动恢复只处理 journal 中已有的 fenced 记录,不能处理缺失项。
- 容量聚合持续计入
status='started'且没有 terminal/no-start、具有 claim/fence/cancel-intent 任一标记的行;没有绝对执行 deadline 或旧 boot 退役判据。取消会清除 claim 但保留 cancel_requested_at,仍被同一聚合计入。新进程也不能替旧 boot 的缺失记录签发确定未执行的证明。 runner_deadline_at在源码中仅有 schema/迁移和 grant 写入,没有恢复方读取;通用 settlement recovery 显式跳过拥有 Runner grant 的 invocation。同 journal 重注册、正常重连和取消不会终结这类占位。删除会话/破坏性清理不是保留原始证据的正常恢复方式。
结果是一次这样的中断就能阻止同 session 的后续独立 run;四个 session 留下同类未决行后,同一 host 的四个 slot 均被占据,即便原始执行 deadline 早已过去。没有扩大到其他 owner 的泄漏,但一个用户的其他 session 会受牵连。
这不要求将 Unknown 改判为 no-start,也不要求按十秒 claim 租期直接释放可能仍执行的请求。设计 730 行附近 要求启动进行有界恢复,并允许在未知结果未全部解决时接受恢复容量上的新工作;755 行附近 将“原请求可能仍运行时的容量占用”与“未知费用责任/依赖分支禁止自动继续”区分开来。后文 955 行附近 对短 claim 过期和取消意图的保守约束应保留;缺口在于当前没有满足前述有界恢复契约的权威结算/退役机制。单独存在 runner_deadline_at 字段不等于它已成为安全回收租约。
修复方向:定义并持久化经过认证的 incarnation/执行权终止依据,按原始执行权限的有界性产生终态或独立的容量退役事实;保留原 attempt 的 Unknown 结果、未知费用责任、晚到证据接收及禁止自动重试/继续的约束。不能仅依赖 wall clock、claim expiry 或记录缺失重新发同一请求。补一个真实数据库与 Runner 进程的屏障测试:SQL claim 提交后、本地 fence 前退出;以相同 journal/new boot 重启;满足权威退役条件后允许独立新工作,原请求不被重发,原依赖分支继续保持隔离,每个 host 四个并发、每个 session 一个并发的上限仍成立。
证据强度:原始 SQL 谓词已经在隔离内存 SQLite fixture 中实测,四个旧 deadline 行仍返回 active_count=4,取消仍为 (4,1),写入确定 no-start 的对照才降到 (3,0)。旧 boot/缺记录的可达性由生产源码和现有测试支撑;未运行 MatrixOne + 真实进程重启的全链复现,SQLite 不验证锁语义。
[P2] 删除已完成会话后,旧终态的拒绝会反复终止共享 Runner 连接
建议 inline 位置:inference_connection.rs:585–590。
合法窗口是:Server 已接收并持久化某 attempt 的终态,run 已完成;发往 Runner 的 ACK 丢失,Runner journal 仍为 TerminalAwaitingAck;用户随后成功删除这个已完成会话。该问题不依赖“运行中的会话可删除”或绕过 active-run guard。
删除入口按 owner 调用 delete_session_lifecycle 和持久化删除事务,后者会 删除 inference_provider_attempts。服务端删除不会同时收到远端 Runner 的 ACK,也不会清除其独立 journal。
Runner 重连重播旧终态时,validate_runner_terminal_attempt 找不到 attempt,NotFound 经 rejection 变成 InvalidEvidence。Edge 对这个携带 attempt 的错误返回整条 connection 的 InvalidRequest,worker 退出,随后 主循环因消息通道关闭而结束 WebSocket。
重连不能自行修复:journal 的 pending 仍按固定顺序提供该未 ACK 项,connection 在 628 行附近 每次选择一个 pending transfer。只有 ACK 能将该条目移出待交付状态;TTL 清理仅处理 Acknowledged 记录。因此删除一个已完成会话可使同一用户共享 host 反复断开;排在该项后的其他 session 终态交付也被持续阻塞。
修复方向:利用经过 owner/runner 校验的 durable deletion tombstone,增加明确的“该精确 attempt 已退役/所属会话已删除”收据与本地持久化处理,不重建已删除会话,不伪造成功 custody。不可把任意 InvalidEvidence 静默当 ACK;应把已授权退役与损坏证据区分开,并将单 attempt 的永久失败隔离,保证其他 session 继续交付。
补测应覆盖:已接收终态但丢 ACK → 完成并成功删除会话 → 同 journal 重连;断言旧 payload 不重新入库、不再无限重发,共享 host 能完成另一 session,原 provider 请求只发生一次。本项为完整源码调用链证明,未运行真实 Server/MatrixOne 的删除端到端测试。
与既有评审逐项去重
开始和结束均读取了 reviews、inline comments、issue comments 全部分页:6 条 review、6 条 inline/reply、8 条 issue comment,per_page=100 的第二页均为空。没有 API 可见的当前 head 进行中/已完成实质深评;两条空 COMMENTED 不计为深评,旧 head 的深评也不代替当前 head 覆盖。API 之外的私下进行中评审不可见。
已先读 当前 head 的增量设计与体量审计。其讨论共享 provider adapter、SSE 迁移、server 内部 wire façade、统一模型校验及 secret 清理;这些作为已覆盖的设计背景,本文不重新包装为新成果。最新实质深评在 d9068d4 的 review,之后四个提交也检查了实际 diff 与相关实现。
- 旧评审的 endpoint 重复拼接、probe token 契约、凭据代际与 readiness fingerprint、Darwin-only import 已分别有修复;未重复报错。
- cb2dd30 深评 已讨论短 claim 过期仍保留容量,并建议真实数据库竞争屏障测试。这项建议仍有价值,但本文没有把它改名作为新发现。第一项的新触发是“SQL 已 claim、本地尚未 fence、重启为 new boot 且缺记录”,影响是缺少原始执行权结束后的有界退役;不是主张短租期一到释放 slot。
- 既有十项 challenge 的旧 journal 身份、consumed-prefix、hello/publication 重试、容量不一致、host 大锁、env secret、IPC aggregate 和公平性等问题,也逐项对照过当前实现。第二项是“完成后删除 + ACK 丢失 + 终态永久拒绝”的组合,既有报告没有指出同一触发与影响;不与 transient publication retry 或 journal 身份变化重复。
- 两项均是当前 head 上保留的新问题,而非将已有相同问题再次提交 inline。发现与证据统一记于本文。
四个维度的综合判断与覆盖
-
设计合理性。 生产主链追踪了 CLI 候选配置准备/校验/应用/CAS/失败回收、managed host 身份与启动、local IPC 的 peer-owner 与版本协商、Server admission/grant、Edge fence→provider、canonical terminal custody、ACK 与恢复。provider request/wire 复用、明确的 incarnation 和 generation、不可变 grant 身份、持久化 fence 先于请求、preview 与 canonical response 分离的方向合理。主要缺口是上述两种生命周期边界:未知结果隔离与执行容量退役未闭合,以及会话删除与远端 durable custody 没有相容的终结协议。
-
数据库 I/O、并发隔离与资源规模。 深读了 runner admission/claim/reconciliation/cancellation/custody、runner_model_bindings 注册与 catalog、runner_wait、storage 相关字段/索引与 settlement 排除条件。查询将 user/runner/journal/session 纳入边界,claim 受事务中的连接/attempt 锁约束;待决账本、交付窗口、chunk、spool、provider 并发与 per-session 限额可见,有 batched readiness/reconciliation,未发现足以单独提出新 finding 的无界逐 token 数据库写入。第一项会让容量记账随未决旧行失去正常回收,第二项会让一个 session 的错误升级为整个用户 host 的交付问题。没有运行 MatrixOne EXPLAIN、连接池压力、真实多进程竞争或 100/500/1000 session 压测,不能据源码约束宣称规模性能已经验证;现有顺序容量测试不等价于真实数据库竞争测试。
-
Clean Code、重复实现、复杂度维护。 深读共享 inference adapter、credentials/local_models、CLI local_model_command/local_runner_lifecycle/session_runtime/session_startup、Edge inference_host/inference_journal/inference_connection/local_host、runtime edge ingress 与 LLM runner coordinator/transport/preview、services runner 与 binding 核心路径。对比了既有审计指出的 adapter/wire/SSE 移动,新增共享校验减少了 CLI/TUI 的规则分叉;类型化身份、错误种类与 revision/fingerprint 较清晰。host/connection/services runner 状态机仍较大,需要跨组件明确退休与错误作用域,但没有把文件长度或个人拆分偏好本身列为缺陷。
-
Unhappy paths、错误传播、取消恢复和测试。 检查了 credential 候选失败清理与 CAS、受限 child env、grant 过期/错 boot、fence 到 provider 的 owned task、取消信号与 journal 次序、断连重播、terminal hash 与 ACK、流截断/响应上限/deadline、Server 恢复 exclusion、删除终态、恢复分支的历史/当前工具能力交集及 output-cap/receipt 边界。追读 agent_backbone server_loop_host/resume、session_artifact_store、相关 session_journal/session_coordination/workspace_observation 与 shell_ops 变更作为跨模块支持。已有测试对许多边界有覆盖,但两个发现的完整场景未找到对应测试。
覆盖策略:上述生产主链和两项 finding 的跨层调用链深入阅读;相关 Rust unit/integration tests、managed_local_host_it、设计文档、测试指南、CI workflow/Makefile 和最后四次增量提交用于验证设计与回归边界。没有把全部 147 个文件逐行深审:较大的测试夹具、文档迁移、机械移动和外围平台代码未全量逐行验证。未执行 CLI/Edge/services 完整 Rust 矩阵、完整安装后的用户旅程、macOS/kqueue 或 Windows 路径、跨 pod 故障、当前 main 的冲突解决与合并集成。相关局限不由其他 crate 的小范围通过结果覆盖。
遵循本 checkout 的 AGENTS.md、CONTRIBUTING.md、架构/测试说明,并阅读真实单数目录中的 .agent/skills/review_changes/SKILL.md、review_code/SKILL.md、unhappy_path_audit/SKILL.md。未因 .agents 不存在而遗漏 .agent。
当前 head 的完整 CI 核验
check-runs filter=all 共 20、filter=latest 共 19,commit statuses 为 0,head workflows 共 4。两种 check-runs、statuses、workflow、各 workflow jobs(filter=all)的所有分页均读到空尾页。以下是实际 job/step 结果,不只依赖 PR 顶部汇总:
| Workflow | 实际结果与范围 | 完成/更新时间 UTC |
|---|---|---|
| Test Suite 34300086181 | 11 jobs 成功:scope;runtime + HTTP/admin/settings contracts;turn-core/services/plan;core crates + selective bridge hooks;CLI non-edge、edge-shell、edge-git-gix、edge-rest、edge-fs-tools;online integration、online core。两个 online lane 的依赖启动、等待、Run online tests 均成功,Skip unaffected step 为 skipped。 | 2026-09-09 01:57:05 |
| Static Checks 34300086231 | scope 与 check 成功;metadata/docs、Actions validation、CI contracts、offline scripts、clippy、fmt、cargo audit steps 成功;Terminal-Bench harness step 跳过;Web、SDK 两个 jobs 按路径 scope 跳过。 | 2026-09-09 01:49:51 |
| PR Title 34300086206 | 标题检查成功。 | 2026-09-09 01:39:45 |
| Supersede stale PR runs 34300084680 | 维护类 pull_request_target workflow 成功;不是产品测试。 | 2026-09-09 01:39:48 |
17 个 Actions jobs 为 15 success、2 skipped。latest 另外包含 Mergify Summary success(2026-10-02 13:17:32 UTC)和 Merge Queue neutral(2026-09-22 07:57:28 UTC)。all 列表中旧 Summary 102304935960 仍显示 in_progress,但同 app/name 的后续 Summary 102305053143 已成功,latest 已取后者;没有把被取代的旧汇总当作仍待完成的新代码 CI。
工作流路径分类和 Makefile 也已对照:online 测试有 feature/environment scope,不是所有外部 provider 测试;selective bridge hooks 也不代表整个端到端矩阵。读取历史 job 原始日志返回 410,因此不虚报 CI 内单测数量,只报告 API 中可确认的 jobs/steps。这些成功属于该 head 的历史 PR CI;PR 现与 main 有冲突,不能据此证明当前 main 上合并集成通过。 没有重跑 CI。
实际本地验证及依赖限制
在 /tmp/astra-pr-712/checkout 的 detached 精确 head 上,git diff --check a6406dc452c3bf1acf166e9ab8ee970c6a071625...HEAD 通过。该 checkout 和原始 /workspace/Astra 的 git status --short 均为空。
最初在完整 workspace 尝试以下测试:
env PATH=/workspace/cloud-setup/cargo/bin:/usr/local/bin:/usr/bin:/bin \
CARGO_HOME=/workspace/cloud-setup/cargo \
RUSTUP_HOME=/workspace/cloud-setup/rustup \
CARGO_TARGET_DIR=/workspace/scratch/astra-review-712-target \
CARGO_BUILD_JOBS=2 CARGO_PROFILE_TEST_DEBUG=0 \
CARGO_PROFILE_DEV_DEBUG=0 CARGO_INCREMENTAL=0 \
cargo test --locked --offline -p astra-credentials -p astra-inference-adapter --lib依赖解析阶段被缺失缓存 gix-archive(workspace 中 gix 0.85.0 所需)阻塞,没有开始执行这些 workspace tests。没有绕过代理或访问共享服务去补依赖。
随后在 /tmp/astra-pr-712/isolated-tests 建立仅两个 crate 的临时 workspace;credentials 的 4 个文件、inference-adapter 的 9 个文件与评审 head 源码一致,沿用原 workspace 配置及依赖约束,使用缓存可用版本。命令保持相同 env/target,并在该目录执行:
cargo test --offline --libRust 1.97.0 下:astra-credentials 34、astra-inference-adapter 45,共 79 项通过,0 失败、0 ignored。覆盖 credential 代际/CAS/租约/fingerprint 和 adapter request/redirect/no retry/大小限制/取消/期限等;provider 为 loopback fake server,没有付费调用。
隔离 lock 相对原 lock 的版本差异仅为:
| 依赖 | 原始 lock | 隔离缓存 |
|---|---|---|
| rustls | 0.23.43 | 0.23.45 |
| rustls-webpki | 0.103.13 | 0.103.15 |
| tokio-rustls | 0.26.4 | 0.26.6 |
| uuid | 1.26.0 | 1.26.1 |
因此这 79 项是“原生产源码 + 明示缓存依赖”的隔离验证,不是原 Cargo.lock、整个 PR 或数据库端到端的通过证明。
容量谓词验证命令:
python3 /tmp/astra-pr-712/check_capacity.py脚本从精确 head 提取原 SQL,在内存 SQLite 中提供 IF 函数并构造四个旧 deadline/旧 boot 占位及异 owner 对照。验证了谓词的占位/取消/no-start 结果;未模拟 MatrixOne 行锁、整个服务状态机或真实网络/进程退出。两项 finding 的更完整回归测试仍需在修复中补充。
交付证据
- 完整本文:
/tmp/astra-pr-712/review.md。 - 初始与最终 GitHub 原始证据:
github-evidence.json、github-final-evidence.json(后者包含完整 check/status/workflow/job/review/comment 分页);交付前再次刷新结果与实际时间保存在final-refresh.json。 - 本地测试:
local-tests.log、isolated-tests.log、local-validation.json。 - 容量谓词 fixture 与输出:
check_capacity.py、capacity-result.txt。 - 全部证据均位于
/tmp/astra-pr-712;临时编译 target 在/workspace/scratch/astra-review-712-target。没有修改/推送产品代码、合并、修冲突、访问生产/共享服务或调用付费 API。
|
Tick the box to add this pull request to the merge queue (same as
|
Summary
Implements Runner-owned BYOK inference while retaining Astra's single durable Agent Backbone. Server owns admission, policy, request compilation, continuation, usage, and audit; only the explicitly selected Runner performs provider I/O with local credentials.
Post-review hardening
--modelwins at launch; missing legacy identity requires a fresh selection instead of a friendly-name or Server fallback. Runner credentials are never selected merely because they are first in the catalog.main, including the existing Darwin session execution-lease fixes, on this same PR branch without rewriting published history.Local verification
No CI wait was used for this verification.
make format-checkand strict all-target clippy for the seven affected CLI/Edge/runtime/services/types/credentials crates passed.runnermatrix: 111 passed;modelmatrix: 419 passed. These filtered counts overlap other suites below.astra-edgesubprocess integration passed: verifies real WS Authorization, rotates the synthetic profile token and reconnects the same child/journal/boot, observes live output before provider completion, kills the host before terminal ACK, observes failed client liveness, then reopens the same journal and replays custody with exactly one provider request.Explicit limitations / release gates
sleepreceives SIGKILL, and ordinary tool-Runner Bash is rejected becauseworkspace_observation::stable_coordination_rootcurrently supports Linux only. Those source files matchmain; no sandbox or coordination check was weakened to bypass them. Therefore this is not a claim that the complete repository offline gate or macOS tool-execution journey is green.Closes #702