Commit Graph
4 Commits
Author SHA1 Message Date
kawaandClaude Opus 4.6 27ddc77ee1 fix(inf-parser): tolerate bare-line sections in real vendor INFs
Real INFs (e.g. Ricoh oemsetup.inf) include [SourceDisksFiles] entries
with bare filename lines (no '='), which strict configparser rejects
with ParsingError, surfacing as a 500 on /drivers/upload.

Pre-process the INF text to rewrite bare lines into synthetic
__bare_N = <line> entries before parsing, and filter those synthetic
keys out of DriverDesc extraction so they cannot leak into driver_names.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:11:45 +02:00
kawaandClaude Opus 4.6 67a1cd66ec chore: complete v1.0 milestone
Archive v1.0 MVP: 7 phases, 13 plans, 27/27 requirements.

- Archive roadmap to milestones/v1.0-ROADMAP.md
- Archive requirements to milestones/v1.0-REQUIREMENTS.md
- Move milestone audit into milestones/
- Create MILESTONES.md with v1.0 entry
- Evolve PROJECT.md: move shipped requirements to Validated,
  update Context with stack/LOC, log Key Decisions with outcomes
- Collapse ROADMAP.md to one-line milestone summary
- Update STATE.md to shipped status
- Back-fill stale requirements-completed frontmatter on
  02-01, 04-01, 05-01, 06-01 SUMMARY.md files

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 09:47:37 +02:00
kawa 5056922890 feat(02-01): implement INF parser with encoding detection and token resolution
- ParsedInf dataclass: driver_names, inf_filename, architecture, has_cat_file, unused_files
- _detect_encoding(): BOM sniffing for UTF-16 LE/BE, UTF-8 BOM, cp1252 fallback
- _resolve_tokens(): regex %TOKEN% expansion from [Strings] section dict
- parse_inf(): RawConfigParser(strict=False) with optionxform=str to preserve case
- Architecture detection: NTamd64->x64, NTarm64->arm64, undecorated->x86, mixed->None
- Deduplication via set(); sorted() for deterministic dropdown order
- [Rule 1 - Bug] Fixed configparser key lowercasing by setting optionxform=str
- All 16 tests pass, zero regressions in 40-test suite
2026-04-10 11:56:51 +02:00
kawa 290106d573 test(02-01): add failing tests for INF parser
- 11 test functions covering all DRV-02 and DRV-05 behaviors
- _detect_encoding tests for UTF-16 LE, UTF-16 BE, UTF-8 BOM, ANSI/cp1252
- parse_inf tests: literal DriverDesc, %TOKEN% resolution, UTF-16 fixture
- Multi-model deduplication, architecture detection (x64/arm64/x86/mixed)
- .cat file detection, unused files detection, empty models section
- INF fixtures: sample.inf, sample_utf16.inf (UTF-16 LE BOM), sample_multi_model.inf
- imptune/services/__init__.py package marker
2026-04-10 11:55:41 +02:00