feat(ql3): expose bounded worker session observation

This commit is contained in:
whyour
2026-08-20 12:55:44 +08:00
parent 6265e31dce
commit 4a4fa85f51
24 changed files with 1437 additions and 28 deletions
@@ -561,6 +561,7 @@ function workerCredentialPrivileges(kind) {
? [
'worker_credential_management_quota_buckets',
'plugin_package_identity_keyset_ledger',
'worker_sessions',
]
: []),
...(manager
@@ -835,7 +836,7 @@ test('accepts the exact PostgreSQL control schema and least-privilege runtime ro
serverMajor: 16,
currentUser: 'ql3_runtime',
contractName: 'control-core',
contractVersion: 67,
contractVersion: 68,
migrationIds: [
'pg-0001-schema-capability',
'pg-0002-run-core',
@@ -905,6 +906,7 @@ test('accepts the exact PostgreSQL control schema and least-privilege runtime ro
'pg-0066-cancellation-dispatch',
'pg-0067-cancellation-dispatch-management',
'pg-0068-cancellation-dispatch-project-keyset',
'pg-0069-worker-session-management-observation',
],
});
});
@@ -935,10 +937,10 @@ test('accepts the exact schema and isolated least-privilege admin role', async (
}),
);
assert.equal(report.currentUser, 'ql3_admin');
assert.equal(report.contractVersion, 67);
assert.equal(report.contractVersion, 68);
assert.equal(
report.migrationIds.at(-1),
'pg-0068-cancellation-dispatch-project-keyset',
'pg-0069-worker-session-management-observation',
);
});
@@ -951,10 +953,10 @@ test('accepts the isolated least-privilege automation manager role', async () =>
}),
);
assert.equal(report.currentUser, 'ql3_automation_manager');
assert.equal(report.contractVersion, 67);
assert.equal(report.contractVersion, 68);
assert.equal(
report.migrationIds.at(-1),
'pg-0068-cancellation-dispatch-project-keyset',
'pg-0069-worker-session-management-observation',
);
const widened = automationManagerPrivileges();
@@ -983,10 +985,10 @@ test('accepts the isolated least-privilege human Approval manager role', async (
}),
);
assert.equal(report.currentUser, 'ql3_approval_manager');
assert.equal(report.contractVersion, 67);
assert.equal(report.contractVersion, 68);
assert.equal(
report.migrationIds.at(-1),
'pg-0068-cancellation-dispatch-project-keyset',
'pg-0069-worker-session-management-observation',
);
const widened = approvalManagerPrivileges();
@@ -1017,10 +1019,10 @@ test('accepts the isolated least-privilege Run manager role', async () => {
}),
);
assert.equal(report.currentUser, 'ql3_run_manager');
assert.equal(report.contractVersion, 67);
assert.equal(report.contractVersion, 68);
assert.equal(
report.migrationIds.at(-1),
'pg-0068-cancellation-dispatch-project-keyset',
'pg-0069-worker-session-management-observation',
);
const widened = runManagerPrivileges();
@@ -1181,10 +1183,10 @@ test('accepts the exact schema and isolated Worker ingress role', async () => {
}),
);
assert.equal(report.currentUser, 'ql3_worker_ingress');
assert.equal(report.contractVersion, 67);
assert.equal(report.contractVersion, 68);
assert.equal(
report.migrationIds.at(-1),
'pg-0068-cancellation-dispatch-project-keyset',
'pg-0069-worker-session-management-observation',
);
});