Skip to content

fix(hitl): support legacy AI Extracted process label - #4833

Open
dlasecki-box wants to merge 1 commit into
box:masterfrom
dlasecki-box:support-legacy-extracted-process-label
Open

dlasecki-box wants to merge 1 commit into
box:masterfrom
dlasecki-box:support-legacy-extracted-process-label

Conversation

@dlasecki-box

@dlasecki-box dlasecki-box commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Treat metadata values as Box AI auto-extracted when the process is either AI_EXTRACTED or the legacy AI Extract process, so legacy extracted fields still show as AI-generated.

Summary by CodeRabbit

  • Bug Fixes

    • Improved recognition of fields using the legacy “AI Extract” process value.
    • Preserved extracted field values and extraction status when processing legacy data, ensuring older records continue to behave correctly.
  • Tests

    • Added coverage for legacy extracted-process handling in field utilities and template instance creation.

@dlasecki-box
dlasecki-box requested a review from a team as a code owner September 15, 2026 14:15
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 86455dcf-b1f7-4cdd-9c52-02f4d2ec1e26

📥 Commits

Reviewing files that changed from the base of the PR and between 5010ec6 and e096100.

📒 Files selected for processing (2)
  • src/api/__tests__/Metadata.test.js
  • src/constants.js

Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review.


Walkthrough

The change adds a typed legacy extraction constant, recognizes 'AI Extract' in process detection, and adds tests for utility detection and template instance creation.

Changes

Legacy extraction process support

Layer / File(s) Summary
Process detection and validation
src/constants.js, src/api/utils.js, src/api/__tests__/utils.test.js, src/api/__tests__/Metadata.test.js
The code recognizes current and legacy extraction process values. Tests verify legacy detection and isExtracted behavior during template instance creation.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: greg-in-a-box

Merge Risk: ⚪ Minimal · up to e0961

Legacy AI-extracted metadata is recognized and displayed as AI-generated, with no concrete unresolved merge risk identified.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
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 4…
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.
Title check ✅ Passed The title clearly describes the main change: support for the legacy AI Extracted process label in HITL handling.
Description check ✅ Passed The description states the behavior change and identifies both supported process values. It also includes the repository template content.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

A rabbit checks the fields with care
“AI Extract” now finds its share
California stays in place
Extracted marks appear with grace
The tests hop along the trail

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

@dlasecki-box
dlasecki-box force-pushed the support-legacy-extracted-process-label branch from 5010ec6 to e096100 Compare September 15, 2026 14:27
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