Plan 021 workstream A: parity-inventory refresh audit (M4 entry criteria) - #312
Conversation
…t pixel constants Current shed cairo rounds GTK's alpha-composited palette selection to #48484D (blue composites to 77.52; rounding is library-version-dependent) and current pango's AA text never hits the exact name/status constants, so measure_agent_palette failed against visually correct captures. The selection match and its ink-exclusion now tolerate ±2 via one near() helper (opt-in tol on color_components, default exact); the two text presence scans classify ink semantically (bright-neutral / red-dominant predicates). Geometry assertions and every other color match stay exact. Gate: harness-unit 42 tests OK; GTK+iced parity captures green in the shed. Cursor review: no real bugs; two coverage findings fixed (±2 boundary vector, trailing-ink polarity assertion); GTK metrics-red/status-red hex collision skipped as pre-existing scope (same hex under exact match too). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgxiEBQTqgNjPswKqcs12d
…d at 166d2d6 Six rows were stale in iced's favor and closed (Sidebar-footer P0 and the create/delete/reorder/New-Project-command/workspace-shortcut functional rows all described the pre-plan-010 world); drifted prose in closed rows and the non-table sections corrected; four rows added under the audit's 'is there a row for this at all?' question (terminal IME — E6 in flight; window vibrancy; context menus; terminal bell as a recorded all-three-UIs absence). Each verdict cites a suite run (shed GTK 171 passed; iced X11 80 passed on wgpu AND tiny-skia; macOS iced 54 passed), a digest-pinned parity capture, or a file:line ref — method block added to the inventory. Roadmap M4 entry-criteria rewritten with the audited open set: open P0 none; open P1 = the user-directed 3h cluster + upstream-blocked drops (#302) + terminal IME (E6, plan 021) + the badge-color one-constant fix (#311, found by this audit: iced #4e9af1 vs the references' deliberate #007aff). #284 recommendation recorded (waive the cross-toolkit golden- image gate, keep focused per-UI pixel guards + human-reviewed captures; revisit trigger named) — final call stays with Charlie, issue left open. Cursor review: 4 citation/consistency findings fixed (stale P0 prose, vibrancy/context-menu file:line cites, delete-project evidence framing); 2 consistency nits fixed (M4 3h list completed, #284 backlog row synced). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgxiEBQTqgNjPswKqcs12d
📝 WalkthroughWalkthroughThe change improves screenshot parity detection for rounded colors and anti-aliased text. It adds focused tests and refreshes the Iced parity inventory and migration roadmap with current audit results, remaining gaps, and CI gate recommendations. ChangesVisual parity validation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
The red-dominant ink predicate admitted the waiting orange (240,160,64) — a near-equal g/b term now separates failed red from it, with lifecycle- color regression vectors. The inventory's load-bearing capture digests are published in full (a prefix pins nothing) with their manifest provenance. The roadmap's M4 waiver semantics are explicit: the audit waives nothing; #284 covers only the CI-gate question; per-row waivers are recorded owner decisions. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SgxiEBQTqgNjPswKqcs12d
|
CodeRabbit cloud reported rate-limited on this PR, so the review ran via the local CLI (
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
tools/screenshot/parity.py (1)
61-64: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winAdd strict RGB tuple matching.
The project requires Python 3.12 or newer. Add
strict=Truetozip(value, target)attools/screenshot/parity.py:64to prevent partial comparisons when tuple lengths differ.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@tools/screenshot/parity.py` around lines 61 - 64, Add strict tuple-length validation in the near function by passing strict=True to zip(value, target), ensuring RGB comparisons never silently ignore mismatched tuple elements.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@tools/screenshot/parity.py`:
- Around line 61-64: Add strict tuple-length validation in the near function by
passing strict=True to zip(value, target), ensuring RGB comparisons never
silently ignore mismatched tuple elements.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ff1cd976-acbc-469f-8997-7297a6d76461
📒 Files selected for processing (4)
docs/development/iced-migration-roadmap.mddocs/development/iced-parity-inventory.mdtools/roosttest_unit/test_visual_parity.pytools/screenshot/parity.py
What this is
The M4 entry-criteria audit the roadmap itself requested: every row of
docs/development/iced-parity-inventory.mdre-verified against current behavior (main@166d2d6) with named evidence, plus the one harness repair the audit needed to produce that evidence. Docs + one harness file; no product code.Changes
Inventory refresh (
iced-parity-inventory.md):IMContexton the terminal, Swift never adoptsNSTextInputClient; iced side is E6, in flight under plan 021), window vibrancy (P2 → 3h), context menus (P2), terminal bell (recorded all-three-UIs absence).Roadmap M4 entry-criteria rewrite (
iced-migration-roadmap.md): the audited open set — open P0: none; open P1 = the user-directed 3h polish cluster + upstream-blocked drops (#302) + terminal IME (E6) + the badge-color one-constant fix (#311, found by this audit: iced#4e9af1vs the references' deliberate#007aff). #284 recommendation recorded: waive the cross-toolkit golden-image gate (evidence + revisit trigger in the doc and on the issue) — final call stays with Charlie; issue left open.Harness repair (
tools/screenshot/parity.py+ unit tests): current shed cairo/pango brokemeasure_agent_palette's exact pixel matches against visually correct captures (alpha-composite rounding#48484E→#48484D; AA text off its constants). Scoped fix: ±2 tolerance on the alpha-composited selection (both match sites), semantic ink predicates for the two text presence scans. Geometry assertions and all other color matches stay exact.Verification
166d2d6-96c9832705, fullmeasurements.jsonboth targets).Impact
No dependency, privacy, or secret changes. No product behavior changes. Accepted risk: the parity-measurement tolerances are deliberately scoped (selection ±2, text-presence predicates only); everything else stays exact-match.
Plan 021 § Workstream A (authoritative spec for this PR)
The audit re-verifies EVERY parity-inventory row with named evidence (in-process screenshots + IPC dumps, both UIs, Mac + shed Linux), closes stale rows, states the honest open P0/P1 set in the roadmap's M4 paragraph, and records an evidence-backed #284 recommendation — the final call is Charlie's, flagged in the morning checklist; subjective polish rows are marked "needs Charlie", not guessed. Evidence discipline: every verdict cites a suite run + commit + counts, a digest-pinned capture, or a file:line ref. Full plan:
~/.claude/plans/roost/021-audit-and-ime.md(session-local).Sibling PR (workstream B, E6 IME input in iced) follows separately.
🤖 Generated with Claude Code
https://claude.ai/code/session_01SgxiEBQTqgNjPswKqcs12d
Summary by CodeRabbit
Documentation
Tests
Bug Fixes