Repository navigation
Conversation
XuPeng-SH
marked this pull request as ready for review
October 23, 2026 15:40
XuPeng-SH
added a commit
to XuPeng-SH/Astra
that referenced
this pull request
Oct 23, 2026
Checkpoint the issue matrixorigin#1124 SQL reduction work. Cache ordinary authenticated principals, reuse bounded model admission, remove distributed weighted admission and write-only tool output projections, and keep readonly Server observations outside the durable effect ledger and generic replay cache. Retain explicit memory operations while removing automatic per-turn recall. Add a public HTTP SQL budget gate and align schema inventory and ownership documentation with the removed storage paths. This is an intermediate checkpoint for PR matrixorigin#1127. The last measured public SQL counts are 132/150/185 for zero/one/three readonly tool calls, exceeding the <=20 and zero-slope targets. Context/Run transaction simplification, remaining outdated receipt/cache fixture corrections, current-source race checks, overall review, and a fresh live harness are still pending.
Pin sqlx-core to upstream's TCP_NODELAY fix so MySQL protocol packets avoid Nagle/delayed-ACK stalls, including statement-cache eviction. Keep the existing connection, TLS and persistence owners. Add an offline regression that inspects real SQLx TCP sockets before handshake and document the transport contract. The regression fails with registry SQLx 0.9.0 and passes with the pinned fix. Related: matrixorigin#1124
Remove per-turn memory snapshots and the separate post-loop settlement worker. Explicit session finalization reconstructs input through the existing Context coordinator; align health checks and retire obsolete metrics.
Checkpoint the issue matrixorigin#1124 SQL reduction work. Cache ordinary authenticated principals, reuse bounded model admission, remove distributed weighted admission and write-only tool output projections, and keep readonly Server observations outside the durable effect ledger and generic replay cache. Retain explicit memory operations while removing automatic per-turn recall. Add a public HTTP SQL budget gate and align schema inventory and ownership documentation with the removed storage paths. This is an intermediate checkpoint for PR matrixorigin#1127. The last measured public SQL counts are 132/150/185 for zero/one/three readonly tool calls, exceeding the <=20 and zero-slope targets. Context/Run transaction simplification, remaining outdated receipt/cache fixture corrections, current-source race checks, overall review, and a fresh live harness are still pending.
XuPeng-SH
force-pushed
the
perf/issue-1124-chat-sql-simplification
branch
from
October 24, 2026 14:00
3f34c34 to
c70c68b
Compare
Preserve real provider output and qualified usage through atomic terminal settlement and cold replay, without treating recovery hints as resume grants. Fence forced handoffs before uncertain-effect reconciliation and retain debt. Align online fixtures with canonical ownership and immutable Run events; retire automatic full-capture assumptions and isolate the Memory catalog.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Capability assessment: Updated: Ordinary Server conversation uses Run authority, canonical Context and durable effect custody while retiring redundant persistence, distributed weighted reservations, automatic memory processing and implicit history tools. Update authentication, runtime lifecycle, data/storage, model routing, memory and multi-session design contracts; preserve the pinned MOI gate.
Summary
Local validation is complete for
bd8d3a511. New-head CI and fresh live harness are pending. The earlierc70c68b02CI/preflight failures are historical failures, not passes for this revision.A short conversation should not pay for a separate persistence protocol at every model or tool boundary. Concentrate execution authority in Run, continuity in Context and uncertain effects in the invocation ledger, and remove the redundant owners and writes.
The public
/chat/streamSQL fixture now measures 15 statements for empty Context and 17 with retained Context, including BEGIN/COMMIT and the full post-stream drain, in two transactions. One or three readonly discovery/agent-list rounds add zero framework SQL. A deliberately observed control-watcher poll adds one real observation statement. These are scripted-provider fixture counts, not production latency or arbitrary-tool guarantees.Related issue
Refs #1124. Remaining MatrixOne index selection is tracked in matrixorigin/matrixone#31046.
Change type
User and compatibility impact
This is a fresh-schema change, without historical migration, backfill or old-layout fallback. Existing incompatible schema markers fail startup explicitly.
Ordinary turns no longer perform automatic memory extraction/implicit memory recall, eager skill/Work discovery, or global session-history tools. Explicit memory/skills/Work operations and local CLI journal remain. Proven builtin readonly observations may execute again and see current data; they do not promise exact read replay. Real external effects retain durable prepare/dispatch/outcome custody. Default diagnostic ingestion is omitted; explicit Explain still records diagnostics.
Cross-process ordinary JWT revocation can take up to the fixed 30-second cache window; sensitive identity/credential operations resolve fresh authority, and local mutations invalidate the cache. Capacity is bounded per process rather than by a globally precise weighted reservation. Qualified execution usage remains on Run; the daily token mirror is no longer an ordinary-Run admission gate. Session-creation limits retain their contract.
Run display GET reads canonical facts and may advance between queries; its old repair endpoint is retired. Live cross-server tool presentation is best effort; cold replay does not promise generic tool cards. Canonical results and uncertainty remain in the invocation ledger and Context. The standalone segment-upload transport and optional legacy fallback paths are retired; pinned MOI APIs remain unchanged.
Architecture and complexity delta
MAX. MatrixOne may scan history despite tenant predicates/index hints. A generated-key experiment failed an interleaved-history control and is excluded. This PR does not claim every remaining query has history-independent cost or that remote-effect tools add no SQL.Verification
54e49ec3e; candidatebd8d3a511. Separate actualgpt-6.1-sol/xhighdesign and overall reviews reconciled the complete PR, implementation/test/documentation deltas and corrections; no material code blocker remains. The frozen MOI consumer, both pins and gate workflow are unchanged.-D warnings, plus format checks passed. Earlier unchanged Services/schema/repository-contract checks remain valid.astra,astra-server,astra-testwere built frombd8d3a511. Actual CLI/internal-JWT/fresh Server/real MatrixOne/scripted provider: healthy chat exits 0, full answer and Completed C0; malformed partial exits 3, remains Failed, preserves actual text, reports authoritative terminal, and retains Failed C0/raw history. Each chat made exactly one provider request. This is a functional diagnostic, not a scored/live-model benchmark.c70c68b02, with zero formal cases executed; they do not establish a pass or an infrastructure/provider root cause.Final checklist