# Changed files: bounded per-file diffs

Implemented on `changes/diff`, based on main 70e4880 with a normal merge.
The controller approved the design on 2026-11-26; the final diff protocol is 35 (renumbered from 34 on 2026-11-27).

## Decisions

One complete file patch fits one bounded base64 durable frame. This avoids
persisting partial, unscanned bytes. The collection remains separately bound
and requires a matching accepted Engineering report before device reads.
Both ends use the module-pinned Gitleaks 8.30.1 embedded default rules; no
repository configuration, baseline, path allowlist or inline ignore is read.
The scanner library logger is permanently disabled to prevent findings from
reaching diagnostic logs. Known-token checks also run on decoded layers.

## Test-first record

All Go commands use `GOMAXPROCS=2 GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0`, `-p 1`.
Only focused tests run locally because the shared Mac is loaded.

- `go test -p 1 ./internal/wire -run 'TestProtocol32ChangeDiffs|TestDisplayPatchBounds' -count=1`:
  failed first (missing types), then passed after implementation. Strict
  downgrade rejects upload frames and removes the report reference below 32.
- `go test -p 1 ./internal/diffscan -run TestScanClosed -count=1`:
  failed first (missing Check), then caught encoded-token and private-key-header
  gaps. Added decoded-layer token detection and conservative private-key-header
  withholding. No fixture weakened to accept those cases.
- `go test -p 1 ./internal/runner/thin -run 'TestCollectChangeDiffs|TestDisplayPatchClip' -count=1`:
  failed first (missing collector), then passed. Covers Unicode rename, clean
  text, secret withholding, binary, large blobs, cancellation and patch caps.
- `go test -p 1 ./internal/equipo/chat -run 'TestChangeDiffUploadBinding|TestChangeDiffPublicationAndRead' -count=1`:
  failed first (missing upload/read functions).

## Result

Protocol 35 transports complete bounded file patches separately from task views.
The instance checks runner, person, task, step, attempt, base, candidate, digest,
path, byte count and collection binding, and scans before storing. Only a
matching accepted Engineering report publishes the collection. Device reads
use task-read visibility, exact listed paths, a second roster/candidate check
and no-store. Patches never enter lists, snapshots or Coordinator prompts.

Limits: 200 files, 1 MiB/blob, 8 MiB input, 64 KiB/2,000 complete lines/file,
2 MiB/candidate, 128 KiB encoded response, 10 seconds collection time. Unaccepted
bytes expire after 15 minutes; accepted bytes after seven days. The sweep and
uploads prune expired bytes. Superseded candidates are deleted even if the next
runner uploads no replacement. A private attempt-bound deadline preserves the
expired state after pruning. Collection failure leaves Engineering unchanged;
the existing Review measurement test proves identical gate results before and
after display collection.

Native renders selectable plain monospaced text with added/removed styling,
character wrapping on iPhone and horizontal scrolling on Mac. Open on Amadan
stays outside the scroll area. Late or mismatched file/candidate responses are
discarded. All unavailable reasons retain the Amadan action.

## Validation

Restored-code focused Go tests passed with Go 1.26.11, CGO disabled,
GOMAXPROCS=2 and `-p 1`:

- Wire protocol/downgrade, patch shape and all display bounds.
- Shared scanner: encoded/known tokens, private key headers, cancellation,
  oversized input, and hostile repository scanner settings.
- Runner: clean patches, Unicode rename, initial commit, binary/oversized blobs,
  input caps, complete before/after scanning, clipping and hostile Git config.
- Store: upload bindings, replay, publication, expiry, candidate retention,
  tampering, encoded response cap, revoked membership and stale-candidate race.
- `TestContractChangeDiffs`: real stream upload/report/device read, no-store,
  no patches in ordinary task views and unchanged merge authority.
- `TestConversationMigrationSnapshot`, `TestAPIErrorCopyKeys`,
  `TestOpsAreWhatTheHandlersWrite|TestSchemaFollowsEncodingJSON`.
