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>
3.0 KiB
phase, plan, subsystem, tags, dependency_graph, tech_stack, key_files, decisions, metrics, requirements-completed
| phase | plan | subsystem | tags | dependency_graph | tech_stack | key_files | decisions | metrics | requirements-completed | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 06-wire-icon-intunewin | 01 | package-export |
|
|
|
|
|
|
|
Phase 06 Plan 01: Wire Icon into .intunewin Export Summary
One-liner: Icon lookup via Icon.get_or_none + shutil.copy2 into tmpdir staging before build_intunewin() call, satisfying PKG-04 with silent-skip for missing icons.
What Was Built
Added 4 lines of production code to imptune/api/packages.py that look up an Icon record for the current printer and, if found and on disk, copy it as icon.png into the .intunewin staging directory before build_intunewin() is called.
Two new integration tests were added to tests/test_packages.py in a new TestIntunewinIconInclusion class:
test_intunewin_includes_icon: uploads a 256x256 PNG, monkeypatchesbuild_intunewin, assertsicon.pngappears in staged filestest_intunewin_without_icon_succeeds: no icon uploaded, asserts export returns 200 with no crash
Decisions Made
- Silent-skip pattern: Missing
IconDB record or missing file on disk both result in the icon step being skipped silently. Export always proceeds; the icon is optional metadata. - Constant filename: Icon is always staged as
icon.pngregardless of theoriginal_filenamestored in the DB. This gives the.intunewinpackage a predictable icon path for Intune policies that reference it.
TDD Execution
RED: test_intunewin_includes_icon failed (icon.png not in staged files ['detect.ps1', 'drivers', 'install.ps1', 'uninstall.ps1']). test_intunewin_without_icon_succeeds passed as expected baseline.
GREEN: After adding shutil/Icon imports and the 4-line copy block, both tests passed. Full suite: 96 passed, 0 failed.
Deviations from Plan
None — plan executed exactly as written.
Verification Results
python -m pytest tests/test_packages.py -x -q— 15 passedpython -m pytest tests/ -q— 96 passed, 0 failed- Code review:
shutil.copy2call is BEFOREbuild_intunewin()call ✓ - Code review:
Iconimported fromimptune.db.models,cfg.ICONS_DIRused (not hardcoded) ✓
Self-Check
Files exist:
imptune/api/packages.py— modifiedtests/test_packages.py— modified
Commits:
2723cc8— test(06-01): add failing test for icon inclusion in .intunewin export6310be5— feat(06-01): wire icon into .intunewin staging before build