Skip to content

Add a public sanitizer-restore robustness bench - #117

Merged
cursor[bot] merged 3 commits into
mainfrom
cursor/robustness-bench-cdf8
Sep 2, 2026
Merged

Add a public sanitizer-restore robustness bench#117
cursor[bot] merged 3 commits into
mainfrom
cursor/robustness-bench-cdf8

Conversation

@byte271

@byte271 byte271 commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Public sanitizer-restore bench for the live five-layer mix (Phase 4 / WATERMARK-ROBUSTNESS-BENCH v1).

This is a hashed, model-free restore grid. It does not rerun GPT-2, SynthID, or any neural detector. Detector numbers stay on the sealed Gate v2 confirmation scorecard (identity 188/192, mix 0/192 after required sanitizers, visible 192/192). Frozen confirmation artifacts and the published wheel are unchanged. Package version stays 0.4.1.

What landed

  • CLI: fuckmark robustness (--json, -q, --fixture, --attack)
  • Algorithm id: fuckmark-robustness-bench-v1
  • 10 short fixtures (ASCII, NFD Latin, emoji, Greek, Cyrillic, Han, Hangul, URL-mixed, digits) times 18 Unicode sanitizer attacks = 180 cells
  • Cell metrics: restores_source, mix/output visible projection, closed-set carrier detect, fuckmark-hidden-scan-v1 residual categories, SHA-256 of mix and attack output
  • Live measure: mix visible projection 180/180; mixed letter/emoji fixtures never restore; digits has no eligible site so mix is a no-op and all 18 attacks restore; ascii_prose / mn_me_us_cf restore false, carrier false, projection false (UnicodeSanitizer turns annotation controls into spaces)
  • Spec: specs/fuckmark-robustness-bench-v1.{protocol.md,vectors.json,freeze.json}
  • Engine stays import-safe from fuckmark.cli (no cycle through cycle8.benchmark / gate_v2)
  • Sanitizer copies in fuckmark.robustness are pinned to the cycle8 reference implementations by test
  • Docs: docs/robustness.md, plus CLI / README / CHANGELOG / research / limits
  • Tests: tests/test_robustness.py binds freeze hashes and replays every cell

Exit 0 match, 1 mix or sanitizer drift, 2 usage.

Codex follow-up (ea6aa95)

  • fuckmark robustness loads protocol, vectors, freeze, and the sealed scorecard from fuckmark/robustness_data/ (must match specs/ after LF folding), so a wheel install no longer looks for site-packages/specs
  • Before exit 0 it recomputes protocol, vectors-file, vectors-canonical, and scorecard-file SHA-256 and compares them to the freeze record. Changing scorecard bytes while leaving the embedded scorecard_hash field alone is still a mismatch
  • Clean-install E2E (tools/verify_release_install.py) runs fuckmark robustness --json --fixture digits --attack identity and requires freeze_ok

Windows Package E2E (cee921d)

Git checkout CRLF changed raw file SHA-256 of protocol/vectors/scorecard on windows-latest. Artifact hashes now fold CRLF to LF (same digest as the Linux freeze). .gitattributes pins those files to LF.

A later v2 may add opt-in detector adapters. This freeze is local and deterministic. Short public fixtures are not the GPT-2 Gate v2 corpus. Sanitizer restore is not a detector miss, and a GPT-2 / SynthID miss is not a general AI-detector rate.

Open in Web Open in Cursor 

Ship fuckmark-robustness-bench-v1 as `fuckmark robustness`: 180 hashed
cells of live mix versus Unicode sanitizers, with no GPT-2 or SynthID
rerun. Detector numbers stay on the sealed Gate v2 scorecard.

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

coderabbitai Bot commented Sep 2, 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: Team

Run ID: ed69fd27-492d-46be-8e74-b91c50ac3400


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.

@byte271
byte271 marked this pull request as ready for review September 2, 2026 03:39

@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: 30f923b6fd

ℹ️ 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 thread fuckmark/robustness.py Outdated
Comment on lines +25 to +28
SPEC_DIR = Path(__file__).resolve().parents[1] / "specs"
PROTOCOL_PATH = SPEC_DIR / "fuckmark-robustness-bench-v1.protocol.md"
VECTORS_PATH = SPEC_DIR / "fuckmark-robustness-bench-v1.vectors.json"
FREEZE_PATH = SPEC_DIR / "fuckmark-robustness-bench-v1.freeze.json"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Package the benchmark artifacts with the installed module

When FuckMark is installed from the wheel, this path resolves to site-packages/specs, but the wheel only packages files under fuckmark and contains none of the referenced vectors, protocol, freeze, or scorecard files. Consequently every installed invocation of fuckmark robustness raises FileNotFoundError while loading the vectors instead of running the advertised public command; these artifacts need to be installed as package data and resolved from that packaged location.

Useful? React with 👍 / 👎.

Comment thread fuckmark/robustness.py Outdated
Comment on lines +330 to +333
vectors = load_vectors()
mismatches = compare_to_vectors(cells, vectors)
sealed = sealed_detector_track()
sealed_ok = sealed["scorecard_hash"] == sealed["expected_scorecard_hash"]

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Verify the frozen artifact hashes before reporting success

When the scorecard contents are changed while its embedded scorecard_hash field is left unchanged, sealed_detector_ok remains true even though file_sha256 no longer matches the frozen value; similarly, the loaded vectors are trusted without checking their frozen file or canonical hashes. Because run_robustness_bench never reads or compares the freeze record, coordinated sanitizer/vector drift or modified detector counts can still produce exit 0, defeating the advertised hashed integrity check.

Useful? React with 👍 / 👎.

cursoragent and others added 2 commits September 2, 2026 03:50
Load protocol, vectors, freeze, and the sealed scorecard from packaged
module data so `fuckmark robustness` works from a wheel. Compare those
file hashes to the freeze record before exit 0, including scorecard
bytes when the embedded hash is left unchanged.

Co-authored-by: Byte271 <byte271@users.noreply.github.com>
Windows Package E2E failed because Git checkout CRLF changed protocol,
vectors, and scorecard file SHA-256. Hash UTF-8 after LF folding so the
freeze matches, and pin those artifacts to LF in .gitattributes.

Co-authored-by: Byte271 <byte271@users.noreply.github.com>
@cursor
cursor Bot merged commit dc4e4df into main Sep 2, 2026
14 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