From 8e04aa25f010193274359af1893e69737373276b Mon Sep 17 00:00:00 2001 From: zhengwr Date: Thu, 11 Jun 2026 13:01:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E6=9D=83=E9=99=90=E8=87=AA=E4=B8=BE?= =?UTF-8?q?=E9=A1=BB=E5=9C=A8=E7=A7=8D=E5=AD=90=E5=AE=9E=E4=BD=93=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E5=90=8E=E9=87=8D=E6=94=BE=E2=80=94=E2=80=94=E8=A7=84?= =?UTF-8?q?=E5=88=99=20ENTITYID=20=E6=8C=89=E8=A1=A8=E5=90=8D=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E7=BB=91=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI 实跑暴露:bootstrap-privilege.sql 跑在 --seed 之前时,INSERT...SELECT 在空 sys_entity 上静默插 0 条规则 → 权限对拍负例不拒/正例 0 行。脚本本身幂等, 种子后重放即修复(eip4ci 实证 9/9+3/3) Co-Authored-By: Claude Fable 5 --- scripts/ci.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/ci.sh b/scripts/ci.sh index abcce82..99a2315 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -48,6 +48,10 @@ CP="platform-parity/target/classes:$(mvn -q org.apache.maven.plugins:maven-depen -pl platform-parity -Dmdep.outputFile=/dev/stdout -o | tail -1)" java -cp "$CP" com.eip4.platform.parity.selfcheck.ParityCli \ --engine="http://localhost:${CI_PORT}" --jdbc="$JDBC" --user="$CI_PG_USER" --pass= --seed --all +# 权限规则按表名动态绑定实体 ID,必须在种子实体创建后重放(脚本幂等); +# 否则 INSERT...SELECT 在空 sys_entity 上静默插 0 条规则 → 负例不拒、正例 0 行 +psql -h "$CI_PG_HOST" -p "$CI_PG_PORT" -U "$CI_PG_USER" -d "$CI_DB" -q \ + -f platform-parity/src/main/resources/bootstrap/bootstrap-privilege.sql java -cp "$CP" com.eip4.platform.parity.selfcheck.ParityCli \ --engine="http://localhost:${CI_PORT}" --jdbc="$JDBC" --user="$CI_PG_USER" --pass= --privilege