Skip to content

Fix audit findings F01–F07 (render, paths, CLI I/O, mix scan) - #108

Merged
byte271 merged 3 commits into
mainfrom
cursor/audit-findings-f01-f07-84a9
Aug 28, 2026
Merged

Fix audit findings F01–F07 (render, paths, CLI I/O, mix scan)#108
byte271 merged 3 commits into
mainfrom
cursor/audit-findings-f01-f07-84a9

Conversation

@byte271

@byte271 byte271 commented Aug 27, 2026

Copy link
Copy Markdown
Owner

Summary

Implements the open FuckMark audit findings F01–F07 against baseline be6ae7645fda8b39d1d308722ac249f519e68de5 (package 0.4.0). Historical evidence files and their SHA-256 sums are not rewritten. Product limitations L01–L04 remain documented limitations, not silent bug closures.

This PR is the delivery vehicle for review. No merge, tag, or release is requested here.

Fixes

ID Change
F01 Chromium surface script sets textarea.value / contenteditable.textContent. Missing browser → UNKNOWN, never VERIFIED. Replacement measurement in evidence/audit-fixes-2026-08-27/ invalidates blank-div contenteditable VERIFIED rows from 2026-08-26.
F02 Protect relative paths (src/main.py, docs/README.md) and Windows paths using / (C:/Users/...) with exact byte preservation. Does not treat and/or or input/output as paths.
F03 Protect Markdown reference labels at uses and definitions (full / collapsed / shortcut). Link checks use reference resolution, not only visible projection.
F04 File/stdin read as raw bytes + strict UTF-8; preserve LF/CRLF/CR/mixed endings and missing final newline on -o, stdout, and --visible.
F05 Explicit --text / --file. Ordinary sentences and decimals are literal text. Slash-looking operands still need --text when they are not files.
F06 Real stdin decoded as strict UTF-8 (not encoding-name-only). Invalid bytes → nonzero exit, empty stdout, no clipboard, no traceback.
F07 Site selection uses a monotonic interval cursor and stops hashing the whole document per candidate. Compose-time projection / carrier / invariant / span-byte checks remain.

Algorithm / freeze attribution

  • Live mix bytes may differ from frozen u034f-ufe00-letter-alt-v1 output hashes when a newly protected span is present.
  • cycle8-mix-freeze-v1 still pins historical letter_mix_source_sha256 b1ceec24…. Live letter_mix.py is intentionally different.
  • Transfer / diagnostic tests replay live mix for visible projection and carrier insertion; they keep verifying frozen scorecard and SHA256SUMS file hashes.
  • CLI identity remains release-cli-v5. Package version remains 0.4.0.

Verification

Local full suite: 1853 passed, 15 skipped (1868 collected).

Skipped because optional research deps / artifacts are absent (scipy, transformers, torch, fonttools, external SynthID refs, local freeze artifacts, MidDev matrix workflow). Chromium contenteditable/textarea controls ran on this host (Google Chrome 148.0.7778.96, DejaVu Sans Mono).

CI also adds a cli-io job on ubuntu-latest and windows-latest for real file/stdin/stdout coverage.

CI note: first Windows cli-io run failed because Path.write_text rewrote the space-filename fixture to CRLF. Fixed in b5d17e0 by writing raw LF bytes.

Walkthrough evidence

F01 contenteditable now shows distinct text (AAAA vs BBBB), not blank divs:

contenteditable AAAA
contenteditable BBBB

Render status matrix and CLI demos for F02–F06:

See /opt/cursor/artifacts/f01_render_results.json and /opt/cursor/artifacts/audit_fix_cli_demo.txt.

Out of scope (still L01–L04)

  • Carrier removal by Mn / default-ignorable stripping
  • Long-document insertion coverage beyond the first 192 sites
  • Narrow English-ASCII domain (unsupported Unicode returns unchanged with exit 0)
  • General software compatibility beyond visible projection

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 2 commits August 27, 2026 21:12
Branch by element type in Chromium surface measurement, protect relative and
forward-slash Windows paths plus Markdown reference labels, keep exact line
endings and strict UTF-8 stdin, add --text/--file, and remove per-candidate
whole-document hashing. Historical evidence files stay untouched; replacement
measurements live under evidence/audit-fixes-2026-08-27/.

Co-authored-by: Byte271 <byte271@users.noreply.github.com>
Co-authored-by: Byte271 <byte271@users.noreply.github.com>
@byte271
byte271 marked this pull request as ready for review August 27, 2026 21:13
@coderabbitai

coderabbitai Bot commented Aug 27, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 69de49f3-d9ec-4432-9e16-81bfbbed349f


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Path.write_text converts newlines on Windows, which made --file mode
look like it rewrote endings when the fixture already stored CRLF.

Co-authored-by: Byte271 <byte271@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76a5b06c6b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +7 to +8
def _normalize_markdown_label(label: str) -> str:
return " ".join(label.split()).casefold()

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize Markdown escapes before matching labels

When a collapsed or shortcut reference uses an escaped punctuation character, such as [foo\*][] with [foo*]: https://example.com, Markdown resolves both labels to the same normalized value, but this function compares the raw backslash forms. The use label is therefore left unprotected, hidden carriers are inserted into it, and the transformed document no longer resolves the link. Decode Markdown backslash escapes (and equivalent label normalization such as character references) before comparing labels.

Useful? React with 👍 / 👎.

@byte271
byte271 merged commit d7dc98b into main Aug 28, 2026
42 checks passed
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.

2 participants