feat(aihr): close functional checklist gaps

This commit is contained in:
key
2026-08-02 12:15:45 +08:00
parent 699cc08050
commit 6ad8a017a4
80 changed files with 4930 additions and 430 deletions
@@ -0,0 +1,21 @@
import assert from 'node:assert/strict';
import fs from 'node:fs';
import test from 'node:test';
const service = fs.readFileSync(new URL('../src/services/questions.ts', import.meta.url), 'utf8');
const page = fs.readFileSync(new URL('../src/pages/user/sop/index.vue', import.meta.url), 'utf8');
test('negative feedback bridge sends only opaque source and idempotency references', () => {
assert.match(service, /questions\/from-answer-feedback/);
assert.match(service, /data:\s*\{\s*requestId: data\.requestId,\s*idempotencyKey: data\.idempotencyKey\s*\}/);
assert.doesNotMatch(service, /publishQuestionFromAnswerFeedback[\s\S]*queryText:/);
assert.doesNotMatch(service, /publishQuestionFromAnswerFeedback[\s\S]*fragmentIds:/);
});
test('human-help conversion is explicit, privacy-aware, and remains pending moderation', () => {
assert.match(page, /转人工求助/);
assert.match(page, /审核通过后其他员工可见/);
assert.match(page, /不含住户姓名、电话、房号等隐私信息/);
assert.match(page, /已提交审核/);
assert.doesNotMatch(page, /已公开|已发布到问题榜/);
});