Skip to content

fix(data): merge 29 confirmed laptop near-duplicate records - #332

Merged
Seungpyo1007 merged 2 commits into
developfrom
Seungpyo1007/laptop-dedup-scan
Sep 29, 2026
Merged

Seungpyo1007 merged 2 commits into
developfrom
Seungpyo1007/laptop-dedup-scan

Conversation

@Seungpyo1007

Copy link
Copy Markdown
Member

Summary

Scanned data/laptop/ (1,995 records) for near-duplicates using the same method as the tablet/watch pass (#324) and smartphone pass (#329): slug/name normalization (punctuation- and brand-prefix-agnostic) plus a spec cross-check (release_date, cpu ref, cpu_name, ram_gb, storage_gb, display size/resolution, gpu, weight, os). Merged 29 confirmed duplicate groups and left all configuration variants untouched.

1995 → 1966 laptop records.

Per-pattern breakdown

Pattern 1 — identical scrape imported twice under different row-id slugs: 29 groups (all merged).
Each group was two files that were byte-identical except slug and variant.source_row — i.e. the same device row imported twice from Ammok/laptop_price_prediction under two different row ids. Merge rule: keep the file with the lower source_row (deterministic), delete the other. source_urls were identical in every group, so the union is a no-op; no field value was changed or invented.

Groups by brand: acer (1), dell (13), hp (3), lenovo (8), msi (2), toshiba (2).

All 29 merged groups (kept ← removed)
Brand Model Kept slug Removed slug
acer Acer Aspire 7 acer-aspire-7-ammok-211 acer-aspire-7-ammok-380
dell Dell Alienware 17 dell-alienware-17-ammok-531 dell-alienware-17-ammok-553
dell Dell Alienware 17 dell-alienware-17-ammok-842 dell-alienware-17-ammok-969
dell Dell Inspiron 7567 dell-inspiron-7567-ammok-152 dell-inspiron-7567-ammok-774
dell Dell XPS 15 dell-xps-15-ammok-187 dell-xps-15-ammok-351
dell Dell XPS 15 dell-xps-15-ammok-294 dell-xps-15-ammok-630
dell Dell Inspiron 5370 dell-inspiron-5370-ammok-72 dell-inspiron-5370-ammok-216
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-28 dell-inspiron-5570-ammok-537
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-356 dell-inspiron-5570-ammok-427
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-514 dell-inspiron-5570-ammok-658
dell Dell Inspiron 5570 dell-inspiron-5570-ammok-73 dell-inspiron-5570-ammok-657
dell Dell Inspiron 5770 dell-inspiron-5770-ammok-61 dell-inspiron-5770-ammok-129
dell Dell Inspiron 5770 dell-inspiron-5770-ammok-190 dell-inspiron-5770-ammok-261
dell Dell XPS 13 dell-xps-13-ammok-209 dell-xps-13-ammok-345
hp HP EliteBook x360 hp-elitebook-x360-ammok-881 hp-elitebook-x360-ammok-886
hp HP ProBook 430 hp-probook-430-ammok-170 hp-probook-430-ammok-249
hp HP ProBook 470 hp-probook-470-ammok-30 hp-probook-470-ammok-80
lenovo Lenovo IdeaPad 320-17IKB lenovo-ideapad-320-17ikb-ammok-281 lenovo-ideapad-320-17ikb-ammok-558
lenovo Lenovo Legion Y720-15IKB lenovo-legion-y720-15ikb-ammok-204 lenovo-legion-y720-15ikb-ammok-233
lenovo Lenovo Legion Y720-15IKB lenovo-legion-y720-15ikb-ammok-296 lenovo-legion-y720-15ikb-ammok-521
lenovo Lenovo ThinkPad T470s lenovo-thinkpad-t470s-ammok-723 lenovo-thinkpad-t470s-ammok-894
lenovo Lenovo ThinkPad X270 lenovo-thinkpad-x270-ammok-650 lenovo-thinkpad-x270-ammok-927
lenovo Lenovo ThinkPad Yoga lenovo-thinkpad-yoga-ammok-597 lenovo-thinkpad-yoga-ammok-793
lenovo Lenovo Yoga 910-13IKB lenovo-yoga-910-13ikb-ammok-245 lenovo-yoga-910-13ikb-ammok-799
lenovo Lenovo Yoga 920-13IKB lenovo-yoga-920-13ikb-ammok-183 lenovo-yoga-920-13ikb-ammok-344
msi MSI GE72MVR 7RG msi-ge72mvr-7rg-ammok-149 msi-ge72mvr-7rg-ammok-812
msi MSI GL72M 7REX msi-gl72m-7rex-ammok-331 msi-gl72m-7rex-ammok-725
toshiba Toshiba Satellite Pro toshiba-satellite-pro-ammok-144 toshiba-satellite-pro-ammok-807
toshiba Toshiba Satellite Pro toshiba-satellite-pro-ammok-174 toshiba-satellite-pro-ammok-838

Pattern 2 — same device in two sibling dirs via brand-prefix path variance (e.g. dell-xps-13 vs xps-13): none found.
Every record is stored under a consistent brand-prefixed base_model_slug; there were zero cases of the same brand+name living under two different base directories.

Pattern 3 — cross-source duplicates under different slug conventions: none found.
No device name appears in both bulk datasets (Ammok/laptop_price_prediction and abhinavflac/laptops-specs-dataset). The two datasets cover disjoint eras/models. The only cross-checkable identical-spec collisions were different SKUs that happen to share the Ammok dataset's coarse specs (e.g. Acer Aspire ES1-572 vs Acer Extensa EX2540) — those were correctly not merged because their names differ.

Placeholder / fabricated-defaults check

No systemic placeholder-value bug (the equivalent of the phone battery_mah=1500 / weight_g=150.0 stamping) is present in laptop data. ram_gb, storage_gb, weight_g, and display.size_inch all show organic distributions with distinct-name diversity proportional to frequency (e.g. ram_gb=16 across 735 distinct model names; storage_gb=512 across 739; the most common weight_g=2200.0 spans 41 distinct models). No single value is stamped across many unrelated devices. The two lowest-diversity weight values (1860.0 and 2180.0, ~3 distinct names each) are simply config variants of a few models, not fabricated defaults.

Conflicts found / resolved

None. Because every merged pair was byte-identical outside slug/variant.source_row, there were no field disagreements to reconcile — nothing was repaired, so no source citations were required beyond the existing source_urls (which matched within each pair).

Validation

  • python -m app.validate → passed.
  • python integrity_check.py <data> --strict → no hard anomalies (only the pre-existing advisory CPU/GPU benchmark ratio outliers, which the gate treats as review-only).
  • Dump refreshed as the last commit: python -m app.dump run from the TechEngine checkout against a fresh scratch database with TECHAPI_DATA_DIR pointing at this worktree. Scope kept to the laptop collection (removed the 29 orphaned per-slug pages; updated the laptop list + manifest count 1995 → 1966). Unrelated pre-existing dump drift in other collections was deliberately excluded to keep the diff reviewable.

Closes #296

Each removed record was a byte-identical re-import of a device that already
exists under a different Ammok row-id slug (Pattern 1: same scrape imported
twice). Within each group the two files differed only in `slug` and
`variant.source_row`; every real spec field (name, brand, cpu, release_date,
device_category, cpu_name, gpu_name, gpu_type, ram_gb, storage_gb, display,
weight_g, os) plus `source_urls` matched exactly, so the merge kept the file
with the lower `source_row` and dropped the redundant one. `source_urls`
were identical, so the union is a no-op and no field values were altered or
invented.

Configuration variants (same model, different CPU/RAM/storage) were left
untouched -- those are distinct real SKUs, not duplicates.

29 groups across acer(1), dell(13), hp(3), lenovo(8), msi(2), toshiba(2).
1995 -> 1966 laptop records.
Regenerated the static laptop dump from the deduped dataset (python -m app.dump
against a fresh scratch database seeded from this worktree). Drops the 29
orphaned per-slug pages for the removed duplicates and updates the laptop
collection count in the list and manifest (1995 -> 1966). Scope limited to the
laptop collection touched by this change.
@TechEngineBot

Copy link
Copy Markdown
Member

🔎 Data verification — Tier 0 (offline existence/trust)

Scored by app.verify; posted by TechEngineBot. Informational only — the structural gate (app.validate) is separate and authoritative for merge.

12/12 categories ? 191,790 records ? diff base develop@ea3f31e

Changed records in this PR

No records scored.

Full-dataset baseline

191790 record(s) assessed.

%%{init: {"theme":"base","themeVariables":{"pie1":"#3fb950","pie2":"#d29922","pie3":"#f85149","pieStrokeWidth":"0px","pieOpacity":"1"}}}%%
pie showData
    title Verification bands — all records
    "Green" : 32772
    "Yellow" : 157963
    "Red" : 1055
Loading
Category Distribution Total 🟢 🟡 🔴 🟢 %
brand 🟩🟩🟩🟩🟩🟩🟩🟨🟨🟨🟨🟨 207 122 85 0 58.9%
soc 🟩🟩🟨🟨🟨🟨🟨🟥🟥🟥🟥🟥 2117 284 837 996 13.4%
smartphone 🟩🟩🟨🟨🟨🟨🟨🟨🟨🟨🟨🟥 93407 18003 75350 54 19.3%
tablet 🟩🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟥 3459 292 3166 1 8.4%
watch 🟩🟩🟩🟨🟨🟨🟨🟨🟨🟨🟨🟥 447 94 350 3 21.0%
pda 🟩🟩🟩🟩🟩🟩🟩🟨🟨🟨🟨🟨 140 83 57 0 59.3%
gpu 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟨🟨🟨 2076 1529 547 0 73.7%
cpu 🟩🟩🟩🟩🟩🟩🟩🟩🟩🟩🟨🟥 4512 4219 292 1 93.5%
laptop 🟩🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 1966 107 1859 0 5.4%
monitor 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 882 0 882 0 0.0%
software 🟩🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 42493 366 42127 0 0.9%
website 🟩🟩🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 40084 7673 32411 0 19.1%
All 🟩🟩🟨🟨🟨🟨🟨🟨🟨🟨🟨🟥 191790 32772 157963 1055 17.1%

Hard violations (forced red):

Count Check
1 !boost_ge_base

green = authoritative source + complete + consistent · yellow = plausible, needs confirmation · red = sparse/weak source or a hard contradiction. Promotion to verified runs in the scheduled verify-network workflow.

@TechEngineBot

Copy link
Copy Markdown
Member

TechEngine change review: PASS

12/12 categories ? 191,790 records ? diff base develop@ea3f31e

Check Result
python -m app.validate PASS
Changed dump JSON and manifest/index counts PASS
New hard integrity anomalies vs PR base PASS

Changed data

Category Added Modified Deleted Added verified Added unverified Added Kaggle-sourced
brand 0 0 0 0 0 0
soc 0 0 0 0 0 0
smartphone 0 0 0 0 0 0
tablet 0 0 0 0 0 0
watch 0 0 0 0 0 0
pda 0 0 0 0 0 0
gpu 0 0 0 0 0 0
cpu 0 0 0 0 0 0
laptop 0 0 29 0 0 0
monitor 0 0 0 0 0 0
software 0 0 0 0 0 0
website 0 0 0 0 0 0

Changed record examples

laptop deleted

  • laptop/acer/2017/acer-aspire-7/acer-aspire-7-ammok-380.json - Acer Aspire 7
  • laptop/dell/2017/dell-alienware-17/dell-alienware-17-ammok-553.json - Dell Alienware 17
  • laptop/dell/2017/dell-alienware-17/dell-alienware-17-ammok-969.json - Dell Alienware 17
  • laptop/dell/2017/dell-inspiron-7567/dell-inspiron-7567-ammok-774.json - Dell Inspiron 7567
  • laptop/dell/2017/dell-xps-15/dell-xps-15-ammok-351.json - Dell XPS 15
  • laptop/dell/2017/dell-xps-15/dell-xps-15-ammok-630.json - Dell XPS 15
  • laptop/dell/2018/dell-inspiron-5370/dell-inspiron-5370-ammok-216.json - Dell Inspiron 5370
  • laptop/dell/2018/dell-inspiron-5570/dell-inspiron-5570-ammok-427.json - Dell Inspiron 5570
  • laptop/dell/2018/dell-inspiron-5570/dell-inspiron-5570-ammok-537.json - Dell Inspiron 5570
  • laptop/dell/2018/dell-inspiron-5570/dell-inspiron-5570-ammok-657.json - Dell Inspiron 5570
  • laptop/dell/2018/dell-inspiron-5570/dell-inspiron-5570-ammok-658.json - Dell Inspiron 5570
  • laptop/dell/2018/dell-inspiron-5770/dell-inspiron-5770-ammok-129.json - Dell Inspiron 5770
  • laptop/dell/2018/dell-inspiron-5770/dell-inspiron-5770-ammok-261.json - Dell Inspiron 5770
  • laptop/dell/2018/dell-xps-13/dell-xps-13-ammok-345.json - Dell XPS 13
  • laptop/hp/2017/hp-elitebook-x360/hp-elitebook-x360-ammok-886.json - HP EliteBook x360
  • ... 14 more

Heuristic review

  • Heuristic warnings: none found.

@TechEngineBot

Copy link
Copy Markdown
Member

TechEngine validation stats: PASS

12/12 categories ? 191,790 records ? diff base develop@ea3f31e

Data summary

Category Total Verified Unverified Missing verified Tracked Verified % of tracked
brand 207 123 84 0 207 59.4%
soc 2117 284 1833 0 2117 13.4%
smartphone 93407 17581 75826 0 93407 18.8%
tablet 3459 288 3171 0 3459 8.3%
watch 447 94 353 0 447 21.0%
pda 140 74 66 0 140 52.9%
gpu 2076 1496 580 0 2076 72.1%
cpu 4512 4219 293 0 4512 93.5%
laptop 1966 105 1861 0 1966 5.3%
monitor 882 0 882 0 882 0.0%
software 42493 358 42135 0 42493 0.8%
website 40084 7635 32449 0 40084 19.0%
all 191790 32257 159533 0 191790 16.8%

Warning

Tracked verified coverage is below 50% for monitor 0.0% (0/882), software 0.8% (358/42493), laptop 5.3% (105/1966), tablet 8.3% (288/3459), soc 13.4% (284/2117), all 16.8% (32257/191790), smartphone 18.8% (17581/93407), website 19.0% (7635/40084), and 1 more.
Tracked coverage excludes records missing the verified field; see the Missing verified column for those records.
This does not fail validation. Keep imported records verified: false until manual audit, but treat this as follow-up verification work before relying on the affected categories as curated data.

Validation notes

  • The integrity gate blocks only hard anomalies introduced by this PR relative to its merge base.
  • Full advisory outlier listings are suppressed on successful runs because they are dataset-wide and mostly stable between PRs.
  • Failure runs still include a detailed log excerpt for debugging.

Key output:

## app.validate
## integrity_check.py (PR head compared with PR base)
loaded CPU=4512 GPU=2076
Integrity section Flagged lines
structural 0
CPU name/tier consistency (desktop mainstream only) 0
CPU single>multi (cinebench/geekbench — should be multi>=single) 0
CPU era-vs-score outliers 0
CPU cross-source ratio outliers (possible wrong-variant) 132
GPU cross-source ratio outliers + sanity 51

@Seungpyo1007
Seungpyo1007 merged commit 1f961ee into develop Sep 29, 2026
5 checks passed
@Seungpyo1007
Seungpyo1007 deleted the Seungpyo1007/laptop-dedup-scan branch September 29, 2026 12:47
@Seungpyo1007 Seungpyo1007 removed the enhancement New feature or request label Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working data Dataset changes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Data accuracy: corrections, duplicates and dates (workstream)

2 participants