Skip to content

chore(sync): absorb upstream through #9703 - #188

Merged
BegoniaHe merged 9 commits into
masterfrom
chore/sync-upstream-2026-09-14
Sep 14, 2026
Merged

chore(sync): absorb upstream through #9703#188
BegoniaHe merged 9 commits into
masterfrom
chore/sync-upstream-2026-09-14

Conversation

@BegoniaHe

Copy link
Copy Markdown
Collaborator

Summary

Absorb upstream 8b5f38885e381176f4bdc7fffd245336337a0e3c..bd046ed29914ee559e9bf47676ccb71a84f747ba (8 commits) by cherry-pick policy: 5 adapted implementation commits and 3 skips. Cursor advanced to bd046ed29914ee559e9bf47676ccb71a84f747ba.

Related issue

Related: none

Surfaces

  • openspec/openapi-v1.yaml, dashboard/src/api/generated/openapi-v1/types.gen.ts, docs/public/openapi.json
  • upstream-sync.yaml, upstream-decisions.jsonl
  • Plugin installer (plugin_package_installer.py, updator.py), Chat history pagination, image preprocess/process-stage preparation

Implementation notes

Upstream Disposition
AstrBotDevs#10028 fallback_provider_ids skip (local_agent_runtime_from_profile already supplies them)
AstrBotDevs#10042 preserve image paths adapt
AstrBotDevs#9667 paginate chat history adapt (OpenAPI + generated client + MDI ChatLoadError; omit ja-JP/ru-RU)
AstrBotDevs#10050 desktop update progress skip (no installAppUpdate desktop bridge)
AstrBotDevs#10004 unify /new and /reset skip (keep conversation.reset vs conversation.create + session.manage)
AstrBotDevs#10053 URL/file plugin update adapt (plugin_package_installer staging/replace)
AstrBotDevs#10065 selected model in threads adapt
AstrBotDevs#9703 process-stage image prep adapt (no image_input.py; keep always-JPEG request_preparation)

Validation

uv run pytest tests/unit/test_preprocess_stage.py tests/unit/platform/test_mattermost_adapter.py tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_with_images tests/unit/test_chat_service.py::test_get_session_includes_project_threads_and_running_state tests/unit/test_chat_service.py::test_get_session_paginates_history_and_reports_has_more tests/unit/test_chat_service.py::test_get_session_rejects_invalid_pagination tests/unit/db/test_message_history_store.py tests/unit/test_openapi_contract.py tests/unit/test_plugin_manager.py tests/unit/test_updator_socks.py::test_plugin_updator_install_prefers_download_url tests/unit/test_astr_message_event.py tests/unit/test_agent_internal_process.py tests/unit/test_provider_request_preparation.py -q --test-profile blocking
cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/chatHistoryPagination.vitest.ts tests/chatViewSmoke.vitest.ts tests/logicCoverage.vitest.ts tests/chatPanels.vitest.ts
cd dashboard && pnpm exec vue-tsc --noEmit && pnpm i18n:check
uv run python .agents/skills/sync-upstream/scripts/inspect_upstream.py
python .agents/skills/sync-upstream/scripts/upstream_decisions.py validate

make check / make quality were not run for this window.

Compatibility and risk

  • Chat history now loads 50 newest messages first; older pages load on scroll-up.
  • Same-name plugin URL/file install now updates instead of failing.
  • Preprocess no longer converts attachments to JPEG; model JPEG conversion remains in request_preparation after OnLLMRequestEvent.
  • Isolation-aware group permissions from feat: unify /new and /reset behavior AstrBotDevs/AstrBot#10004 were not absorbed.

