Commit Graph

298 Commits

Author SHA1 Message Date
evan188199-tech
65d9b8f557 fix(co-writer): keep a placeholder row and warn when DOCX table row parsing fails (#1700)
* fix(co-writer): warn and keep placeholder row when DOCX table row parsing fails

_table_to_markdown swallowed per-row cell errors with 'except Exception:
continue', silently dropping rows (e.g. malformed merged cells) from the
converted markdown. Log a warning with the table/row ordinal and keep a
placeholder row so the loss is visible in the output itself.

Use an English placeholder '(unparseable row)' so non-Chinese documents
are not polluted, and keep test imports sorted for CI.

* test(codebuddy): make credential fixture expiry relative to now

test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.

Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:22:52 +08:00
evan188199-tech
50a3ba4e4d fix(knowledge): surface swallowed KB status, progress and folder-sync failures (#1706)
* fix(knowledge): make update_kb_status write failures observable

The ready-transition metadata refresh swallowed every exception
(`except Exception: pass`), and a kb_config.json persist failure
surfaced only as an opaque raise inside fire-and-forget callers, so
a lost status update left the persisted KB state stale with no
diagnostic.

- Log a warning naming the KB when the best-effort ready-transition
  metadata refresh fails, instead of silently passing.
- Log an error with the KB name and status when persisting the
  config fails, then re-raise so callers still receive the exception
  (the write is authoritative, not best-effort).

Tests: a persist failure is logged and re-raised; a metadata refresh
failure is logged and does not propagate.

* fix(knowledge): make progress WS failures visible instead of silent

The websocket_progress endpoint swallowed five failure points with
`except Exception: pass`: timestamp parsing (x2), error-frame delivery,
socket close, and user-context reset. A corrupt progress snapshot or a
broken teardown path therefore vanished without a trace.

- Share a _progress_age_seconds helper for both freshness checks: narrow
  the catch to (TypeError, ValueError), keep the inactive/stale fallback,
  and log unparseable timestamps at warning level.
- Reuse the already-parsed snapshot age in the replay decision, so one
  corrupt timestamp warns once per connection instead of once per
  freshness check.
- Trace failed error-frame delivery and failed close at debug level
  (usually an already-disconnected client, not a fault).
- Log a failed reset_current_user at warning level: leaking the user
  context is a real fault, not a disconnect.

Tests: malformed timestamp degrades with a warning; cleanup failures are
logged and never propagate; normal disconnects stay silent.

* fix(knowledge): stop swallowing a failed reindex error-progress write

The reindex failure path wrapped its ProgressTracker ERROR update in
`except Exception: pass`, so when that write itself failed the rebuild's
failure alert disappeared and the KB progress view silently stayed stale.
Log a warning instead; the task-level error status remains authoritative.

* fix(knowledge): log folder sync state recording failures

update_folder_sync_state() swallowed per-file mtime recording errors
with 'except Exception: pass', so a file whose state could not be
recorded silently degraded the persisted sync state while last_sync
still advanced. Log the failure at WARNING and keep the un-recorded
fallback so the next scan re-syncs the file.

* test(codebuddy): make credential fixture expiry relative to now

test_load_credentials_parses_session wrote a hard-coded expiresAt of
1791055241000 (2026-10-03 15:40:41 UTC) and asserted is_expired() is
False. Once that instant passed the assertion flipped, so the test now
fails on every Python version for every branch.

Derive expiresAt / refreshExpiresAt from time.time() so the fixture
always describes a live session, and assert against the value written.

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:22:32 +08:00
evan188199-tech
70d65c0029 fix(api): warn when a deferred tool's definition fails to load (#1731)
* fix(api): warn when a deferred tool's definition fails to load

build_tool_options swallowed get_definition() errors on deferred (MCP)
tools with a bare continue, so a broken tool silently vanished from
the options surface with no trace of why it was unavailable. The skip
now logs a warning naming the provider and adapter class plus the
failure reason; enumeration of the remaining tools is unchanged.

* style(api): ruff-format deferred tool definition warning changes

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:22:03 +08:00
evan188199-tech
f0348731de test(co-writer): lock router contract for CRUD, 4xx payloads, export failures (#1768)
Coverage gap: deeptutor/api/routers/co_writer.py had 246 missing lines
(40.0%). Add tests/api/routers/test_co_writer_contract.py (40 cases):
document CRUD request/response shapes, illegal-payload 4xx handling,
export/import failure branches, edit/automark agent passthrough, and
history/tool-calls endpoints. All storage and agent work is stubbed to
tmp_path; no product code changed.

Evidence: evidence/co-writer-tests-20261003/ (40 passed on
origin/main ef2d9e5c3; no failing cases, contract currently holds).

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:14:11 +08:00
evan188199-tech
27ef7af57c test(api): cover learning-records account isolation and read boundaries (#1739)
* test(api): cover learning-records account isolation and read boundaries

Regression protection for GET /api/mastery-paths/reading/records
(#1109/#1130): cross-account invisibility through the real
require_learning_surface auth stack, the 200-entry most-recent-first
activity tail, the empty-account branch, 401 on missing/invalid tokens,
405 on writes, and 400 on conflicting workspace scopes.

* test(api): fix ruff import order and formatting in learning-records tests

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:12:46 +08:00
evan188199-tech
d7a8610731 test(question): pin mimic websocket error-path and stdout interceptor failure contracts (#1741)
* test(question): pin mimic websocket error-path and stdout interceptor failure contracts

Failure-injection characterization tests for the two DT-22 HIGH findings on
websocket_mimic_generate: the outer error broadcast swallow and the
StdoutInterceptor terminal-write swallow (ex-TeeWrite). Pins that send/write
failures stay isolated, process stdout is always restored, and the websocket
still closes. 现状豁免 recorded in docstrings: the swallows are silent by
design today; surfacing them is a code change outside this test-only card.

* style(tests): reformat question router mimic websocket test for ruff format

---------

Co-authored-by: XZH <cto@xzh.ai>
2026-10-07 20:12:37 +08:00
Bingxi Zhao (Frank)
f07029cfcf release: v1.6.13
Ship the reading, listening, question-bank, parsing, and provider updates
summarized in assets/releases/ver1-6-13.md.

Make speech timeouts configurable, report actionable synthesis failures,
and keep chat attachments discoverable in their selected workspace while
preserving earlier uploads and URLs. Keep reply playback cancellation and
single-audio ownership intact.

Sync README prose and all eleven translations, update the stable install
note, and archive release notes older than one week. Repair stale reading
test fixtures and spawned test imports, and clear the Partner type error.

Validation: 9252 Python tests and 8 subtests passed (28 skipped); 518 web
unit tests, 1253 Node tests, and 62 browser audits passed. Pre-commit, ruff,
typecheck, contracts, architecture, i18n, production build, route budgets,
and the docs build passed.
2026-10-04 21:35:00 +08:00
Bingxi Zhao (Frank)
4d7b080fbe fix(knowledge): reuse catalog probes without blocking the API (#1711) 2026-10-04 18:04:10 +08:00
Bingxi Zhao (Frank)
8ed5fe040e test: synchronize session restoration and turn cleanup 2026-10-04 16:21:59 +08:00
Bingxi Zhao
c30449895e Merge pull request #1661 from ChinskiKaczynski/feat/polish-language
feat: add Polish localization
2026-10-04 15:13:29 +08:00
Bingxi Zhao (Frank)
2700105923 Merge dev into PR #1664 and preserve integrated behavior 2026-10-04 14:41:40 +08:00
Bingxi Zhao
ab52f95cc3 Merge pull request #1640 from evan188199-tech/codex/co-writer-model-selection
feat(co-writer): support model selection for edits (#661)
2026-10-04 14:27:08 +08:00
Bingxi Zhao (Frank)
dfeb2fb4f3 Merge dev into PR #1657 and preserve integrated behavior 2026-10-04 14:22:45 +08:00
Bingxi Zhao
002dbc34ee Merge pull request #1685 from evan188199-tech/codex/fix/mastery-session-lock
fix(session): stop waiting turns before deletion (#1646)
2026-10-04 14:19:37 +08:00
Bingxi Zhao
2f62ab1d71 Merge pull request #1625 from evan188199-tech/codex/fix/workspace-subagents
fix(workspace): preserve shared subagent access (#1613)
2026-10-04 14:17:27 +08:00
Bingxi Zhao
412fdf4dd0 Merge pull request #1651 from evan188199-tech/codex/feat/learner-assigned-books
feat(learner): expose assigned interactive books
2026-10-04 14:15:04 +08:00
Bingxi Zhao
f56dfb476e Merge pull request #1599 from dxhome/codex/fix-knowledge-list-proxy
fix: knowledge base listing through proxy
2026-10-04 14:13:31 +08:00
Bingxi Zhao
86aea7b4c5 Merge pull request #1635 from evan188199-tech/codex/feat/bilingual-source-pairing
feat(web-source): add bilingual source pairing (#902)
2026-10-04 14:00:11 +08:00
Bingxi Zhao (Frank)
be4c144171 Merge dev while preserving futureinfra and existing provider contracts 2026-10-04 13:58:31 +08:00
Bingxi Zhao (Frank)
6a236e7b62 Merge dev to retain Requesty and API Route provider registrations 2026-10-04 13:54:09 +08:00
XZH
7cf2fc94a3 fix(session): stop waiting turns before deletion 2026-10-01 09:15:57 -07:00
uxidev
cce8292ecc feat: add FutureInfra as an LLM provider
Register FutureInfra as an OpenAI-compatible gateway provider (env FUTUREINFRA_API_KEY, base URL https://futureinfra.ai/v1/ai, alias future_infra) with tests mirroring the Cheaper Inference provider.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 00:25:03 +09:00
dennyho0917
8972c8786a feat: add API Route LLM gateway provider 2026-09-30 14:01:30 +08:00
ZyPulse
cbb742a141 feat(parsing): select an independent image description model 2026-09-30 00:01:29 +08:00
ChinskiKaczynski
f446ac6715 fix: complete Polish language integration 2026-09-29 16:33:11 +02:00
XZH
cd474bc824 feat(reading): add server-owned quiz star rewards (#1656) 2026-09-29 06:17:54 -07:00
XZH
cc7d1987c9 test(learner): format assigned books regressions 2026-09-29 02:17:28 -07:00
XZH
c90fe4d047 feat(learner): expose assigned interactive books
Closes #1650
2026-09-29 02:14:47 -07:00
XZH
0541549ef3 feat(co-writer): support model selection for edits 2026-09-28 19:02:48 -07:00
XZH
0e260130be feat(web-source): add bilingual source pairing (#902)
Add bilingual page pairing and language variant alignment for web sources:
- Detect page language variants via hreflang alternate links and URL language prefix patterns.
- Record pairing relations in durable SQLite repository and KB web-source metadata.
- Expose pairing relations via GET /api/knowledge-bases/{kb_name}/web-source/{source_id}/pairings and WebSourceInfo.
- Display bilingual pairing indicator in the KB web sources section with localization across en, zh, de, fr, uk.
- Add targeted tests for pairing detection, repository persistence, and API exposure.

Co-authored-by: multica-agent <github@multica.ai>
2026-09-28 14:58:51 -07:00
Thibault Jaigu
21de8bf0c8 test: cover Requesty provider registry and runtime resolution 2026-09-28 20:20:13 +01:00
XZH
1240d5e294 fix(workspace): preserve shared subagent access 2026-09-28 08:17:00 -07:00
Bingxi Zhao (Frank)
55b1b14769 test(update): isolate positive flows from runner systemd service 2026-09-27 11:38:29 +08:00
Bingxi Zhao (Frank)
ffe74e2fbc fix(chat): handle direct RAG kwargs and isolate tool settings test 2026-09-27 11:17:47 +08:00
Bingxi Zhao (Frank)
5e7be659a2 Preserve retrieved source visuals for vision answers 2026-09-27 10:57:00 +08:00
Bingxi Zhao (Frank)
3a0ed2b560 fix(turns): surface and retry orphaned worker loss (#1570) 2026-09-27 04:55:15 +08:00
Bingxi Zhao (Frank)
1e1e02beae fix(co-writer): keep automark annotations readable (#1603) 2026-09-27 04:55:15 +08:00
Bingxi Zhao (Frank)
e02c82bdf0 fix(update): refuse in-app handoff inside systemd services (#1555) 2026-09-27 04:52:21 +08:00
Bingxi Zhao (Frank)
550268e1e3 fix: support Malay as a persistent reply language 2026-09-27 04:37:15 +08:00
Bingxi Zhao (Frank)
68a9de1255 Merge remote-tracking branch 'origin/dev' into codex/pr1602-fix 2026-09-27 03:27:16 +08:00
Bingxi Zhao (Frank)
0e6761bc35 fix(web): recover every unaccepted chat submission 2026-09-27 03:27:08 +08:00
Bingxi Zhao
06a5a8443b Merge pull request #1563 from wumajiehechuan-lab/fix/dashscope-stt-realtime-model
fix(voice): use realtime DashScope STT model ids
2026-09-27 03:22:03 +08:00
Bingxi Zhao
0bc78fc90a Merge pull request #1583 from polaris-smart/fix/fastapi-lazy-include-tests
test(api): adapt knowledge_router/file_preview tests to lazy route inclusion
2026-09-27 03:17:52 +08:00
Bingxi Zhao (Frank)
467d0adba2 test(api): preserve auth dependencies for eager preview routes 2026-09-27 02:56:13 +08:00
Bingxi Zhao
2902e09699 Merge pull request #1592 from dxhome/preserve-generated-partner-attachments
fix: preserve generated Partner attachments
2026-09-27 02:39:07 +08:00
Bingxi Zhao
8d403b9ebb Merge pull request #1571 from aiapienthusiast/feature/cheaper-inference-provider
feat: add Cheaper Inference as an LLM provider
2026-09-27 02:36:55 +08:00
dxhome
2fb4d89771 fix: knowledge base listing through proxy 2026-09-26 13:20:13 +08:00
XuanDu
a988f88778 fix: preserve generated partner attachments 2026-09-25 19:35:32 +08:00
Philipp Eisbacher
9b139a772f feat(i18n): add German as a full interface language
Adds `de` alongside en/zh/fr/uk, following the seams the Ukrainian locale
established: the interface-language normalizers (settings + launcher), the
Settings language list, APP_LANGUAGES / normalizeLanguage, the lazy bundle
loader, the date locale, the CLI banner labels, the quiz-judge prompt and
the i18n audit's required locales. German already existed as a reply
language; this makes it selectable for the UI as well.

`web/locales/de/app.json` covers all 5200 English keys (audit: 3850/3850
used keys, strict). `language.german` is added to every catalog.

Tests: `tests/i18n/test_german_locale.py` pins each seam, and
`web/tests/german-locale-quality.test.ts` guards terminology (informal
"du", one term per concept, no context-free machine translations such as
"Lappen" for RAG). Three existing tests used `de` as their example of an
unsupported language; they now use `xx`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 22:00:58 +02:00
polaris-smart
664f8a61ab test(api): adapt knowledge_router/file_preview tests to lazy route inclusion
Newer FastAPI resolves include_router lazily, so iterating app.routes yields
_IncludedRouter placeholders without a .path attribute — the learner-surface
template tests crashed on attribute access instead of asserting routes, and
the file-preview auth test counted 0 routes (assert 0 == 2).

Adapt the two suites to resolve included routers through the same
iter_routes pattern video_learning's tests already use, so route
enumeration works under both eager and lazy inclusion.

This clears the pre-existing red on dev (the v1.6.11 release commit runs
red on these suites in CI) — verified: 130 passed across the two files.
2026-09-25 02:00:06 +08:00