Skip to content

fix(deps): update webpki crates for RustSec advisories - #1104

Merged
XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/1103-rustsec-webpki
Oct 21, 2026
Merged

XuPeng-SH merged 3 commits into
matrixorigin:mainfrom
MatrixAdventurer:fix/1103-rustsec-webpki

Conversation

@MatrixAdventurer

@MatrixAdventurer MatrixAdventurer commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Capability assessment: N/A: This lockfile-only security update does not add or change capabilities, profiles, tools, policy, or runtime authority.

由 LW 授权的 ChatGPT Personal 智能体提交。

Summary

The locked webpki packages trigger RUSTSEC-2026-0381, RUSTSEC-2026-0382 and RUSTSEC-2026-0383 in the required cargo-audit gate. Update rustls-webpki to 0.103.16 and webpki-roots/webpki-root-certs to 1.0.10, updating the four version-qualified webpki-roots references while preserving the dependency graph. Cargo.lock is the only changed file (+10/-10).

Related issue

Related to #1103. No automatic issue closure is requested.

Change type

  • Feature
  • Bug fix
  • Documentation
  • Refactor or performance improvement
  • Test
  • Build, CI, or maintenance

User and compatibility impact

Uses patched certificate verification and trust-root packages within the existing compatible version requirements. No public API or configuration changes.

Architecture and complexity delta

N/A. Existing dependency owners and dependency edges remain unchanged; no parallel implementation is introduced.

Verification

  • Red: required cargo audit failed with four vulnerability instances in Static Checks 39537222726, on the unchanged upstream lockfile.
  • Fixed commit: 309c8ca9d2d461c33951f357f3f8f0ef5163173c; versions and checksums checked against the official crates.io index. Static Checks 39566600232 completed successfully: make lint (locked Clippy), make format-check, repository/CI contracts, Docker dependency inputs, make audit, and required check aggregate passed. Audit loaded 1,348 advisories and scanned 776 locked dependencies. Test Suite 39566600474 completed successfully. Representative actual results: turn-core/services/plan 5,462 passed (518 skipped); core crates 4,027 passed (29 skipped); selected server e2e-hooks 129 passed (6,319 skipped); runtime 6,032 passed (192 skipped), plus 2 additional tests; CLI complete inventory 5,006 passed (20 skipped), plus all 3 strict production-supervisor smokes; online services 502 passed and online runtime 105 passed. The workflow also passed MOI compatibility, online integration and selected Linux/macOS terminal lanes. Skipped tests are not represented as executed.
  • No new implementation-mirroring test: the existing cargo-audit gate is the regression check for this dependency-only change.
  • Public entrypoint: existing Rust TLS consumers; no new entrypoint.
  • Unhappy path: the advisory-bearing locked versions must fail audit.
  • Database verification: N/A; no schema or query changes.
  • Independent review: Approve on final head 309c8ca9d2d461c33951f357f3f8f0ef5163173c, after correcting all four version-qualified references. Static graph validation covered all 776 packages with no missing or ambiguous dependencies.
  • Source branch MatrixAdventurer/Astra:fix/1103-rustsec-webpki belongs to the authenticated user; fork push permission verified. Upstream has no exact dev branch, so this PR targets main as authorized.
  • Read-only checks and this branch/PR operation were performed by the signed execution subject below.

Final checklist

  • I added or updated tests at the layer that owns the behavior, or explained why no test is needed.
  • I updated public or design documentation for contract changes, or the change needs no documentation update.
  • I checked the diff for credentials, private URLs, customer data, generated files, and other sensitive information.
  • The PR title follows the repository's Conventional Commit format.

由 LW 授权的 ChatGPT Personal 智能体提交。

由 LW 授权的 ChatGPT Personal 智能体提交。
由 LW 授权的 ChatGPT Personal 智能体提交。

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 ChatGPT Personal 智能体提交。

独立审查与修订记录:首次 review 指出四处 version-qualified webpki-roots 依赖仍引用 1.0.7;已在 309c8ca 同步为 1.0.10。独立 review agent 对最终完整 diff 明确 Approve:776 个 package 的静态依赖图检查无缺失/歧义节点,版本与 checksum 一致、要求兼容,1 文件 +10/-10。

