fix(gates): enforce BRD content thresholds
This commit is contained in:
@@ -56,6 +56,8 @@ docker exec -i wygj-mysql mysql -uroot -proot --default-character-set=utf8mb4 <<
|
||||
CREATE DATABASE \`$TEST_DB\` CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;
|
||||
USE \`$TEST_DB\`;
|
||||
CREATE TABLE aihr_practice_scenario (tenant_id varchar(20), position varchar(80), enabled tinyint);
|
||||
CREATE TABLE aihr_knowledge_attach (tenant_id varchar(20), type varchar(50), status tinyint);
|
||||
CREATE TABLE aihr_case_record (tenant_id varchar(20), status varchar(30));
|
||||
CREATE TABLE aihr_practice_session (tenant_id varchar(20), session_id varchar(100), ext_party_id varchar(100), mode varchar(30), finished_time datetime, satisfaction_score tinyint);
|
||||
CREATE TABLE aihr_practice_assignment (tenant_id varchar(20), ext_party_id varchar(100), create_time datetime);
|
||||
CREATE TABLE aihr_org_snapshot (
|
||||
@@ -76,6 +78,24 @@ SELECT '000000','生活顾问',1 FROM (
|
||||
SELECT 1 n UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6
|
||||
UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10 UNION ALL SELECT 11 UNION ALL SELECT 12
|
||||
) n;
|
||||
INSERT INTO aihr_knowledge_attach
|
||||
SELECT '000000','sop',2 FROM (
|
||||
SELECT 1 n UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5
|
||||
) n;
|
||||
INSERT INTO aihr_knowledge_attach VALUES
|
||||
('000000','training',2),
|
||||
('other','sop',2),
|
||||
('000000','sop',1);
|
||||
INSERT INTO aihr_case_record
|
||||
SELECT '000000','已入库' FROM (
|
||||
SELECT 1 n UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5
|
||||
UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9 UNION ALL SELECT 10
|
||||
UNION ALL SELECT 11 UNION ALL SELECT 12 UNION ALL SELECT 13 UNION ALL SELECT 14 UNION ALL SELECT 15
|
||||
UNION ALL SELECT 16 UNION ALL SELECT 17 UNION ALL SELECT 18 UNION ALL SELECT 19 UNION ALL SELECT 20
|
||||
) n;
|
||||
INSERT INTO aihr_case_record VALUES
|
||||
('000000','已转写'),
|
||||
('other','已入库');
|
||||
INSERT INTO aihr_org_snapshot VALUES
|
||||
('000000','active','A','P1','13900000001'),
|
||||
('000000','active','B','P1','13900000001'),
|
||||
@@ -124,6 +144,7 @@ pilot_output="$(AIHR_PILOT_START_DATE=2026-07-07 AIHR_PILOT_END_DATE=2026-07-10
|
||||
[[ "$pilot_output" == *'projects=1/1-2'* ]] || { echo "FAIL: safe pilot project count: $pilot_output" >&2; exit 1; }
|
||||
[[ "$pilot_output" == *'org_ten_sessions=1/2'* ]] || { echo "FAIL: formal 9/10 boundary: $pilot_output" >&2; exit 1; }
|
||||
[[ "$pilot_output" == *'calibration=1/20 consistency=1/1'* ]] || { echo "FAIL: calibration window: $pilot_output" >&2; exit 1; }
|
||||
[[ "$pilot_output" == *'sop_docs=5/5 stored_cases=20/20'* ]] || { echo "FAIL: BRD content quantity gates: $pilot_output" >&2; exit 1; }
|
||||
[[ "$pilot_output" == *'sop_usable=1/1 sop_pending=1'* ]] || { echo "FAIL: SOP window: $pilot_output" >&2; exit 1; }
|
||||
[[ "$pilot_output" == *'satisfaction=5.0/5 responses=19'* ]] || { echo "FAIL: safe satisfaction identity scope: $pilot_output" >&2; exit 1; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user