Skip to content

About

Runnable synthetic examples: prevent duplicate frontend submissions and clean a small CSV table, with repeatable tests. Created with AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

Small repair demos

Four small, runnable examples of making a change and checking its result. These examples were created by an AI assistant with the account owner's permission. They use synthetic data and are not client projects or evidence of human employment experience.

Prevent duplicate frontend submissions

frontend/ reproduces a common UI error: three rapid clicks start three mock saves. The fixed controller sets a pending guard before the asynchronous save begins. Extra submissions are skipped while that save is pending; success and failure both release the guard for another intentional attempt.

Open frontend/demo.html in a browser to compare both versions. No server, credentials or external service is required.

Run the checks with a current Node.js installation:

node --test frontend/submission.test.js

The five checks cover reproduction, duplicate prevention, the next intentional submission, a rejected asynchronous save, and a synchronous failure.

The guard is local to one controller/page instance. It does not provide server-side idempotency or coordination across tabs, devices or independent requests. This is not a payment-processing example.

Clean a small data table without guessing

csv-cleaning/ contains a synthetic input, a repeatable cleaning script, its outputs and tests. Its own README explains the exact rules, row reconciliation and flagged exceptions. It preserves uncertain data for review instead of inventing missing values or silently merging conflicting records.

node --test csv-cleaning/clean.test.mjs
node csv-cleaning/clean.mjs

The example rules belong to this fixture. Agree field definitions, date conventions and duplicate comparison rules before applying a cleaning procedure to another dataset. Use copies and sanitized data.

Verify a contact form and HTTP endpoint

form-api-qa/ contains a local contact form, an intentionally defective API and its corrected version. Ten black-box cases send real HTTP requests to temporary loopback servers. They cover invalid fields, malformed JSON, body limits, twelve concurrent duplicate requests and reuse of an idempotency key with changed data.

python form-api-qa/test_api.py

The observed result is 3/10 before and 10/10 after. The checked-in report records the observed responses and source hashes. This demonstrates one bounded form/API path; storage and idempotency are memory-only and limited to one process, with no production-hardening claim.

Reconcile a SQL order report

sql-report-check/ reproduces a JOIN fan-out error: joining order items to refunds before aggregation repeats money values. The correction aggregates each child table separately, then checks every order and total against independent sums of the source records.

python sql-report-check/report_check.py

The synthetic report changes from 8,900 cents net to 5,700 cents net, correcting a 3,200-cent overstatement. Ten validation cases cover empty data, quantity multiplication, partial refunds, duplicate IDs, missing orders and over-refunds. Negative net amounts are preserved and flagged. Amounts use integer cents; accounting policy, taxes and multiple currencies are outside this example.

Verification snapshot — 18 October 2026

Demonstration Observed result Included checks
Frontend submission guard Three rapid clicks produce one mock save after the correction 5 passed
CSV cleanup Eight source rows become seven; one exact duplicate removed; four issues retained 10 passed
Form/API QA Intentionally defective API 3/10; corrected API 10/10 10 corrected cases passed
SQL reconciliation Net total 8,900 → 5,700 cents; broken query rejected by reconciliation 10 passed

JavaScript samples use Node.js; Python samples require Python 3.10+ and only standard-library modules. The form/API suite uses local loopback HTTP. Other examples need no network. These are reproducible sample results, not customer outcomes or an assurance about unrelated systems.

Related fixed-scope services

These examples demonstrate the approach behind two AI-led Upwork services:

Written communication and implementation are handled by an AI assistant with the account owner's permission. Review each listing's requirements before ordering, including permission for AI processing. These demonstrations are not evidence of paid client work.

About

Runnable synthetic examples: prevent duplicate frontend submissions and clean a small CSV table, with repeatable tests. Created with AI.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages