feat(ql3): add local run log retention

This commit is contained in:
whyour
2026-08-12 02:57:43 +08:00
parent 308aa75d89
commit 2bfa8ca279
50 changed files with 2752 additions and 85 deletions
@@ -136,9 +136,11 @@ test('creates a reviewed edge database and opens runtime only after readiness',
'0084-capability-v42',
'0085-plugin-package-workflow-run-list-index',
'0086-capability-v43',
'0087-run-attempt-log-retention',
'0088-capability-v44',
]);
assert.equal(migrated.readiness.contractName, 'local-control-core');
assert.equal(migrated.readiness.contractVersion, 43);
assert.equal(migrated.readiness.contractVersion, 44);
assert.equal(migrated.readiness.journalMode, 'delete');
assert.equal(fs.statSync(databasePath).mode & 0o777, 0o600);
@@ -501,8 +503,8 @@ test('backfills v14 execution revisions with a verified independent digest', asy
.get(),
},
{
contract_version: 43,
migration_id: '0085-plugin-package-workflow-run-list-index',
contract_version: 44,
migration_id: '0087-run-attempt-log-retention',
},
);
} finally {
@@ -689,19 +691,19 @@ test('excludes reviewed optional feature tables while preserving unknown table d
const options = { databasePath, profile: 'edge' };
await migrateLocalSqlitePath(options);
const client = new DatabaseSync(databasePath);
assert.equal((await auditLocalSqlitePath(options)).tableCount, 76);
assert.equal((await auditLocalSqlitePath(options)).tableCount, 78);
client.exec(
'CREATE TABLE "ModelInvocationFeatureHead" (feature_id TEXT PRIMARY KEY)',
);
client.close();
assert.equal((await auditLocalSqlitePath(options)).tableCount, 76);
assert.equal((await auditLocalSqlitePath(options)).tableCount, 78);
const unknownClient = new DatabaseSync(databasePath);
unknownClient.exec('CREATE TABLE "UserExtensionData" (id TEXT PRIMARY KEY)');
unknownClient.close();
assert.equal((await auditLocalSqlitePath(options)).tableCount, 77);
assert.equal((await auditLocalSqlitePath(options)).tableCount, 79);
const triggerClient = new DatabaseSync(databasePath);
triggerClient.exec(`