- `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`:
  two table-driven tests passed for transport/bounds/plain line styling and
  late-response cancellation.
- Native fixtures/schema, 334 exact web strings, identity and sign-in lifetime
  checks passed. Mac and unsigned iPhone Simulator builds passed.
- `make fmt-check`, `make budget` (93 directories) and `make copy-release-check`
  passed. Size allowances use measured counts, retaining earlier reasons.
  The new GET has a device-only JSON perf record: indexed lookup, no Git/network.

The loaded-machine instruction overrides the usual full local gate. No full
native/Go suite or local perf run; Linux CI is the full Go/performance gate.
Its exact-head verdict is delivered with the SHA. The added UI test was not
run; direct fixture-app screenshots were inspected instead. The owned simulator
was stopped/deleted and the fixture Mac app stopped.

## Mutation results

52 mutations killed, then restored. Commands below returned nonzero with a
relevant failing assertion. Two initially invalid scan mutants were repaired
and rerun. Initially surviving fixtures were strengthened: isolate newline and
UTF-8 guards, use a valid index/total pair, test blob caps directly, and use
distinct before/after files so Git rename detection cannot mask a removed scan.

- `runner` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `person` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `attempt` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `base` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `candidate` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `engineering` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `running` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `retired` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `cancel` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `moving` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `size` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `digest` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `order` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `candidate-byte-cap` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `file-count` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `instance-rescan` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `accepted-only` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `expiry` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `response-cap` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `wire-path` in `internal/wire/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestDisplayPatchBounds -count=1`.
- `wire-bytes` in `internal/wire/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestDisplayPatchBounds -count=1`.
- `wire-lines` in `internal/wire/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestDisplayPatchBounds -count=1`.
- `wire-utf8` in `internal/wire/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestDisplayPatchBounds -count=1`.
- `wire-nul` in `internal/wire/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestDisplayPatchBounds -count=1`.
- `wire-withheld` in `internal/wire/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestDisplayPatchBounds -count=1`.
- `scan-known` in `internal/diffscan/scan.go`: **KILLED**. `go test -p 1 ./internal/diffscan -run TestScanClosed -count=1`.
- `scan-decoded` in `internal/diffscan/scan.go`: **KILLED**. `go test -p 1 ./internal/diffscan -run TestScanClosed -count=1`.
- `scan-private-header` in `internal/diffscan/scan.go`: **KILLED**. `go test -p 1 ./internal/diffscan -run TestScanClosed -count=1`.
- `scan-rules` in `internal/diffscan/scan.go`: **KILLED**. `go test -p 1 ./internal/diffscan -run TestScanClosed -count=1`.
- `scan-inline-ignore` in `internal/diffscan/scan.go`: **KILLED**. `go test -p 1 ./internal/diffscan -run TestScanClosed -count=1`.
- `runner-blob-cap` in `internal/runner/thin/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/runner/thin -run TestCollectChangeDiffs|TestDisplayPatchClip|TestDisplayBlobSafetyAndInputBudget|TestCollectionScansBeforeAfterAndBeyondCut -count=1`.
- `runner-aggregate` in `internal/runner/thin/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/runner/thin -run TestCollectChangeDiffs|TestDisplayPatchClip|TestDisplayBlobSafetyAndInputBudget|TestCollectionScansBeforeAfterAndBeyondCut -count=1`.
- `runner-mode` in `internal/runner/thin/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/runner/thin -run TestCollectChangeDiffs|TestDisplayPatchClip|TestDisplayBlobSafetyAndInputBudget|TestCollectionScansBeforeAfterAndBeyondCut -count=1`.
- `runner-before-scan` in `internal/runner/thin/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/runner/thin -run TestCollectChangeDiffs|TestDisplayPatchClip|TestDisplayBlobSafetyAndInputBudget|TestCollectionScansBeforeAfterAndBeyondCut -count=1`.
- `runner-after-scan` in `internal/runner/thin/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/runner/thin -run TestCollectChangeDiffs|TestDisplayPatchClip|TestDisplayBlobSafetyAndInputBudget|TestCollectionScansBeforeAfterAndBeyondCut -count=1`.
- `runner-line-cap` in `internal/runner/thin/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/runner/thin -run TestCollectChangeDiffs|TestDisplayPatchClip|TestDisplayBlobSafetyAndInputBudget|TestCollectionScansBeforeAfterAndBeyondCut -count=1`.
- `native-bearer` in `native/apple/Sources/EquipoKit/API/ChangeDiff.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `native-response-cap` in `native/apple/Sources/EquipoKit/API/ChangeDiff.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `native-task` in `native/apple/Sources/EquipoKit/API/ChangeDiff.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `native-candidate` in `native/apple/Sources/EquipoKit/API/ChangeDiff.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `native-path` in `native/apple/Sources/EquipoKit/API/ChangeDiff.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `native-byte-cap` in `native/apple/Sources/EquipoKit/API/ChangeDiff.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `native-lines` in `native/apple/Sources/EquipoKit/API/ChangeDiff.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `native-late-response` in `native/apple/Sources/EquipoKit/Presentation/ChangeDiffModel.swift`: **KILLED**. `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests`.
- `publication-hash` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `second-candidate` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `second-roster` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `prune-pending` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `discard-superseded` in `internal/equipo/chat/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/equipo/chat -run ^TestChangeDiff -count=1`.
- `frame-downgrade` in `internal/wire/runners.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestProtocol32ChangeDiffs -count=1`.
- `report-downgrade` in `internal/wire/runners.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestProtocol32ChangeDiffs -count=1`.
- `complete-lines` in `internal/wire/change_diffs.go`: **KILLED**. `go test -p 1 ./internal/wire -run TestDisplayPatchBounds -count=1`.

Raw mutation scripts/results and validation logs are archived beside the
screenshots in `site/build/slice5b/validation/`, outside this repository.

## Screenshots

`~/amadan.net/oficina/polish-audit/equipo-daily-driver/site/build/slice5b/`:
`iphone-diff.png`, `iphone-diff-large.png`, `mac-diff.png`. Production sheet,
fake device transport, long lines; the large iPhone capture uses Accessibility
XL. Wrapping, scrolling and the visible Amadan action were inspected.

## Copy review

Luna approved all five on 2026-11-26, replacing the unavailable sentence below.
The source and both native catalogs now record that approval.

- `native.diff.withheld`: This file’s changes are hidden because they may contain a secret.
- `native.diff.too_large`: This file is too large to show here.
- `native.diff.unavailable`: These changes aren’t available. Open on Amadan to review them.
- `native.diff.expired`: These changes have expired. Open on Amadan to review them.
- `native.diff.truncated`: Only part of this file’s changes is shown. Open on Amadan for the rest.

Binary reuses `native.changes.binary`. Stale-candidate errors use the literal
reviewed `preview_changed` code and `api.preview_changed` words. No server copy
was added. Native copy review is resolved; Fable review remains with the controller.

## First Linux CI result and corrections

58c9c213 compiled and passed the copy step. CI caught a stale protocol-99
negotiation expectation (31 instead of 32), four budget reasons over 200 bytes,
and the new scanner package's missing budget TestMain hook. Fixed those test
integration issues and reran their narrow checks. The same run had timeouts in
TestContractChecksPlacedOnTheWorker, TestBrowserCopyContinue and webread's
TestTimeouts; all three passed their automatic retries. No timeout assertion or
production behavior was weakened. The subsequent head is the final CI gate.

Staticcheck also rejected the deprecated detect.Fragment API. The scanner now
uses the supported DetectSource API with one complete bounded in-memory
fragment, no path and no filesystem/archive reader. Govulncheck found reachable
GO-2026-6888, GO-2026-6865 and GO-2025-3922 through the newly imported scanner.
Raised only the named dependencies to patched versions: brotli 1.2.7,
klauspost/compress 1.20.2, and ulikunitz/xz 0.5.15. Gitleaks and its embedded
rules remain pinned at 8.30.1. No finding was suppressed.

After correction, the focused scanner/runner/store/stream tests passed.
Staticcheck v0.7.0 and govulncheck v1.8.0 on internal/diffscan, targeting
linux/amd64, passed; govulncheck reported zero reachable vulnerabilities.

Luna follow-up: regenerated catalogs, string checks and parity passed.
The implementation head 05c89179 passed Linux CI including perf before this
copy-only follow-up; delivery reports the new head and its CI verdict.

## Fable delta review, 2026-11-26

The normal merge of main includes `602b91fe` (the landed check-db diagnostic).
Main had meanwhile shipped unfinished-work capability 32, and the controller
reserved 33 for the open Assistant attachments branch. The controller allocated
`ProtocolChangeDiffs = 34`. Diff references and frames are stripped/refused for
32 and 33, with frozen StepReport key sets and unfinished-work semantics tested.
The controller will not land or release this branch before
`design/assistant-attachments` (protocol 33) lands. If that branch stalls, the
controller will coordinate renumbering. Keep 34 meanwhile. No code from that
open branch was merged.

The instance computes `hidden_characters` from every Unicode Cf code point on
the returned patch. This covers bidi controls, marks, isolates, zero-width
characters and other format characters. Patch bytes and collection hashes stay
unchanged; this is a device response field, not runner-supplied authority.
Native also detects the characters locally for older responses. It shows the
approved notice and renders each character as a highlighted code-point marker.
The initial Mac cap and original-byte Copy described by this review have been
replaced by the second-review fixes below. Both platforms now wrap all text,
and Copy contains the displayed markers.

The new notice is `native.diff.hidden_characters`: “This file contains hidden
characters that can change how code reads. They are shown as codes.” Approved
by Luna, 2026-11-26, in both generated catalogs. Copy reuses `chat.paste.copy`.

The shared runner/instance scanner now refuses URLs with nonempty embedded
passwords, before and after supported decoding. Detector panic and error tests
exercise the actual detector boundary as well as rule-loading failures.

Tests were extended before implementation: the password fixture failed at
runtime; missing hidden-character fields/rendering helpers failed to compile.
Focused wire/scanner/store and native tests then passed. Mutation outcomes and
final validation are recorded below before delivery. Local commands remain
limited to two workers and focused tests under the loaded-Mac ruling.

All seven reported survivor mutations now fail at runtime: own forge credential
omission, scanner panic as clean, scanner error as clean, nonliteral pathspecs,
runner candidate-byte cap removal, retired-step read allowance, and publication
with fewer files than the facts. The literal-path regression exercises both
blob lookup and the diff command; the latter catches Git wildcard expansion.

Additional killed mutations: embedded-password scan removal, hidden-character
flag removal, Unicode Cf detection removal, native marker removal, notice
removal, Mac line cap removal, and loss of the full copy text. All mutations
were restored. Logs and scripts are archived in `site/build/slice5b/validation-review/`.

Focused wire/scanner/store tests passed; runner diff tests passed (7.770s),
including real Git candidate caps and credential withholding. The device
contract sends a hostile bidi patch through the real upload/report/read route
and verifies the flag and unchanged bytes (1.364s). Native ChangeDiffTests
passed, as did string parity, catalog checks, Mac build, iPhone Simulator build,
formatting, measured size budgets and release-copy checks.

An overly broad local `Test.*Diff` selector also picked unrelated
`TestPreviewRejectsDifferentAncestor` (local preview scanner unavailable) and
`TestTokenCheckUnfinished` (token-card timeout). Neither assertion was changed;
the corrected focused selection passed. Linux CI remains the full gate under
the controller's instruction to avoid full local suites.

New visual evidence: `mac-hidden-characters.png` and
`iphone-hidden-characters.png` in `site/build/slice5b/`. Both use the production
diff sheet and fake device transport, with RLO/PDF and zero-width-space code
markers and the reviewed notice. No real project or credential is involved.

CI at `daeedf1e` found the device schema's new flag did not match the generated
contract: the always-emitted bool must be required, and its description belongs
in `wireschema` as well as the generated document. Both are corrected. The
focused `TestPersonAPIDeviceContract` is now included in local validation.

## Second Fable review: visible characters and complete Mac text

The Go flag and native presentation now cover every Cf and
Default_Ignorable_Code_Point, U+2028/U+2029, and every Cc except TAB and LF.
The controller explicitly keeps LF structural. CR is marked, including in
CRLF files; that case also displays the approved hidden-character notice.
NUL remains refused by patch validation, and is still covered by the display
predicate. Original patch bytes, path acceptance and merge authority do not change.

`internal/wire/testdata/hidden-codepoints.json` is consumed by Go and Swift:
65 ranges, 4,422 code-point cases including visible/structural negative cases.
Its Cf and Default_Ignorable ranges come from Unicode 17's
[UnicodeData](https://www.unicode.org/Public/17.0.0/ucd/UnicodeData.txt) and
[DerivedCoreProperties](https://www.unicode.org/Public/17.0.0/ucd/DerivedCoreProperties.txt).
The fixture includes all default-ignorable ranges, including unassigned points,
Hangul fillers, CGJ, variation selectors and tags. The Go union of Cf,
Other_Default_Ignorable_Code_Point and Variation_Selector covers the same set;
Swift uses its scalar properties. Tests also pin Cf characters excluded from
Default_Ignorable_Code_Point, so dropping either class fails.

Mac now uses selectable NSTextView with character wrapping in the vertical
scroll view. There is no line truncation and no horizontal scroll requirement.
The layout regression measures the real text container at widths 240, 560 and
800, with 2,000 spaces before `evil()`, and verifies those glyphs are inside the
view's measured bounds. A separate 60,000-character line keeps its trailing code.
Rendering and whole-file Copy use the same visible text, including marker codes
and actual LF separators. The Copy button remains outside the patch and copies
the whole displayed file; native selection also copies only visible text.
File rows, folder headers, rename sources, accessibility labels and the sheet
header use the same escaping. Request URLs still use the original validated path.

The CRLF regression exposed another issue: Swift Character treats CRLF as one
grapheme, so the old suffix check rejected it and the line counter missed it.
Both now inspect Unicode scalars, matching Go. CRLF is accepted within the bounds,
renders `⟨U+000D⟩` before each real line break, and counts toward the 2,000-line cap.
The scanner now also withholds empty-username password URLs such as
`redis://:secret@host`; runner collection and instance acceptance tests cover it.
No new copy was introduced.

