A blob that a commit emptied is still a blob, and ingestion reads an item with
neither content nor URL as nothing to sync: applyFetchedItem counts it as
skipped and the sync reports success. The body indexed from an earlier commit
stays fully searchable, and no later sync revisits it — a full sync still sees
the path in the tree, and an incremental sync only walks the diffs of commits
newer than the recorded head, which the emptying commit already moved past.
Emit the file's path as the content in that case so ingestion replaces the stale
body, matching what the Notion (b9be7d0d), Confluence and IMA (b71b31c8)
connectors already do. The check is on length alone: a blob holding only
whitespace still carries content the repository has.
* fix(feishu): 修复同步请求限流与共享重试等待
* fix(feishu): 完善知识库限流冷却和导出轮询
Bound export polling by poll count so shared pacing and cooldowns retain the
same export ticket without causing false 60-second timeouts. Preserve the
feishu_timeout failure classification when the poll budget is exhausted.
Cap cooldowns, isolate reactive waits by API path, and use a configurable
10-second default when no valid retry hint is available. Refresh expired
tokens before rejoining the request gate to preserve pacing and new cooldowns.
Skip JSON decoding when the legacy rate-limit code is absent, derive the
prefilter from the shared protocol constant, and update configuration docs.
Isolate shared gates in tests and cover cooldowns, cancellation, API grouping,
concurrent token refresh, and timeout classification.
Validation: Feishu core tests pass; diff-scoped Feishu lint reports 0 issues;
gofmt and git diff --check pass. No live Feishu sync was run for this commit.
* fix(feishu): grant request gate slots in arrival order and improve rate-limit logs
- Reserve the next slot before sleeping so concurrent callers are paced in
FIFO order instead of racing after a shared wake-up.
- Restore the error log for non-rate-limited HTTP 400 download failures.
- Include the API gate name in rate-limit warnings.
---------
Co-authored-by: wizardchen <wizardchen@tencent.com>
* feat(helm): support compatible service name overrides
* refactor(helm): keep verification within existing chart workflow
* docs(helm): focus service naming guidance on configuration and upgrades
* fix(deploy): bump paradedb image to v0.25.11-pg17
Batch-importing large knowledge bases on the pinned
paradedb/paradedb:v0.22.6-pg17 image drives PostgreSQL into a
PANIC/crash-recovery loop (corrupted page pointers in shared buffers,
amcheck clean, no OOM), taking every ingest task down with it.
Three independent fixes upstream cover this exact write path, and the
pinned image predates all of them:
- pgvector 0.8.2 fixed a buffer overflow in parallel HNSW index
builds, 0.8.3 fixed possible index corruption during HNSW vacuuming,
and 0.8.4 fixed inserts during HNSW vacuuming; the image ships
pgvector 0.8.1, and the embeddings table maintains three HNSW
halfvec indexes on import.
- pg_search gained WAL-based crash recovery in 0.24.0 (paradedb#4901):
without it, any backend crash corrupts BM25 segment metadata and
turns a single crash into a recovery loop (paradedb#4935).
- PostgreSQL core moved 17.9 -> 17.11; its release notes contain no
fix matching this failure signature, ruling the core out.
Bump the compose image tags to v0.25.11-pg17 (postgres and
langfuse-db-init, prod and dev) and update the docs that pin the old
tag. Fresh installs are covered by the existing schema SQL (verified
against 0.25.11: extensions, BM25 index and HNSW halfvec indexes all
create cleanly). Existing data volumes keep working across the image
swap without any action (keyword and vector queries byte-identical in
testing); ALTER EXTENSION pg_search/vector UPDATE aligns the SQL
catalog afterwards, and migration 000099 is a no-op for 0.25.x by
design. The Helm chart pins a different image line and is left alone.
Fixes#4077
* fix(migrations): upgrade pg_search catalog to 0.25.11 with the image
Swapping in the v0.25.11 image leaves the extension catalog at 0.22.x.
Calling extension functions such as paradedb.version_info() against the
mismatched catalog segfaults the backend and sends the whole server into
crash recovery, so the catalog upgrade is required rather than optional.
- Add migration 000115 to update pg_search 0.22.0-0.25.10 to 0.25.11 and
pgvector 0.8.0-0.8.3 to 0.8.4 when the server ships those versions.
- Skip 000099 on newer images instead of advising UPDATE TO '0.22.6',
which leaves the catalog behind the shared library and crashes.
- Rewrite the upgrade guide as one 0.22.x -> 0.25.11 path with a required
ALTER EXTENSION UPDATE and a note that rollback needs a backup.
- Extend scripts/test_paradedb_upgrade.py to verify 0.22.2 -> 0.25.11 by
default (--to 0.22.6 keeps the old path) and run CONCURRENTLY
migrations outside a transaction like golang-migrate does.
---------
Co-authored-by: LuckVd <LuckVd@users.noreply.github.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
An OAuth MCP service keeps one cached connection per user. After a
successful OAuth callback, after a token is revoked, and when an agent
resumes from an in-conversation authorization, the service's connections
were recycled with CloseClient, which disconnects every user's
connection and cancels connection attempts still in flight. Closing a
Streamable HTTP connection cancels the requests it has in flight, so one
user authorizing again cancelled other users' running tool calls on the
same server process. The agent retries a failed call once on a fresh
connection, but a long call fails, and a non-idempotent tool can run
twice.
A connection is not affected when another user's token changes: each
one reads its own user's token from the store on every request. Add
MCPManager.CloseClientForPrincipal, which closes only that user's
connection, and use it when a token is revoked.
After an authorization, the callback and the in-conversation retry call
CloseClientsAfterAuthorization instead. It closes the authorizing user's
connection, since the new authorization may be for another account of
the upstream service, and every connection of the service in the tenant
that was built with an OAuth client ID other than the registration
stored now. The registration is shared by all users of the service and
can be replaced by any replica. A connection still holding the old
client ID can fail its next refresh with invalid_client, and handling
that failure deletes the stored registration, by then the replacement.
If the registration cannot be read, the whole service is closed as
before, unless the caller's context has ended, in which case only the
authorizing user's connection is closed. The callback bounds this
cleanup with its own timeout.
This runs in the process that handles the callback and, for an
in-conversation authorization, in the process where the agent waits.
Connections cached by other replicas are not examined, as before, and
neither are other users' connection attempts still in flight.
CompleteAuthorization now returns the tenant, service and principal of
the attempt, and connections report the client ID they were built with.
Disconnecting happens after the manager lock is released, because
closing a transport can wait on the server.
#4122 made the outbound (SSRF-safe) dial timeout configurable through
WEKNORA_OUTBOUND_DIAL_TIMEOUT (internal/config/config.go,
applyNetworkEnvOverrides), but the variable is not listed in
services.app.environment, so in a Docker Compose deployment there is no way
to set it: a value in the host .env never reaches the container, and slow
serverless endpoints keep failing at the 5s default.
Pass it through with an empty default. applyNetworkEnvOverrides only
overrides the timeout when the trimmed value is non-empty and parses as a
positive duration, so an unset variable keeps the 5s default unchanged.
Also document it in .env.example next to the other outbound settings.
Co-authored-by: Victor Maznyuk <victor@maznyuk.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
These three models were missing from the catalog, so they resolved to the
anthropic defaults: budget thinking (they reject budget_tokens) and
temperature/top_p (they reject non-default sampling values).
seed.json pins their metadata from the models overview and pricing pages:
1M context, 128K output, and base, 5m cache write, cache hit and output
prices. Haiku 5.5 is priced by prompt length, and the catalog has one price
per model, so it carries the prompts-up-to-100k tier. overrides.json gives
all three adaptive thinking with effort (all five levels), with temperature
and top_p off.
Thinking off differs per model. Opus 5.5 can't turn thinking off, so off is
unsupported, like Fable 5.1. Haiku 5.5 accepts "disabled". Sonnet 5.5
rejects "disabled" and turns off up-front thinking with "between_tools". The
new thinking_off_type compat field carries that value. Empty keeps
"disabled", and it is omitempty so the parity hashes of other entries don't
change.
Claude-Session: https://claude.ai/code/session_01BeNHkjF4spsH9d18UiYPiU
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Disable temperature and top_p for Claude models that reject non-default sampling values. Regenerate the model catalog and parity baseline, add request-body regression coverage, and clarify the documented sampling restrictions.
* feat(system): platform user management — list, enable/disable, reset password, role toggle
Adds a SystemAdmin-only user management panel under platform settings
(System global -> Access). The backend already had repository primitives
and promote/revoke endpoints; this wires the missing service/handler/route
for listing and account-status changes and adds the UI.
Backend
- New GET /system/admin/users: paginated, cross-tenant user list
(offset/limit, limit capped at 200), serialised via ToUserInfo so password
hashes are never exposed; has_more derived with a limit+1 fetch (no COUNT).
- New POST /system/admin/users/status: enable/disable an account.
Disabling revokes all of the user's tokens immediately. Service guards
reject self-disable and disabling the last active system administrator.
- ValidateToken now re-checks is_active on every request, so a disabled
account cannot keep using a previously issued access token.
Frontend
- UserListDialog: table with status/role tags, pagination, in-page
username/email filter, enable/disable and reset-password actions, and
one-click system-admin promote/revoke (reuses existing endpoints) with
confirmation prompts. Reset-password dialog is a sibling (not nested)
dialog so close/cancel/overlay all work.
- All new strings are i18n keys under system.globalSettings.userList in
all six locales (en-US, zh-CN, zh-TW, ja-JP, ko-KR, ru-RU).
Tests: handler unit tests for list pagination/redaction/limit-cap and for
status-change success/guard/404 paths; existing handler/service/router
suites pass.
Co-authored-by: MOSS Agent <noreply@example.com>
* fix(system): make account status changes atomic and validate requests
* refactor(system): streamline settings and add dedicated user management tab
* fix(system): resolve user management CI lint findings
* fix(system): preserve account status during ordinary user updates
---------
Co-authored-by: desksk <26273255+desksk@users.noreply.github.com>
Co-authored-by: MOSS Agent <noreply@example.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
Replace gallery pagination with an aspect-ratio-preserving masonry layout and automatic loading. Keep viewer navigation continuous, preserve loaded images on retry, and discard stale query results. Remove obsolete pagination paths and cover loading behavior with regression tests.
* Compact and align collapsed sidebar icons
* Unify chat composer control sizing and styling
* Polish sidebar, list pages, toolbox and citation popover styling
* Update tests for compact sidebar and borderless citation pills
* feat(wiki): improve graph layout and exploration
* feat(wiki): name graph themes and connect pages to their document summary
- Rewrite selectGraphAnchors on deterministic Louvain communities with
coverage, redundancy and readability rules; clean file-name captions.
- Add group focus bar with switch menu, Esc/background exit, caption pills.
- Count distinct neighbors for link_count from both link directions, and
let ego BFS use the same adjacency so stale in_links do not hide pages.
- Connect each page to its source document summary and leave the index
page out of the graph; return edges as [] for an isolated ego center.
- Keep graph search and type filters available after an empty render.
* fix(wiki): use theme tokens in graph styles and satisfy Go lint
* feat(wiki): label the page shared by a multi-document graph group
docreader.utils.split provides the text-splitting primitives (split_text_keep_separator, split_by_sep, split_by_char, split_by_regex, match_by_regex) used by the document splitter, but had no unit tests. Add docreader/tests/test_utils_split.py covering keep/discard separator behavior, char splitting, regex splitting that preserves separators, and regex matching.
The register form accepts usernames matching /^[a-zA-Z0-9_\u4e00-\u9fa5]+$/:
ASCII letters, digits, underscore and CJK ideographs (Hanja). The ko-KR
message said Hangul (한글) instead of Hanja (한자), so a Korean user who
typed a Hangul name was rejected by a message claiming Hangul is allowed.
Every other locale already says "Chinese characters".
* fix(datasource/dingtalk): tighten Validate sampling edges
Keep probing later documents in the same workspace, hold listing budget
for sibling folders that are already queued, fail closed when any root
page cannot be listed, and say when the probe cap stops a conclusive walk.
Fixes#4021
Co-authored-by: fight for you <wangrui19971019@users.noreply.github.com>
* fix(datasource/dingtalk): stop Validate walk once probe cap is spent
- Break the workspace walk as soon as maxValidateProbes is spent, so a
later unlistable folder can no longer turn failed probes into acceptance.
- Treat a skipped folder tail as covered only by a probe made after the
skip, not by any earlier probe in the same workspace.
- Keep the document name on probe context errors.
---------
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: fight for you <wangrui19971019@users.noreply.github.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
validateEndpointURL pinned the scheme to wss for long-connection endpoints
and then passed the URL to ValidateURLForSSRF, whose scheme allowlist only
accepts http/https — so every custom ws/wss endpoint failed with
"invalid scheme: wss (only http/https allowed)" and SSRF_WHITELIST could
not help because the whitelist is only consulted after the scheme check.
The default endpoint worked only because it short-circuits validation.
Validate ws/wss endpoints under an https mask instead: the scheme is
already pinned, and every host-level guard (restricted hostnames,
private/metadata IPs, DNS rebinding, port blocklist, whitelist and
whitelist-only mode) still applies unchanged. Same approach as
qqbot.validateGatewayURL.
fuseWithRRF reads each list's ranks through bestRanks, which ranks every
list on its own by score. Retrievers run concurrently and their results are
appended in goroutine completion order, so neither the order of the lists nor
the order of the hits inside a list may change a chunk's rank.
These tests fail on the pre-#3687 concatenation-order ranking and pass on
main. Refs #3796.
mcp.NewTool defaults destructiveHint and openWorldHint to true. The
built-in endpoint only set readOnlyHint, so clients that refuse
destructive tools could not call search or wiki reads.
Co-authored-by: fight for you <wangrui19971019@users.noreply.github.com>
When a turn finishes with queued follow-ups, the chat view attaches to the
follow-up run via continue-stream while the previous POST may still be open,
waiting up to 3s for the session title. Both streams share one
AbortController and onclose stopped it unconditionally, so the old POST
closing aborted the follow-up stream and left that answer stuck as
"generating". The next follow-up's agent_query then relabelled that stale
row, rendering its answer under the previous question.
- streame.ts: onclose and the error path only stop or report for the
current stream generation, mirroring the existing onmessage guard.
- useChatStreamHandler.ts: agent_query only adopts a trailing placeholder
that has no request id yet (or already has this one).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Count distinct coverage across long repetitive runs and preserve HTML-wrapped no-text replies through normalization. Add sanitizer and image-persistence regressions for both cases.
Distinguish vector and keyword result pools, initial and refill phases, and diagnostic decisions from actual retrieval and model calls. Clarify that aggregate counts cover all candidates while detailed samples focus on image vectors, and document the new trace names.
Batch independent Qwen3-VL embedding conversations through an explicit compatibility setting. Preserve singleton requests and serial overrides, validate response ordering, and add wire tests and opt-in live numerical parity checks.
Live verification confirms valid batched responses but does not meet strict numerical parity bounds; document the deployment-side reproducibility limitation.
* feat(mcp): support modern and legacy protocol connections
* fix(mcp): preserve annotated headers on modern tool calls
* fix(mcp): load parameter header schemas before tool calls
* fix(mcp): keep a working legacy session when discovery retry fails
Modern method-level 404s stay connected, while an expired SSE session still disconnects. A transient discover failure retries once, and a failed retry keeps the handshake that already succeeded.
* fix(mcp): wrap protocol negotiation lines for the linter
golangci-lint rejects lines longer than 120 characters.
* fix(mcp): retry protocol discovery without dropping the live session
A second initialize on the same transport clears a stateful legacy session when discover returns 404. Probe on a separate connection, and drop cached parameter headers after another client refreshes the directory.
---------
Co-authored-by: wizardchen <wizardchen@tencent.com>
* refactor: make outbound SSRF-safe dial timeout configurable (default 5s)
Previously SSRFSafeDialContext hardcoded a 30s dial timeout for every
outbound (SSRF-validated) endpoint (VLM/LLM/embedding/ASR/connectors).
A black-holed or unreachable endpoint therefore burned ~30s per attempt
before failing, which (a) delayed the circuit breaker trip and (b) made
the UI show a misleading "thinking" state instead of surfacing the
bad-URL error quickly.
- Move the dial timeout to WEKNORA_OUTBOUND_DIAL_TIMEOUT, default 5s.
- Apply it in config.LoadConfig via utils.SetOutboundDialTimeout; the
default is also set in an init() so it holds even if LoadConfig is
skipped. Concurrent reads are safe (atomic nanoseconds).
- KeepAlive stays 30s; the sandbox/cloud GuardedDialContext (10s) and
Ollama dialer (10s) are intentionally left untouched.
* test(utils): serialize outbound dial timeout tests
---------
Co-authored-by: tayadwx <tayadwx@users.noreply.github.com>
Co-authored-by: wizardchen <wizardchen@tencent.com>
* fix(chat): keep custom metadata on knowledge-chat references
Redis round-trips and graph or analysis result builders dropped knowledge custom metadata, so chat citations lost fields such as course and lesson URLs.
* test(chat): wrap metadata fixtures to satisfy line length lint
---------
Co-authored-by: wizardchen <wizardchen@tencent.com>
node:24-bookworm-slim has no trust store. Switching apt to
mirrors.tencent.com first follows an HTTP to HTTPS redirect and the
package install fails. Install ca-certificates from the original HTTP
source before the swap, matching the runtime stage.
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: fight for you <wangrui19971019@users.noreply.github.com>