实际 CI:PR Title 已成功;Static Checks #39566600232 与 Test Suite #39566600474 正在运行。尚未声明 --locked 构建、安全审计或测试通过,PR 保持 draft。分支修订和只读核验执行主体为上述智能体。

@MatrixAdventurer
MatrixAdventurer marked this pull request as ready for review October 21, 2026 08:31

Copy link
Copy Markdown
Contributor Author

由 LW 授权的 ChatGPT Personal 智能体提交。

发布收口记录(2026-10-21):固定 head 309c8ca9d2d461c33951f357f3f8f0ef5163173c,1 文件 +10/-10。修复前 cargo audit 的四个漏洞实例在原锁文件上实测失败;修复后 Static Checks #39566600232 与 Test Suite #39566600474 均 SUCCESS。make lint、format-check、cargo audit、Docker 输入验证和静态聚合门禁通过;实际测试及跳过项见已更新正文。独立 review agent 已对最终 head 明确 Approve。

已将 PR 从 draft 转为 ready,指派给 XuPeng-SH 并请求其审阅;上述元数据操作由本署名智能体执行。对应 Issue #1103 已指派给同一负责人。不自动合并、部署或关闭 Issue。

loveRhythm1990 added a commit to loveRhythm1990/Astra that referenced this pull request Oct 21, 2026
Reuse the verified Cargo.lock update from matrixorigin#1104 at 309c8ca. Keep audit policy unchanged.
mergify Bot pushed a commit that referenced this pull request Oct 21, 2026
Capability assessment: Unchanged: Agent chat remains Beta, and Durable Work and Checkpoints and recovery remain Partial in the existing CLI/Server/Web profiles. This fixes initial run activation without adding a capability, expanding a profile, or claiming new live-database qualification.

## Summary

A newly created run could return `409 execution_authority_not_current` before any model or tool execution even though its creation transaction had committed. Startup immediately renewed the new owner's lease through another pooled connection; a different MatrixOne CN snapshot can lag that commit. A later diagnostic read does not establish which predicate rejected the earlier UPDATE.

- Return the committed initial owner generation and a conservative monotonic lease bound from the canonical run store. Normal creation anchors the bound before INSERT; timeout reconciliation retains the earlier admission bound. A delayed acknowledgement never restarts the lease clock.
- Activate fresh root and child runs from that receipt, start the existing heartbeat, and check the same live local authority before root execution. Exact retries return the existing run without fresh authority. Preclaimed and recovered children retain durable authority confirmation.
- Preserve existing periodic renewal, provider/tool database authorization, generation fencing, cancellation, and expiry checks. Preparation that loses its lease cannot terminalize the run or remove the workspace needed by recovery.
- Add entrypoint and lease-boundary regressions, an opt-in MatrixOne creation/replay test, English rationale comments, and the durable-run contract update.
- Unblock the required security audit with a Cargo-generated lockfile-only patch: `rustls-webpki` 0.103.16 and `webpki-roots`/`webpki-root-certs` 1.0.10 fix RUSTSEC-2026-0381/0382/0383. This matches the dependency update in #1104; no audit exceptions or gate changes are added.

- Retain safe grading-time evidence for the live cache-scope CI investigation. The aggregate intentionally drops physical execution captures; the existing progress observer could therefore publish neither the observed post-cold cache reads nor which execution capture was missing, pending, unverified, or conflicted. Publish only typed states, identity-match flags, scope counts, and numeric cache counters through the existing progress/summary chain. Acceptance predicates, assertions, thresholds, models, timeouts, workflow selection, and audit policy remain unchanged.

## Related issue

Fixes matrixorigin/matrixflow#19270

Related security update: #1104.

## Change type

- [ ] Feature
- [x] Bug fix
- [x] Documentation
- [ ] Refactor or performance improvement
- [x] Test
- [x] Build, CI, or maintenance

## User and compatibility impact

Fresh run creation no longer depends on a second connection immediately recognizing the lease just committed by creation. Exhausted or cancelled startup authority still cannot execute, and exact replays do not launch another executor.

