Skip to content

[fix-runtime] Preserve DeepSeek response aliases in request journals - #13

Merged
SleepyLGod merged 1 commit into
mainfrom
codex/fix-deepseek-response-journal-alias
Sep 14, 2026
Merged

SleepyLGod merged 1 commit into
mainfrom
codex/fix-deepseek-response-journal-alias

Conversation

@SleepyLGod

@SleepyLGod SleepyLGod commented Sep 14, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Persist DeepSeek Responses SDK output using wire aliases, including JSON-schema fields.
  • Continue reading historical journal responses that used SDK field names without rewriting persisted records.
  • Add round-trip and malformed-record regression coverage.

Validation

  • tests/test_deepseek_responses_lm.py: 112 passed (run before cherry-picking the identical commit onto current main).
  • git diff --check main...HEAD: passed.
  • No provider calls were made for this PR.

The local .gitignore and untracked research documents are intentionally excluded.

Summary by CodeRabbit

  • Bug Fixes

    • Improved persistence and replay of DeepSeek Responses results in durable requests.
    • Added compatibility with older journal records that use SDK field names.
    • Improved validation and JSON round-trip handling for JSON-schema responses.
  • Tests

    • Added coverage for response persistence, legacy record replay, alias handling, serialization, and validation failures.

Persist wire-compatible schema fields and continue validating historical SDK-shaped journal responses during replay.

Signed-off-by: Von <haodong.lu.me@gmail.com>
Copilot AI lite review requested due to automatic review settings September 14, 2026 10:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 0dabedf5-3aa4-4f5c-998e-8a573b451a89

📥 Commits

Reviewing files that changed from the base of the PR and between 2bdce24 and b71eab7.

📒 Files selected for processing (2)
  • src/agent_memory/adapters/lotus/deepseek_responses_lm.py
  • tests/test_deepseek_responses_lm.py

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The durable DeepSeek Responses path now serializes SDK results with aliases and validates journaled payloads by field name or alias. Tests cover current and legacy records, JSON round trips, schema aliases, and validation failures.

Changes

DeepSeek response persistence

Layer / File(s) Summary
Response serialization and journal validation
src/agent_memory/adapters/lotus/deepseek_responses_lm.py
Durable Responses results use field aliases during serialization. Journaled payloads accept field names and aliases during validation.
Persistence compatibility tests
tests/test_deepseek_responses_lm.py
Parameterized tests cover native response serialization, legacy-record replay, JSON persistence, schema alias handling, and validation errors. Other listed changes reformat existing test code without changing behavior.

Estimated code review effort: 2 (Simple) | ~15 minutes


Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Essentials by visiting https://app.coderabbit.ai/settings/billing.

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-14T10:32:07.652664Z b71eab7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@SleepyLGod
SleepyLGod merged commit 93d98d1 into main Sep 14, 2026
5 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.

2 participants