Skip to content

fix(server): skip native sessions during bulk import - #15634

Open
maria-rcks wants to merge 3 commits into
pingdotgg:mainfrom
maria-rcks:fix/round2-wide-10933
Open

maria-rcks wants to merge 3 commits into
pingdotgg:mainfrom
maria-rcks:fix/round2-wide-10933

Conversation

@maria-rcks

@maria-rcks maria-rcks commented Oct 4, 2026 •

Copy link
Copy Markdown
Collaborator

Bulk import could publish a second thread for a Claude or Codex session T3 Code already owns, including archived and deleted originals. The v2 event sink now rechecks ownership in the same provider instance inside the publication transaction. Owned sessions create no history or runtime row and count as neither imported nor failed, so onboarding keeps the selected landing project without a false import warning. Ordinary imports and retries recover resume metadata without replaying history.

Existing duplicates and cross-environment deduplication remain outside this fix.

Verified on Blacksmith: importer tests (failed-write retry plus active, deleted, other-instance, and unowned native sessions for Codex and Claude against real SQLite projections) and the welcome-wizard tests pass; server typecheck and scoped lint pass. Real provider transcript import through the client is unverified.

Closes #10933

Written by claude-opus-5-5 via Claude Code in T3 Code

@coderabbitai

coderabbitai Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

Next included review available in 22 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 10 included reviews currently available.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Path: .coderabbit.config.ts
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 95d7a4e9-d6d5-49df-8126-f45a2e5c9431

📥 Commits

Reviewing files that changed from the base of the PR and between 08e18b7 and e9a6018.


📒 Files selected for processing (3)
  • apps/server/src/orchestration-v2/EventSink.ts
  • apps/server/src/project/AgentSessionImporter.test.ts
  • apps/server/src/project/AgentSessionImporter.ts


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:M 30-99 changed lines (additions + deletions). labels Oct 4, 2026
@macroscopeapp

macroscopeapp Bot commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This production bug fix changes bulk import from always attempting a session to conditionally suppressing the entire event and runtime write when another thread owns the native session. The ownership check is implemented in the shared transactional event sink, making this an automatic processing gate that warrants human review.

Notes:

  • Diff unchanged. Approvability was decided on eligibility alone.

You can add or adjust custom eligibility rules. Learn more.

macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Oct 4, 2026
@juliusmarminge juliusmarminge added the macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews label Oct 11, 2026 — with ChatGPT Codex Connector

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

macroscope-review Opt PRs made by unvouched contributors in for Macroscope review. Vouched contributors auto-reviews size:M 30-99 changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Imported agent sessions duplicate T3-native threads: import dedup never consults the native thread namespace

2 participants