mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-10-31 19:52:43 +00:00
* feat(managed-agent): consolidate persistence into a 32-table baseline Preserve journal, idempotency, runtime, physical storage and recovery boundaries in a shared fresh-database schema. Add fixed snapshots, typed operations, scoped resource collection and atomic automation projections with MySQL fault and load coverage. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(managed-agent): restore schema CI and channel claim fencing Avoid nested snapshot connection borrowing while preserving committed read-lease expiry and retirement checks. Carry reserved channel reconciliation identities into private journal commands and retain UNKNOWN no-resend behavior. Update canonical-schema fixtures, migration discovery and application packaging. Preserve the 32-table fresh-database boundary and record local versus pending CI acceptance in both languages. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(managed-agent): refuse system catalogs before schema initialization Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(managed-agent): restore fresh-schema E2E and MariaDB validation Port the real-stack runner and its audits to canonical tables, retain stream and approval scopes, and register fresh Linux storage before Harness admission. Validate MariaDB CHECK enforcement and InnoDB without relying on MySQL-only metadata or negative-test syntax. Add regression coverage and document current platform and acceptance boundaries. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(managed-agent): normalize boolean CASE catalog literals Accept MariaDB's numeric representation of bare SQL boolean literals while retaining structural CHECK validation, quoted values and enforcement guards. Add alias and tamper regression coverage and synchronize the bilingual verification evidence. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(ci): raise managed schema MariaDB packet budget Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(managed-agent): support MariaDB load-test query plans Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * fix(managed-agent): Restore native storage fixtures and const read witnesses Preserve measured row counts while bounding MariaDB optimization-stage page reads, and register Linux Hosted test storage through the production guard before tool admission. Keep recovery registration across restarts and resolve physical owners through aliases. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> * test(managed-agent): Await snapshot publication in retraction checks Keep the strict terminal snapshot watermark assertion while allowing after-commit publication to finish under the concurrent materializer. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> --------- Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com> Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
58 lines
2.4 KiB
SQL
58 lines
2.4 KiB
SQL
-- H5b/H5c of #12827: the registered channel connections, the route
|
|
-- catalog that maps an authenticated scope to its Session, and the
|
|
-- dispatcher's claim ledger that remembers which Session a claimed delivery
|
|
-- belongs to and when it was claimed. None of these holds a journal fact:
|
|
-- the Session journal's channel_route and channel_delivery chains stay the
|
|
-- authority; these rows locate, index and lease.
|
|
|
|
CREATE TABLE qwen_managed_channel_instance (
|
|
tenant_id VARCHAR(128) NOT NULL,
|
|
channel_id VARCHAR(128) NOT NULL,
|
|
platform VARCHAR(64) NOT NULL,
|
|
account_id VARCHAR(512) NOT NULL,
|
|
account_generation BIGINT NOT NULL,
|
|
state VARCHAR(16) NOT NULL,
|
|
actor_id VARCHAR(512) NOT NULL,
|
|
workspace_id VARCHAR(512) NOT NULL,
|
|
cwd_relative VARCHAR(1024) NOT NULL,
|
|
policy_json LONGTEXT NOT NULL,
|
|
created_at BIGINT NOT NULL,
|
|
updated_at BIGINT NOT NULL,
|
|
PRIMARY KEY (tenant_id, channel_id)
|
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
|
|
CREATE INDEX idx_managed_channel_instance_created
|
|
ON qwen_managed_channel_instance (tenant_id, created_at, channel_id);
|
|
|
|
-- One row per route chain: the scope the Session journal keyed the chain
|
|
-- by, so the next event on that scope finds its Session without guessing.
|
|
CREATE TABLE qwen_managed_channel_binding (
|
|
tenant_id VARCHAR(128) NOT NULL,
|
|
channel_id VARCHAR(128) NOT NULL,
|
|
route_id VARCHAR(128) NOT NULL,
|
|
session_id VARCHAR(512) NOT NULL,
|
|
scope_kind VARCHAR(16) NOT NULL,
|
|
sender_id VARCHAR(512),
|
|
chat_id VARCHAR(512),
|
|
thread_id VARCHAR(512),
|
|
created_at BIGINT NOT NULL,
|
|
PRIMARY KEY (tenant_id, channel_id, route_id)
|
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
|
|
CREATE INDEX idx_managed_channel_binding_session
|
|
ON qwen_managed_channel_binding (tenant_id, session_id);
|
|
|
|
-- The claim of one delivery: the Session its record lives in and the
|
|
-- time the dispatcher claimed it, so an adapter that dies after a send
|
|
-- is settled unknown by lease, never resent.
|
|
CREATE TABLE qwen_managed_channel_claim (
|
|
tenant_id VARCHAR(128) NOT NULL,
|
|
channel_id VARCHAR(128) NOT NULL,
|
|
delivery_id VARCHAR(128) NOT NULL,
|
|
session_id VARCHAR(512) NOT NULL,
|
|
claimed_at BIGINT NOT NULL,
|
|
PRIMARY KEY (tenant_id, channel_id, delivery_id)
|
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
|
|
CREATE INDEX idx_managed_channel_claim_claimed
|
|
ON qwen_managed_channel_claim (tenant_id, channel_id, claimed_at);
|