Commit Graph

89 Commits

Author SHA1 Message Date
Rajat Ahuja 2945f6bb3c
rm: level_valid constraint (#266)
* rm: level_valid constraint

* fix: create new migration

* fix: normalize data before enforcing check constraint again
2025-11-17 12:56:37 -05:00
Rajat Ahuja 7e8cf4336c
fix: add test for message seq in session (#268) 2025-11-17 12:54:23 -05:00
Benjamin McCormick 5226b84cf3 Merge branch 'main' into ben/dev-1163 2025-11-13 12:24:39 -05:00
doria c8d75c77df
Merge pull request #256 from plastic-labs/ben/better-dedup
feat: better dedup with configurability
2025-11-13 11:46:43 -05:00
Rajat Ahuja d7bdcc3bc1
feat: codify queue columns (#254)
* feat: codify queue columns

* fix: batch with python loop control

* fix: cleanup merge

* fix: down revision

* fix: batch delete in migration

* feat: only run alembic tests for changed migration / test (#264)

* feat: only run alembic tests for changed migration / test
* fix: Run full test suite if alembic testing infra changes

* feat: codify times_derived + level on Document (#260)

* feat: codify times_derived + level on Document
* fix: CR comment

* fix: CodeRabbit comments

* fix: batch migrations; move types; remove fields from payload

* fix: rm duplicate table args

* fix: add messages.id FK
2025-11-07 13:22:24 -05:00
Rajat Ahuja 8e3f24d4f8
feat: add caching (redis) (#265)
* feat: init redis cache

* feat: initialize redis client

* fix: add fakeredis client

* fix: update docker compose

* fix: various coderabbit comments

* fix: update docker-compose.yml.example

* fix: CR comments 2

* fix: clean up client

* fix: cache key class; workspace LRU; constants -> utils

* fix: CodeRabbit comments

* feat: add redis to harness

* fix: use cashews

* fix: add locking for cache stampedes

* fix: clean up PR

* f: unify cache key templates and stop caching None

* fix: alter prefixes + prime cache on get_or_create()

* fix: re-add fakeredis

* chore: Code Rabbit nits

* CR comments; make client more resilient

* fix: BPR

* fix: set redis once but clear cache in between every test

* fix: attempt fix contextvar error

* fix: make TestClient rely on redis patch

* fix: potential working fix

* fix: namespace inheritance; address comments

* fix: namespace inheritance; address comments

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-11-07 13:04:28 -05:00
Rajat Ahuja 1d0934a568
fix: message seq in session N+1 (#261)
* fix: message seq in session N+1

* test: behavior of enqueue

* fix: test

* chore: Code Rabbit Comments

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-11-03 15:33:48 -05:00
Rajat Ahuja 097f3b31a0
align DB state to sqlalchemy model definitions (#245)
* feat: align DB schema with sqlalchemy model definitions

* test: add test for new migration file

* fix: add pk for message embeddings table

* fix: add naming constraint

* fix: align more indexes + unique constraints --> rm redundancy

* fix: add missing indexes

* Fix Server Default Migrations and add in appropriate Server Defaults (#252)

* fix: Improve alembic migration reliability

* fix: Ensure alembic migrations use a session pooler (#247)

* fix: Ensure alembic migrations use a session pooler

* fix: bump batch size; fix document delete in 08894082221a (#249)

* chore: add alembic logging

* fix (alembic): remove order by in batches

* fix: fkey -> fk

* chore: code rabbit

---------

Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>

* fix: Add server defaults to appropriate columns

* chore: (tests) Add alembic migration test

---------

Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>

* fix: align models with alembic check

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-11-03 14:58:12 -05:00
doria 1df47e61c8
fix: remove list webhook db call (not needed, causes race condition) (#257)
* fix: remove get_workspace call from list_webhooks (not necessary, causes race condition)

* fix: remove old test
2025-11-03 11:26:44 -05:00
doria 342d72184a
feat: rework langfuse setup to work more cleanly; fix bug in dream scheduling (#253) 2025-11-03 11:25:29 -05:00
doria 71a6b80594
Merge pull request #258 from plastic-labs/ben/add-test-count-to-longmem
feat: add --test-count arg to longmem.py
2025-10-31 13:29:42 -04:00
Benjamin McCormick 9bdd8741a5 feat: add --test-count arg to longmem.py 2025-10-30 16:52:23 -04:00
Benjamin McCormick 0f8fc7f21c chore: remove old unuseful code 2025-10-30 14:57:25 -04:00
Benjamin McCormick 3186d2ce39 feat: add optional backup providers that kick in on retry 2025-10-29 16:53:28 -04:00
Benjamin McCormick a90156e113 feat: rework langfuse setup to work more cleanly; fix bug in dream scheduling 2025-10-29 16:10:11 -04:00
Vineeth Voruganti 6df41265ed
fix: Ensure alembic migrations use a session pooler (#247)
* fix: Ensure alembic migrations use a session pooler

* fix: bump batch size; fix document delete in 08894082221a (#249)

* chore: add alembic logging

* fix (alembic): remove order by in batches

* fix: fkey -> fk

* chore: code rabbit

---------

Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
2025-10-28 17:41:49 -04:00
Rajat Ahuja 5db7b4948c
feat: introduce alembic migration verification (#238)
* feat: introducer migration verification checks

* fix: move verification to tests/alembic

* feat: add verification steps for all alembic migrations

* fix: isolate test runs and implement all migration tests

* test: parametrize

* fix: CR comments

* fix: Add README

* feat: add precommit hook for validating alembic

* fix: rm pytest-alembic package

* test: create bulk resources to test migration batching

* fix: add latest test

* fix: tests to handle non-standard schema

* chore: Code Rabbit nits

* fix: CR comments 1

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-23 16:24:35 -04:00
Rajat Ahuja 77a965e97f
feat: fix race condition in message sequence batching (#235)
* feat: fix race condition in message sequence batching

* fix: CodeRabbit comments; commit early to release the advisory lock before generating embeddings

* fix: use index + rm unused method

* fix: PR comments

* fix: bug in lock timeout

* fix: patch tracked_db for peers route within conftest.py
2025-10-16 11:46:55 -04:00
doria 65503955a4
fix: defensively get summary, better summary logging, gemini client token count (#236)
* fix: remove default max_distance from get_working_rep, get token count from gemini client properly, log summaries better

* fix: defensively get message public id (new field)

* fix: add defensive check to to_schema_summary

---------

Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
2025-10-10 18:18:31 -04:00
Benjamin McCormick 1eefc4af31 fix: [hotfix] return schemas, not models 2025-10-09 17:25:11 -04:00
doria 68acf38134
Misc: bug fixes, multi-db test harness, DELETE workspace (#230)
* feat: add optional JWT and webhook secrets to honcho instance creation

* chore: ignore spurious warnings

* feat: add response format if using gpt-5 model family

* feat: add response models to all apis except anthropic

* fix: raise NotImplementedError for response models in AsyncAnthropic client

* chore: address review

* [WIP] representation structure + deriver cleanup

* chore: add tests, cleanup

* feat: [WIP: semi-working] representation object

* fix: alignment

* fix: make observations hashable for dedup

* fix: datetime formatting, observation counting

* fix: switch to int for message id, clean up representation

* feat: remove need for metadata working rep

* chore: cleanup

* fix: use tenacity instead of custom fns

* feat: add representation and card to context if desired

* feat: add semantically relevant observations

* fix: pass all params to streaming, nonblocking streaming

* feat: consolidate document saving, make working representation fetching much smarter

* chore: add 100% test coverage of representation util

* feat: basic dream infra

* feat: dream queue item first pass

* chore: fixes & cleanup from coderabbit

* fix: dreams scheduled when new document count reaches a certain threshold

* feat: wip: timed dreams (not working)

* fix: test

* fix: remove useless pyright ignore

* fix: executing dreams

* feat: dreaming

* feat: [WIP] longmemeval bench

* feat: add USE_PEER_CARD setting, fix longmem test driver

* feat: get full working rep for dialectic in one swoop -- fix representation_from_documents to use the proper timestamp!

* fix: timestamps for real, handle assistant qs in longmem

* fix: remove old client, add batching to longmem

* perf: remove duplicate detection, will move to background task

* feat: track perf metrics on evals

* feat: adjust deriver prompt to use peer_id, add question date to question, clean up deriver

* fix: label metrics by task for better perf trace

* chore: code review

* feat: add efficiency score to longmem bench

* chore: tuning and cleaning up eval

* chore: bring in the big prompts

* feat: add support for vllm client

* feat: perf: bundle db calls in deriver and dialectic, increase max conns in docker db

* feat: add merge-sessions flag to longmemeval, add SUMMARY_ENABLED flag

* fix: COLLECT_METRICS default false

* chore: display start/end message ids, don't include in metrics

* fix: break large messages apart for eval

* fix: only get/create collection when needed

* feat: properly attribute documents with message id ranges and add session name column to documents

* fix: revert move of get_or_create_collection (need for fkey)

* fix: always get collection with peer name even if it's none

* chore: coderabbit

* fix: give peer card its own config, expand document schema, refactor get_context to be parallel, various cleanup chores and bugfixes

* chore: refactor: reify observer/observed system across entire codebase, including db migration

* refactor: cleanup code organization, make singletons where desired

* refactor: replace embeddings store with representation manager

* chore: coderabbit cleanup

* feat: multi-db longmem harness

* Merge branch 'main' into ben/multi-db-harness

* [WIP] feat: add delete workspace endpoint, use in bench

* chore: move excess logging to debug

feat: improve metrics block logs to include more data

fix: make longmem db deletion configurable

* fix: [CRITICAL] use async genai client

* chore: update core sdk, fix tests to use aio as well

* fix: rollback prompt changes

* chore: update version

* fix: cleanup, coderabbit, wrap delete op in try/except

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-09 16:53:41 -04:00
doria a3d98afdfe
Add updated get_context to SDKs (#231)
* feat: add optional JWT and webhook secrets to honcho instance creation

* chore: ignore spurious warnings

* feat: add response format if using gpt-5 model family

* feat: add response models to all apis except anthropic

* fix: raise NotImplementedError for response models in AsyncAnthropic client

* chore: address review

* [WIP] representation structure + deriver cleanup

* chore: add tests, cleanup

* feat: [WIP: semi-working] representation object

* fix: alignment

* fix: make observations hashable for dedup

* fix: datetime formatting, observation counting

* fix: switch to int for message id, clean up representation

* feat: remove need for metadata working rep

* chore: cleanup

* fix: use tenacity instead of custom fns

* feat: add representation and card to context if desired

* feat: add semantically relevant observations

* fix: pass all params to streaming, nonblocking streaming

* feat: consolidate document saving, make working representation fetching much smarter

* chore: add 100% test coverage of representation util

* feat: basic dream infra

* feat: dream queue item first pass

* chore: fixes & cleanup from coderabbit

* fix: dreams scheduled when new document count reaches a certain threshold

* feat: wip: timed dreams (not working)

* fix: test

* fix: remove useless pyright ignore

* fix: executing dreams

* feat: dreaming

* feat: [WIP] longmemeval bench

* feat: add USE_PEER_CARD setting, fix longmem test driver

* feat: get full working rep for dialectic in one swoop -- fix representation_from_documents to use the proper timestamp!

* fix: timestamps for real, handle assistant qs in longmem

* fix: remove old client, add batching to longmem

* perf: remove duplicate detection, will move to background task

* feat: track perf metrics on evals

* feat: adjust deriver prompt to use peer_id, add question date to question, clean up deriver

* fix: label metrics by task for better perf trace

* chore: code review

* feat: add efficiency score to longmem bench

* chore: tuning and cleaning up eval

* chore: bring in the big prompts

* feat: add support for vllm client

* feat: perf: bundle db calls in deriver and dialectic, increase max conns in docker db

* feat: [WIP] realtime context object
note: must download custom stainless API for SDK

* feat: add merge-sessions flag to longmemeval, add SUMMARY_ENABLED flag

* fix: COLLECT_METRICS default false

* chore: display start/end message ids, don't include in metrics

* fix: break large messages apart for eval

* fix: only get/create collection when needed

* feat: properly attribute documents with message id ranges and add session name column to documents

* fix: revert move of get_or_create_collection (need for fkey)

* fix: always get collection with peer name even if it's none

* chore: coderabbit

* fix: bug in get context
feat: get context updates in ts sdk

* feat: viz

* chore: update honcho-ai/core, remove WIPs

* fix: consistent ordering, comment nits, removed excess dreamer init

* fix: test int->str

* fix: Add validation and update async python client

* fix: add validation for last_user_message as well

* fix: add deeper validation to getContext in typescript sdk

* fix: let session context take a Message object for lastUserMessage to match python sdk behavior

* fix: use PeerIdSchema

* fix: allow peer object as argument

* fix: lastUserMessage min length 1

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-09 15:44:21 -04:00
Rajat Ahuja f38230fd92
Integrate prometheus into Honcho (#226)
* feat: add prometheus to api routes

* fix: rm multiproc setup

* feat: add prometheus to  deriver

* fix: rm deriver-specific counters (for now)

* fix: dangling issues

* feat: skip metrics endpoint; track dialectic calls; track individual message creation

* fix: CR comments and use fastapi route template. also fix dialectic call

* fix: revert to existing request_id logic

* fix: rm session_name from dialectic call

* feat: add deriver task metric

* fix: rm unused get_namespace

* rm: namespace param

* feat: add MESSAGE_INPUT_TOKENS and DERIVER_TOKENS_PROCESSED counters

* fix: rm message input tokens

* fix: PR comments; docstrings; error handle metrics exposing endpoint

* chore: Code Rabbit

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-08 13:53:48 -04:00
Rajat Ahuja 3d0f96d339
Add QueueItem cleanup logic (#228)
* feat: start queue cleanup

* feat: add Queue cleanup logic

* feat: mark messages as errored

* fix: rename + commit

* fix: rm apscheduler

* fix: add default for created_at in migration

* fix: consolidate error handling and only throw away first message of an errored batch

* fix: move processing to within queue manager

* fix: regen migration

* fix: CR comment

* fix: rename message -> queue_item when dealing with queue_item in the queue manager
2025-10-08 12:44:33 -04:00
doria f988aae996
create Representation class and use it to unify all formatting (#214)
* feat: add optional JWT and webhook secrets to honcho instance creation

* chore: ignore spurious warnings

* feat: add response format if using gpt-5 model family

* feat: add response models to all apis except anthropic

* fix: raise NotImplementedError for response models in AsyncAnthropic client

* chore: address review

* [WIP] representation structure + deriver cleanup

* chore: add tests, cleanup

* feat: [WIP: semi-working] representation object

* fix: alignment

* fix: make observations hashable for dedup

* fix: datetime formatting, observation counting

* fix: switch to int for message id, clean up representation

* feat: remove need for metadata working rep

* chore: cleanup

* fix: use tenacity instead of custom fns

* feat: add representation and card to context if desired

* feat: add semantically relevant observations

* fix: pass all params to streaming, nonblocking streaming

* feat: consolidate document saving, make working representation fetching much smarter

* chore: add 100% test coverage of representation util

* feat: basic dream infra

* feat: dream queue item first pass

* chore: fixes & cleanup from coderabbit

* fix: dreams scheduled when new document count reaches a certain threshold

* feat: wip: timed dreams (not working)

* fix: test

* fix: remove useless pyright ignore

* fix: executing dreams

* feat: dreaming

* feat: [WIP] longmemeval bench

* feat: add USE_PEER_CARD setting, fix longmem test driver

* feat: get full working rep for dialectic in one swoop -- fix representation_from_documents to use the proper timestamp!

* fix: timestamps for real, handle assistant qs in longmem

* fix: remove old client, add batching to longmem

* perf: remove duplicate detection, will move to background task

* feat: track perf metrics on evals

* feat: adjust deriver prompt to use peer_id, add question date to question, clean up deriver

* fix: label metrics by task for better perf trace

* chore: code review

* feat: add efficiency score to longmem bench

* chore: tuning and cleaning up eval

* chore: bring in the big prompts

* feat: add support for vllm client

* feat: perf: bundle db calls in deriver and dialectic, increase max conns in docker db

* feat: add merge-sessions flag to longmemeval, add SUMMARY_ENABLED flag

* fix: COLLECT_METRICS default false

* chore: display start/end message ids, don't include in metrics

* fix: break large messages apart for eval

* fix: only get/create collection when needed

* feat: properly attribute documents with message id ranges and add session name column to documents

* fix: revert move of get_or_create_collection (need for fkey)

* fix: always get collection with peer name even if it's none

* chore: coderabbit

* fix: give peer card its own config, expand document schema, refactor get_context to be parallel, various cleanup chores and bugfixes

* chore: refactor: reify observer/observed system across entire codebase, including db migration

* refactor: cleanup code organization, make singletons where desired

* refactor: replace embeddings store with representation manager

* chore: coderabbit cleanup

* chore: update migration to non-null session param in documents, general review and cleanup

* chore: merge branch 'main' into ben/deriver-tidy

* chore: review fixes
2025-10-07 15:28:44 -04:00
Rajat Ahuja accdc79fdb
feat: Modify the Summary BaseModel to use public_id of message rather than internal ID (#224)
* feat: Modify the Summary BaseModel to use public_id of message rather than internal ID

* fix: fallback invocation

* fix: strict validation

* fix: rm ID from Message schema

* fix: make SDK changes
2025-10-07 12:37:22 -04:00
Vineeth Voruganti 73c5eb1f5a
SDK Changes (#223)
* fix: Add top level transactions for tracing in deriver

* fix: Add Delete methods to sdks for sessions

* feat: Add session deletion and session level deriver status methods

* fix: Streaming support to python sdk

* fix: Checkpoint Streaming working in SDKs with workarounds for stainless

* feat: fix pagination, add message metadata update, and get peer card methods

* feat: parity in typescript and python sdks

* fix: Address Coderabbit

* fix: Address Coderabbit

* chore: add basedpyright rules to sdk

* fix: Code Rabbit & Changelog

* fix: updated docs with api-reference
2025-10-01 16:25:30 -04:00
Rajat Ahuja 3df044e1b7
feat: use token limit from all senders for rollup (#221)
* feat: use token limit from all senders for rollup

* fix: send all messages to queue_manager

* test: fixe tests and move ownership check to separate query

* fix: if first sender message exceeds batch then we should return an empty batch

* feat: separate representation and non-representation processing

* fix: return msg object and queue items

* fix: rollup logic with interleaving messages

* fix: rm TODO

* Fix langfuse trace and add fallback for weird error in deriver

* fix: simplify query

* fix: comment out update_current_generation

* fix: BPR

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-10-01 16:10:10 -04:00
Rajat Ahuja 6e01af2005
Track worker ownership (#216)
* fix: simplify; use debug logs

* fix: random type error

* fix: CR comments

* fix: move limit check before opening db connection

* fix: use single SQL call to verify ownership and fetch message batch

* fix: CR comments 2
2025-09-25 15:14:48 -04:00
Vineeth Voruganti 09a6b4f8e2
fix: add shadow .env file for compose file (#196) 2025-09-24 16:09:51 -04:00
doria d5f10b9ed2
Merge pull request #206 from plastic-labs/rajat/DEV-1069
Rollup representation tasks in queue for batch processing
2025-09-24 15:49:58 -04:00
Rajat Ahuja fb66630142
feat: get peer cards endpoint (#209)
* feat: get peer cards endpoint

* fix: rm try/catch

* refactor: POST -> GET

* fix: /peer-cards -> /peer-card

* fix: /peer-cards -> /peer-card

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-09-24 12:56:45 -04:00
doria f21d2c78d8
Merge branch 'main' into rajat/DEV-1069 2025-09-24 11:56:36 -04:00
doria 93c23d7e33
Merge branch 'main' into rajat/db-scoping 2025-09-24 11:54:56 -04:00
doria 5d88c459b8
refactor: replace mirascope with handrolled client (#202)
* feat: add optional JWT and webhook secrets to honcho instance creation

* chore: ignore spurious warnings

* feat: add response format if using gpt-5 model family

* feat: add response models to all apis except anthropic

* fix: raise NotImplementedError for response models in AsyncAnthropic client

* chore: address review

* chore: add tests, cleanup

* fix: use tenacity instead of custom fns

* fix: pass all params to streaming, nonblocking streaming

* chore: fix test mock
2025-09-24 11:53:30 -04:00
Rajat Ahuja 1cc3d9aaaf perf: use join on messages table instead of storing token_count in queue payload 2025-09-24 11:45:04 -04:00
Rajat Ahuja 218d00c666 test: fix peer chat tests 2025-09-23 17:44:43 -04:00
Rajat Ahuja 26f975f808 test: CR comments 2025-09-22 13:31:33 -04:00
Rajat Ahuja 1a7bd91cdd fix: use earliest message as cutoff 2025-09-22 13:13:56 -04:00
Rajat Ahuja 5301914847 fix: CR comments 2025-09-19 12:24:01 -04:00
Rajat Ahuja dfa7577eb8 Merge branch 'main' into rajat/DEV-1069 2025-09-19 11:59:51 -04:00
doria 3f47866ae0
feat: add configurable max message size, update tests and docs -- fixes token overflow in deriver (#208)
* feat: add configurable max message size, update tests and docs -- this fixes token overflow in deriver

* fix: remove LLMError special handling

* chore: bump version

---------

Co-authored-by: Rajat Ahuja <rahuja445@gmail.com>
Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-09-18 15:57:53 -04:00
Rajat Ahuja 6ae0d9f434 chore: CR comments 2025-09-05 16:30:55 -04:00
Rajat Ahuja faefb9ac86 test: queue manager 2025-09-05 16:12:35 -04:00
Rajat Ahuja 4eb6830236 feat: batch representation task processing 2025-09-05 13:47:03 -04:00
Rajat Ahuja e6c580b660 refactor: queue manager 2025-09-05 12:47:15 -04:00
doria 802aac0d70
feat: targeted peer cards (#204)
* feat: targeted peer cards

* chore: review cleanup

* chore: Code Rabbit Comment cleanup

---------

Co-authored-by: Vineeth Voruganti <13438633+VVoruganti@users.noreply.github.com>
2025-09-04 12:13:34 -04:00
Vineeth Voruganti f6e01a6f72
2.3.0 Release & N+1 Query Optimization (#190)
* chore (docs): Initial Changelog for 2.3.0

* optimize batch enqueue calculation

* fix (embed): Truncate context during _query_documents_for_level

* chore (docs): Update Changelog with patches

* fix: Code Rabbit Suggestions

* fix: Code Rabbit Suggestions
2025-08-13 14:58:58 -04:00
doria 6efb950ef5
feat: enhance critical analysis functionality by adding peer_id parameter (#191)
- Updated `critical_analysis_call` and `critical_analysis_prompt` to include a new `peer_id` parameter for improved context in analysis.
- Modified the `CertaintyReasoner` class to pass the sender's name as `peer_id` during analysis calls.
- Adjusted test cases to reflect the inclusion of `peer_id`, ensuring comprehensive coverage of the new functionality.
2025-08-13 13:46:56 -04:00
doria fb45c607e5
fix: refactor datetime handling in security and utility modules (#188)
* fix: refactor datetime handling in security and utility modules

- Updated `verify_jwt` function to utilize `parse_datetime_iso` for improved expiration time validation.
- Enhanced `_validate_datetime_string` to prioritize timezone-aware formats and streamline parsing logic.
- Modified `created_at` assignments in `ObservationContext` to use UTC timezone for consistency in timestamp handling.

* fix: proper observation extraction

- Replaced direct observation references with the `extract_observation_content` function to enhance clarity and maintainability in the `new_observations` list comprehension.

* refactor: streamline datetime parsing in filter and formatting utilities

- Removed redundant timezone-aware format handling from `_validate_datetime_string` in `filter.py`.
- Enhanced `parse_datetime_iso` in `formatting.py` to ensure consistent conversion of 'Z' suffix to timezone-aware datetime objects, improving clarity and functionality.

* refactor: update JWT verification and enhance datetime parsing

- Changed `verify_jwt` function from asynchronous to synchronous for improved performance and simplicity.
- Enhanced `parse_datetime_iso` to include comprehensive input validation and support for various timezone formats, ensuring consistent and secure datetime parsing.

* chore: coderabbit
2025-08-13 13:13:33 -04:00