feat: ship deterministic parser and lifecycle release

This commit is contained in:
inman committed 2026-08-28 17:13:58 +08:00
1 parent 208c434b31
commit 7b5d855b09
176 files changed
+20248 -1362

No files matched your search

+41 -3
View File
@@ -98,7 +98,7 @@ test('order updates require an identifier and only run a no-write browser previe
assert.equal(result.identifier, 'LW-270520A-A');
});
test('parent confirmation export is blocked before any browser operation', () => {
test('untyped parent confirmation export is blocked before any browser operation', () => {
const result = plans.validateOperation({
action: 'confirmation_export',
order_nature: 'formal',
@@ -106,7 +106,7 @@ test('parent confirmation export is blocked before any browser operation', () =>
data: { existing_refs: { parent_group_no: 'PARENT-EXAMPLE' } },
});
assert.equal(result.ok, false);
assert.match(result.blockers.join('\n'), /母团/);
assert.match(result.blockers.join('\n'), /existing_refs\.kind|缺少标准确认件类型|唯一解析/);
assert.equal(result.execution, 'blocked');
});
@@ -524,7 +524,7 @@ test('allows multi-date split facts only inside the dedicated TEST-202609 probe'
assert.equal(result.ok, true, result.blockers.join('; '));
assert.match(result.warnings.join('\n'), /测试态事实探针/);
const publicPlan = plans.publicPlan(result);
assert.equal(publicPlan.contract_version, 'ltjt-lifecycle-v2.8-updating-wide-parse-2026-08');
assert.equal(publicPlan.contract_version, 'ltjt-lifecycle-v2.9-roster-leader-contact-2026-08');
assert.equal(publicPlan.capability_state, 'validated_parent_create_batch_split_order_probe_only');
});
@@ -599,6 +599,44 @@ test('accepts canonical confirmation export types without alias normalization',
assert.deepEqual(result.exportTypes, ['liantai-confirm']);
});
test('shared-plan visitor export uses tid only and rejects child-scoped or mixed sources', () => {
const operation = {
action: 'confirmation_export',
order_nature: 'formal',
submit_mode: 'dry_run',
data: {
existing_refs: {
kind: 'shared_plan', identifier: 'LW-261101A-A', parent_group_no: 'LW-261101A-A',
plan_no: 'LW-261101A-A', tid: '456', resolved: true, resolution_source: 'erp_unique_match'
},
confirmation: { type: 'visitor-list' }
}
};
const result = plans.validateOperation(operation);
assert.equal(result.ok, true, result.blockers.join('; '));
assert.deepEqual(result.exportTypes, ['visitor-list']);
const plan = plans.buildConfirmationExportPlan(operation, {});
assert.equal(plan.target_kind, 'shared_plan');
assert.deepEqual(plan.artifacts, [{
type: 'visitor-list',
path: '/System/Business/orders_Visitor.asp',
params: { tid: '456' },
downloaded: false,
converted: false,
scheduled: false,
sent: false
}]);
const wrongType = structuredClone(operation);
wrongType.data.confirmation = { type: 'liantai-confirm' };
assert.match(plans.validateOperation(wrongType).blockers.join('\n'), /散拼母团.*整团游客信息/);
const leakedChildRef = structuredClone(operation);
leakedChildRef.data.existing_refs.ddid = '789';
assert.match(plans.validateOperation(leakedChildRef).blockers.join('\n'), /散拼母团.*子单.*ddid/);
});
test('rejects requested confirmation formats because platform processing is separate', () => {
const result = plans.validateOperation({
action: 'confirmation_export',