Test-first evidence (logs in `site/build/slice5b/validation-review2/`):

- `GOMAXPROCS=2 GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0 go test -p 1 ./internal/wire ./internal/diffscan -run 'TestPatchHiddenCharacters|TestEmbeddedPasswordURL' -count=1` failed for missing scalar classes and the empty username, then passed.
- `swift test --package-path native/apple --jobs 2 --filter ChangeDiffTests` failed for missing markers, raw Copy and lost trailing code. The added CRLF test separately failed three assertions before its fix.
- Restored `swift test --package-path native/apple --jobs 2 --filter 'ChangeDiffTests|ChangeFilesTests'`: 21 tests passed.
- Focused wire, scanner, chat, device route and generated OpenAPI contract tests passed, as did the runner credential/URL withholding test.
- String parity (334 web strings), catalog checks, API/Markdown fixtures, Oficina ID and sign-in lifetime checks passed. Mac and iPhone builds use two jobs. Full local suites remain deferred under the loaded-Mac ruling; Linux CI is the full gate.
- `make fmt-check budget copy-release-check` passed. Wire's measured source count is 7,535; no time budget was raised.

All 19 deliberate mutations failed at runtime, then were restored:

1. Go Cf detection removed.
2. Go Other_Default_Ignorable detection removed.
3. Go Variation_Selector detection removed.
4. Go Cc detection removed.
5. Go U+2028 detection removed.
6. Go U+2029 detection removed.
7. Empty URL username refused by the password detector's pattern.
8. Native Cf detection removed.
9. Native Default_Ignorable detection removed.
10. Native Cc detection removed.
11. Native U+2028 detection removed.
12. Native U+2029 detection removed.
13. Copy returns original hidden bytes.
14. File name rendering returns raw paths.
15. Rename source rendering returns raw paths.
16. Display cuts a line at 2,000 characters.
17. Character wrapping replaced by clipping.
18. CRLF line counting reverted to Character iteration.
19. CRLF suffix validation reverted to Character suffix matching.

