Skip to content

docs: add ADR for AI chat history storage#135

Merged
felipemontoya merged 4 commits intoopenedx:mainfrom
eduNEXT:mfmz/submission-adr
Mar 27, 2026
Merged

docs: add ADR for AI chat history storage#135
felipemontoya merged 4 commits intoopenedx:mainfrom
eduNEXT:mfmz/submission-adr

Conversation

@MaferMazu
Copy link
Copy Markdown
Contributor

@MaferMazu MaferMazu commented Feb 12, 2026

Description

This PR adds the ADR: Use Open edX Submission Service for Persistent Chat History in the AI extensions framework.

How to test

You can read it here: https://github.com/eduNEXT/openedx-ai-extensions/blob/fbfac9d4ddc706d63098b0b6dbb349bf88aa334b/docs/decisions/0004-submission-as-chat-storage.rst

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 12, 2026
@openedx-webhooks
Copy link
Copy Markdown

openedx-webhooks commented Feb 12, 2026

Thanks for the pull request, @MaferMazu!

This repository is currently maintained by @felipemontoya.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.34%. Comparing base (25bb0d8) to head (dbe3855).
⚠️ Report is 198 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #135      +/-   ##
==========================================
+ Coverage   91.22%   94.34%   +3.11%     
==========================================
  Files          51       60       +9     
  Lines        4547     6858    +2311     
  Branches      276      370      +94     
==========================================
+ Hits         4148     6470    +2322     
+ Misses        311      296      -15     
- Partials       88       92       +4     
Flag Coverage Δ
unittests 94.34% <ø> (+3.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Comment thread docs/decisions/0004-submission-as-chat-storage.rst
Comment thread docs/decisions/0004-submission-as-chat-storage.rst
Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Comment thread docs/decisions/0004-submission-as-chat-storage.rst
@MaferMazu MaferMazu marked this pull request as ready for review February 16, 2026 14:53
@MaferMazu
Copy link
Copy Markdown
Contributor Author

@ormsbee @feanil @kdmccormick I would like your review of this ADR ✨

@felipemontoya felipemontoya changed the title docs: add ADR for chat history storage docs: add ADR for AI chat history storage Feb 16, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Ready for Review in Contributions Feb 18, 2026
Copy link
Copy Markdown
Contributor

@feanil feanil left a comment

Choose a reason for hiding this comment

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

I'm a little concerned that submissions might be a leaky abstraction for this use-case but I want to understand better what you're thinking for the mapping from AI Chats to submission items. If for example each turn is a separate submission, then retrieval might be more expensive than what we've done historically here since instead of 5-10 attempt items retrieved it might be hundreds of chat messages/response pairs.

Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Comment thread docs/decisions/0004-submission-as-chat-storage.rst
@felipemontoya
Copy link
Copy Markdown
Member

Hey @feanil thanks a lot. Your concern about this being a leaky abstraction is valid. Up to now it has worked because it gives us an existing persistence layer, security model, and APIs without introducing a new storage system, but it does come with tradeoffs.

I updated the ADR to make that explicit. I explain how we are using it and what the limit of 100KB means in practice with some rough estimates. Some optimizations will need to be future work, but being clear about what they are is a good first step here.

Comment thread docs/decisions/0004-submission-as-chat-storage.rst Outdated
Copy link
Copy Markdown
Member

@felipemontoya felipemontoya left a comment

Choose a reason for hiding this comment

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

Thanks a lot @feanil @ormsbee @Henrrypg. Your comments and contributions made this idea better, but also the code as we were able to update it to use submissions in a better way. From my side I think this ADR is accepted and we should merge it and continue, but I'll wait to hear from you in case you have any other open comment.

@ormsbee
Copy link
Copy Markdown

ormsbee commented Mar 27, 2026

It's always exciting to see the stuff you folks are building here. Thank you for being so receptive to feedback!

@Henrrypg Henrrypg self-requested a review March 27, 2026 13:45
Copy link
Copy Markdown
Contributor

@Henrrypg Henrrypg left a comment

Choose a reason for hiding this comment

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

Thanks for the update @felipemontoya. I'm agree with whole ADR. Thanks @MaferMazu

@felipemontoya felipemontoya merged commit 7810b05 into openedx:main Mar 27, 2026
10 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for Review to Done in Contributions Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

7 participants