Skip to content

fix(verify): normalize laptop and monitor structural scores - #101

Merged
Seungpyo1007 merged 1 commit into
mainfrom
fix/laptop-monitor-structural-red
Sep 26, 2026
Merged

Seungpyo1007 merged 1 commit into
mainfrom
fix/laptop-monitor-structural-red

Conversation

@Seungpyo1007

@Seungpyo1007 Seungpyo1007 commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Valid laptop and monitor imports fell into red after #95 because categories without domain rules had only 65 available points but still used the 100-point scale. Normalize the assessed weights to 0–100, retain zero consistency credit, explicitly prohibit green until domain rules exist, and preserve structural hard failures.

Reproduction with TECHAPI_DATA_DIR=C:/Users/29/Desktop/TechAPI/data (TechAPI e6050e6519698b7dcb40d2edc5930485dad1a9f3; engine baseline 78d2080):

Category Total Missing required Slug/file mismatch Invalid slug Verified without URLs
laptop 1995 0 0 0 0
monitor 882 0 0 0 0

app.validate.validate() returned zero errors. No broken laptop or monitor records were found. All required fields are top-level, every filename matches its record slug, and all records carry a base model. Laptops use 1951 nested variant paths plus 44 accepted flat paths; monitors use 882 nested paths. The structural check therefore needs no relaxation.

Laptop original scores: 965 at 35 (unknown host), 923 at 38 (tier 3), 46 at 58 (tier 1), and 61 at 62 (tier 1). All 882 monitors originally scored 38 (tier 3). Their red bands came from unavailable consistency credit rather than structural failure.

Category Before green/yellow/red After green/yellow/red
laptop 0 / 107 / 1888 0 / 1995 / 0
monitor 0 / 0 / 882 0 / 882 / 0

After counts come from a local python -m app.verify status run with the same data root and a temporary output path. No TechAPI data changes are included. Software and website share the fallback branch and receive the same normalization; categories with domain rules are unchanged. Subscores retain their original weights, while the overall fallback score is normalized.

Validation:

  • python -m pytest tests -q --basetemp=C:/Users/29/AppData/Local/Temp/techengine-98-fixed-tests
  • python -m mypy app
  • python -m ruff check app tests
  • Added valid laptop variant and monitor fixtures: bulk sources score yellow, strong sources still cannot earn green, and missing required fields force red despite a high score.

Refs #98
Refs GetTechAPI/TechAPI#297

Normalize the available structural, host and provenance weights while preserving structural hard failures and the no-green policy.

Closes #98

Refs GetTechAPI/TechAPI#297
@Seungpyo1007 Seungpyo1007 added bug Something isn't working enhancement New feature or request labels Sep 26, 2026
@Seungpyo1007 Seungpyo1007 self-assigned this Sep 26, 2026
@Seungpyo1007
Seungpyo1007 merged commit ccb668d into main Sep 26, 2026
1 check passed
@Seungpyo1007
Seungpyo1007 deleted the fix/laptop-monitor-structural-red branch September 26, 2026 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant