Skip to content

test(vision): the model check runs the layout tier through process with its tier named - #286

Merged
jddunn merged 1 commit into
masterfrom
test/vision-check-layout-route
Oct 11, 2026
Merged

jddunn merged 1 commit into
masterfrom
test/vision-check-layout-route

Conversation

@jddunn

@jddunn jddunn commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Summary

The vision-pipeline pack's layout mode (framerslab/agentos-extensions#132) calls

pipeline.process(image, { tiers: ['document-ai'], forceCategory: 'document-layout' })

scripts/vision-models-check.mjs read layout only through analyzeLayout, so that route never ran with Florence-2 loaded. The check now also runs it on the invoice and asserts that the result names the document-ai tier alone, carries one page in layout, and reads the invoice's text. The handwriting route the pack uses (tiers: ['handwriting']) was already in the check.

Raised on framerslab/agentos-extensions#132 (Qodo: "Tier behavior lacks a real-pipeline test"): this job is where the packs' tier options meet the real models; a real pipeline in the extensions CI would download the models on every run.

How this was verified

The "Local vision tiers load and run" job runs on this pull request (the workflow's paths include scripts/vision-models-check.mjs), with the models.

Summary by Sourcery

Verify that the vision pipeline’s layout mode runs the named document-ai tier end to end through process.

Enhancements:

  • Extend the local vision model check to run the document layout tier through the public process API and verify its tier selection, page layout, and extracted invoice text.

Tests:

  • Add end-to-end coverage for the named document-ai layout route used by the vision-pipeline pack.

Summary by CodeRabbit

  • Tests
    • Added a check that document layout processing identifies the selected tier, returns one layout page, and includes invoice text.

…th its tier named

The vision-pipeline pack's layout mode calls process(image, { tiers:
['document-ai'], forceCategory: 'document-layout' }). The model check read
layout through analyzeLayout only, so that route never ran with Florence-2
loaded. It now runs too, and must report the document-ai tier alone, one
page and the invoice's text.
@jddunn
jddunn requested a review from Victor-Evogor as a code owner October 11, 2026 02:01
@sourcery-ai

sourcery-ai Bot commented Oct 11, 2026

Copy link
Copy Markdown

Sorry @jddunn, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 2 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@sourcery-ai

sourcery-ai Bot commented Oct 11, 2026

Copy link
Copy Markdown
Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Extends the real-model vision check to exercise the layout mode used by the vision-pipeline pack through pipeline.process, confirming tier selection, layout output, and invoice text extraction while Florence-2 is loaded.

Sequence diagram for layout tier processing

sequenceDiagram
    participant Check as vision-models-check
    participant Pipeline as VisionPipeline
    participant Florence as Florence-2
    participant Invoice as InvoiceImage

    Check->>Pipeline: process(InvoiceImage, tiers: document-ai, forceCategory: document-layout)
    Pipeline->>Florence: process invoice layout
    Florence-->>Pipeline: layout page and extracted text
    Pipeline-->>Check: result with tiers, layout, and text
    Check->>Check: assert tiers equals document-ai
    Check->>Check: assert layout.pages.length equals 1
    Check->>Check: assert text matches invoice
Loading

File-Level Changes

Change Details Files
Add an end-to-end assertion for the layout tier through the public process API.
  • Run the invoice through pipeline.process with tiers: ['document-ai'] and forceCategory: 'document-layout'.
  • Verify only the requested tier is reported, exactly one layout page is returned, and invoice text is extracted.
scripts/vision-models-check.mjs
Clarify that the Florence-2 model check covers both direct layout analysis and the named process route.
  • Update the script documentation to describe the added process-path coverage.
scripts/vision-models-check.mjs

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 11, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-11T02:02:42.915994Z f3b492b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Test the named document-ai layout route with real models

🧪 Tests 🕐 Less than 10 minutes

Grey Divider

AI Description

• Exercise the layout route used by the vision-pipeline pack through process with Florence-2
 loaded.
• Assert that the invoice result contains only the document-ai tier, one layout page, and invoice
 text.
Diagram

graph TD
  A["Invoice sample"] --> B["Named layout process"] --> C["Florence-2 tier"] --> D["Pipeline result"] --> E["Result assertions"]
Loading
High-Level Assessment

Reusing the existing real-model check is appropriate: it already loads Florence-2 and runs when this script changes. A separate extensions-CI test would duplicate costly model downloads, while a mocked unit test would not verify this real pipeline route.

Files changed (1) +11 / -2

Tests (1) +11 / -2
vision-models-check.mjsCover the named layout route in the real-model check +11/-2

Cover the named layout route in the real-model check

• Runs the invoice through 'pipeline.process' with 'tiers: ['document-ai']' and 'forceCategory: 'document-layout'', in addition to the existing direct layout check. Asserts that the result reports only the document-ai tier, contains one layout page, and includes invoice text.

scripts/vision-models-check.mjs

@coderabbitai

coderabbitai Bot commented Oct 11, 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: framerslab/agentos/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Team
  • Run ID: cf2d3839-d832-484b-a6be-aec707e88620

📥 Commits

Reviewing files that changed from the base of the PR and between 26acf47 and f3b492b.


📒 Files selected for processing (1)
  • scripts/vision-models-check.mjs

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



📝 Walkthrough

Walkthrough

The vision model check description now includes Florence-2’s process path. A new check calls process with the document-ai tier and document-layout, then verifies the returned tier, one layout page, and invoice text.

Changes

Florence-2 process validation

Layer / File(s) Summary
Document processing validation
scripts/vision-models-check.mjs
The description now names the Florence-2 process path. The new check verifies its tier, layout page count, and invoice text.

Priority: ⬇️ Low

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

Change: Other


Merge Risk: ⚪ Minimal · up to f3b49

The check exercises the intended invoice layout-processing path and verifies its tier, page count, and text. No material merge risk remains.

Pre-merge checks | Passed 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check Passed The title clearly identifies the main change: testing the vision layout tier through the process API and reporting its tier name.
Description check Passed The description provides a detailed summary and explains how the change was verified. It omits the template sections for Linked issues, Type of change, Migration notes, and Checklist, but the core req…
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 1…
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
  • Commit to this branch
  • Create a new PR


🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

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

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

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can tweak Display settings with a live preview to see your comment before it ships

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@jddunn
jddunn merged commit 7886ac2 into master Oct 11, 2026
10 checks passed
@jddunn
jddunn deleted the test/vision-check-layout-route branch October 11, 2026 02:48
github-actions Bot pushed a commit that referenced this pull request Oct 11, 2026
## [0.13.44](v0.13.43...v0.13.44) (2026-10-11)

### docs

* twelfth round of audit follow-ups (the docs-alignment routes, the manifest paths) (#288) ([65268a8](65268a8))

### fix

* **memory:** guardedFetch counts the body on the wire and reads the network's NAT64 prefixes (#287) ([984997f](984997f))

### test

* **vision:** the model check runs the layout tier through process with its tier named (#286) ([7886ac2](7886ac2))
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