Skip to content

fix(core): reject bidi controls in benchmark evidence identity - #322

Draft
seonghobae wants to merge 11 commits into
feat/controlled-benchmark-threshold-contractfrom
test/controlled-benchmark-bidi-identity
Draft

seonghobae wants to merge 11 commits into
feat/controlled-benchmark-threshold-contractfrom
test/controlled-benchmark-bidi-identity

Conversation

@seonghobae

@seonghobae seonghobae commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Scope

Stacked security repair for #237 / #203. This PR changes only OriginWeave-owned controlled-benchmark reproducibility identity admission plus its tests, doctoring, and changelog. It does not reinterpret browser-issued protocol identifiers, add release/signing authority, or duplicate #199/#201 evidence/release ownership.

Current exact head is a4c8ceaf67a075ef483334802aacfc54cf502068. The branch still targets feat/controlled-benchmark-threshold-contract, but its recorded base is predecessor #237 exact ea92c326e2dc4e3daa869aff1266c10b05453e7d.

Implemented delta

The lane rejects all 12 Unicode Bidi_Control scalars plus U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR in benchmark-owned reproducibility identity. Visible Korean/Japanese/Spanish and Arabic/Hebrew remain admissible. Admission still occurs before expected/observed byte equality. No normalization, confusable folding, ASCII-only restriction, browser-protocol normalization, benchmark-threshold change, signing/persistence authority, workflow mutation, or release authority is introduced.

The exact head also verifies the broadened ControlCharacterRunContext diagnostic string in controlled_benchmark_run_context.rs, so the child already semantically covers the error-display path that #237 later repaired for coverage.

Current parent drift

#237 advanced ordinary-forward to 4d175467c550c969d1ad22e51016473c0a4da034 after native CI exposed rustfmt and uncovered-Display defects. Comparing current #237 to this head yields 11 ahead / 1 behind / diverged with merge base ea92c326.... A fresh PR metadata recalculation reports this Draft PR mergeable, so there is no proven content conflict; the one-behind parent delta is still an explicit restack/adoption obligation.

This is not a close condition and not permission to discard the 11 child commits. The missing parent delta is test-only; its exact predecessor diagnostic cannot be copied verbatim because this child intentionally broadens the diagnostic to include C0/C1, Unicode line/paragraph separators, and bidirectional formatting characters.

Foundation order remains authoritative: #237 must first obtain exact-head acceptance and normal protected integration. Then this branch must ordinary/non-force adopt/adapt the protected parent generation, preserving every valid child delta, and reacquire all execution/review/ruleset evidence on the resulting new exact head. Scheduled-agent policy forbids merging, so no merge commit, destructive rebase, or force push is performed during this maintenance run.

Existing evidence

Earlier Draft-policy CI/MV3 generations were skipped; the prior Ready probe was cancelled and is not acceptance evidence. The predecessor current-head static CodeRabbit review found no actionable issue, but it is not runner-backed repository GREEN and will not transfer after restack.

#324 remains the downstream Unicode-18 DICP successor and must stay intact until this lane is reconciled and accepted.

No force push, destructive rebase, self-approval, bypass, gate weakening, workflow/ruleset/secret mutation, protected-main merge, tag, publish, or release is authorized here.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: c1eef9f1-6511-4d94-80d7-8dfe0873c7f4

📥 Commits

Reviewing files that changed from the base of the PR and between ea92c32 and a4c8cea.

📒 Files selected for processing (4)
  • CHANGELOG.md
  • crates/originweave-core/src/controlled_benchmark.rs
  • crates/originweave-core/tests/controlled_benchmark_run_context.rs
  • docs/doctoring/controlled-benchmark-unicode-identity-security.md

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

실행 컨텍스트 필드 검증이 Unicode 줄·문단 구분자와 양방향 서식 제어 문자를 추가로 거부합니다. 관련 오류 문서, 테스트, 보안 문서와 changelog가 갱신되었습니다. 표시 가능한 Unicode 및 RTL 문자열은 계속 허용됩니다.

Changes

실행 컨텍스트 Unicode 검증

Layer / File(s) Summary
Unicode 검증 로직 확장
crates/originweave-core/src/controlled_benchmark.rs
validate_run_context_field가 C0/C1 제어 문자, U+2028/U+2029, 지정된 Bidi_Control 문자를 거부합니다. 오류 설명과 문서 주석도 검사 범위를 반영합니다.
검증 테스트와 보안 문서
crates/originweave-core/tests/controlled_benchmark_run_context.rs, docs/doctoring/controlled-benchmark-unicode-identity-security.md, CHANGELOG.md
새 거부 대상의 실패 동작과 표시 가능한 Unicode 및 RTL 문자열의 허용 동작을 검증합니다. Unicode 보안 경계와 변경 기록을 문서화합니다.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to a4c8c

