Skip to content

docs(import): align thread recovery documentation - #2248

Merged
MODSetter merged 1 commit into
MODSetter:devfrom
fukalous:docs/import-thread-recovery-followup
Oct 15, 2026
Merged

MODSetter merged 1 commit into
MODSetter:devfrom
fukalous:docs/import-thread-recovery-followup

Conversation

@fukalous

@fukalous fukalous commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What

  • remove the resolved interrupted-import thread recovery gap from the roadmap
  • distinguish ordinary workspaces from marked legacy-import workspaces in Contract 3 and ADR 0022
  • name workspaces.has_unkeyed_imported_threads in the migration table

Why

Follow-up requested after #2068 merged. The docs now match _import_thread: ordinary workspaces create missing hosted threads, while marked legacy workspaces only claim a unique unkeyed row with the same creation time and leave ambiguous or unmatched rows untouched.

How to test

  • python scripts/check_docs.py (155 doc files, 0 problems)
  • git diff --check

Prepared with AI assistance and reviewed against the merged implementation and docs/architecture/import.md.

High-level PR Summary

This PR aligns the thread recovery documentation with the implementation merged in PR #2068. It removes the resolved interrupted-import gap from the roadmap, clarifies the distinction between ordinary workspaces and legacy-import workspaces in how they handle thread recovery during re-import, and names the workspaces.has_unkeyed_imported_threads column in the migration table. The changes are documentation-only and reflect the actual behavior: ordinary workspaces create missing hosted threads, while legacy workspaces only claim unkeyed rows with matching creation times.

⏱️ Estimated Review Time: 5-15 minutes

💡 Review Order Suggestion
Order File Path
1 docs/adr/0022-markdown-only-cloud-import.md
2 docs/contracts/03-export-bundle.md
3 docs/architecture/data-model.md
4 docs/ROADMAP.md

Need help? Join our Discord

Summary by CodeRabbit

  • Documentation
    • Clarified that re-imports in workspaces with legacy unkeyed threads associate a hosted ID only with a unique unkeyed thread sharing the same creation time. Existing hosted-ID matches remain unchanged; ambiguous or unmatched legacy threads are left untouched, and no new thread is created in those workspaces.
    • Updated the data model and export contract descriptions to reflect this behavior, and revised the roadmap wording about restoring threads after interrupted imports. The hosted export deadline and import progress summary remain noted.

@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

@fukalous is attempting to deploy a commit to the Rohan Verma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: MODSetter/SurfSense/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 657e6222-2d79-4ecb-b82a-52cc878a7119
📥 Commits

Reviewing files that changed from the base of the PR and between 9da2405 and 7897d0f.

📒 Files selected for processing: 1
  • docs/architecture/data-model.md
🚧 Files skipped from review as they are similar to previous changes: 1
  • docs/architecture/data-model.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📝 Walkthrough

The documentation scopes legacy thread matching to marked workspaces and describes how imports handle matching, ambiguous, and unmatched threads. The roadmap no longer says that rerunning an import must restore threads missed by an interrupted import.

Changes: Cloud import documentation

Layer / File(s) Summary
Legacy thread matching and roadmap wording
docs/architecture/data-model.md, docs/adr/0022-markdown-only-cloud-import.md, docs/contracts/03-export-bundle.md, docs/ROADMAP.md
The documentation names the workspace marker for older unkeyed imports and limits legacy matching to a unique unkeyed row with the same creation time. Matching rows receive the hosted ID and retain their local title and messages. Ambiguous or unmatched rows remain unchanged, and the contract says no new thread is created. The roadmap removes the rerun requirement.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Merge Risk: ⚪ Minimal · up to 7897d

This documentation update clarifies legacy import thread handling and does not change runtime behavior. No merge-blocking risk is identified.

### Architecture Summary

Architecture risk: 🔵 Low · up to 9da24

The change affects 1 system.

Changed systems: docs

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — docs (service) was modified; 4 changed files map to changed impact.

Before / after behavior

  • observed — Modified behavior in docs/ROADMAP.md: The cloud import item removes the requirement for a rerun to restore chat threads missed by an interrupted import; its deadline and progress-summary statements remain.
  • observed — Modified behavior in docs/adr/0022-markdown-only-cloud-import.md: The Decision replaces the unconditional rule to create a missing thread with separate behavior for ordinary workspaces and legacy-unkeyed-import workspaces; the latter only assigns the hosted ID to a unique unkeyed row with a matching creation time.
  • observed — Modified behavior in docs/architecture/data-model.md: The 0029 revision description now names workspaces.has_unkeyed_imported_threads as the field marking workspaces with older unkeyed imported threads, rather than describing the marking without identifying the field.
  • observed — Modified behavior in docs/contracts/03-export-bundle.md: The legacy-thread fallback now applies only in workspaces marked as containing threads imported before hosted IDs were retained. It claims the single unkeyed row with the matching creation time, assigns its hosted ID while preserving its local title and messages, and leaves ambiguous or unmatched rows untouched without creating a thread; the prior wording described this fallback without the workspace condition.
Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies documentation changes that align import thread recovery behavior. It matches the pull request's main objective and is concise.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches: 💡 1
🛠️ Fix failing CI checks: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Signed-off-by: chenminghao.99 <fukalous@gmail.com>
@fukalous
fukalous force-pushed the docs/import-thread-recovery-followup branch from 9da2405 to 7897d0f Compare October 15, 2026 17:25
@MODSetter
MODSetter merged commit 23eaead into MODSetter:dev Oct 15, 2026
28 of 31 checks passed
@MODSetter

Copy link
Copy Markdown
Owner

Merged into dev, thanks. Contract 3, ADR 0022 and the 0029 row now say what _import_thread does, and the ROADMAP line is back to "Imports need a progress summary."

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