From d201b0cbcbe56978bb33cbcaccbfd496bba8e765 Mon Sep 17 00:00:00 2001 From: twocucao Date: Tue, 26 May 2026 14:43:06 +0800 Subject: [PATCH 1/3] Harden GitHub Actions workflows --- .github/workflows/deploy-website.yml | 32 +++++++++++++++++++++++----- .github/workflows/docs.yml | 25 ++++++++++++++++------ 2 files changed, 46 insertions(+), 11 deletions(-) diff --git a/.github/workflows/deploy-website.yml b/.github/workflows/deploy-website.yml index 5768b1e3..009cfb70 100644 --- a/.github/workflows/deploy-website.yml +++ b/.github/workflows/deploy-website.yml @@ -17,17 +17,38 @@ concurrency: cancel-in-progress: false jobs: + check-target: + runs-on: ubuntu-latest + outputs: + website-exists: ${{ steps.website.outputs.exists }} + steps: + - uses: actions/checkout@v6 + + - id: website + name: Check website package + run: | + if [ -f benchmarks/EvoAgentBench/website/package.json ]; then + echo "exists=true" >> "$GITHUB_OUTPUT" + else + echo "exists=false" >> "$GITHUB_OUTPUT" + echo "::notice::benchmarks/EvoAgentBench/website/package.json is not present; skipping website deploy." + fi + build: runs-on: ubuntu-latest + needs: check-target + if: needs.check-target.outputs.website-exists == 'true' defaults: run: working-directory: benchmarks/EvoAgentBench/website steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: - node-version: 20 + node-version: 24 + cache: npm + cache-dependency-path: benchmarks/EvoAgentBench/website/package-lock.json - run: npm ci @@ -38,7 +59,7 @@ jobs: - run: touch out/.nojekyll - - uses: actions/upload-pages-artifact@v3 + - uses: actions/upload-pages-artifact@v5 with: path: benchmarks/EvoAgentBench/website/out @@ -48,6 +69,7 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build + if: needs.build.result == 'success' steps: - id: deployment - uses: actions/deploy-pages@v4 + uses: actions/deploy-pages@v5 diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a8eec180..d00a8834 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -18,11 +18,15 @@ on: permissions: contents: read +concurrency: + group: docs-${{ github.ref }} + cancel-in-progress: true + jobs: links: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Validate active relative Markdown links run: | @@ -82,6 +86,12 @@ jobs: } failures = [] + warnings = [] + primary_link_pattern = re.compile( + r"^\[(?:Code|Plugin|Live Demo|Learn more)\]\(([^)]+)\)", + flags=re.M, + ) + for path, heading in files.items(): text = path.read_text() start = text.find(heading) @@ -101,18 +111,21 @@ jobs: title_match = re.search(r"####\s+(.+)", cell) title = title_match.group(1).strip() if title_match else f"use case {index}" banner_match = re.search(r"\[!\[[^\]]*\]\([^)]+\)\]\(([^)]+)\)", cell) - primary_match = re.search(r"^\[(?:Code|Plugin|Live Demo)\]\(([^)]+)\)", cell, flags=re.M) + primary_match = primary_link_pattern.search(cell) - if not banner_match: - failures.append(f"{path}: {title}: missing linked banner") - elif not primary_match: + if not banner_match and primary_match: + warnings.append(f"{path}: {title}: primary link has no linked banner") + elif banner_match and not primary_match: failures.append(f"{path}: {title}: missing primary link") - elif banner_match.group(1) != primary_match.group(1): + elif banner_match and primary_match and banner_match.group(1) != primary_match.group(1): failures.append( f"{path}: {title}: banner link {banner_match.group(1)} " f"does not match primary link {primary_match.group(1)}" ) + if warnings: + print("\n".join(f"warning: {warning}" for warning in warnings)) + if failures: print("\n".join(failures)) sys.exit(1) From 6669825e9f05dad14ed4ec21e3aa075eb5c8448b Mon Sep 17 00:00:00 2001 From: twocucao Date: Tue, 26 May 2026 14:50:22 +0800 Subject: [PATCH 2/3] Add EverCore smoke workflow --- .github/workflows/evercore-smoke.yml | 105 +++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 .github/workflows/evercore-smoke.yml diff --git a/.github/workflows/evercore-smoke.yml b/.github/workflows/evercore-smoke.yml new file mode 100644 index 00000000..005658f1 --- /dev/null +++ b/.github/workflows/evercore-smoke.yml @@ -0,0 +1,105 @@ +name: EverCore Smoke + +on: + pull_request: + paths: + - "methods/EverCore/**" + - ".github/workflows/evercore-smoke.yml" + push: + branches: [main] + paths: + - "methods/EverCore/**" + - ".github/workflows/evercore-smoke.yml" + +permissions: + contents: read + +concurrency: + group: evercore-smoke-${{ github.ref }} + cancel-in-progress: true + +jobs: + smoke: + runs-on: ubuntu-latest + defaults: + run: + working-directory: methods/EverCore + + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-python@v6 + with: + python-version: "3.12" + + - uses: astral-sh/setup-uv@v8 + with: + enable-cache: true + cache-dependency-glob: methods/EverCore/uv.lock + + - name: Install dependencies + run: uv sync --locked --dev + + - name: Check whitespace + run: git diff --check + + - name: Compile API and demo modules + env: + PYTHONPATH: src:. + run: uv run python -m compileall -q src/api_specs demo/extract_memory.py + + - name: Run stable DTO compatibility tests + env: + PYTHONPATH: src:. + run: uv run pytest tests/test_content_item_compat.py -q + + - name: Validate demo payload compatibility + env: + PYTHONPATH: src:. + run: | + uv run python - <<'PY' + from pydantic import ValidationError + + from api_specs.dtos.memory import PersonalAddRequest + from demo.extract_memory import convert_to_v1_message + + source = { + "message_id": "msg_001", + "create_time": "2025-06-26T00:00:00Z", + "sender": "user_001", + "sender_name": "User", + "type": "text", + "content": "hello", + } + session_meta = {"user_details": {"user_001": {"role": "user"}}} + converted = convert_to_v1_message(source, session_meta) + + PersonalAddRequest.model_validate( + {"user_id": "user_001", "messages": [converted]} + ) + assert converted["content"] == "hello" + assert "text" not in converted + + old_payload = { + "user_id": "user_001", + "messages": [ + { + "message_id": "msg_001", + "sender_id": "user_001", + "sender_name": "User", + "role": "user", + "timestamp": 1750896000000, + "type": "text", + "text": {"content": "hello"}, + } + ], + } + try: + PersonalAddRequest.model_validate(old_payload) + except ValidationError as exc: + assert exc.errors()[0]["loc"] == ("messages", 0, "content") + else: + raise AssertionError("old payload unexpectedly passed validation") + + print("EverCore demo payload smoke passed") + PY From a51e8585ab9013321683fecc7939d96ada55ca19 Mon Sep 17 00:00:00 2001 From: twocucao Date: Tue, 26 May 2026 14:51:47 +0800 Subject: [PATCH 3/3] Pin setup-uv action version --- .github/workflows/evercore-smoke.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/evercore-smoke.yml b/.github/workflows/evercore-smoke.yml index 005658f1..859fca4e 100644 --- a/.github/workflows/evercore-smoke.yml +++ b/.github/workflows/evercore-smoke.yml @@ -32,7 +32,7 @@ jobs: with: python-version: "3.12" - - uses: astral-sh/setup-uv@v8 + - uses: astral-sh/setup-uv@v8.1.0 with: enable-cache: true cache-dependency-glob: methods/EverCore/uv.lock