Files
ARCADIA-Studio/harness/experiments/text-diagnostics-20260913/probe/README.md
T
sorokin.oleg.edu 9fd76aef3a Add current-draft diagnostic underlines and passive hover
Preserve raw include diagnostic provenance and derive bands from the existing shaped editor. Retain deferred tooltip paragraphs through rendering. Include source, regression, failure and native-trial evidence; corrected native acceptance remains pending.
2026-09-13 01:43:22 -07:00

24 lines
4.6 KiB
Markdown

# Isolated diagnostic geometry seam probe — prepared, not executed
This standalone workspace does not modify the production workspace, registry cache or application. It privately copies all 70 files of pinned iced_widget 0.14.2 and adds only the documented `Content::with_editor<T>` read-only callback. `vendor-original-manifest.json` pins every original byte; compare against `vendor/iced_widget` to verify that only src/text_editor.rs differs. The stale registry `.cargo-checksum.json` is retained as original provenance, not rewritten to assert the patched file is upstream; Cargo's local path patch is the authoritative dependency choice.
The standalone Cargo manifest pins iced 0.14.0, uses the exact production default-features=false feature list (wgpu, canvas, tokio, x11, wayland, advanced), a local iced_widget patch, isolated [workspace], and dev debug=0. It is CPU-only despite preserving those feature gates. No window, GPU adapter, application or network is requested by main. No builds or Cargo resolution have been run. Parent must settle an offline lockfile and pin it before the actual probe execution; this preparation does not claim a frozen resolved graph without Cargo.lock.
## Assertions defined before execution
The actual Iced TextEditor is laid out and drawn using a FontLayout-style CPU Recorder with the same graphics::text::Editor/Paragraph implementations as production. It has a nonzero logical origin (23,31), explicit padding13, height170 and two widths260/560. One retained Widget Tree is reused throughout. The recorder receives the actual fill_editor reference, padded origin and clip.
The probe asserts: one fill_editor call; identical safe pointer identity between callback and paint reference; every source line/glyph cluster coordinate equals the callback's post-draw geometry; exact padded origin/clip; actual narrower-width wrap count greater than wider; actual multibyte clusters present with valid UTF8 boundaries. It then creates Word and Line selections through supported Content actions, checks expected selected text, and proves repeated accessor/layout/draw retain cursor, selected bytes, source including mixed CRLF/LF, and nonzero scroll. Scroll must change visible geometry without changing cursor/selection/text. Structured Debug FRAME lines record all observed runs, cluster byte bounds, x/y/width, bidi level, baseline/top/height and scroll; final PASS is printed only after every assertion.
Fail if actual copy identity differs, origins/clips mismatch, fixture does not wrap/scroll, Unicode boundaries are invalid, or selection/text/scroll change. Treat compilation errors or fixture failures as unexecuted/failed evidence and preserve exact logs, never as success. A later negative control can intentionally offset the expected padded origin or alter copied geometry to confirm comparisons reject it; do not modify vendored edit semantics for a negative control.
## Scope limits
This is foundational accessor/geometry proof, not the diagnostic range or hover algorithm. The renderer records fill_editor but does not paint pixels; it does not evaluate ancestor transformations/clips, GPU font rasterization, tooltip behavior, hit-testing, syntax-highlighter font changes, pointer gestures, IME, focus or performance. Selection setup uses actual supported Content actions, not mounted mouse input; preservation is checked across real widget layout/draw. Those limitations must remain in any result. It does not establish that a maintained dependency patch is accepted for production.
## Parent-controlled execution and capture
Prepared helper `capture_inputs.py` hashes every probe file except records/target and the manifest itself into a fresh exclusive JSON path supplied by --output. Capture again after offline Cargo.lock resolution and immediately before the build/run, using a fresh output; preserve the prepared capture too. Record exact Cargo/Rust/Python paths, environment, target/cache configuration, command array, start/finish/exit and separate exclusive stdout/stderr hashes. Use an approved private output or parent-coordinated target directory, never an unsolicited new shared build. The program itself prints frames and terminal PASS/failed assertion to those logs.
Suggested sequence AFTER parent approval: `cargo generate-lockfile --offline --manifest-path <probe>/Cargo.toml`; inspect/pin lock and full inputs; then `cargo run --locked --offline --manifest-path <probe>/Cargo.toml`. Parent supplies actual toolchain PATH and target/build environment and captures both commands. No build or run was performed during preparation. Readback input hashes after completion before declaring a result; package/static-source acceptance is out of scope.