← Source tree

SUBMISSION_DRAFT.md

---
title: "ReviewQueue: the most useful AI feature was refusing to rewrite the data"
published: false
tags: devchallenge, hf26challenge
---

*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle](https://dev.to/challenges/hacktoberfest-week2-2026-10-12).*

## What I Built

A repeated ID is easy to spot. An amount that looks perfectly reasonable but belongs to the wrong transaction is much harder. And a tool that silently fixes either one creates another question: what exactly changed?

ReviewQueue is a small offline tool for freelancers who review structured business exports. It combines a locally trained scikit-learn Isolation Forest with explicit checks for repeated IDs and unclear numeric fields. Its output is a queue of review hints alongside every original record. It does not correct amounts, merge duplicate rows or strip leading zeros from identifiers.

The potential paid service is helping a freelancer configure the input mapping and reference records for one repeatable review workflow, then supporting that workflow. That is a business hypothesis, not a validated business: I have no paying customer or revenue to report. The current Python input format is JSON; CSV and spreadsheet import are not implemented.

## Demo

**[Open the interactive demo](https://reviewqueue.rahmat19800402.chatgpt.site).** No account or API key is needed.

Start with “Normal example,” then “Unusual example.” The page actually runs 100 exported Isolation Forest trees in JavaScript. They were trained in scikit-learn on fictional USD records. Change the amount or quantity and run the model again. The fixed demo reference has quantities of one and amounts from 80 to 158; this is an illustration, not a model of visitors' businesses.

Next, try the complete six-record review workflow:

1. Review the full report. It includes an unusual amount, two rows with a repeated ID, an ambiguous decimal and a currency without sufficient reference data.
2. Inspect the original values, flags and model metadata.
3. Confirm that snapshot and download the review JSON.
4. Reset the session. The export gate closes until another review and confirmation.

The downloaded report retains all six original objects and both repeated-ID rows. A SHA-256 digest binds the complete report bytes. The confirmation is a local UI state; it does not certify that a record is correct or authenticate a reviewer.

For a batch using your own same-context historical reference records, the Python CLI fits and runs the model locally:

```sh
python reviewqueue.py sample_input.json --output my_review.json
```

Dependencies must be installed first. The analysis itself makes no network calls.

## Code

**[Public code repository and source browser](https://reviewqueue.rahmat19800402.chatgpt.site/source/index.html)** — BSD-3-Clause.

The source page links to the self-hosted Git repository, a Git bundle and a ZIP. It includes the Python engine, original synthetic data, browser model exporter, JavaScript evaluator, review UI, tests and dependency notices. The repository was created during this challenge window; the project began on 14 October 2026.

## How I Built It

The model uses three numeric features: signed-log amount, log quantity and signed-log unit amount. It trains separately for each currency. Without at least 20 valid same-currency reference records and enough numeric variation, it abstains rather than inventing a score.

The first development audit exposed a bad queue: 17 of 25 ordinary-by-construction rows received model hints. Preserving the records was working; reducing a person's workload was not.

I added a conservative promotion policy. A model hint enters the review queue only if the Isolation Forest decision score is negative **and** a feature lies outside the reference's observed numeric support. Raw model candidate status remains visible. Repeated-ID and invalid-number checks still run separately.

On that same development fixture, the result changed to 0 of 25 ordinary rows flagged, all 10 extreme numeric rows flagged, and none of five plausible-valued rows whose notes assert an unverifiable business error. That last result is a limit: numeric anomaly detection cannot establish the truth of a note.

These are regression results on a fixture that informed development, not independent accuracy measurements. The conservative gate can miss unusual records inside the reference range. I would need authorized examples and independent reviewer labels before making a claim about customer workload or error detection.

There are 52 passing Python tests and 24 passing Node test cases. The Node suite includes 204 new numerical probes matching the exported JavaScript forest scores to scikit-learn within 1e-8, plus report-byte and UI event-flow checks. The UI tests use a simulated DOM. Native-browser layout, accessibility and saved-file behavior were not verified in this environment; I am not counting those tests as browser QA.

The CLI also rejects duplicate JSON keys and numbers that would lose precision during decoding. It refuses to overwrite a source or existing result. Source-file bytes remain untouched, while the report records their hash. Output JSON whitespace and numeric spelling may differ from the input serialization.

## Why Does Open Innovation Matter?

An inspectable local model makes a small review service practical: the operator can examine the features, replace the model, change the queue policy and rerun a batch without a per-record API bill. The Python workflow can keep client records on the operator's computer after dependencies are installed.

For this task, a language model's ability to generate fluent text would not solve the main engineering problem. I need predictable numeric handling and a traceable connection between a hint and an original record. Open scikit-learn tooling gave me that starting point, including the ability to export a tiny synthetic forest and check its browser calculations against Python.

The privacy and cost benefits come with responsibility: reference selection, thresholds and evaluation belong to the operator. The earlier noisy audit is included in the project history because that tradeoff should be visible.

AI assistance was used to implement, test and document the project. The main open-source AI component is scikit-learn's Isolation Forest; NumPy, SciPy, joblib and threadpoolctl are credited in the dependency notices. The included model was trained on this project's original synthetic records. No partner prize category, customer validation or guaranteed earnings are claimed.