fix(ql3): preserve legacy running instances

This commit is contained in:
whyour
2026-09-02 04:06:13 +08:00
parent 950f638998
commit 6717a3dfa6
2 changed files with 20 additions and 1 deletions
@@ -86,7 +86,9 @@ function legacyDomain(name: string): LocalReconciliationPlanDomain {
if (['Dependences', 'Dependencies', 'Apps'].includes(name)) {
return 'plugin_package';
}
if (['CrontabStats', 'Logs'].includes(name)) return 'run_history';
if (['CrontabStats', 'Logs', 'RunningInstances'].includes(name)) {
return 'run_history';
}
return 'unknown';
}
@@ -0,0 +1,17 @@
const assert = require('node:assert/strict');
const { test } = require('node:test');
const {
classifyLocalReconciliationFact,
} = require('../dist/deployment/reconciliation/planning/inventory.js');
test('classifies Legacy runtime instances as preserved run history', () => {
assert.equal(
classifyLocalReconciliationFact('legacy', 'RunningInstances'),
'run_history',
);
assert.equal(
classifyLocalReconciliationFact('legacy', 'PluginOwnedState'),
'unknown',
);
});