The validation change, regression coverage, diagnostics, and documentation are aligned in the supplied evidence. No actionable merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 2 files. (2 skipped: 2…
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 벤치마크 증거 식별자에서 Bidi 제어 문자를 거부하는 핵심 변경을 정확하고 간결하게 설명합니다. U+2028 및 U+2029 변경을 포함하지 않지만 제목이 모든 세부 변경을 포함할 필요는 없습니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/controlled-benchmark-bidi-identity

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.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head 11b2c16422481eb674a90ae61e941a5b247c4024 against exact parent ea92c326e2dc4e3daa869aff1266c10b05453e7d, focused on this bounded security contract only:

  • test-first coverage of the complete Unicode Bidi_Control set (U+061C, U+200E..U+200F, U+202A..U+202E, U+2066..U+2069);
  • whether Rust char::is_control would have missed these format controls on the parent;
  • whether the minimal helper rejects only bidi formatting controls while ordinary visible Arabic/Hebrew and existing Unicode remain admissible;
  • whether error/rustdoc semantics remain coherent and no benchmark threshold, registry, browser protocol, workflow, signing, persistence, or provider authority is widened;
  • formatting / lint / coverage risks in the two-file delta.

Do not treat static review as hosted CI or browser execution evidence.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

parent="ea92c326e2dc4e3daa869aff1266c10b05453e7d"
head="11b2c16422481eb674a90ae61e941a5b247c4024"

echo "== Commit identities =="
git show -s --format='parent: %P%nhead: %H%nsubject: %s' "$head"
git cat-file -e "${parent}^{commit}"
git cat-file -e "${head}^{commit}"

echo
echo "== Name/status delta =="
git diff --name-status "$parent" "$head"

echo
echo "== Stat =="
git diff --stat "$parent" "$head"

echo
echo "== Exact delta =="
git diff --find-renames --find-copies --no-ext-diff --unified=80 "$parent" "$head"

echo
echo "== Parent validator candidates =="
git grep -n -E 'validate_run_context_field|is_control|ControlledBenchmarkRunContext' "$parent" -- '*.rs' || true

echo
echo "== Head validator candidates =="
git grep -n -E 'validate_run_context_field|is_bidi_control|is_control|ControlledBenchmarkRunContext' "$head" -- '*.rs' || true

echo
echo "== Parent test candidates =="
git grep -n -E 'reasoning_configuration|ControlledBenchmarkRunContext|Arabic|Hebrew|Korean|Japanese|Spanish|Bidi' "$parent" -- '*test*.rs' '*.rs' || true

echo
echo "== Head test candidates =="
git grep -n -E 'reasoning_configuration|ControlledBenchmarkRunContext|Arabic|Hebrew|Korean|Japanese|Spanish|Bidi' "$head" -- '*test*.rs' '*.rs' || true

Length of output: 29189


🏁 Script executed:

#!/bin/bash
set -euo pipefail

parent="ea92c326e2dc4e3daa869aff1266c10b05453e7d"
test_first="a02b1d6e3a2034944ba337973bc9d0385976907c"
head="11b2c16422481eb674a90ae61e941a5b247c4024"

echo "== Commit sequence =="
git show -s --format='%H%nparents: %P%nsubject: %s%n' "$parent" "$test_first" "$head"
echo "ancestry parent -> test-first:"
git merge-base --is-ancestor "$parent" "$test_first" && echo yes
echo "ancestry test-first -> head:"
git merge-base --is-ancestor "$test_first" "$head" && echo yes
echo "commits in requested range:"
git log --format='%H %P %s' --reverse "${parent}..${head}"

echo
echo "== Static whitespace diagnostics =="
git diff --check "$parent" "$head"

echo
echo "== Controlled benchmark public context and error definitions at head =="
git show "$head:crates/originweave-core/src/controlled_benchmark.rs" | nl -ba | sed -n '140,205p;430,545p;590,780p'

echo
echo "== Focused test file at head =="
git show "$head:crates/originweave-core/tests/controlled_benchmark_run_context.rs" | nl -ba | sed -n '1,235p'

echo
echo "== Rust workspace and lint configuration candidates =="
fd -HI -t f '^(Cargo\.toml|rustfmt\.toml|clippy\.toml)$' . -E .git -E target | sort | while IFS= read -r path; do
  echo "--- $path"
  sed -n '1,260p' "$path"
done

echo
echo "== Formatting availability and non-mutating formatting check =="
if command -v rustfmt >/dev/null 2>&1; then
  rustfmt --version
  git diff --no-ext-diff "$parent" "$head" -- \
    crates/originweave-core/src/controlled_benchmark.rs \
    crates/originweave-core/tests/controlled_benchmark_run_context.rs > /tmp/controlled-benchmark.patch
  # Inspect the changed Rust files only. --check does not modify files.
  rustfmt --edition 2021 --check \
    crates/originweave-core/src/controlled_benchmark.rs \
    crates/originweave-core/tests/controlled_benchmark_run_context.rs
else
  echo "rustfmt unavailable"
fi

Length of output: 35506


@seonghobae Review complete for exact head 11b2c16422481eb674a90ae61e941a5b247c4024 against exact parent ea92c326e2dc4e3daa869aff1266c10b05453e7d.

I found one documentation-semantic issue.

  • P2 — Update the public error documentation and display text for bidi controls. At crates/originweave-core/src/controlled_benchmark.rs, Line 445 and Line 492 still state that ControlCharacterRunContext means the field “contains a control character.” The new rejected scalars are Unicode Bidi_Control format characters, not characters for which Rust char::is_control() returns true. The function rustdoc correctly describes the expanded condition, but the public error variant and its displayed diagnostic do not. Update these texts to state “control or Unicode bidirectional formatting character.” Consider adding a to_string() assertion for one bidi case.

Other static checks passed:

  • The commit sequence is test-first: ea92… → a02b… (test) → 11b2… (repair).
  • The hostile test enumerates all 12 requested scalars: 1 (U+061C) + 2 (U+200E..U+200F) + 5 (U+202A..U+202E) + 4 (U+2066..U+2069).
  • The helper matches exactly those same 12 scalars.
  • The parent validator used only value.chars().any(char::is_control). Static source inspection confirms that this predicate did not cover the new format-character cases.
  • The positive cases preserve the existing Korean/Japanese/Spanish text and add visible Arabic/Hebrew text. The helper does not reject ordinary RTL letters.
  • The changed admission check runs on expected and observed fields before byte equality. It therefore prevents an equal hostile value from becoming suite evidence.
  • The two-file delta does not modify benchmark thresholds, registry values, browser protocol behavior, workflows, signing, persistence, or provider authority.
  • git diff --check reported no whitespace errors.
  • Workspace Clippy configuration does not identify a direct issue in this delta. Static inspection found no new forbidden unwrap, expect, panic, dbg!, todo!, or print macro use.
  • rustfmt was unavailable in the inspection environment. I could not perform a formatter check.
  • I did not run tests, Clippy, rustdoc, coverage, hosted CI, or browser execution. This review is static only.
⚠️ Action not completed

Head commit changed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Fresh exact-head review requested for 9175f992c81b21b5ac80db10afb6aa94ec6b3c97 against exact stacked base ea92c326e2dc4e3daa869aff1266c10b05453e7d. Please supersede the earlier predecessor-head request.

Focus on the three-file bounded delta: complete Unicode Bidi_Control coverage; ordinary visible RTL-script acceptance; exact helper set/ranges; error/rustdoc semantics; APA/reference accuracy in docs/doctoring/controlled-benchmark-unicode-identity-security.md; and any formatting/lint/coverage or authority-widening risk. Static review must not be treated as hosted CI/browser execution evidence.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="ea92c326e2dc4e3daa869aff1266c10b05453e7d"
head="9175f992c81b21b5ac80db10afb6aa94ec6b3c97"

echo '== identities and range =='
git show -s --format='commit: %H%nparents: %P%nsubject: %s' "$base" "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base-is-ancestor: yes'
git log --format='%H %P %s' --reverse "${base}..${head}"

echo '== files and static whitespace =='
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
git diff --check "$base" "$head"

echo '== exact delta =='
git diff --no-ext-diff --find-renames --find-copies --unified=100 "$base" "$head" -- \
  crates/originweave-core/src/controlled_benchmark.rs \
  crates/originweave-core/tests/controlled_benchmark_run_context.rs \
  docs/doctoring/controlled-benchmark-unicode-identity-security.md

echo '== source map =='
ast-grep outline crates/originweave-core/src/controlled_benchmark.rs --items all --match 'ControlledBenchmarkRunContext|validate_run_context_field|is_bidi_control|ControlCharacterRunContext' || true

echo '== source/test focused evidence at head =='
git show "$head:crates/originweave-core/src/controlled_benchmark.rs" | nl -ba | sed -n '400,535p;620,735p'
git show "$head:crates/originweave-core/tests/controlled_benchmark_run_context.rs" | nl -ba | sed -n '1,270p'

echo '== doctoring document =='
git show "$head:docs/doctoring/controlled-benchmark-unicode-identity-security.md" | nl -ba

echo '== config candidates =='
fd -HI -t f '^(Cargo\.toml|rustfmt\.toml|clippy\.toml)$' . -E .git -E target | sort | while IFS= read -r p; do
  echo "--- $p"
  sed -n '1,240p' "$p"
done

echo '== all Bidi_Control-related changed-code locations =='
git grep -n -E 'Bidi_Control|bidi|bidirectional|is_bidi_control|ControlCharacterRunContext' "$head" -- \
  '*.rs' 'docs/doctoring/controlled-benchmark-unicode-identity-security.md' || true

Length of output: 66131


🤖 web_search executed:

Unicode UTS #39Revision 34 August 27 2026 Unicode 18.0.0 UAX#9 Revision 51 bidirectional algorithm official documentation Bidi_Control property scalar values

Length of output: 19786


@seonghobae Review complete for exact head 9175f992c81b21b5ac80db10afb6aa94ec6b3c97 against exact base ea92c326e2dc4e3daa869aff1266c10b05453e7d.

I found one issue.

  • P2 — Correct the public error documentation and diagnostic for bidi controls. At crates/originweave-core/src/controlled_benchmark.rs, Line 445 and Line 492 still describe ControlCharacterRunContext as a field that “contains a control character.” The new rejected Bidi_Control scalars are Unicode formatting characters. They are not covered by Rust char::is_control(). The rustdoc for evaluate_controlled_benchmark_suite_for_run correctly describes the expanded rule. The public enum documentation and Display text do not. Change both texts to say “control or Unicode bidirectional formatting character.” Add a to_string() assertion for a bidi-control case.

Static checks for the requested bounded contract found the following:

  • The commit sequence is correct: base → test-first → repair → doctoring.
  • The test enumerates all 12 Bidi_Control scalars.
  • The helper matches exactly U+061C, U+200E..U+200F, U+202A..U+202E, and U+2066..U+2069.
  • The parent used only char::is_control(). Static source inspection confirms that this did not reject the bidi formatting controls.
  • The helper preserves ordinary RTL letters. The positive regression retains Korean/Japanese/Spanish text and adds visible Arabic/Hebrew text.
  • Validation occurs for expected and observed context fields before byte equality. A byte-equal hostile identity cannot influence suite evidence.
  • The helper is private and dependency-free.
  • The delta does not modify thresholds, registry membership or versioning, browser protocol behavior, workflows, signing, persistence, model/provider routing, or release authority.
  • The doctoring document accurately states the bounded-context distinction and the test-first lineage.
  • The UAX #9 Revision 51 reference has the correct Unicode version and date. Its description of Bidi_Control supports the three control groups stated in the document.
  • git diff --check reported no whitespace errors.

I did not run rustfmt, tests, Clippy, rustdoc, coverage, hosted CI, or browser execution. This is static review only.

You are interacting with an AI system.

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review only current exact head e0f0fc662992f47c667026c62e5bf536323a3bc8 against exact stacked base ea92c326e2dc4e3daa869aff1266c10b05453e7d; supersede all predecessor-head requests. Focus on the complete Bidi_Control set/ranges, visible RTL-script acceptance, the retained ControlCharacterRunContext variant with widened diagnostic semantics, its explicit Display coverage, APA/reference accuracy in the doctoring file, and any format/lint/coverage or authority-widening defect. Do not treat static review as hosted CI/browser execution evidence.

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="ea92c326e2dc4e3daa869aff1266c10b05453e7d"
head="e0f0fc662992f47c667026c62e5bf536323a3bc8"

echo '== Commit identity and ancestry =='
git show -s --format='base: %H%nbase parents: %P%nbase subject: %s' "$base"
git show -s --format='head: %H%nhead parents: %P%nhead subject: %s' "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base-is-ancestor: yes'
echo '-- commits in range --'
git log --format='%H %P %s' --reverse "${base}..${head}"

echo '== Changed files and whitespace =='
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
git diff --check "$base" "$head"

echo '== Changed Rust/documentation structure =='
ast-grep outline crates/originweave-core/src/controlled_benchmark.rs --items all --match 'ControlledBenchmarkRunContext|ControlCharacterRunContext|validate_run_context_field|is_bidi_control' || true
ast-grep outline crates/originweave-core/tests/controlled_benchmark_run_context.rs --items all || true

echo '== Exact bounded delta =='
git diff --no-ext-diff --find-renames --find-copies --unified=100 "$base" "$head" -- \
  crates/originweave-core/src/controlled_benchmark.rs \
  crates/originweave-core/tests/controlled_benchmark_run_context.rs \
  docs/doctoring/controlled-benchmark-unicode-identity-security.md

echo '== Current source: public error, validation, evaluation =='
git show "$head:crates/originweave-core/src/controlled_benchmark.rs" | nl -ba | sed -n '420,535p;620,775p'

echo '== Current test file =='
git show "$head:crates/originweave-core/tests/controlled_benchmark_run_context.rs" | nl -ba | sed -n '1,300p'

echo '== Current doctoring document =='
git show "$head:docs/doctoring/controlled-benchmark-unicode-identity-security.md" | nl -ba

echo '== Parent validator context =='
git show "$base:crates/originweave-core/src/controlled_benchmark.rs" | nl -ba | sed -n '620,735p'

echo '== Workspace style and lint configuration =='
fd -HI -t f '^(Cargo\.toml|rustfmt\.toml|clippy\.toml)$' . -E .git -E target | sort | while IFS= read -r p; do
  echo "--- $p"
  sed -n '1,220p' "$p"
done

echo '== Static macro and helper usage in changed Rust files =='
git diff --no-ext-diff -U0 "$base" "$head" -- \
  crates/originweave-core/src/controlled_benchmark.rs \
  crates/originweave-core/tests/controlled_benchmark_run_context.rs |
rg -n -C2 '(unwrap!|unwrap\(|expect\(|panic!|dbg!|todo!|println!|eprintln!)' || true

echo '== Non-mutating rustfmt check, if available =='
if command -v rustfmt >/dev/null 2>&1; then
  rustfmt --version
  tmpdir="$(mktemp -d)"
  trap 'rm -rf "$tmpdir"' EXIT
  git show "$head:crates/originweave-core/src/controlled_benchmark.rs" > "$tmpdir/controlled_benchmark.rs"
  git show "$head:crates/originweave-core/tests/controlled_benchmark_run_context.rs" > "$tmpdir/controlled_benchmark_run_context.rs"
  rustfmt --edition 2021 --check \
    "$tmpdir/controlled_benchmark.rs" \
    "$tmpdir/controlled_benchmark_run_context.rs"
else
  echo 'rustfmt unavailable'
fi

Length of output: 77219


🤖 web_search executed:

site:unicode.org "UTS #39: Unicode Security Mechanisms" "Revision 34" OR "Revision 35" "Unicode 18.0.0" AND site:unicode.org/reports/tr9 "Revision 51" "Unicode Bidirectional Algorithm"

Length of output: 15333


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for url in \
  'https://www.unicode.org/reports/tr39/tr39-34.html' \
  'https://www.unicode.org/reports/tr9/tr9-51.html'
do
  echo "== $url =="
  page="$(mktemp)"
  trap 'rm -f "$page"' EXIT
  curl --fail --location --silent --show-error --max-time 30 "$url" -o "$page"
  rg -in -m 20 -C1 '(unicode security mechanisms|unicode bidirectional algorithm|<th[^>]*>Version|<th[^>]*>Date|<th[^>]*>Revision|Revision 34|Revision 51|2026-08-27|2025-08-13)' "$page"
  rm -f "$page"
  trap - EXIT
done

Length of output: 3707


@seonghobae Review complete for exact head e0f0fc662992f47c667026c62e5bf536323a3bc8 against exact stacked base ea92c326e2dc4e3daa869aff1266c10b05453e7d.

I found no defect in the requested bounded delta.

  • The range has the required test-first sequence: test, repair, doctoring, diagnostic update, and diagnostic test.
  • is_bidi_control matches all 12 Unicode Bidi_Control scalars:
    • U+061C;
    • U+200E..U+200F;
    • U+202A..U+202E; and
    • U+2066..U+2069.
  • validate_run_context_field rejects C0/C1 controls through char::is_control() and rejects the exact bidi-control set through is_bidi_control.
  • The parent implementation used only char::is_control(). Static source inspection shows that this predicate did not reject the bidi formatting characters.
  • The hostile test enumerates every required scalar. It requires ControlCharacterRunContext before suite evidence evaluation.
  • The visible Unicode test retains Korean, Japanese, and Spanish text. It also accepts visible Arabic and Hebrew text without bidi formatting controls.
  • The retained ControlCharacterRunContext variant has coherent semantics. Its rustdoc, Display text, and evaluate_controlled_benchmark_suite_for_run rustdoc state the C0/C1-or-Unicode-bidirectional-formatting rule.
  • The test explicitly pins the widened Display diagnostic for a bidi-control case.
  • The private helper does not change the public error variant shape or add a dependency.
  • The doctoring document accurately distinguishes OriginWeave-owned benchmark metadata from browser-issued protocol identifiers.
  • The APA references match the cited pages: UTS #39 Revision 34 is dated 2026-08-27, and UAX #9 Revision 51 is dated 2025-08-13.
  • The delta does not change benchmark thresholds, registry membership or versioning, browser protocol handling, workflows, signing, persistence, provider routing, or release authority.
  • git diff --check found no whitespace errors.
  • Static inspection found no new use of workspace-denied unwrap, expect, panic, dbg!, todo!, or print macros.

rustfmt was unavailable in the inspection environment. I did not run formatting, tests, Clippy, rustdoc, coverage, hosted CI, or browser execution. This review is static only.

You are interacting with an AI system.

@seonghobae
seonghobae marked this pull request as ready for review September 15, 2026 00:01

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review only current exact head fcc49ab34f305ee844f596d8b4d56d1bc0e599ac against exact stacked base ea92c326e2dc4e3daa869aff1266c10b05453e7d; supersede predecessor-head requests. The only delta after the previously clean e0f0fc662992f47c667026c62e5bf536323a3bc8 is the lossless CHANGELOG.md Unreleased/Security entry. Verify that the changelog wording is truthful active-PR evidence (not protected-main shipment), that no unrelated history was lost, and that the complete code/test/doctoring/changelog range retains the bounded Bidi_Control contract and authority boundaries. Static review is not hosted CI/browser GREEN.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="ea92c326e2dc4e3daa869aff1266c10b05453e7d"
prior="e0f0fc662992f47c667026c62e5bf536323a3bc8"
head="fcc49ab34f305ee844f596d8b4d56d1bc0e599ac"

echo '== Commit identities and ancestry =='
git show -s --format='base%n  %H%n  parents: %P%n  subject: %s%n' "$base"
git show -s --format='prior%n  %H%n  parents: %P%n  subject: %s%n' "$prior"
git show -s --format='head%n  %H%n  parents: %P%n  subject: %s%n' "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base-is-ancestor-of-head: yes'
git merge-base --is-ancestor "$prior" "$head" && echo 'prior-is-ancestor-of-head: yes'
echo '-- commits in complete requested range --'
git log --reverse --format='%H %P %s' "${base}..${head}"
echo '-- commits after prior reviewed head --'
git log --reverse --format='%H %P %s' "${prior}..${head}"

echo '== Changed paths and whitespace =='
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
git diff --check "$base" "$head"
echo '-- successor-only paths and diff --'
git diff --name-status "$prior" "$head"
git diff --check "$prior" "$head"
git diff --no-ext-diff --unified=60 "$prior" "$head" -- CHANGELOG.md

echo '== CHANGELOG.md at head =='
git show "$head:CHANGELOG.md" | nl -ba | sed -n '1,220p'

echo '== Complete bounded delta =='
git diff --no-ext-diff --find-renames --find-copies --unified=50 "$base" "$head" -- \
  crates/originweave-core/src/controlled_benchmark.rs \
  crates/originweave-core/tests/controlled_benchmark_run_context.rs \
  docs/doctoring/controlled-benchmark-unicode-identity-security.md \
  CHANGELOG.md

echo '== Validation and public diagnostic at head =='
git show "$head:crates/originweave-core/src/controlled_benchmark.rs" | nl -ba | sed -n '430,515p;635,750p'

echo '== Regression coverage at head =='
git show "$head:crates/originweave-core/tests/controlled_benchmark_run_context.rs" | nl -ba | sed -n '1,280p'

echo '== Doctoring document at head =='
git show "$head:docs/doctoring/controlled-benchmark-unicode-identity-security.md" | nl -ba

echo '== Scope scan for changed paths and authority-related terms =='
git diff --no-ext-diff -U0 "$base" "$head" | rg -n -C2 '^\+.*(threshold|registry|browser|workflow|sign|persist|provider|release|publish|tag|Bidi_Control|bidi|bidirectional)' || true

echo '== Rust formatting availability =='
if command -v rustfmt >/dev/null 2>&1; then
  rustfmt --version
else
  echo 'rustfmt unavailable'
fi

Length of output: 123865


@seonghobae Review complete for exact head fcc49ab34f305ee844f596d8b4d56d1bc0e599ac against exact stacked base ea92c326e2dc4e3daa869aff1266c10b05453e7d.

I found no defect in the requested scope.

  • fcc49ab34f305ee844f596d8b4d56d1bc0e599ac directly follows the previously reviewed head e0f0fc662992f47c667026c62e5bf536323a3bc8.
  • The successor range contains one commit and modifies only CHANGELOG.md.
  • The complete range retains the intended linear sequence: test-first coverage, production repair, doctoring, diagnostic update, diagnostic regression coverage, and changelog entry.
  • The CHANGELOG.md entry is under Unreleased / Security.
  • The entry says “Active PR #322.” It does not claim protected-main shipment, release, signing, publication, or merge completion.
  • The entry accurately describes rejection of Unicode Bidi_Control formatting scalars in controlled-benchmark run-context evidence identities.
  • The entry accurately states that ordinary visible RTL scripts remain accepted.
  • Git ancestry confirms that the specified base is an ancestor of the head. The requested stacked history remains present. I found no unrelated history loss.
  • validate_run_context_field still rejects C0/C1 controls and the exact 12-scalar Bidi_Control set before expected and observed context values can pass byte equality.
  • The regression test still covers U+061C, U+200E..U+200F, U+202A..U+202E, and U+2066..U+2069.
  • The visible Unicode regression still accepts the existing Korean, Japanese, and Spanish string and the visible Arabic/Hebrew string.
  • The retained ControlCharacterRunContext diagnostic and its explicit Display assertion remain consistent with the widened validation rule.
  • The doctoring record continues to state the bounded ownership distinction. It does not change browser-issued protocol identifier handling.
  • The complete range does not change benchmark thresholds, registry membership or versioning, browser protocol authority, model/provider routing, evidence signing or persistence, workflows, release authority, or other unrelated authority boundaries.
  • git diff --check found no whitespace errors in either the complete range or the changelog-only successor range.
  • The changelog commit also adds the final newline to CHANGELOG.md.

rustfmt was unavailable in the inspection environment. I did not run formatting, tests, Clippy, rustdoc, coverage, hosted CI, or browser execution. This is a static review only.

You are interacting with an AI system.

@seonghobae
seonghobae marked this pull request as draft September 15, 2026 01:53
@seonghobae
seonghobae marked this pull request as ready for review September 15, 2026 02:11

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

Please review exact head a4c8ceaf67a075ef483334802aacfc54cf502068 against stacked base ea92c326e2dc4e3daa869aff1266c10b05453e7d. Focus on the controlled-benchmark evidence-identity boundary: complete Bidi_Control coverage, U+2028/U+2029 line/paragraph-separator handling, preservation of ordinary visible RTL/CJK/Latin text, validation-before-byte-equality ordering, diagnostic/rustdoc consistency, and owner-boundary creep. Treat skipped/queued Actions as no execution evidence.

@coderabbitai

coderabbitai Bot commented Sep 15, 2026 •

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

base="ea92c326e2dc4e3daa869aff1266c10b05453e7d"
head="a4c8ceaf67a075ef483334802aacfc54cf502068"

echo '== Commit identity and ancestry =='
git show -s --format='base: %H%nbase parents: %P%nbase subject: %s%n' "$base"
git show -s --format='head: %H%nhead parents: %P%nhead subject: %s%n' "$head"
git merge-base --is-ancestor "$base" "$head" && echo 'base-is-ancestor-of-head: yes'
echo '-- commits in requested range --'
git log --reverse --format='%H %P %s' "${base}..${head}"

echo '== Changed paths, stats, and whitespace =='
git diff --name-status "$base" "$head"
git diff --stat "$base" "$head"
git diff --check "$base" "$head"

echo '== Changed source outlines =='
git show "$head:crates/originweave-core/src/controlled_benchmark.rs" > /tmp/controlled_benchmark.rs
git show "$head:crates/originweave-core/tests/controlled_benchmark_run_context.rs" > /tmp/controlled_benchmark_run_context.rs
ast-grep outline /tmp/controlled_benchmark.rs --items all --match 'ControlCharacterRunContext|validate_run_context_field|is_bidi_control|is_unicode_line_separator|evaluate_controlled_benchmark_suite_for_run' || true
ast-grep outline /tmp/controlled_benchmark_run_context.rs --items all || true

echo '== Complete bounded delta =='
git diff --no-ext-diff --find-renames --find-copies --unified=70 "$base" "$head" -- \
  crates/originweave-core/src/controlled_benchmark.rs \
  crates/originweave-core/tests/controlled_benchmark_run_context.rs \
  docs/doctoring/controlled-benchmark-unicode-identity-security.md \
  CHANGELOG.md

echo '== Current validation, diagnostic, and evaluation =='
git show "$head:crates/originweave-core/src/controlled_benchmark.rs" | nl -ba | sed -n '425,525p;620,790p'

echo '== Current regression coverage =='
git show "$head:crates/originweave-core/tests/controlled_benchmark_run_context.rs" | nl -ba | sed -n '1,360p'

echo '== Current doctoring and changelog =='
git show "$head:docs/doctoring/controlled-benchmark-unicode-identity-security.md" | nl -ba
git show "$head:CHANGELOG.md" | nl -ba | sed -n '1,160p'

echo '== Parent validation =='
git show "$base:crates/originweave-core/src/controlled_benchmark.rs" | nl -ba | sed -n '625,765p'

echo '== Authority-sensitive changed lines =='
git diff --no-ext-diff -U0 "$base" "$head" | rg -n -i -C2 '^\+.*(threshold|registry|browser|workflow|sign|persist|provider|release|publish|tag|bidi|line.separator|paragraph.separator|unicode)' || true

echo '== Static prohibited macros in changed Rust lines =='
git diff --no-ext-diff -U0 "$base" "$head" -- \
  crates/originweave-core/src/controlled_benchmark.rs \
  crates/originweave-core/tests/controlled_benchmark_run_context.rs |
rg -n -C2 '(unwrap!|unwrap\(|expect\(|panic!|dbg!|todo!|println!|eprintln!)' || true

echo '== Rust formatter availability =='
if command -v rustfmt >/dev/null 2>&1; then
  rustfmt --version
else
  echo 'rustfmt unavailable'
fi

Length of output: 136792


@seonghobae Review complete for exact head a4c8ceaf67a075ef483334802aacfc54cf502068 against exact stacked base ea92c326e2dc4e3daa869aff1266c10b05453e7d.

I found no defect in the requested scope.

  • The complete range retains the test-first sequence for both repairs.
  • is_bidi_control matches the complete 12-scalar Bidi_Control set:
    • U+061C;
    • U+200E..U+200F;
    • U+202A..U+202E; and
    • U+2066..U+2069.
  • is_unicode_line_separator matches only U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR.
  • validate_run_context_field rejects C0/C1 controls, the two Unicode line/paragraph separators, and the exact bidi formatting-control set.
  • The hostile regressions cover all 12 bidi controls and both line/paragraph separators.
  • The visible Unicode regression keeps Korean, Japanese, Spanish, Arabic, and Hebrew text admissible when the value has no rejected rendering control.
  • evaluate_controlled_benchmark_suite_for_run validates each expected and observed field before it performs byte equality. A byte-equal hostile value cannot enter suite evaluation.
  • ControlCharacterRunContext remains the public failure variant. Its rustdoc and Display text describe the widened C0/C1, line/paragraph-separator, and bidirectional-formatting boundary.
  • The diagnostic regression pins the widened Display text.
  • The doctoring document distinguishes benchmark-owned reproducibility labels from browser-issued protocol identifiers. It does not claim browser identifier normalization or ownership.
  • The implementation does not change benchmark thresholds, registry membership or versioning, browser protocol handling, provider routing, signing, persistence, workflows, release authority, or other authority boundaries.
  • CHANGELOG.md describes active PR #322 behavior. It does not claim protected-main shipment or executed verification.
  • git diff --check reported no whitespace errors.

rustfmt was unavailable in the inspection environment. I did not run formatting, tests, Clippy, rustdoc, coverage, hosted CI, or browser execution. Skipped or queued Actions are not execution evidence. This review is static only.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Copy Markdown
Contributor Author

Fresh follow-up finding is tracked separately as #323 rather than widening this PR into an unversioned Unicode catch-all. Current #322 exact a4c8ceaf67a075ef483334802aacfc54cf502068 owns C0/C1 + U+2028/U+2029 + exact Bidi_Control admission only. #323 owns the versioned Default_Ignorable_Code_Point profile decision/tests and explicitly excludes browser-issued protocol identifiers from that grammar. This PR should not copy #162/#165 source or silently add normalization/confusable policy.

@seonghobae
seonghobae marked this pull request as draft September 15, 2026 02:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working priority: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant