feat(sparkctl): add PDF extraction contract fixture#5
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the PDF-EXTRACTION-V1 adapter contract, including its JSON schema, documentation, a synthetic fixture, and a Rust validator with associated tests. The reviewer feedback highlights several discrepancies between the Rust validator implementation and the JSON schema. Specifically, the validator incorrectly rejects empty tables and empty warnings, which are permitted by the schema, and fails to validate the contains_personal_data_risk field. The reviewer provides actionable code suggestions to align the Rust validation logic with the schema and recommends adding corresponding unit tests to verify these cases.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Summary
Adds a lightweight PDF-to-structured-data adapter contract for SPARK-like administrative workflows.
This PR defines a deterministic
PDF-EXTRACTION-V1JSON schema, a synthetic/manual fixture, local runtime fixture-contract validation, focused tests, use-case documentation, and a dedicated local Agent Skill for PDF extraction contracts.What Changed
schemas/spark/pdf_extraction_v1.schema.jsonfor the structured extraction contract.examples/spark/pdf_extraction_fixture.jsonas a synthetic/manual administrative planning fixture.docs/use-cases/PDF_TO_EVIDENCE_PACKET.mddescribing how extraction JSON can feed Context Pack / Evidence Packet workflows.validate_pdf_extraction_contract_valuewith deterministic canonical JSON hashing..agents/skills/pdf-extraction-contracts/SKILL.mdfor future local agent guidance.Boundaries
Validation
Local validation completed before push:
cargo fmt --all --checkcargo testcargo clippy --all-targets --all-features -- -D warningsReviewer Checklist
review_required: falseis rejected.