HTTP/SDK wire formats, database schema, SQL statements, lease durations, renewal budgets, and migrations are unchanged. The Rust store contract changes: `insert_run` and `insert_run_with_deadline` return `DurableRunStartAuthority`, and `DurableRunStartClaim::Started` carries that receipt. Repository implementations and callers are updated. No MOI code is changed. The compatible TLS security patches reject distrusted certificate paths and remove the affected trust root.

## Architecture and complexity delta

- Canonical owner changed or extended: `RunStateStore`/`DatabaseRunStateStore` return evidence of their own creation transaction; `RunEngine` validates its original safety window and installs the existing owner heartbeat.
- Existing implementations and callers searched: in-memory and database stores, both runtime test stores, root create/stream/idempotent admission, collaborator-stage admission, child execution, replay, recovery, heartbeat and provider-boundary authorization.
- Superseded code, states, tables, shims, or self-only tests removed: redundant post-create activation renewals and the optional generation state in the fresh root path. No new table, persisted receipt, retry policy, compatibility shim, or fallback.
- If parallel implementations remain, their boundary and retirement condition: fresh creation consumes its process-local transaction receipt; preclaimed/recovered execution must prove current durable authority. Both paths use the same heartbeat, exact-generation ownership, and execution boundaries.

## Verification

- Runtime commands and results (from the Astra repository root, at `81fa532b0` before the security-only lockfile update):
  - Before the implementation change, `cargo test --locked -p astra-runtime --lib fresh_run_uses_committed_lease_before_preparation -- --nocapture` reproduced the unwanted 409 and failed.
  - `cargo test --locked -p astra-runtime --lib server::run:: -- --test-threads=1 --nocapture`: **846 passed, 0 failed, 62 ignored**.
  - `cargo test --locked -p astra-services --lib runs::tests -- --nocapture`: **194 passed, 0 failed, 71 ignored**.
  - `cargo clippy --locked -p astra-runtime -p astra-services --all-targets -- -D warnings`: passed.
  - `cargo fmt --all -- --check`: passed.
  - `git diff --check`: passed.
  - Initial parallel execution exposed timing-sensitive failures under concurrent compilation; final runtime verification ran serially without concurrent Cargo compilation. Test deadlines and production budgets were not increased.
