Skip to content

Fix resumable, project-scoped Codex session imports - #7047

Draft
codex-corp wants to merge 2 commits into
tinyhumansai:mainfrom
codex-corp:fix/codex-session-import
Draft

codex-corp wants to merge 2 commits into
tinyhumansai:mainfrom
codex-corp:fix/codex-session-import

Conversation

@codex-corp

@codex-corp codex-corp commented Oct 7, 2026 •

Copy link
Copy Markdown

Blocked by upstream architecture removal: current main (7578346c85) and release no longer contain the coding-session persona UI/RPC or the old TinyMemory/TinyCortex implementation. A merge attempt confirmed modify/delete and dependency conflicts and was aborted without changing this branch. These fixes target the previous architecture; resolving by restoring deleted files would revive unsupported behavior. Porting Codex ingestion to the new memory engine requires a separate design decision. The existing implementation and dependency diffs remain available for review.

Summary

  • Resume long Codex imports from durable digest-window checkpoints instead of resending successful windows.
  • Keep optional project filtering in the driver, with shared count/import predicates and isolated project persona state.
  • Report bounded, safe failure details and checkpoint progress through backward-compatible fields.
  • Use existing toasts and inline alerts for partial imports and missing processing prerequisites without changing settings.
  • Preserve general Claude imports and exclude unrelated embedding changes.

Problem

Long Codex conversations can exhaust a bounded ingestion pass before completing a session. File-level cursors alone lose successful window progress, and zero processed sessions can conceal useful work or a provider failure. Project-scoped imports also need trustworthy metadata and identical discovery/import boundaries.

Solution

The driver selects transcripts by metadata before reading the batch. Optional project scope accepts only canonical Codex project directories within the configured root; unknown paths and symlink escapes are excluded. Project state is isolated and an OS lock rejects overlapping imports.

Scoped passes retain five-session/five-call budgets. Successful windows and recovery splits are persisted against content fingerprints; unchanged windows are reused after interruption, while changed windows are reviewed again. A failed session does not block its healthy neighbor and never receives a completed cursor. Persona reduction uses the existing deterministic fallback when the scoped call budget is exhausted.

The host checks processing permission and summarizer availability before dispatch. Optional report fields carry opaque session IDs, stable reason codes and fixed safe remediation text. The UI continues draining checkpoint progress, labels estimated counts, and retains actionable errors after refreshing status.

Dependency source diffs

This single OpenHuman PR is a draft pending maintainer adoption of the published library commits and a TinyMemory module release/artifact-pin update. This PR does not hand-edit release versions or checksums. The installed application and its current import have not been replaced or restarted.

Submission Checklist

  • Tests added or updated: App/CLI provenance, path boundaries, missing metadata, long-session restart, content changes, failed-neighbor recovery, legacy reports, preflight, stop/timeout and partial UI states.
  • Diff coverage ≥ 80%: focused frontend changed executable lines were 13/13 covered; merged Rust/frontend diff coverage remains a CI gate and has not been measured locally.
  • Coverage matrix updated.
  • All affected feature IDs listed under Related.
  • No new external network dependencies introduced; provider behavior is tested through existing seams.
  • Manual smoke checklist updated.
  • Linked issue closed: N/A, user-reported reproduction without an existing tracked issue.

Impact

Desktop coding-session ingestion. New serde-default report fields remain compatible with old responses; the TinyMemory bus minor contract advances from 4.1 to 4.2. No filesystem path is added to RPC requests. General imports retain Claude behavior and legacy budgets. No user provider, model, consent or embedding configuration is changed.

Related

  • Feature ID: 8.2.5 — Coding-session persona ingestion.
  • Closes: N/A.
  • Follow-up: dependency adoption and published module artifact pins before release.

AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A.
  • URL: N/A.

Commit & Branch

  • Branch: fix/codex-session-import.
  • Commit SHA: a66bee76b6185640f67bef0e4b5fd94935b63a7e.

Validation Run

  • pnpm --filter openhuman-app format:check.
  • pnpm typecheck.
  • Focused tests: 39 frontend tests and 3 Rust processing-preflight tests passed.
  • Rust fmt/check: root cargo check, core Clippy, TinyMemory fmt/Clippy/build/full tests and TinyCortex persona full tests passed.
  • Tauri fmt/check: Tauri Clippy passed with task-local Linux development dependencies.
  • Root pnpm docs:check and lint passed; lint reports 68 pre-existing warnings, zero errors.
  • Four module project-scope fixtures passed.
  • Approved smoke: one small redacted Labeeb conversation excerpt through Bifrost → MiniMax produced valid digest JSON in approximately 2.17 seconds. No persona/cursor files were written; this is a provider/parse smoke, not a full installed-driver import.
  • Repository pre-push hooks ran without bypassing checks.

Validation Blocked

  • command: N/A for the completed checks above.
  • error: None outstanding for those checks.
  • impact: merged diff coverage remains unmeasured locally; dependency module publication remains a release prerequisite.

Behavior Changes

  • Intended behavior change: scoped Codex imports resume completed windows and report actionable failures with bounded work.
  • User-visible effect: accurate partial progress, explicit project scope and clear remediation without automatic settings changes.

Parity Contract

  • Legacy behavior preserved: absent scope keeps general Codex/Claude imports and Claude budgets; legacy reports deserialize with defaults.
  • Guard/fallback/dispatch parity checks: cloud opt-out, local processing, unavailable summarizer, overlap lock, scope containment and deterministic persona reduction covered.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): none identified.
  • Canonical PR: this PR.
  • Resolution: N/A; unrelated local embedding work is retained separately and excluded.

@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

This branch has not been deployed

No deployments
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