Skip to content

Add the document inference lab on the job console - #8

Merged
rohits2501 merged 1 commit into
mainfrom
feat/document-inference-lab
Oct 24, 2026
Merged

rohits2501 merged 1 commit into
mainfrom
feat/document-inference-lab

Conversation

@rohits2501

Copy link
Copy Markdown
Owner

Summary

  • Add a read-only inference preview that turns extracted fields and saved review edits into facts, checks them against the invoice rules, and shows the conclusions. The preview writes nothing to the job, the event log, or the review.
  • Default checker is plain TypeScript, so a visitor needs no binary. A local open-ontologies binary is opt-in, and the HTTP backend returns not configured. The panel is behind NEXT_PUBLIC_FEATURE_INFERENCE_LAB.
  • Move spec 0008 into a directory with the decision history and verify steps, and mark scope feature 18 in progress. Verify and test are still open.

Test plan

  • Open a finished mock job and confirm the Inference lab shows Checked, a senior signoff tier, Karnataka from the GSTIN prefix, and two low-confidence warnings.
  • Click a premise and confirm the review list and document viewer select that field.
  • Run each synthetic preset and confirm contradictory dates fail with a 3200000 paise delta, and the missing-evidence preset has no GSTIN fact and no state fact.
  • Call POST /api/inference/preview twice and confirm the job events and saved review are unchanged.
  • Set INFERENCE_BACKEND=http and confirm a fresh mock job shows Saved example, not a live check, and the route returns not configured.
  • Set NEXT_PUBLIC_FEATURE_INFERENCE_LAB=false and confirm the job page renders no panel.
  • npm run typecheck, npm run lint, npm test, and npm run build pass, and /jobs/[id] stays inside perf/budgets.json.

Made with Cursor

- Introduced the Inference Lab panel in the Job Console, which is conditionally rendered based on the `inferenceLab` flag.
- Updated the `.env.example` file to include the `NEXT_PUBLIC_FEATURE_INFERENCE_LAB` flag.
- Changed the status of the "Document inference lab" in the scope documentation from "planned" to "in-progress".
- Removed the obsolete specification document for the inference lab.

This commit enhances the user interface by integrating the inference lab functionality and ensures that relevant documentation reflects the current development status.
@vercel

vercel Bot commented Oct 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ai-document-intelligence-console Ready Ready Preview Oct 24, 2026 4:04am UTC

@github-actions

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
/ 433490 B 🔺+1191 B (+0.3%) 126043 B 🔺+431 B (+0.3%)
/_not-found 304371 B 🔺+1108 B (+0.4%) 88704 B 🔺+400 B (+0.5%)
/jobs/[id] 443608 B 🔺+1663 B (+0.4%) 129298 B 🔺+529 B (+0.4%)
public/pdf.worker.min.mjs 1850852 B +0 B (+0.0%) 437925 B +0 B (+0.0%)
pdfjs 306635 B +0 B (+0.0%) 88776 B +0 B (+0.0%)

Performance

Total duration: 599.00 ms -139.00 ms (-18.8%) | Renders: 14 (+0) | Paint: 132.00 ms -8.00 ms (-5.7%)

Test Duration Renders Paint
Job console 421.00 ms -130.00 ms (-23.6%) 3 (+0) 64.00 ms -4.00 ms (-5.9%)

1 test within noise

Mount counts
Test Metric Count Ceiling
Home list jobs 11 32
Job console pages 3 12
Job console review 14 40
Job console events 25 80
Job console heap 6105396 83886080

Metric alarms

None.

Details of this run

@rohits2501
rohits2501 merged commit 9d84ae4 into main Oct 24, 2026
3 checks passed
@rohits2501
rohits2501 deleted the feat/document-inference-lab branch October 24, 2026 04:11
@rohits2501
rohits2501 restored the feat/document-inference-lab branch October 24, 2026 04:39

This branch was successfully deployed

1 active deployment
Preview — ec17145d Deployed Oct 24, 2026 by vercel[bot]
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