The mutation runner, exact commands and per-mutation logs are archived with the
validation evidence. Protocol remains 34. The controller will land/release only
after Assistant attachments 33 lands, or coordinate a separate renumbering.

Visual evidence was recaptured from this branch: `iphone-hidden-characters.png`,
`mac-hidden-characters.png`, `mac-hidden-filenames.png`, and `mac-long-line.png`
in `site/build/slice5b/`. The long-line capture visibly includes `evil()` after
2,000 spaces. All were inspected. The owned simulator was terminated, shut down
and deleted, and the Mac fixture apps were closed after capture.

## Held-branch follow-ups after approval of be924467

Protocol remains 34 and the branch remains held for Assistant attachments 33.
The Mac paragraph style now gives wrapped continuations a font-relative hanging
indent (three times the font’s point size), while each original diff line
starts at zero. The real NSTextView layout test verifies that `evil()` after
2,000 spaces is below and to the right of its original `+`, at three view widths.
The indent is layout, not inserted text, so Copy retains the displayed contents.

FE0E and FE0F immediately after an allowed pictographic base remain in their
normal presentation, without a marker or hidden-character flag. Following the
controller's tightening of 37e88207, Go and native use the same pinned Unicode 17
intersection of Emoji and Extended_Pictographic, excluding bases below U+00FF
and U+203C, U+2049 and U+2122. This retains ⚠️ while excluding ASCII digits, #,
*, ©, ®, ™, ‼, ⁉, regional indicators and emoji modifiers. The source is Unicode's
[Emoji data](https://www.unicode.org/Public/17.0.0/ucd/emoji/emoji-data.txt).
The shared fixture checks every allowed base with both selectors and every
removed Emoji base, plus explicit identifier and keycap sequences. It contains
412 ranges and 7,664 cases. `admin1` + FE0F, `1` + FE0F, `#` + FE0F, `©` + FE0F,
and digit/#/* keycaps all keep their visible selector markers and flags.
Selector-only text, ordinary text bases, intervening whitespace, repeated
selectors, other variation selectors and tags still get markers and flags.
Filename rendering and Copy share the same contextual exception. The generated
OpenAPI description documents it; no protocol or copy change is involved.

The new shared-fixture cases failed on Go and Swift before implementation.
The added native layout assertions also failed because the continuation's x
coordinate was zero. Focused tests then passed. Machine checks precede each
heavy command: `sysctl -n vm.loadavg`, `sysctl -n vm.swapusage`, and the process
list, collapsing children of one heavy job. Commands wait above load 20 or when
two other heavy jobs are running. Jobs run serially, with four workers and a
10-minute timeout; no local full gate or unfiltered suite is run.

All 11 follow-up mutations failed at runtime and were restored: omit FE0E,
omit FE0F, omit the Emoji-base guard, remember the last Emoji instead of the
immediate predecessor, and exempt other selectors/tags (each on Go and native),
plus removal of the Mac hanging indent.

The tighter-base regression first failed with the old implementation on both
sides (Go's shared fixture; native's 8-test diff suite, 400 assertion issues).
After implementing the restricted tables, both passed. Eight further mutations
were killed at runtime and restored: re-enable ASCII bases, re-enable ©/®,
re-enable ™/‼/⁉, and re-enable non-pictographic Emoji bases (regional indicators
and modifiers), each in Go and native. These tests cover visible rendering,
the hidden-character notice, and exact displayed Copy text, including keycaps.
The existing Mac continuation screenshot remains representative: ⚠️ is still an
allowed pictographic pair, and the FE0F after ordinary text remains marked.

Final narrow validation:

- `GOMAXPROCS=4 GOTOOLCHAIN=go1.26.11 CGO_ENABLED=0 go test -p 4 ./internal/wire ./internal/plan3test -run '^(TestPatchHiddenCharacters|TestPersonAPIDeviceContract)$' -count=1`: passed.
- `swift test --package-path native/apple --jobs 4 --filter ChangeDiffTests`: 8 passed after restoring mutations.
- `swift build --package-path native/apple --jobs 4 --product EquipoMac`: passed.
- Native catalog and web parity checks passed. `make fmt-check budget` passed,
  with wire remaining within its 7,709-line cap after restricting the base table.
- `mac-long-line.png` was recaptured and inspected: `evil()` is visibly indented
  under its `+`; `⚠️` keeps its normal presentation, while FE0F after `x` is marked.
  The bounded capture process terminated and waited for its fixture app. No
  simulator was needed or started for these follow-ups.

Commands, machine checks, red/green and mutation logs, and the final CI receipt
are archived in `site/build/slice5b/validation-held-followups/`.

## Renumbered to protocol 35 (2026-11-27)

Main landed `ProtocolAssistantFiles = 33` and `ProtocolPlaces = 34`, so
this branch merged origin/main `be28c0c8` normally and moved to
`ProtocolChangeDiffs = Protocol35` (`ProtocolCurrent`).

- **Downgrade (`runners.go`).** Encode runs the diff step first: it refuses a
  `change_diff` upload below 35 and drops a step report's `change_diffs`.
  Main's Places (below 34) and Assistant-files (below 33) downgrades follow,
  and accumulate `changed` instead of overwriting it.
- **Frozen key sets.** StepReport keys are frozen and identical at 32, 33 and
  34 (main changed no StepReport field); `TestDiffDowngradeFrozen32To34` checks
  all three. Main's Places test (byte-identical at 34, refused or dropped
  at 33) and its Assistant-files test (byte-identical at 33) are unchanged
  apart from the current/`Spoken(99)` value.
