Commit graph

1041 commits

Author SHA1 Message Date
Marius Oppedal Ringsby
874bbf967b Replace cleanup service datetime.utcnow calls (#1494)
datetime.utcnow() is deprecated in Python 3.12 and removed in 3.14.
Swap the five calls in src/cleanup_service.py for a local _utcnow()
helper returning naive UTC, matching the naive DateTime columns the
archive/delete cutoffs compare against (same approach as the
task-scheduler and core-database slices). Add a regression test
asserting the helper stays naive so the cutoff math can't hit a
naive/aware TypeError.

Part of #1116
2026-06-03 14:14:27 +09:00
ghreprimand
04d393b8d2 Replace webhook manager datetime.utcnow calls (#1499)
Co-authored-by: ghreprimand <203024559+ghreprimand@users.noreply.github.com>
2026-06-03 14:14:23 +09:00
Alexandre Teixeira
d210da49e2 Add companion pairing route response tests (#920) 2026-06-03 14:14:20 +09:00
Alexandre Teixeira
0b4bc71dfc Add atomic IO durability tests (#1622) 2026-06-03 14:14:16 +09:00
red person
e6f1e8fe71 Ignore non-object prefs JSON (#1257) 2026-06-03 14:12:45 +09:00
red person
7bb710338c Ignore non-object embedding endpoint config (#1260) 2026-06-03 14:12:41 +09:00
red person
3c73b4fe32 Skip invalid research CLI records (#1394) 2026-06-03 14:12:38 +09:00
red person
395edc5126 Reject invalid theme CLI prefs (#1396) 2026-06-03 14:12:35 +09:00
red person
989d066e0b Fall back from invalid preset stores (#1402) 2026-06-03 14:12:31 +09:00
Wes Huber
d5e73f1c84 fix(tests): align broken test assertions with current behavior (#1791)
* fix(tests): align broken test assertions with current behavior

- test_readme_native_quickstart_uses_loopback: README warning text
  moved from --host prefix to bind-to phrasing; update assertion
- test_sanitize_merges_consecutive_user_messages: consecutive user
  messages ARE merged and orphan tool messages ARE dropped by the
  adjacency repair pass; update expected counts and values

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix(tests): update cookbook status poll assertion for stopped state

The cookbookRunning.js ternary now handles a 'stopped' status
alongside 'error', so the exact string match in the test no longer
holds. Relax the assertion to check for the error branch presence
instead of the full ternary expression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-03 14:12:17 +09:00
Afonso Coutinho
083d311da4 fix: context_compactor token helpers crash on non-string message text (#1634)
* fix: context_compactor token helpers crash on non-string message text

* fix: _truncate_text_to_token_budget returns an empty string for non-string text, not the raw value
2026-06-03 14:12:14 +09:00
Shaw
89145b6260 fix(scheduler): fail closed on malformed scheduled_time instead of 500 (#1410)
compute_next_run parsed scheduled_time as "HH:MM" with int(parts[0]),
int(parts[1]) and no validation, so "9", "9am", "25:00", "9:" or ":30" raised
IndexError/ValueError. The POST /tasks create route passes the user/LLM-supplied
scheduled_time before its try block (and only validates the cron field), so a
bad value surfaced as an unhandled 500 rather than the clean 400 used for other
invalid fields — and the same crash could fire inside the scheduler loop when
recomputing next_run for an already-stored bad row.

Guard the parse and fail closed (warn + return None), matching the existing
invalid-cron handling in the same function.

Adds tests/test_scheduler_scheduled_time_validation.py — malformed values return
None (fail before with IndexError/ValueError), valid HH:MM still computes.
2026-06-03 14:12:07 +09:00
Shaw
2cdacb952e fix(tts): tolerate a malformed tts_speed instead of 500-ing (#1450)
synthesize() and get_stats() parsed the stored tts_speed with a bare
float(settings.get("tts_speed", "1")). The manage_settings agent tool maps
"speech speed"/"voice speed" to tts_speed and, because the setting's default is
a string, writes the value through unvalidated — so an agent (or a hand-edited
settings.json) can store "fast" or "". After that, GET /api/tts/stats and POST
/api/tts/synthesize both 500 with ValueError until the JSON is corrected by hand.

Parse defensively via a _safe_speed() helper (non-numeric/empty/<=0 -> 1.0),
mirroring the settings layer's tolerance of corrupt config.

Adds tests/test_tts_speed_malformed.py (stats + synthesize) — both raise
ValueError before this change and pass after.
2026-06-03 14:12:03 +09:00
red person
74a6b54e33 Reject invalid cookbook CLI state (#1531) 2026-06-03 14:11:56 +09:00
red person
082e556975 Ignore invalid note CLI items (#1539) 2026-06-03 14:11:53 +09:00
red person
9b37461279 Skip invalid FAISS migration JSON (#1547) 2026-06-03 14:11:49 +09:00
red person
d0c4f7da4f Ignore non-string background stream deltas (#1549) 2026-06-03 14:11:45 +09:00
red person
c570673751 Skip invalid memory CLI rows (#1552) 2026-06-03 14:11:42 +09:00
red person
94f8833176 Skip invalid skills CLI rows (#1553) 2026-06-03 14:11:38 +09:00
red person
e265a4447a Normalize stored MCP CLI JSON (#1554) 2026-06-03 14:11:35 +09:00
red person
6a46c21143 Reject invalid Tailscale discovery JSON (#1556)
* Reject invalid Tailscale discovery JSON

* Guard nested Tailscale IP shapes
2026-06-03 14:11:31 +09:00
red person
8bc232d395 Mask short webhook CLI tokens (#1558) 2026-06-03 14:11:28 +09:00
red person
499fb9b44f Handle missing gallery album images (#1563) 2026-06-03 14:11:24 +09:00
red person
00d1c0ff2c Skip invalid contacts CLI rows (#1569) 2026-06-03 14:11:21 +09:00
red person
d887158103 Handle missing calendar CLI relation (#1574) 2026-06-03 14:11:17 +09:00
Afonso Coutinho
e33c9ba609 fix: is_public_blocked_tool crashes on a truthy non-string tool name (#1620)
* fix: is_public_blocked_tool crashes on a truthy non-string tool name

* fix: is_public_blocked_tool fails closed (blocks) on a malformed non-string tool name
2026-06-03 14:11:14 +09:00
Afonso Coutinho
290a3ba714 fix: _lookup_bandwidth crashes on a truthy non-string gpu_name (#1641) 2026-06-03 14:11:10 +09:00
red person
8707cc69ee Ignore non-object settings scrub inputs (#1645) 2026-06-03 14:11:05 +09:00
red person
ce97fd6b64 Handle non-string src search queries (#1646) 2026-06-03 14:11:02 +09:00
red person
ab75523724 Let preset set replace corrupt entries (#1650) 2026-06-03 14:10:58 +09:00
red person
2858871d07 Reject non-PNG signature export data (#1651) 2026-06-03 14:10:54 +09:00
red person
d697328cf8 Ignore invalid background job store rows (#1261) 2026-06-03 14:07:14 +09:00
red person
1bf1880f11 Ignore invalid integration rows (#1404) 2026-06-03 14:07:11 +09:00
red person
03655655bc Ignore invalid companion auth shapes (#1405) 2026-06-03 14:07:07 +09:00
red person
bb5caf2d42 Ignore invalid editor draft payloads (#1533) 2026-06-03 14:07:03 +09:00
red person
c8556eefcb Skip invalid memory extractor rows (#1535) 2026-06-03 14:07:00 +09:00
red person
6f9582e3af Skip invalid ownerless JSON rows (#1540) 2026-06-03 14:06:57 +09:00
red person
7cf39a927b Skip invalid skill extractor rows (#1546) 2026-06-03 14:06:53 +09:00
red person
9629fe3b15 Ignore non-string task CLI previews (#1559) 2026-06-03 14:06:49 +09:00
red person
8f4191f3ab Ignore non-string docs CLI content lengths (#1561) 2026-06-03 14:06:46 +09:00
red person
cd17198633 Skip invalid personal CLI index rows (#1571) 2026-06-03 14:06:42 +09:00
Afonso Coutinho
e9826b7989 fix: agent_tools._truncate crashes on non-string input (#1624)
* fix: agent_tools._truncate crashes on non-string input

* fix: agent_tools._truncate returns a string for non-string input, not the raw value
2026-06-03 14:06:39 +09:00
Afonso Coutinho
19cce9499c fix: visual_report markdown helpers crash on a non-string input (#1633) 2026-06-03 14:06:35 +09:00
red person
8ed718c88a Ignore non-string email thread bodies (#1654) 2026-06-03 14:06:31 +09:00
Afonso Coutinho
17532340a0 Parse standard Gmail quote attribution dates
Allow Gmail quote attribution parsing to handle standard US weekday/month/day/year comma patterns while preserving existing formats, with JS regression coverage.
2026-06-03 13:45:56 +09:00
Afonso Coutinho
cfdeec47a1 Decode email headers without injected spaces
Use email.header.make_header for MIME header decoding so adjacent encoded/plain header parts preserve RFC spacing, with regression coverage.
2026-06-03 13:45:33 +09:00
Afonso Coutinho
5a89b52698 Merge search analytics defaults in services copy
Make services.search.analytics tolerate missing counters in older or partial analytics files by merging loaded data over defaults, with regression coverage.
2026-06-03 13:45:07 +09:00
Afonso Coutinho
11e3967083 Normalize scheduled email offsets before storage
Normalize scheduled email send_at values with timezone offsets or Z suffixes to naive UTC before storing, matching the poller's lexicographic comparison format and preventing early/late sends.
2026-06-03 13:44:18 +09:00
Afonso Coutinho
acaba896dd Treat non-string research summaries as low quality
Filter malformed non-string research summaries instead of letting the broad exception path classify them as usable, with regression coverage.
2026-06-03 13:42:24 +09:00
Afonso Coutinho
296ca6df6b Skip malformed personal keyword index rows
Make personal keyword retrieval tolerate corrupted non-dict index entries and missing chunk lists, with regression coverage.
2026-06-03 13:42:05 +09:00