Skip to content

fix(migrations): infer legacy extraction tiers - #764

Merged
urjitc merged 1 commit into
mainfrom
assess-flashcards-quizzes
Aug 11, 2026
Merged

fix(migrations): infer legacy extraction tiers#764
urjitc merged 1 commit into
mainfrom
assess-flashcards-quizzes

Conversation

@urjitc

@urjitc urjitc commented Aug 11, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve explicit extraction tiers encoded in R2 keys
  • infer early fast projections from their existing provisional/provider-mode metadata
  • treat other published legacy projections as the final enhanced pass

Verification

  • pnpm check
  • exact production workspace will be retried after merge and manual deployment

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Review in cubic

Summary by CodeRabbit

  • Bug Fixes
    • Improved extraction tier detection when manifest information is incomplete.
    • Added fallback classification using projection metadata and provider mode.
    • Unrecognized manifest tiers are now handled gracefully instead of producing an error.

@cursor

cursor Bot commented Aug 11, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 716850c.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Changes

Extraction tier resolution

Layer / File(s) Summary
Resolve extraction tier during migration
src/features/workspaces/migration/legacy-workspace-data.ts
Extraction imports use resolveExtractionTier. Manifest-key detection remains authoritative. Provisional projections and projections with provider mode fast resolve to fast; other unmarked projections resolve to enhanced. Unrecognized manifest-key tiers no longer throw an error.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ 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 and concisely describes the migration change to infer legacy extraction tiers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch assess-flashcards-quizzes

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
src/features/workspaces/migration/legacy-workspace-data.ts (1)

516-528: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add regression tests for tier precedence and fallback.

Add table-driven tests for:

  • /fast/manifest.json and /enhanced/manifest.json keys, including conflicting metadata.
  • metadata.provisional === true.
  • providerMode === "fast".
  • Other published projections resolving to "enhanced".
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/features/workspaces/migration/legacy-workspace-data.ts` around lines 516
- 528, Add table-driven regression tests for resolveExtractionTier covering
explicit /fast/manifest.json and /enhanced/manifest.json keys with conflicting
metadata, provisional metadata, providerMode "fast", and other published
projections defaulting to "enhanced"; assert that explicit key tiers take
precedence over fallback signals.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/features/workspaces/migration/legacy-workspace-data.ts`:
- Around line 516-528: Add table-driven regression tests for
resolveExtractionTier covering explicit /fast/manifest.json and
/enhanced/manifest.json keys with conflicting metadata, provisional metadata,
providerMode "fast", and other published projections defaulting to "enhanced";
assert that explicit key tiers take precedence over fallback signals.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: f608d004-daca-4cf4-91fc-f639688cd9b9

📥 Commits

Reviewing files that changed from the base of the PR and between 5329228 and 716850c.

📒 Files selected for processing (1)
  • src/features/workspaces/migration/legacy-workspace-data.ts

@urjitc
urjitc merged commit 05c6871 into main Aug 11, 2026
12 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in Dev Board Aug 11, 2026
@greptile-apps

greptile-apps Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This change lets legacy workspace migrations retain ready extraction results when older manifest keys do not encode an extraction tier. A focused Worker test exercised tierless manifests, provisional and fast-mode fallbacks, and explicit fast/enhanced manifest keys. All six cases passed, including persistence of the selected tier with the migrated extraction record. No defects were found.

Confidence Score: 5/5

The migration behavior is safe to merge based on the exercised legacy manifest and tier-persistence paths.

A focused Worker-runtime test exercised the historical tierless-manifest failure path and six current migration scenarios, confirming fallback selection, explicit-key precedence, and persistence of the migrated extraction details.

Files Needing Attention: No files need further attention.

T-Rex T-Rex Logs

What T-Rex did

  • T-Rex ran the requested contract-validation checks for the pull request, but local artifact references were not uploaded.

T-Rex Ran code and verified through T-Rex

Reviews (1): Last reviewed commit: "fix(migrations): infer legacy extraction..." | Re-trigger Greptile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant