Commit Graph
162 Commits
Author SHA1 Message Date
kawa cf3b86a696 docs(phase-10): record RTVAL-01 PASS on re-test with fixed .intunewin build
- Flip RTVAL-01 from FAIL to PASS after re-test against live tenant rubis.fr
- Reference evidence screenshots (tenant-upload, app-assigned)
- Fix Package SHA256 (strip trailing garbage) to 8818124aa97ed3da24bf73a1f08f43065e6efea46f44a3abffc9983b097d3ddc
- Update top-level Status to IN PROGRESS; plan 10-02 resumed at Task 2
- Resolve ISSUE-01 (fixed in 74535ea HMAC scope + 7716246 Detection.xml alignment)
- Lock package to ImpTune commit 00b709d
2026-04-13 14:10:43 +02:00
kawaandClaude Sonnet 4.6 00b709d25a docs(debug): resolve phase-10 intunewin parse failure
Two-bug root cause confirmed against live arescom.fr Intune tenant:
(1) Detection.xml structural deviations (commit 7716246)
(2) HMAC scope bug — iv+ciphertext vs ciphertext-only (commit 74535ea)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 13:37:32 +02:00
kawaandClaude Sonnet 4.6 35d4edc623 docs: update debug session — HMAC scope bug identified and fixed
Session now records the second root cause (HMAC over ciphertext-only vs
IV+ciphertext) and the fix applied in commit 74535ea. Status moved back
to awaiting_human_verify for next Intune upload retry.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 12:08:59 +02:00
kawaandClaude Sonnet 4.6 74535ea089 fix(intunewin): compute HMAC over IV+ciphertext, not ciphertext alone
The reference implementation (svrooij/ContentPrep Zipper.cs DecryptFileAsync)
reads the first 32 bytes as the stored HMAC, then hashes the *remaining* bytes
— i.e. IV (16 bytes) || ciphertext — to verify integrity. ImpTune was computing
HMAC(mac_key, ciphertext) which omits the IV. Intune's server-side HMAC check
would therefore always fail, manifesting as the same silent symptom as the
Detection.xml bug: empty wizard fields, greyed OK button, no error banner.

The blob layout is unchanged: [HMAC(32)] + [IV(16)] + [ciphertext].
Only the hash input is corrected: iv + ciphertext instead of ciphertext.

The Mac field in Detection.xml is also updated accordingly (it stores the same
HMAC value that is prepended to the blob).

Tests updated: test_hmac_matches now verifies HMAC over blob[32:] (= IV+ciphertext),
which is exactly what the reference decryption algorithm verifies against.

All 114 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 12:08:43 +02:00
kawaandClaude Sonnet 4.6 44a4f2c573 docs: record debug session phase-10-rtval-01-intunewin-parse-fail
Debug session documenting root cause and fix for Intune upload wizard
silent metadata-parse failure. Status: awaiting_human_verify.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 11:48:49 +02:00
kawaandClaude Sonnet 4.6 77162466d5 fix(intunewin): align Detection.xml with IntuneWinAppUtil.exe reference format
Four structural defects in the generated Detection.xml caused Intune's upload
wizard to silently fail metadata parsing (empty form, OK button greyed):

1. Missing ToolVersion="1.8.6.0" XML attribute on ApplicationInfo — the wizard
   uses this to validate the package was produced by a compatible tool.
2. Spurious xmlns="http://schemas.microsoft.com/IntuneWin" namespace — changes
   element identity for Intune's XML parser (reference emits no namespace).
3. <?xml version="1.0" ?> declaration header — reference uses OmitXmlDeclaration=true.
4. Extra <MacAlgorithm> child element inside EncryptionInfo — not present in
   the reference FileEncryptionInfo model (svrooij/ContentPrep verified).

Fix: switched from toprettyxml() to tostring(xml_declaration=False)+indent(),
added ToolVersion attribute, removed xmlns and MacAlgorithm.
Tests updated to assert the corrected reference format; all 114 pass.

