Repository navigation
DXP-593: Complete visual input examples with multiple images - #957
Conversation
✅ Deploy Preview for genlayer-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
Legatus audit: Approved (commit 1beb128) Audit of PR #957 (DXP-593) at
|
|
/run-e2e all |
danieljrc888
left a comment
There was a problem hiding this comment.
Reviewed at 1beb128. The two-image limit and the images= / response_format="json" arguments are correct. One error in the example:
pages/developers/intelligent-contracts/features/image-processing.mdx:61 uses raise gl.UserError("Expected a boolean matches field"). gl.UserError is not exported by the SDK, so on a malformed LLM response the example dies with AttributeError instead of raising a user error. Use gl.vm.UserError(...).
Please also add this snippet to the code example lint so the API names are checked.
|
Re-checked at 176b0ec: the example now raises |
|
Legatus audit: Approved (commit 176b0ec) Audit of PR #957 (DXP-593) at
|
|
/run-e2e all |
|
Legatus audit: Approved (commit 176b0ec) The PR head is still On GitHub the PR is still open and all its checks are green: Playwright E2E, lint-code-examples, the node docs sync check, CodeRabbit and the Netlify checks passed, and "Pages changed" was skipped. My review of this commit still holds:
The ticket I filed in my previous message, about |
|
/run-e2e all |
|
Legatus audit: Approved (commit 176b0ec) The PR head is still My approval of this commit stands: the docs now correctly use If a message like this arrives again with the same SHA, Legatus may be sending duplicate notifications without the head having changed. |
|
/run-e2e all |
|
Legatus audit: Approved (commit 176b0ec) Nothing has changed. The PR head is still My earlier approval stands: the docs now correctly use This is the third "head changed" notification for the same SHA. Legatus seems to be sending them without the head actually changing. |
|
/run-e2e all |
|
Legatus audit: Approved (commit 176b0ec) Nothing has changed: the PR head is still My earlier approval stands: the docs now correctly use This is the fourth "head changed" notification for an unchanged SHA. Something in Legatus is probably re-queuing this review without checking whether the head moved. I haven't filed a ticket for it because none of the listed teams clearly owns Legatus. |
|
/run-e2e all |
|
Legatus audit: Approved (commit 176b0ec) Nothing has changed: the PR head is still My earlier approval stands: the docs now correctly use This is the fifth "head changed" notification for the same unchanged SHA. |
|
/run-e2e all |
|
Legatus audit: Approved (commit 176b0ec) Nothing has changed: the PR head is still My earlier approval stands: the docs now correctly use This is the sixth "head changed" notification for the same unchanged SHA. |
|
/run-e2e all |
|
Legatus audit: Approved (commit 176b0ec) Nothing has changed: the PR head is still My earlier approval stands: the docs now correctly use This is the seventh "head changed" notification for the same unchanged SHA. |
|
/run-e2e all |
danieljrc888
left a comment
There was a problem hiding this comment.
Approved at the head I reviewed; the requested changes are resolved.
Changes
Completes the existing Image Processing guide with a two-image comparison example. Developers can now find single-image, multiple-image, and webpage screenshot inputs on the same page. The new helper passes images in order, validates the JSON boolean, and independently checks the leader's decision. Notes cover the two-image limit and ambiguous comparisons.
Adds a Playwright regression test for the three rendered examples and the link to response validation guidance.
Ticket assessment
DXP-593 remains partially outstanding. Previous PR #298 was closed without merging. Commit 7977f5e (PR #388) subsequently added
features/image-processing.mdxwith single-image and screenshot examples; current main (90f98c2) still lacked a multiple-image example.Assumptions
Validation
npm run test:e2e -- --config=node_modules/.cache/playwright.nix.config.cjs --workers=4inside a Nix Python shell againstnpm run start -- -p 3001after a passingnix shell nixpkgs#python3 -c npm run build. The local-only config imports the repository config and overrides only the absolute test directory and Chromium executable with Nix Chromium; all tests run unchanged.npm run test:e2e -- --config=node_modules/.cache/playwright.nix.config.cjs tests/visual-inputs.e2e.spec.tspassed (1/1).git diff --check.The Nix shell supplies Python required by the existing build checks; the initial attempt without it stopped before building. The default cached Chromium lacked host libraries on NixOS, so the successful run uses Nix Chromium. No environment workaround is committed.
Summary by CodeRabbit
Review changes
gl.vm.UserError.genvm-lint: requiredcomment so the default code-example lint runs SDK validation and treats failures as errors. Unmarked snippets retain their existing advisory behavior.gl.UserErrornamespace in snippet ASTs: SDK validation alone does not execute the function's error branch.Additional assumption: use an opt-in marker to enforce this snippet without changing validation policy for all existing partial examples.
Review validation:
python scripts/test-lint-code-examples.py(4 passed),python scripts/lint-code-examples.py(passed, including the comparison snippet), andnpm run build(passed). Python and genvm-linter were supplied through a local Nix-backed virtual environment.Full browser validation after the review changes: 171 passed with
npm run test:e2e -- --config=node_modules/.cache/playwright.nix.config.cjs --workers=4, using the same local Nix Chromium override described above. GitHub'slint-code-examplesand node-documentation sync checks also passed at176b0ec.