重命名项目为 quality-inspection-platform
将仓库目录从 ai_auto_test 迁至 quality-inspection-platform,统一质量检测平台命名;MCP 环境变量新增 QIP_* 并兼容 AI_TEST_*。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-2
@@ -168,7 +168,7 @@ def _make_user_out(user: User) -> CurrentUserOut:
|
||||
|
||||
|
||||
def _issue_auth_token(user: User) -> str:
|
||||
secret = os.getenv("AUTH_TOKEN_SECRET", "ai-auto-test-dev-secret")
|
||||
secret = os.getenv("AUTH_TOKEN_SECRET", "quality-inspection-dev-secret")
|
||||
nonce = secrets.token_hex(8)
|
||||
raw = f"{user.id}:{user.username}:{user.role}:{nonce}"
|
||||
signature = hmac.new(secret.encode("utf-8"), raw.encode("utf-8"), hashlib.sha256).hexdigest()
|
||||
@@ -176,7 +176,7 @@ def _issue_auth_token(user: User) -> str:
|
||||
|
||||
|
||||
def _resolve_user_by_token(token: str, db: Session) -> User | None:
|
||||
secret = os.getenv("AUTH_TOKEN_SECRET", "ai-auto-test-dev-secret")
|
||||
secret = os.getenv("AUTH_TOKEN_SECRET", "quality-inspection-dev-secret")
|
||||
parts = (token or "").split(":")
|
||||
if len(parts) != 5:
|
||||
return None
|
||||
|
||||
@@ -59,7 +59,7 @@ def _build_logql(method: str, url_path: str) -> str:
|
||||
base = service_label
|
||||
else:
|
||||
service_key = os.getenv("LOKI_SERVICE_LABEL", "app").strip() or "app"
|
||||
service_value = os.getenv("LOKI_SERVICE_VALUE", "").strip() or "ai-auto-test"
|
||||
service_value = os.getenv("LOKI_SERVICE_VALUE", "").strip() or "quality-inspection-platform"
|
||||
base = f'{{{service_key}="{service_value}"}}'
|
||||
|
||||
filters: list[str] = [base]
|
||||
|
||||
Reference in New Issue
Block a user