mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-10-21 14:21:48 +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>
123 lines
4.6 KiB
SQL
123 lines
4.6 KiB
SQL
CREATE TABLE qwen_runtime_binding_slot (
|
|
request_key CHAR(64) PRIMARY KEY,
|
|
tenant_id VARCHAR(512) NOT NULL,
|
|
workspace_id VARCHAR(512) NOT NULL,
|
|
workspace_generation VARCHAR(512) NOT NULL,
|
|
canonical_cwd VARCHAR(512) NOT NULL,
|
|
capability_digest VARCHAR(512) NOT NULL,
|
|
isolation_class VARCHAR(32) NOT NULL,
|
|
isolation_key VARCHAR(512),
|
|
provisioner_kind VARCHAR(128) NOT NULL,
|
|
placement_domain VARCHAR(512) NOT NULL,
|
|
runtime_template_digest VARCHAR(512) NOT NULL,
|
|
last_generation BIGINT NOT NULL,
|
|
active_binding_id VARCHAR(512),
|
|
CONSTRAINT uq_runtime_binding_isolation UNIQUE (isolation_key)
|
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
|
|
CREATE TABLE qwen_runtime_binding (
|
|
binding_id VARCHAR(512) PRIMARY KEY,
|
|
request_key CHAR(64) NOT NULL,
|
|
scope_key CHAR(64) NOT NULL,
|
|
tenant_id VARCHAR(512) NOT NULL,
|
|
workspace_id VARCHAR(512) NOT NULL,
|
|
workspace_generation VARCHAR(512) NOT NULL,
|
|
canonical_cwd VARCHAR(512) NOT NULL,
|
|
capability_digest VARCHAR(512) NOT NULL,
|
|
isolation_class VARCHAR(32) NOT NULL,
|
|
isolation_key VARCHAR(512),
|
|
provisioner_kind VARCHAR(128) NOT NULL,
|
|
placement_domain VARCHAR(512) NOT NULL,
|
|
runtime_template_digest VARCHAR(512) NOT NULL,
|
|
runtime_generation BIGINT NOT NULL,
|
|
binding_state VARCHAR(32) NOT NULL,
|
|
provision_request_id VARCHAR(512),
|
|
provision_seed_ciphertext LONGTEXT,
|
|
credential_key_id VARCHAR(512),
|
|
resource_handle_version INT,
|
|
resource_handle_json LONGTEXT,
|
|
runtime_instance_id VARCHAR(512),
|
|
runtime_endpoint VARCHAR(2048),
|
|
runtime_lease_id VARCHAR(512),
|
|
runtime_epoch BIGINT,
|
|
runtime_credential_ciphertext LONGTEXT,
|
|
runtime_credential_key_id VARCHAR(512),
|
|
attestation_generation BIGINT NOT NULL,
|
|
drain_requested BOOLEAN NOT NULL,
|
|
operation_owner VARCHAR(512),
|
|
operation_lease_until DATETIME(6),
|
|
operation_generation BIGINT NOT NULL,
|
|
record_version BIGINT NOT NULL,
|
|
last_health_at DATETIME(6),
|
|
last_reconciled_at DATETIME(6),
|
|
last_active_at DATETIME(6) NOT NULL,
|
|
CONSTRAINT uq_runtime_binding_generation
|
|
UNIQUE (request_key, runtime_generation)
|
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
|
|
CREATE INDEX idx_runtime_binding_scope
|
|
ON qwen_runtime_binding (scope_key, isolation_key, binding_state);
|
|
|
|
CREATE TABLE qwen_runtime_session (
|
|
runtime_session_id VARCHAR(512) PRIMARY KEY,
|
|
scope_key CHAR(64) NOT NULL,
|
|
tenant_id VARCHAR(512) NOT NULL,
|
|
workspace_id VARCHAR(512) NOT NULL,
|
|
workspace_generation VARCHAR(512) NOT NULL,
|
|
canonical_cwd VARCHAR(512) NOT NULL,
|
|
capability_digest VARCHAR(512) NOT NULL,
|
|
isolation_class VARCHAR(32) NOT NULL,
|
|
harness_session_id VARCHAR(512) NOT NULL,
|
|
turn_kind VARCHAR(32) NOT NULL,
|
|
binding_id VARCHAR(512) NOT NULL,
|
|
runtime_generation BIGINT NOT NULL,
|
|
session_state VARCHAR(32) NOT NULL,
|
|
record_version BIGINT NOT NULL,
|
|
last_active_at DATETIME(6) NOT NULL
|
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
|
|
CREATE INDEX idx_runtime_session_scope
|
|
ON qwen_runtime_session (scope_key);
|
|
|
|
CREATE INDEX idx_runtime_session_binding
|
|
ON qwen_runtime_session (
|
|
binding_id, runtime_generation, session_state
|
|
);
|
|
|
|
CREATE TABLE qwen_tool_execution (
|
|
execution_call_id_hash CHAR(64) NOT NULL,
|
|
execution_call_id VARCHAR(512) PRIMARY KEY,
|
|
idempotency_key_hash CHAR(64) NOT NULL,
|
|
idempotency_key VARCHAR(512) NOT NULL,
|
|
binding_id VARCHAR(512) NOT NULL,
|
|
runtime_generation BIGINT NOT NULL,
|
|
harness_session_id VARCHAR(512) NOT NULL,
|
|
runtime_session_id VARCHAR(512) NOT NULL,
|
|
runtime_session_key CHAR(64) NOT NULL,
|
|
turn_id VARCHAR(512) NOT NULL,
|
|
tool_call_id VARCHAR(512) NOT NULL,
|
|
request_digest VARCHAR(512) NOT NULL,
|
|
reference_json LONGTEXT NOT NULL,
|
|
execution_state VARCHAR(32) NOT NULL,
|
|
execution_status VARCHAR(32),
|
|
result_json LONGTEXT,
|
|
last_sequence BIGINT NOT NULL,
|
|
cancel_requested BOOLEAN NOT NULL,
|
|
dispatch_owner VARCHAR(512),
|
|
dispatch_lease_until DATETIME(6),
|
|
dispatch_generation BIGINT NOT NULL,
|
|
record_version BIGINT NOT NULL,
|
|
settled_at DATETIME(6),
|
|
CONSTRAINT uq_tool_execution_call_hash
|
|
UNIQUE (execution_call_id_hash),
|
|
CONSTRAINT uq_tool_execution_idempotency
|
|
UNIQUE (idempotency_key_hash)
|
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;
|
|
|
|
CREATE INDEX idx_tool_execution_session
|
|
ON qwen_tool_execution (runtime_session_key, execution_state);
|
|
|
|
CREATE INDEX idx_tool_execution_binding
|
|
ON qwen_tool_execution (
|
|
binding_id, runtime_generation, execution_state
|
|
);
|