Skip to content

fix: rebase fork deltas onto upstream v4.26.8 - #1

Closed
bowling233 with Copilot wants to merge 1 commit into
masterfrom
copilot/rebase-v4268
Closed

fix: rebase fork deltas onto upstream v4.26.8#1
bowling233 with Copilot wants to merge 1 commit into
masterfrom
copilot/rebase-v4268

Conversation

Copilot AI commented Jul 29, 2026

Copy link
Copy Markdown

Rebased the fork-specific master deltas onto upstream AstrBotDevs/AstrBot tag v4.26.8, while intentionally excluding the DingTalk patch already merged upstream (AstrBotDevs#9389). This keeps only the fork-maintained CI/docs additions and the MCP proxy behavior fix.

  • Fork-only CI and maintenance docs

    • Added fork workflow: .github/workflows/docker-build.yml
    • Added fork maintenance guide: AGENTS.md
  • MCP proxy behavior preserved after rebase

    • Updated _quick_test_mcp_connection in:
      • astrbot/core/agent/mcp_client.py
      • astrbot/core/provider/func_tool_manager.py
    • Session creation now honors environment proxy settings via trust_env=True.
# before
async with aiohttp.ClientSession() as session:

# after
async with aiohttp.ClientSession(trust_env=True) as session:
  • Resulting delta vs v4.26.8 is intentionally limited to
    • .github/workflows/docker-build.yml
    • AGENTS.md
    • astrbot/core/agent/mcp_client.py
    • astrbot/core/provider/func_tool_manager.py
Original prompt

We need to rebase our fork's master branch onto the upstream tag v4.26.8 (AstrBotDevs/AstrBot).

Current state

Our master branch is based on v4.26.7 with 3 incremental commits on top:

  1. fix: honor proxy settings for MCP connections — adds .github/workflows/docker-build.yml and changes aiohttp.ClientSession() to aiohttp.ClientSession(trust_env=True) in two files: astrbot/core/agent/mcp_client.py and astrbot/core/provider/func_tool_manager.py
  2. fix(dingtalk): handle command errors and rich-text mentions — DingTalk fix that is NOW MERGED into upstream v4.26.8 (as fix(dingtalk): fix command parsing and error responses caused by rich text in the DingTalk HarmonyOS client. AstrBotDevs/AstrBot#9389), so this commit should be DROPPED during rebase
  3. docs: document fork maintenance workflow — adds AGENTS.md

What to do

  1. Add the upstream remote: git remote add upstream https://github.com/AstrBotDevs/AstrBot.git (it may already exist)

  2. Fetch upstream tags: git fetch upstream --tags

  3. Create a new branch rebase-v4.26.8 from the upstream tag v4.26.8 (commit 60c9e68d50dc9b9ed58503f21a0b77a8d0bd2159)

  4. Apply our two incremental changes on top of v4.26.8:

    a. Copy .github/workflows/docker-build.yml from our current master branch (this is our custom CI workflow for building and publishing Docker images to GHCR)

    b. In astrbot/core/agent/mcp_client.py, find the _quick_test_mcp_connection function and change aiohttp.ClientSession() to aiohttp.ClientSession(trust_env=True) (there should be exactly one occurrence in this function)

    c. In astrbot/core/provider/func_tool_manager.py, find the _quick_test_mcp_connection function and change aiohttp.ClientSession() to aiohttp.ClientSession(trust_env=True) (there should be exactly one occurrence in this function)

    d. Copy AGENTS.md from our current master branch

  5. Commit these changes with message: fix: honor proxy settings for MCP connections; add fork CI and docs

  6. Push the rebase-v4.26.8 branch

  7. Do NOT include the DingTalk fix commit — it's already in upstream v4.26.8.

Verification

After applying changes, verify that:

  • git diff v4.26.8..HEAD --stat shows only these files changed: .github/workflows/docker-build.yml, astrbot/core/agent/mcp_client.py, astrbot/core/provider/func_tool_manager.py, AGENTS.md
  • The aiohttp.ClientSession(trust_env=True) change is present in both Python files

Copilot AI changed the title [WIP] Rebase fork's master branch onto upstream tag v4.26.8 fix: rebase fork deltas onto upstream v4.26.8 Jul 29, 2026
Copilot AI requested a review from bowling233 July 29, 2026 13:05
bowling233 pushed a commit that referenced this pull request Jul 29, 2026
…eopened) (AstrBotDevs#8323)

* fix: Faiss read/write on Windows with non-ASCII paths

Bridge Faiss C++ fopen() ANSI codepage limitation through
pure ASCII temp files using Python shutil. Also fix dtype=np.int64
for IDs, vector.reshape for search, and remove incorrect
normalize_L2 on IndexFlatL2.

* fix: narrow RuntimeError catch, add search validation, bridge only when needed

Addresses bot review feedback on PR AstrBotDevs#8323:
- Add _needs_bridge() helper to activate temp file bridge only on
  Windows + non-ASCII paths (Sourcery AstrBotDevs#5)
- _read_index: re-raise RuntimeError when bridging not needed,
  preventing silent swallowing of genuine Faiss errors (Sourcery #1)
- _write_index: skip temp file for ASCII/non-Windows paths (Sourcery AstrBotDevs#5)
- search(): validate ndim==1 and dimension before reshape,
  preventing silent semantic corruption on 2D input (Sourcery AstrBotDevs#3, AstrBotDevs#4)
- _safe_temp_dir & _make_temp_file: simplify (Sourcery AstrBotDevs#6, AstrBotDevs#7)
  - Remove redundant CWD fallback (never reached on non-ASCII paths)
  - Remove redundant UUID prefix (mkstemp O_EXCL guarantees uniqueness)

All changes tested: 119/119 pass covering bridge logic,
ASCII/non-ASCII paths, concurrent temp file uniqueness,
search validation, and exception propagation.

* style: ruff format

* chore: ruff check fix

* fix: make search() accept both 1D and 2D vectors, fix caller shape

---------

Co-authored-by: Soulter <905617992@qq.com>
@bowling233 bowling233 closed this Jul 29, 2026
@bowling233
bowling233 deleted the copilot/rebase-v4268 branch July 29, 2026 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants