Skip to content

docs(examples): add verified screenshot fields example - #740

Merged
svonava merged 1 commit into
mainfrom
feat/screenshot-fields-example
Oct 14, 2026
Merged

svonava merged 1 commit into
mainfrom
feat/screenshot-fields-example

Conversation

@svonava

@svonava svonava commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Add a standalone screenshot-fields example that sends one complete Kanboard screenshot and strict schema through SIEClient with Gemma 4 31B. Readers can fetch immutable public evidence, verify every file, and score the complete recorded answer offline. Fresh responses are saved separately without overwriting an existing result.

Validation: all 14 public evidence files passed SHA-256 and length checks; the original scorer returned 26/26 fields with schema validation. All 34 offline tests and Ruff checks pass, including the released SDK's complete request and response comparison with the recorded call, allowing only the documented token-cap alias. No new inference was run.

Summary by CodeRabbit

  • New Features
    • Added a runnable example that extracts typed fields from a full Kanboard screenshot and returns them as JSON using Gemma 4 31B on SIE.
    • Verify the included evidence and score saved responses offline without an API key.
  • Documentation
    • Added setup and usage guidance, including the example’s provenance and limitations.

@svonava svonava added the coderabbit-direct Opt in CodeRabbit for direct examples and root README changes label Oct 14, 2026
@svonava
svonava requested a review from a team as a code owner October 14, 2026 21:55
@svonava

svonava commented Oct 14, 2026

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 14, 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: Organization UI
  • Review profile: CHILL
  • Plan: Team
  • Run ID: 7390f4fb-e445-424e-a46c-a78773d44aaa
📥 Commits

Reviewing files that changed from the base of the PR and between cd21333 and 3e6005d.

⛔ Files ignored due to path filters: 1
  • examples/screenshot-fields/uv.lock is excluded by !**/*.lock
📒 Files selected for processing: 9
  • examples/README.md
  • examples/screenshot-fields/.gitignore
  • examples/screenshot-fields/README.md
  • examples/screenshot-fields/evidence.py
  • examples/screenshot-fields/pins.json
  • examples/screenshot-fields/pyproject.toml
  • examples/screenshot-fields/run.py
  • examples/screenshot-fields/score.py
  • examples/screenshot-fields/tests/test_example.py

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

📝 Walkthrough

Adds a screenshot-to-JSON example that verifies pinned evidence, sends a schema-constrained request to an SIE endpoint, saves the response, and scores responses offline.

Changes: Screenshot-to-JSON example

Layer / File(s) Summary
Pinned evidence verification
examples/screenshot-fields/pins.json, examples/screenshot-fields/evidence.py, examples/screenshot-fields/tests/test_example.py, examples/README.md, examples/screenshot-fields/README.md, examples/screenshot-fields/.gitignore, examples/screenshot-fields/pyproject.toml
Adds pinned files and checks their byte counts and SHA-256 digests. Fetching verifies existing files and checks downloaded files before saving them. Verification validates the KB01 record and reconstructed request.
Single-call inference and response capture
examples/screenshot-fields/run.py, examples/screenshot-fields/tests/test_example.py, examples/screenshot-fields/README.md
Adds an SIE request path that verifies evidence, submits the request, and saves the complete response without overwriting an existing output. Tests cover request construction, HTTP failures, and CLI behavior.
Offline response scoring
examples/screenshot-fields/score.py, examples/screenshot-fields/tests/test_example.py, examples/screenshot-fields/README.md
Adds response parsing, schema validation, and KB01 scoring. Tests cover offline scoring and malformed, incomplete, or incorrect answers.

Sequence Diagram(s)

sequenceDiagram
  participant Run as run.py
  participant Evidence as evidence.py
  participant SDK as SIEClient
  participant Endpoint as SIE endpoint
  participant Output as Response file
  Run->>Evidence: Verify evidence and reconstruct request
  Run->>SDK: Submit messages and response format
  SDK->>Endpoint: Send inference request
  Endpoint-->>SDK: Return response
  SDK-->>Run: Return response
  Run->>Output: Write complete response JSON
Loading

Suggested reviewers: fm1320

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 3e600

No merge-blocking issue is established for the screenshot-fields example; complete the normal evidence and SDK checks before merging.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 4 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
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.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding a verified screenshot-fields example under the examples documentation.
Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 29 functions across 4 files. (5 skipped: 5 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 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.

@coderabbitai

coderabbitai Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
⚠️ Action not completed

Already reviewed the last commit. Use @coderabbitai full review to rerun a review of the entire changeset.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@svonava
svonava merged commit 5ab5985 into main Oct 14, 2026
18 checks passed
@svonava
svonava deleted the feat/screenshot-fields-example branch October 14, 2026 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

coderabbit-direct Opt in CodeRabbit for direct examples and root README changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant