Skip to content

docs(safety): de-stale SR-17 — reverse-direction non-BMP + lone-surrogate oracles now exist#289

Merged
avrabe merged 1 commit into
mainfrom
docs/sr17-destale-reverse-nonbmp-oracles
Jun 15, 2026
Merged

docs(safety): de-stale SR-17 — reverse-direction non-BMP + lone-surrogate oracles now exist#289
avrabe merged 1 commit into
mainfrom
docs/sr17-destale-reverse-nonbmp-oracles

Conversation

@avrabe

@avrabe avrabe commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What

SR-17's verification-description (authored at the v0.31.0 traceability audit) lists the UTF-16 → UTF-8 reverse direction and lone-surrogate U+FFFD substitution as a carried gap — "covered structurally (LS-P-16) but not yet by a non-BMP runtime round-trip". The subsequent #272 async cross-encoding campaign closed that gap with runtime oracles, but the SR text was never updated. The result was an understated (phantom) gap in the safety record — the safe failure direction, but still a traceability defect that under-credits real verification.

This is a text-only correction to one existing verified SR. No links, artifacts, or statuses change.

Oracles that close the gap (all passing under wasmtime)

Oracle Covers
test_sr17_utf16_to_utf8_supplementary_plane_transcoding reverse-direction non-BMP round-trip — U+1F600 pair D83D DE00 → UTF-8 F0 9F 98 80
test_sr17_utf16_to_utf8_lone_high_surrogate_replacement terminal lone high surrogate → U+FFFD EF BF BD
test_sr17_utf16_to_utf8_midstring_lone_surrogate_replacement mid-string lone surrogate → U+FFFD
test_sr17_utf16_to_utf8_malformed_surrogate_matrix malformed-input matrix
inc2_async_utf16_to_utf8_param_* (tests/async_cross_encoding.rs) async path over the same shared decode/encode helpers

Verification

  • adapter_safety SR-17 oracles: 8 passed / 0 failed; async non-BMP oracles: 44 passed / 0 failed.
  • rivet validate: identical with and without this edit — 180 errors / 101 warnings / 0 broken cross-refs (the pre-existing left-side missing: feature/design-decision baseline; this edit changes no validation state).
  • LS-N gate (run_ls_verification.py): 57 passed / 0 failed / 0 missing.

Scope

Touches only safety/requirements/safety-requirements.yamlno Tier-5 source path, so no Mythos gate applies.

🤖 Generated with Claude Code

…gate oracles now exist

SR-17's verification-description (written at the v0.31.0 audit) listed the
UTF-16 → UTF-8 reverse direction and lone-surrogate U+FFFD substitution as a
carried gap "covered structurally but not yet by a non-BMP runtime round-trip".
The #272 async cross-encoding campaign closed that gap afterward but the SR text
was not updated, leaving an understated (phantom) gap in the safety record.

Cite the runtime oracles that close it, all passing under wasmtime:
  - test_sr17_utf16_to_utf8_supplementary_plane_transcoding (U+1F600 pair
    D83D DE00 → UTF-8 F0 9F 98 80) — reverse-direction non-BMP round-trip
  - test_sr17_utf16_to_utf8_lone_high_surrogate_replacement
  - test_sr17_utf16_to_utf8_midstring_lone_surrogate_replacement (→ U+FFFD)
  - test_sr17_utf16_to_utf8_malformed_surrogate_matrix
  - inc2_async_utf16_to_utf8_param_* (async path, same shared helpers)

Text-only change to one existing `verified` SR: no links, artifacts, or status
changed. rivet validate identical with/without (180 errors / 101 warnings /
0 broken cross-refs — the pre-existing left-side baseline). LS-N gate 57/0/0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

LS-N verification gate

57/57 approved LS entries verified

count
Passed (≥1 test, all green) 57
Failed (≥1 test failure) 0
Missing (no ls_*_NN_* test found) 0

Approved loss-scenarios.yaml entries are expected to have a
regression test named ls_<letter>_<num>_* (e.g. LS-A-11
ls_a_11_*). The gate runs each prefix via cargo test --lib --no-fail-fast and aggregates pass/fail/missing.

Failed LS entries

(none)

Missing regression tests

(none)

Updated automatically by tools/post_verification_comment.py.
Source of truth: safety/stpa/loss-scenarios.yaml.

@avrabe avrabe merged commit d171113 into main Jun 15, 2026
8 checks passed
@avrabe avrabe deleted the docs/sr17-destale-reverse-nonbmp-oracles branch June 15, 2026 05:54
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