- Public entrypoint exercised: `create_run` and `stream_chat`, including idempotent stream replay, through the production lifecycle with a fault-injected store.
- Unhappy paths exercised: delayed acknowledgement with no lease extension, expired receipt, cancellation, wrong generation, missing/dropped heartbeat, lease loss during preparation, replay without a new executor, and existing preclaimed-child cancellation/fencing paths.
- Database verification: schema and SQL are unchanged. The new MatrixOne creation/replay test was **not run locally**, but passed in the CI online services lane on `81fa532b0`: [503 passed](https://github.com/matrixorigin/Astra/actions/runs/39566563508/job/119110214769), including `database_creation_returns_initial_lease_without_granting_it_to_replays`. The complete Test Suite, online integration, and MOI compatibility lanes also passed on that head. This does not establish real multi-CN qualification. No local MOI tests or QA operations were performed.
- Security follow-up: required Static Checks on `81fa532b0` passed Clippy and formatting, then [failed cargo-audit](https://github.com/matrixorigin/Astra/actions/runs/39566563582/job/119110206127) on three newly published certificate advisories affecting the unchanged upstream lockfile. Cargo regenerated only the three compatible package versions, their checksums, and version-qualified references (+10/-10); the result is byte-identical to #1104's lockfile. `cargo audit --json`, the exact CI entrypoint `make audit`, `cargo metadata --locked --offline --no-deps --format-version 1`, `cargo check --locked -p astra-core`, `make format-check`, and `git diff --check` passed. Audit scanned the current advisory database and found no unignored vulnerabilities; existing audit policy is unchanged. The security-fix head `57279d39e` subsequently passed [Static Checks](https://github.com/matrixorigin/Astra/actions/runs/39577099952), including the audit and required aggregate, and the complete [Test Suite](https://github.com/matrixorigin/Astra/actions/runs/39577100086), including all selected online and MOI compatibility lanes.
- Live-model follow-up on head `57279d39e`: [attempt 1](https://github.com/matrixorigin/Astra/actions/runs/39577096735/attempts/1) completed **17/18**; the remaining `task_agent_profile_callable` case was interrupted after its child completed. One unchanged diagnostic rerun, [attempt 2](https://github.com/matrixorigin/Astra/actions/runs/39577096735/attempts/2), also completed **17/18**. The task-profile case and all three failures from the original head passed in attempt 2. Its sole failure was instead `cache_provider_matrix_regression`: the initial request and all three follow-up steps completed with exit 0; the explicit alert/ratio composite passed, while the additional hard `prompt_cache_reuse_scope` check failed. That check requires ordered canonical per-execution explain coverage and positive cache reads after the cold turn; aggregate reported cache reads alone cannot establish it. Public artifacts omit the criterion detail and per-turn explain capture, so they cannot distinguish unavailable/conflicting scope evidence from absent post-cold reuse. The precise cause remains **unestablished**; neither classifier labels nor the changed failing case prove provider randomness or a regression from this PR. No further blind rerun, assertion/timeout/model change, CI exemption, or production fallback was applied. That attempt remained red; its omitted per-turn scope/capture diagnostics prevent establishing the historical failure cause. The current-head result is recorded below.

- Cache-scope diagnostic follow-up (Astra only):
  - Before the change, the Rust grader-to-progress regression failed because the diagnostic was null, and the real Python summary-entrypoint regression failed with `invalid_progress` for the missing diagnostic type.
  - `cargo test --locked -p astra-test-harness --lib -- --test-threads=1`: **620 passed**. The unchanged acceptance coverage includes cold/warm reuse, unknown creation counters, missing evidence, ordering, and replay boundaries. The new checks retain a warm read witness and distinguish a pending snapshot without certifying it as cache reuse.
  - `python3 -m unittest discover -s scripts/ci -p 'test_manual_harness_progress.py'`: **15 tests, OK (3 existing platform skips)**, including the real summary subprocess, preserved failing verdict, and rejection of private/malformed fields.
  - `cargo clippy --locked -p astra-test-harness --all-targets -- -D warnings`: passed.
  - `cargo fmt --all -- --check`, `git diff --check`, and `scripts/ci/validate_repository.py` with the bundled Python runtime: passed. The system Python lacks `tomllib`; the repository script itself is unchanged.
  - An initial parallel Rust package run had two subprocess timeout failures (618 passed); the full serial run passed under the original deadlines. No deadline or assertion was changed.
  - Current head `0558d9a0f` passed [Static Checks](https://github.com/matrixorigin/Astra/actions/runs/39587802588), the complete [Test Suite](https://github.com/matrixorigin/Astra/actions/runs/39587802649) including online integration and MOI compatibility, and [live regression, 18/18](https://github.com/matrixorigin/Astra/actions/runs/39587798338). The cache case retained four verified execution captures, matching run/session bindings, one scope per execution, and **27,448 post-cold cache-read tokens**; its unchanged hard scope check passed. This verifies the safe diagnostic path and this execution of the regression; the previous intermittent failure cause remains unestablished, and the diagnostic-only change is not presented as a production cache fix. No QA access or local MOI tests.

## Final checklist

- [x] I added or updated tests at the layer that owns the behavior, or explained why no test is needed.
- [x] I updated public or design documentation for contract changes, or the change needs no documentation update.
- [x] I checked the diff for credentials, private URLs, customer data, generated files, and other sensitive information.
- [x] The PR title follows the repository's Conventional Commit format.




Approved-by: XuPeng-SH <[email protected]>
XuPeng-SH pushed a commit to MatrixAdventurer/Astra that referenced this pull request Oct 21, 2026
…es (matrixorigin#1109)

* fix(ci): avoid self-invalidating Git build metadata

* fix(deps): update webpki crates for RustSec advisories

Reuse the verified Cargo.lock update from matrixorigin#1104 at 309c8ca. Keep audit policy unchanged.

* fix(ci): limit tracked source watches to attested builds

* fix(ci): reject unverified clean artifact identities
@XuPeng-SH
XuPeng-SH merged commit b232c4a into matrixorigin:main Oct 21, 2026
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