mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-21 01:32:44 +08:00
feat(ql3): add local run log retention
This commit is contained in:
@@ -2420,6 +2420,7 @@ function auditSourceImports(root, packagePath, findings) {
|
||||
'@qinglong/runtime-core/plugin-package-task-publication',
|
||||
'@qinglong/runtime-core/project-tool-definition-snapshot',
|
||||
'@qinglong/runtime-core/run-attempt-log-read',
|
||||
'@qinglong/runtime-core/run-attempt-log-retention',
|
||||
'@qinglong/runtime-core/task-spec-semantic',
|
||||
].includes(specifier) &&
|
||||
!(
|
||||
|
||||
@@ -148,7 +148,7 @@ async function main() {
|
||||
report.status !== 'ready' ||
|
||||
report.generation !== 1 ||
|
||||
report.profile !== input.profile ||
|
||||
report.sqlite?.contractVersion !== 43 ||
|
||||
report.sqlite?.contractVersion !== 44 ||
|
||||
(report.image?.architecture !== 'amd64' &&
|
||||
report.image?.architecture !== 'arm64') ||
|
||||
report.service?.kind !== 'compose'
|
||||
|
||||
@@ -361,8 +361,8 @@ async function main() {
|
||||
(fs.statSync(path.join(rolloutRoot, name)).mode & 0o777) !== 0o600,
|
||||
) ||
|
||||
(fs.statSync(backupPath).mode & 0o777) !== 0o600 ||
|
||||
receipt.sqlite?.contractVersion !== 43 ||
|
||||
receipt.sqlite?.writeContractVersion !== 43 ||
|
||||
receipt.sqlite?.contractVersion !== 44 ||
|
||||
receipt.sqlite?.writeContractVersion !== 44 ||
|
||||
(receipt.sqlite?.writeObservation !== 'unchanged' &&
|
||||
receipt.sqlite?.writeObservation !== 'changed') ||
|
||||
receipt.sqlite?.backup?.sha256 !== backup.sha256 ||
|
||||
|
||||
@@ -245,9 +245,9 @@ function auditDockerfile(contents, findings) {
|
||||
!contents.includes('io.qinglong.ai="excluded"') ||
|
||||
!contents.includes('io.qinglong.profile="edge,standalone"') ||
|
||||
!contents.includes('io.qinglong.local.application-config="2"') ||
|
||||
!contents.includes('io.qinglong.local.sqlite-contract-min="43"') ||
|
||||
!contents.includes('io.qinglong.local.sqlite-contract-max="43"') ||
|
||||
!contents.includes('io.qinglong.local.sqlite-write-contract="43"') ||
|
||||
!contents.includes('io.qinglong.local.sqlite-contract-min="44"') ||
|
||||
!contents.includes('io.qinglong.local.sqlite-contract-max="44"') ||
|
||||
!contents.includes('io.qinglong.local.sqlite-write-contract="44"') ||
|
||||
!contents.includes('io.qinglong.local.compose-selection="1"')
|
||||
) {
|
||||
addFinding(findings, 'RUNTIME_IDENTITY_OR_LABEL_DRIFT');
|
||||
|
||||
@@ -535,7 +535,7 @@ function snapshotReceipt(evidence) {
|
||||
function isSnapshot(value) {
|
||||
return (
|
||||
hasExactKeys(value, SNAPSHOT_KEYS) &&
|
||||
value.contractVersion === 43 &&
|
||||
value.contractVersion === 44 &&
|
||||
typeof value.sha256 === 'string' &&
|
||||
SHA256_PATTERN.test(value.sha256) &&
|
||||
Number.isSafeInteger(value.bytes) &&
|
||||
@@ -1337,7 +1337,7 @@ async function resumePhase(options, manifest) {
|
||||
const outcomes = Object.freeze({
|
||||
commitStatus: committed.status,
|
||||
replayStatus: replay.status,
|
||||
sqliteIntegrity: databaseEvidence.contractVersion === 43 ? 'ok' : 'invalid',
|
||||
sqliteIntegrity: databaseEvidence.contractVersion === 44 ? 'ok' : 'invalid',
|
||||
stageRemoved: !fs.existsSync(session.collection.stagePath),
|
||||
tombstonePresent: fs.existsSync(tombstonePath),
|
||||
retainedSnapshots,
|
||||
|
||||
Reference in New Issue
Block a user