Checklist

  • Conventional Commit type is chore, build, ops, or test (not ci).
  • The change is focused and does not include unrelated product refactors.
  • A toolchain upgrade updates every matching declaration, workflow, image build, and lockfile.
  • Runtime Python deps update pyproject.toml, requirements.txt, and uv.lock together.
  • I ran the relevant formatting, lint, build, and test commands.
  • No secrets committed.
  • I did not restore legacy shims, Python <3.14 fallbacks, or upstream publish/docs URLs as fork artifacts.
  • I will not merge this PR myself. Merge needs a human maintainer review plus a separate AI-assisted review (AI_POLICY.md).
  • AI use follows AI_POLICY.md. Keep exactly one author note below. Do not fabricate the other.

Agent note

Goal: apply the reviewed upstream window and open a PR against Xero-Team/AstrBot. Touched preprocess/Mattermost image tracking, WebChat history pagination (OpenAPI + generated client), plugin staging/replace, ThreadPanel model selection, and post-hook image re-preparation via request_preparation. Checks actually run are listed in Validation; make check was not run. Residual risk: plugin replace/restore is a smaller matrix than upstream's full installer suite; Chat empty-session error UI is composition-adapted; AstrBotDevs#9703 does not adopt upstream PNG passthrough. Tools: OpenCode, sync-upstream skill, gh.

Soulter and others added 6 commits September 14, 2026 12:42
…#10042)

Keep converted model JPEGs out of event cleanup and stop Mattermost from
attaching download paths as event-owned temps. Attachment labels still
use the original source path; provider JPEG conversion stays in
request_preparation.

Upstream-Commit: 72928aa
Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com>
Upstream-PR: AstrBotDevs#10042
Sync-Disposition: adapt
Fork-Adaptation: Apply tracking rules to _normalize_media_component and keep Mattermost tests under tests/unit/platform/.
Tested: uv run pytest tests/unit/test_preprocess_stage.py tests/unit/platform/test_mattermost_adapter.py tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_with_images -q --test-profile blocking
AI-Generated: true
Generated-At: 2026-09-14T10:42:11Z
Add page and page_size to WebChat session history, with has_more metadata
and scroll-up loading in the composition-based Chat view. Omit ja-JP and
ru-RU locales. Dashboard tests use Vitest instead of upstream .test.mjs.

Upstream-Commit: fae2c12
Upstream-Author: Wei Chengqian <wcqqq1214@gmail.com>
Upstream-PR: AstrBotDevs#9667
Sync-Disposition: adapt
Fork-Adaptation: Count history through MessageHistoryStoreMixin; keep MDI ChatLoadError; regenerate Hey API client and public OpenAPI together.
Tested: uv run pytest tests/unit/test_chat_service.py::test_get_session_includes_project_threads_and_running_state tests/unit/test_chat_service.py::test_get_session_paginates_history_and_reports_has_more tests/unit/test_chat_service.py::test_get_session_rejects_invalid_pagination tests/unit/db/test_message_history_store.py tests/unit/test_openapi_contract.py -q --test-profile blocking; cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/chatHistoryPagination.vitest.ts tests/chatViewSmoke.vitest.ts tests/logicCoverage.vitest.ts && pnpm exec vue-tsc --noEmit && pnpm i18n:check
AI-Generated: true
Generated-At: 2026-09-14T10:50:38Z
…tDevs#10053)

Stage URL and archive installs in the system temp directory and replace
an already-installed plugin of the same metadata name, restoring the
previous files if load fails. Skip staging/backup prefixes during
discovery. Omit the upstream star_manager.py layout.

Upstream-Commit: 7ec39bd
Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com>
Upstream-PR: AstrBotDevs#10053
Sync-Disposition: adapt
Fork-Adaptation: Implement staging and replace/restore in plugin_package_installer.py and PluginUpdator.install(target_dir=).
Tested: uv run pytest tests/unit/test_plugin_manager.py tests/unit/test_updator_socks.py::test_plugin_updator_install_prefers_download_url -q --test-profile blocking
AI-Generated: true
Generated-At: 2026-09-14T10:56:09Z
Pass the current Chat provider/model selection into ThreadPanel so side
thread requests use the same selected_provider and selected_model as the
main session.

