ASSET1D/OAOPS1 完成资产公网试录与巡检降噪

这个提交包含在:
2026-05-23 16:11:49 +08:00
父节点 4b8685d5dc
当前提交 c76001c8d2
共修改 8 个文件,包含 314 行新增和 22 行删除
+17 -12
查看文件
@@ -101,9 +101,22 @@ run_client_spec_if_present() {
return 0
fi
local cooldown="${OAOPS1_E2E_COOLDOWN_SECONDS:-2}"
if [[ "$cooldown" =~ ^[0-9]+$ && "$cooldown" -gt 0 ]]; then
sleep "$cooldown"
fi
run_client_finding_step "$name" "$@" npx playwright test "$spec" --workers=1 --reporter=list
}
cooldown_login_step() {
local reason="$1"
local cooldown="${OAOPS1_LOGIN_STEP_COOLDOWN_SECONDS:-65}"
if [[ "$cooldown" =~ ^[0-9]+$ && "$cooldown" -gt 0 ]]; then
log "[oaops1] login cooldown ${cooldown}s before ${reason}"
sleep "$cooldown"
fi
}
load_default_env() {
local env_file="${OAOPS1_ENV_FILE:-$HOME/.hyb-oa/live-smoke.env}"
if [[ "${OAOPS1_SKIP_ENV_FILE:-0}" == "1" || ! -f "$env_file" ]]; then
@@ -123,6 +136,7 @@ run_ready_and_runtime() {
run_finding_step "live-smoke-env" env LIVE_SMOKE_BASE_URL="$PUBLIC_BASE_URL" node "$ROOT_DIR/scripts/qa/check-live-smoke-env.mjs" --json
run_finding_step "live-readiness" env QA_ISSUE_ID=OAOPS1 LIVE_SMOKE_BASE_URL="$PUBLIC_BASE_URL" LIVE_SMOKE_READINESS_DIR="$REPORT_DIR/live-smoke-readiness" bash "$ROOT_DIR/scripts/qa/run-live-smoke-readiness.sh"
run_finding_step "oa-only-smoke-readiness" env LIVE_SMOKE_BASE_URL="$PUBLIC_BASE_URL" OA_ONLY_SMOKE_READINESS_REPORT_DIR="$REPORT_DIR/oa-only-smoke-readiness" node "$ROOT_DIR/scripts/qa/check-oa-only-smoke-readiness.mjs"
cooldown_login_step "live-feature-flags"
run_finding_step "live-feature-flags" env LIVE_SMOKE_BASE_URL="$PUBLIC_BASE_URL" node "$ROOT_DIR/scripts/qa/check-live-feature-flags.mjs" \
--expect payment_batch_v1=force_on \
--expect erp_sync=force_off \
@@ -144,14 +158,6 @@ const credentials = {
identifier: process.env.LIVE_SMOKE_ADMIN_IDENTIFIER?.trim(),
password: process.env.LIVE_SMOKE_ADMIN_PASSWORD?.trim(),
},
employee: {
identifier: process.env.LIVE_SMOKE_EMPLOYEE_IDENTIFIER?.trim(),
password: process.env.LIVE_SMOKE_EMPLOYEE_PASSWORD?.trim(),
},
finance: {
identifier: process.env.LIVE_SMOKE_FINANCE_IDENTIFIER?.trim(),
password: process.env.LIVE_SMOKE_FINANCE_PASSWORD?.trim(),
},
};
const probes = [
@@ -161,12 +167,9 @@ const probes = [
{ id: "reimbursement-summary", role: "admin", path: "/api/reimbursements/stats/summary", domain: "reimbursement" },
{ id: "invoice-pool", role: "admin", path: "/api/invoice-pool?page=1&pageSize=5", domain: "invoice_ocr" },
{ id: "purchase-requests", role: "admin", path: "/api/purchase-requests?page=1&pageSize=5", domain: "procurement" },
{ id: "contracts-registry", role: "admin", path: "/api/contracts-registry?page=1&pageSize=5", domain: "contracts" },
{ id: "contracts-registry", role: "admin", path: "/api/contracts-registry", domain: "contracts" },
{ id: "projects", role: "admin", path: "/api/projects?page=1&pageSize=5", domain: "projects" },
{ id: "payment-batches", role: "finance", path: "/api/payment-batches?page=1&pageSize=5", domain: "payment_batch" },
{ id: "ap-ledger", role: "finance", path: "/api/ap-operations/reimbursement-ledger?page=1&pageSize=5", domain: "accounting_handoff" },
{ id: "audit-logs", role: "admin", path: "/api/audit-logs?page=1&pageSize=5", domain: "audit" },
{ id: "employee-reimbursements", role: "employee", path: "/api/reimbursements?page=1&pageSize=5&mine=1", domain: "employee_scope" },
];
function maskIdentifier(value) {
@@ -281,6 +284,7 @@ async function main() {
baseUrl,
checkedAt: new Date().toISOString(),
readOnly: true,
duplicateRoleChecks: "employee/finance/payment/AP are covered by oa-only-smoke-readiness to avoid repeated login throttling",
roles: Object.fromEntries(Object.entries(roles).map(([role, state]) => [role, {
status: state.status,
reason: state.reason || null,
@@ -510,5 +514,6 @@ trap finish EXIT
load_default_env
run_ready_and_runtime
cooldown_login_step "authenticated-readonly-probe"
run_finding_step "authenticated-readonly-probe" run_authenticated_readonly_probe
run_mobile_and_entry_matrix