Skip to content

Plan 021 workstream A: parity-inventory refresh audit (M4 entry criteria) - #312

Merged
charliek merged 3 commits into
mainfrom
feature/plan-021-parity-audit
Aug 7, 2026
Merged

Plan 021 workstream A: parity-inventory refresh audit (M4 entry criteria)#312
charliek merged 3 commits into
mainfrom
feature/plan-021-parity-audit

Conversation

@charliek

@charliek charliek commented Aug 7, 2026

Copy link
Copy Markdown
Owner

What this is

The M4 entry-criteria audit the roadmap itself requested: every row of docs/development/iced-parity-inventory.md re-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):

  • Six rows were stale in iced's favor and closed: the Sidebar-footer P0 and the create / delete / reorder / New-Project-command / workspace-shortcut functional rows all described the pre-plan-010 world.
  • Drifted prose corrected in closed rows and the non-table sections (chrome colors, footer deferral note, ordered-slices item 6, palette-feasibility closing).
  • Four rows added under the audit's "is there a row for this at all?" question: terminal IME (all three UIs lack it — GTK has no IMContext on the terminal, Swift never adopts NSTextInputClient; iced side is E6, in flight under plan 021), window vibrancy (P2 → 3h), context menus (P2), terminal bell (recorded all-three-UIs absence).
  • Dated method-and-evidence block: suite runs (shed GTK 171 passed; iced X11 80 passed on both wgpu and tiny-skia; macOS iced 54 passed), digest-pinned parity captures, file:line refs.

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 #4e9af1 vs 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 broke measure_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

  • harness-unit: 42 tests OK (locally, same command as CI).
  • Shed gate: GTK + iced parity captures green post-fix (run 166d2d6-96c9832705, full measurements.json both targets).
  • Evidence suite runs listed above; markdown table structure machine-checked.
  • Cursor reviews (Codex usage-limited): harness diff — no real bugs, 2 coverage findings fixed, 1 pre-existing scope skip; docs diff — 4 citation/consistency findings fixed, 2 nits fixed, dispositions in the commit messages.

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

    • Updated the visual-parity roadmap and inventory with current audit results, remaining gaps, completed work, and CI gate recommendations.
    • Documented decisions and follow-up items for IME support, context menus, terminal behavior, tab badges, and other polish areas.
  • Tests

    • Added coverage for tolerant color matching, anti-aliased text, palette measurement, and visual-bound detection.
  • Bug Fixes

    • Improved visual comparisons to recognize slight color variations and anti-aliased text, producing more reliable parity measurements.

charliek and others added 2 commits August 6, 2026 23:45
…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
@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

The 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.

Changes

Visual parity validation

Layer / File(s) Summary
Tolerant pixel classification and tests
tools/screenshot/parity.py, tools/roosttest_unit/test_visual_parity.py
Adds RGB tolerance and semantic ink classifiers. Updates agent palette measurement and tests rounded palette colors, anti-aliased text, status text, and trailing ink.
Parity audit and roadmap records
docs/development/iced-parity-inventory.md, docs/development/iced-migration-roadmap.md
Records refreshed audit evidence, completed project and interaction work, remaining parity gaps, issue references, and the cross-toolkit CI gate waiver recommendation.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the Plan 021 parity-inventory refresh and M4 entry-criteria audit, which are the primary changes.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/plan-021-parity-audit

Comment @coderabbitai help to get the list of available commands.

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
@charliek

charliek commented Aug 7, 2026

Copy link
Copy Markdown
Owner Author

CodeRabbit cloud reported rate-limited on this PR, so the review ran via the local CLI (coderabbit review --committed --base main, the documented fallback). Three major findings, all addressed in 73e9b5f:

  1. is_red_dominant_ink admitted the waiting orange (240,160,64) — real; the predicate gains a near-equal g/b term (abs(g-b) <= 30) separating failed red from waiting orange, with lifecycle-color regression vectors. (Not reachable in the current fixture — waiting ink never appears inside the selected failed row the scan is bounded to — but the classifier is now correct on its own terms. The pre-tightening shed gate's green run stands: every observed red-text pixel in the real capture has g≈b, so the added term cannot flip that result.)
  2. Truncated digests pin nothing — full 64-hex SHA-256 digests published with per-run manifest provenance.
  3. M4 waiver semantics ambiguous — the roadmap now states explicitly: the audit waives nothing; No CI gate for GTK↔Iced visual parity (capture tooling is human-reviewed only) #284's recommendation covers only the CI-gate question; per-row waivers are owner decisions recorded on the row before M4 can be declared entered.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
tools/screenshot/parity.py (1)

61-64: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Add strict RGB tuple matching.

The project requires Python 3.12 or newer. Add strict=True to zip(value, target) at tools/screenshot/parity.py:64 to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 166d2d6 and 73e9b5f.

📒 Files selected for processing (4)
  • docs/development/iced-migration-roadmap.md
  • docs/development/iced-parity-inventory.md
  • tools/roosttest_unit/test_visual_parity.py
  • tools/screenshot/parity.py

@charliek
charliek merged commit 6e0f622 into main Aug 7, 2026
17 checks passed
@charliek
charliek deleted the feature/plan-021-parity-audit branch August 7, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant