Skip to content

Generate project memory context from meetings#18

Merged
qyinm merged 5 commits into
mainfrom
codex-project-memory-v0
May 5, 2026
Merged

Generate project memory context from meetings#18
qyinm merged 5 commits into
mainfrom
codex-project-memory-v0

Conversation

@qyinm
Copy link
Copy Markdown
Owner

@qyinm qyinm commented May 5, 2026

Summary

Adds Project Memory v0 aggregation so completed meeting context packets also update project-level agent context artifacts.

Why

Completed meetings already generate source-backed context packets. This PR rolls those packets up into project-level memory so future agent tasks can consume accumulated context instead of only per-meeting briefs.

Changes

  • Add project memory artifact writing under projects/<project-id>/.
  • Aggregate source records, memory objects, relations, evidence maps, decisions, open questions, and project-context views from meeting packets.
  • Refresh project memory automatically after source context generation writes a meeting packet.
  • Cover project aggregation, inbox fallback, and the automatic generation path with native host contract tests.
  • Validated with cargo fmt --check, native host tests, agent server tests, and the desktop native-launch test.

Summary by CodeRabbit

Release Notes

  • New Features

    • Project memory file generation and management to organize project-level context, memory objects, relations, evidence, decisions, and open questions
    • Support for reading and deserializing existing source and context data back into typed structures
  • Improvements

    • Enhanced HTTP request handling with improved error response mapping
    • Updated transcript evidence labeling for better clarity and consistency
    • Expanded data serialization and deserialization capabilities across core packet models

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 5, 2026

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Free

Run ID: 979dcefd-4619-46cd-b357-ffe8ab58d636

📥 Commits

Reviewing files that changed from the base of the PR and between ad47803 and b3d8bb1.

📒 Files selected for processing (2)
  • native/native-host-rust/src/context_packet.rs
  • native/native-host-rust/tests/context_packet_contract.rs

📝 Walkthrough

Walkthrough

This PR adds project-level memory aggregation capabilities alongside meeting-level context packets. It enables reading existing JSONL data, merging project state, and writing aggregated per-project artifacts (source index, memory objects, relations, evidence map, context file). Core data models now support deserialization, and provider HTTP handling is refined.

Changes

Project Memory Aggregation

Layer / File(s) Summary
Data Shape
src/context_packet.rs
Core data types (SourceRecord, SourceLocation, SourceRef, MemoryObject, Relation) now derive Deserialize to enable round-trip reading of JSONL files.
Project Memory Infrastructure
src/context_packet.rs
Adds ProjectMemoryPaths struct, project_memory_paths helper, and utilities (read_jsonl_file, ID/namespace helpers, merge_by_id) to organize and merge project-scoped data.
Project Memory Core
src/context_packet.rs
Implements render_project_memory_context, build_project_evidence_map, and write_project_memory_files to aggregate and write project-level memory artifacts.
Integration & Refinement
src/context_packet.rs
Integrates project memory writing into generate_source_context_with_provider; refines provider HTTP error handling and changes transcript evidence label format to sourceId#locationKind.
Tests & Helpers
tests/context_packet_contract.rs
Adds test_packet helper and bundle writers with projectHint support; new tests validate project memory accumulation by project hint and inbox fallback.

Poem

A rabbit hops through projects bright,
Gathering memories left and right,
Each packet merged with gentle care,
Project context now laid bare,
Memories flow—what a sight! 🐰✨

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 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 Pro by visiting https://app.coderabbit.ai/login.

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

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a project memory system that aggregates meeting data into project-specific directories. It includes logic for slugifying project IDs, namespacing object IDs, and merging new records with existing ones in JSONL files. Feedback highlights potential race conditions and atomicity issues during file writes, as well as opportunities to optimize object categorization and reduce unnecessary cloning in the rendering and writing logic.

Comment thread native/native-host-rust/src/context_packet.rs
Comment thread native/native-host-rust/src/context_packet.rs Outdated
Comment thread native/native-host-rust/src/context_packet.rs
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b3d8bb1100

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread native/native-host-rust/src/context_packet.rs
@qyinm qyinm merged commit c00fc90 into main May 5, 2026
1 check passed
@qyinm qyinm deleted the codex-project-memory-v0 branch May 5, 2026 14:41
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.

1 participant