Upstream-Commit: 4007d64
Upstream-Author: Soulter <37870767+Soulter@users.noreply.github.com>
Upstream-PR: AstrBotDevs#10065
Sync-Disposition: adapt
Fork-Adaptation: Keep webChatStepUpTokens and make getProviderSelection optional for existing ThreadPanel tests.
Tested: cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/chatPanels.vitest.ts tests/chatViewSmoke.vitest.ts
AI-Generated: true
Generated-At: 2026-09-14T10:57:20Z
AstrBotDevs#9703)

Keep original image attachments intact in preprocess and re-prepare the
working request after OnLLMRequestEvent. Provider JPEG conversion stays
in request_preparation, including the remote-URL drop.

Upstream-Commit: bd046ed
Upstream-Author: 氕氙 <piexian@foxmail.com>
Upstream-PR: AstrBotDevs#9703
Sync-Disposition: adapt
Fork-Adaptation: Do not add image_input.py; map post-hook preparation onto request_preparation and keep always-JPEG.
Tested: uv run pytest tests/unit/test_preprocess_stage.py tests/unit/platform/test_mattermost_adapter.py tests/unit/test_astr_message_event.py tests/unit/test_agent_internal_process.py tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_with_images tests/unit/test_provider_request_preparation.py -q --test-profile blocking
AI-Generated: true
Generated-At: 2026-09-14T11:01:00Z
Record dispositions for 8b5f388..bd046ed
and advance the upstream cursor to bd046ed.

AI-Generated: true
Generated-At: 2026-09-14T11:01:50Z
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread astrbot/core/star/plugin_package_installer.py Fixed
Comment thread astrbot/core/star/plugin_package_installer.py Fixed
Comment thread astrbot/core/star/updator.py Fixed
Comment thread astrbot/core/star/plugin_package_installer.py Fixed
Comment thread astrbot/core/star/plugin_package_installer.py Fixed
Comment thread astrbot/core/db/protocols.py Fixed
Confine plugin install/move paths to staging and store roots, strip
newlines from install-failure logs, and reject prototype-polluting
session keys. Also restore URL/file install mocks for staging
target_dir, replace the non-system ChatLoadError rounded token, and
satisfy eqeqeq plus the Protocol stub CodeQL note.

AI-Generated: true
Generated-At: 2026-09-14T11:25:47Z
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread dashboard/src/composables/useMessages.ts Fixed
Comment thread astrbot/core/star/plugin_package_installer.py Fixed
Comment thread astrbot/core/star/updator.py Fixed
Replace session-keyed Dashboard records with Map so route conversation
ids cannot be treated as remote property writes. Build plugin install
destinations with join/normpath/startswith instead of Path.resolve.

AI-Generated: true
Generated-At: 2026-09-14T11:50:01Z
Skip JPEG conversion until after OnLLMRequestEvent so plugin
replacements keep original extra parts. Merge truncated WebChat
history by id instead of dropping older loaded pages. Cover plugin
replace restore when reload fails.

Tested: uv run pytest tests/unit/test_agent_internal_process.py tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_with_images tests/unit/test_astr_main_agent.py::TestBuildMainAgent::test_build_main_agent_can_defer_image_preparation tests/unit/test_plugin_manager.py::test_install_plugin_from_file_updates_existing_plugin tests/unit/test_plugin_manager.py::test_install_plugin_from_file_restores_previous_files_on_reload_failure tests/unit/test_preprocess_stage.py tests/unit/test_provider_request_preparation.py -q --test-profile blocking; cd dashboard && pnpm exec vitest run --config vitest.config.ts tests/chatHistoryPagination.vitest.ts tests/chatViewSmoke.vitest.ts tests/useMessagesFollowUp.vitest.ts tests/logicCoverage.vitest.ts

AI-Generated: true
Generated-At: 2026-09-14T12:31:28Z
@BegoniaHe
BegoniaHe merged commit e87d5ff into master Sep 14, 2026
26 checks passed
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.

5 participants