- **Current-protocol assertions.** Every one now names `ProtocolChangeDiffs`,
  or 35. Negotiation now maps 35 to 35 and 99 to 35.
- **Migration.** The branch's `0111_change_diffs.sql` collided with main's
  `0111_notification_actions.sql`. It was renamed to `0113_change_diffs.sql`
  and its schema block follows main's 0111 and 0112 in `schema.sql`.
  `Models` lists both new records.
- **Runner wiring (`run.go`).** Main's Engineer gained `ConfirmMint` and
  `SiteChanged`; the branch's `DiffSecrets` is kept beside them.
- **OpenAPI.** A structural three-way merge of base, branch and main. It
  had no conflicts, and its changes from main are additions only (ChangeDiff
  and its operation beside RetryTask, places and `placement_question`).
- **Strings.** `strings.json` keeps both sides' keys. `check-strings.py`'s
  approval comment rule adds the `native.diff.` prefix to main's rule, and
  the catalogs were regenerated with `--write`. No new strings.
- **Budgets.** Size exemptions were raised to the measured counts. Main's
  card-read comment and the branch's diff perf skip are both kept.

Checks:

- `./internal/wire/...` passes.
- These pass with `-tags testbuild`: `internal/equipo` (migrations and
  snapshot), `chat`, `thintest` and `plan3test` for Diff, Place,
  AssistantFile, Protocol and Contract, and `runner/thin` for TestChangeDiff,
  TestDiff, TestPlaces and TestAssistantFile.
- Linux build, budget size, TestBudgetRecordsAreShort, plan3-copy-check and
  check-strings pass.
- Native `ChangeDiffTests` pass: 8 of 8.
- A wider `runner/thin` selection hit three tests:
  `TestPreviewRejectsDifferentAncestor`, `TestPreviewReplacesInPlace` and
  `TestResearchHandoffNothingToPlace`. Those are among the known
  macOS-unreliable tests in that package, so hub CI decides them.