Root cause verified against svrooij/ContentPrep Packager.cs + ApplicationInfo.cs
(open-source C# reference implementation of IntuneWinAppUtil.exe).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 11:48:36 +02:00
kawa 46cfde00e0 chore(10-02): update STATE.md — plan blocked at RTVAL-01 FAIL
- Status set to BLOCKED with .intunewin structure defect as blocker
- BLOCKER-01 raised: Detection.xml missing/malformed in generated package
- Decision recorded: stop plan 10-02, gap-closure via /gsd:debug or /gsd:plan-phase 10 --gaps
- Session continuity updated to reflect RTVAL-01 FAIL stop point
2026-04-13 11:39:31 +02:00
kawa 403a0a5e69 fix(10-02): record RTVAL-01 fail — Intune cannot parse generated .intunewin
- RTVAL-01 status set to FAIL: Win32 app wizard fields stayed empty, OK greyed out
- Verbatim technician symptom quoted verbatim in report
- Interpretation: Detection.xml / package metadata malformed or missing in .intunewin archive
- RTVAL-02, RTVAL-03, RTVAL-04 marked BLOCKED (all depend on RTVAL-01 PASS)
- ISSUE-01 raised in Issues Found with root cause hypothesis and resolution path
- Plan 10-02 stopped; gap-closure cycle required before retesting
2026-04-13 11:38:53 +02:00
kawa 93a4e30bd4 docs(10-01): complete preflight-package-and-scaffold plan
- Add 10-01-preflight-package-and-scaffold-SUMMARY.md
- Update STATE.md: position moved to Phase 10 plan 01 complete
- Update ROADMAP.md: Phase 10 shows 1/3 summaries (In Progress)
- Mark RTVAL-05 complete in REQUIREMENTS.md
2026-04-13 11:33:23 +02:00
kawa 88cf53d660 chore(10-01): record technician metadata and drop .intunewin evidence
- RUNTIME-VALIDATION.md: populate all Tenant & Environment rows
  (tenant domain, device hostname, OS build 26200.7171, driver vendor,
  commit SHA, package filename, SHA256, generated-at date)
- Set Started date to 2026-04-13
- Add Copieur_2eme.intunewin to evidence/ (Ricoh PCL6 Universal Print)
2026-04-13 11:32:05 +02:00
kawa 1c3f458583 feat(10-01): scaffold RUNTIME-VALIDATION.md and evidence folder
- Create RUNTIME-VALIDATION.md with Tenant & Environment metadata table
- Add RTVAL-01 through RTVAL-04 sections with PENDING status
- Add Issues Found and Sign-off checklist sections
- Create evidence/.gitkeep so git tracks the evidence directory
2026-04-13 11:24:11 +02:00
kawa de24e1d18e docs(phase-10): finalize Phase 10 plan list in ROADMAP 2026-04-13 11:20:35 +02:00
kawa 5e2210ecc0 docs(phase-10): create runtime validation phase plan 2026-04-13 11:20:04 +02:00
kawaandClaude Opus 4.6 973b0c7807 docs(phase-09): complete phase execution
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 11:12:05 +02:00
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
kawa 37a06dac89 docs(09-02): complete playwright-port-autofill plan
- Create 09-02-SUMMARY.md with Playwright e2e evidence for UX-02
- Update STATE.md: decisions, session continuity, progress bar
- Update ROADMAP.md: phase 9 marked complete (3/3 plans with summaries)
- Update REQUIREMENTS.md: UX-02 marked complete
2026-04-13 10:58:51 +02:00
kawa 322fc2050f test(09-02): add Playwright UX-02 port autofill test
- Create tests/e2e/test_port_autofill.py - headless chromium test for PRNT-03
- Verifies IP->port_name auto-derivation via Alpine @input handler at /printers
- Update 09-VALIDATION.md: mark UX-02 tasks green, cite test file as evidence
2026-04-13 10:57:07 +02:00
kawa 4e9bd9b1ab chore(09-02): add Playwright dev deps and e2e package scaffolding
- Add pytest-playwright and playwright to requirements-dev.txt
- Create tests/e2e/__init__.py package marker
- Create tests/e2e/conftest.py with session-scoped live_server fixture
2026-04-13 10:55:49 +02:00
kawa 9902e2a5b8 docs(09-01): complete driver-upload-fix-and-inline-oob plan
- Create 09-01-SUMMARY.md: documents OOB swap fix, file changes, TDD outcomes
- Update STATE.md: advance session, add decisions, update progress (94%)
- Update ROADMAP.md: phase 9 in progress (2/3 summaries)
- Update REQUIREMENTS.md: mark UX-01 complete
2026-04-13 10:53:13 +02:00
kawa 72c6a98578 feat(09-01): add inline driver upload to printer form with OOB refresh
- Add id="printer-form-driver-select" to driver <select> (OOB swap target)
- Add sibling <form hx-post="/drivers/upload"> AFTER printer </form>,
  inside Alpine x-data div — avoids invalid nested form HTML
- Hidden <input name="caller" value="printer_form"> sentinel triggers OOB path
- Add hidden <div id="driver-list"> anchor for HTMX outerHTML swap target
- Create tests/test_printer_form.py with test_printer_form_has_inline_driver_upload
  asserting stable select id, caller sentinel, and non-nested upload form

Full non-e2e suite: 112 passed.
2026-04-13 10:51:46 +02:00
kawa 10ee09a5aa fix(09-01): resolve driver upload 500 and add HTMX OOB refresh path
- Import Form from fastapi for mixed multipart + form field support
- Add caller: str = Form('') parameter to upload_driver handler
- Capture new_driver from Driver.get_or_create() return tuple
- Branch on caller == 'printer_form' to emit OOB-enabled response
- Create partials/driver_upload_with_oob.html with primary driver_list
  include + hx-swap-oob select targeting id=printer-form-driver-select
- New driver is auto-selected via new_driver_id context variable

All 13 driver upload tests pass including 4 new OOB contract tests.
Full non-e2e suite: 111 passed.
2026-04-13 10:50:27 +02:00
kawa c6fe284e28 docs(09-03): complete script-download-links plan
- Add 09-03-SUMMARY.md documenting .ps1 routes + detail-page links
- Update STATE.md with decisions and session info
- Update ROADMAP.md phase 9 progress (1/3 summaries)
- Mark UX-03 complete in REQUIREMENTS.md
2026-04-13 10:49:47 +02:00
kawa d1de8395a3 test(09-01): add failing driver upload 500 regression + OOB contract tests
- Add _make_driver_zip_with_cat() helper for .inf + .cat fixture ZIPs
- Add _make_bom_driver_zip() helper for UTF-16 LE BOM encoded INF edge case
- Add test_upload_500_regression (parametrized: plain UTF-8 + BOM variant)
- Add test_upload_returns_oob_when_called_from_form (RED: handler lacks caller param)
- Add test_upload_oob_autoselects_new_driver (RED: no OOB fragment emitted)
- Add test_upload_no_oob_from_standalone_drivers_page

OOB tests fail: handler returns driver_list.html always regardless of caller field.
500 regression tests pass: existing synthetic ZIPs work fine against current handler.
2026-04-13 10:49:34 +02:00
kawa 68a2935af2 feat(09-03): add .ps1 script download routes and detail-page links
- Refactor install/uninstall/detect handlers into shared _*_response() helpers
- Add .ps1 route aliases: /scripts/install.ps1, /scripts/uninstall.ps1, /scripts/detect.ps1
- Add Scripts section to printer_detail.html inside {% if has_driver %} with 3 download links
- All 6 new tests green, full suite 106/106 passing
2026-04-13 10:48:43 +02:00
kawa d3590017e9 test(09-03): add failing .ps1 route and detail-page link tests
- Create tests/test_script_download.py with 5 tests for .ps1 routes (install/uninstall/detect, 404, 422)
- Add test_detail_page_shows_script_links to TestCommandPreview in tests/test_packages.py
- All 6 new tests go RED (routes and template links do not exist yet)
2026-04-13 10:47:09 +02:00
kawa 71c808601c docs(09): create phase plan for UX tech debt closure
Three plans covering UX-01 (driver upload 500 fix + inline HTMX OOB
refresh on printer form), UX-02 (Playwright headless test for PRNT-03
IP->port auto-fill), and UX-03 (.ps1 script download routes + detail
page links). VALIDATION.md finalized with real task IDs and
nyquist_compliant=true. ROADMAP Phase 9 plan list filled in.
2026-04-13 10:29:43 +02:00
kawa 84a350f233 'docs(09):_add_research_validation_strategy' 2026-04-13 10:23:47 +02:00
kawaandClaude Sonnet 4.6 73ea2d7fed docs(09): research phase UX tech debt closure
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 10:22:32 +02:00
kawa 5476160417 docs(09): capture phase context 2026-04-13 10:16:54 +02:00
kawa 57dc82876e docs(08): note driver upload 500 as pre-surfaced Nyquist gap 2026-04-13 10:04:48 +02:00
kawa e5ea4db911 docs(08): capture phase context 2026-04-13 10:02:10 +02:00
kawa d2f66d4b43 docs: create milestone v1.1 roadmap (4 phases) 2026-04-13 09:58:23 +02:00
kawa 30707f9cce docs: define milestone v1.1 requirements 2026-04-13 09:55:31 +02:00
kawa c9a7f70338 docs: start milestone v1.1 hardening and validation 2026-04-13 09:53:04 +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 63c935e860 docs(phase-07): complete phase execution 2026-04-13 09:01:45 +02:00
kawa 14293a8443 docs(07-01): complete dashboard and navigation polish plan
- SUMMARY.md documents /packages route, dashboard live queries, 99 tests green
- STATE.md advanced to 7/7 phases complete (100%)
- ROADMAP.md marks Phase 7 and plan 07-01 complete
2026-04-13 09:00:01 +02:00
kawa 91910ad97d feat(07-01): wire dashboard data and add /packages listing page
- Dashboard queries 5 most recent Printer records and 5 most recent driver-assigned ones
- New /packages route lists printers with drivers, with intunewin/ninja download links
- packages.html template extends base.html with Pico grid table
- Dashboard printer/package items now link to detail pages
- Quick action buttons wired to real routes (removed aria-disabled)
2026-04-13 08:58:13 +02:00
kawa 8cf47f5c89 test(07-01): add failing tests for /packages route and dashboard data
- test_packages_returns_200 asserts /packages returns 200
- test_dashboard_shows_recent_printers verifies recent printers rendered
- test_dashboard_shows_recent_packages verifies only driver-assigned printers shown
2026-04-13 08:57:20 +02:00
kawaandClaude Opus 4.6 c402bff54a docs(07): create phase plan for dashboard and navigation polish
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 17:05:37 +02:00
kawa 56578c8e9f docs(phase-07): add validation strategy 2026-04-10 17:03:46 +02:00
kawa 3e3d4860aa docs(phase-07): research dashboard and navigation polish phase 2026-04-10 17:02:49 +02:00
kawaandClaude Opus 4.6 9ba8743144 docs(phase-06): complete phase execution and verification
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 16:24:21 +02:00
kawa 906f3ca101 docs(06-01): complete wire-icon-intunewin plan
- SUMMARY.md: icon lookup + copy into .intunewin staging
- STATE.md: advanced to 06-01 complete, 100% progress, PKG-04 decision recorded
- ROADMAP.md: phase 06 marked Complete (1/1 plans)
- REQUIREMENTS.md: PKG-04 marked complete
2026-04-10 16:22:22 +02:00
kawa 6310be5e76 feat(06-01): wire icon into .intunewin staging before build
- Add shutil import and Icon import to packages.py
- After driver extraction, look up Icon record for printer
- If found and file exists on disk, copy to tmpdir/icon.png
- Missing icon (no DB record or missing file) silently skipped — export still succeeds
- PKG-04 requirement satisfied
2026-04-10 16:21:34 +02:00
kawa 2723cc8974 test(06-01): add failing test for icon inclusion in .intunewin export
- test_intunewin_includes_icon: uploads PNG icon, asserts icon.png in staged files
- test_intunewin_without_icon_succeeds: baseline no-icon export passes (already green)
2026-04-10 16:21:04 +02:00
kawaandClaude Opus 4.6 9f3d35b72f docs(06): create phase plan for wiring icon into intunewin export
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:41:05 +02:00
kawa 9912378563 docs(06): add research and validation strategy 2026-04-10 15:39:22 +02:00
kawaandClaude Sonnet 4.6 ba106eecbe docs(06): research phase — wire icon into .intunewin export
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-10 15:38:22 +02:00
kawaandClaude Opus 4.6 a6d8e15210 docs(roadmap): add gap closure phases 6-7
Phase 6 wires icon into .intunewin export (closes PKG-04).
Phase 7 fixes dashboard empty state and /packages 404 nav link.
PKG-04 reset to Pending in REQUIREMENTS.md traceability table.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-10 15:32:52 +02:00