S4: agent-held VNC sessions, macOS Screen Sharing spike and codec benchmark #35
Open
opened 2026-10-06 15:42:37 +00:00 by kayg
·
49 comments
No Branch/Tag specified
main
j470b-server-mesh-rejoin
mesh-compat-382
j444b-d381-key-wins-flood
j461b-macos-utun-reader-thread
j475b-remove-host-motion
fix-reconnect-new-link
j481-d380
dev
j479-mesh-soak
fix/j476-host-facts
j475-motion-pill-split
j470-mac-node-join
root-upgrade-d376
j474-review-merge
latency-targets-120hz
nightly-suite-shards
gotatun-pin-j469
macos-utun-reader-thread
fix-flood-echo-stall
wip/j416
motion-fast-ease-out
mesh-addhost-j259
takeover-close-terminals-d368
kbd-instant-followups
fix-trust-key-double-click
nightly-suite-partial-report
appwin-icons-j207
rusqlite-slice1
swipe-content-first-d374
mesh-mtu-381
addhost-instant-open
glass-contrast-d365-mock
glass-contrast-d365
signout-followups-442
fix-startup-toast-red
research-gotatun-matrix-j317
themes-sync-j304
fix-load-flakes
fix-nix-zig-patch
fix-compute01-browser-baseline
ratchet-size-baseline-419
predict-auto-d130
revoke-coverage-d367
nightly-suite-queue-timeout
nightly-browser-suite
fix-rustsec-2026-0459
fonts-ioskeley-obel
log-retention-d375
fix-kbd-no-anim-427
fix-dev-red-specs-2
takeover-proof-305-j205
wip/j410-server-pump
ui-consistency-d372
fix-osc52-clipboard
libghostty-vt-1.0
forget-retired-host-d369
j404-merge-426
fix-setup-lock-race
fix-touch-select-426
revoke-access-report-ui
fix-predictive-echo-specs
fix-selinux-agent-exec
wip/j395-checkpoint2
wip/j395
j391-review-scratch
ui-consistency-j195-deferred-rebased
fix-rustc-paths-421
decisions-wording-341
fix-install-suite-red
fix-dev-rtt-specs
fix-pending-removal-align
fix-privileged-skip
fix-install-suite-404
review-j368
mesh-dns-j254
revoke-access-report-d356b
revoke-privilege-round5
fix-removal-confirm
review-j360
gotatun-rotation-367
deps-refresh-340
review-j354
review-J351
review-j350
addhost-takeover-d359
revoke-report-items-347
revoke-end-sessions-d362
review-j348
size-mesh-ssh-346
size-trim-337
revoke-access-diff-d356
j259-pre-rebase-b06c5a6
j305-ended-at-start-spec
addhost-sudo-consent
fix-layout-real-specs-411
fix-shell-open-411
fix-console-hosts-373
fix-shell-exit
fuzz-host-name-353
fix-host-details-410
macos-filter-j197
research-gotatun-tricks
revoke-p3-j216l
stale-state-pill
revoke-followups-j216k
revoke-progress-j216e
backup/macos01-20261106/lume/j197
backup/macos01-20261106/lume/appwin-icons-j207-stash0
backup/macos01-20261106/claude/stash-0
backup/macos01-20261106/claude/stash-1
backup/macos01-20261106/claude/J80-macos-s1
backup/macos01-20261106/claude/J80
backup/macos01-20261106/claude/J80-slice1-20261102
backup/macos01-20261106/claude/J16b-appwin-on-dev
backup/macos01-20261106/claude/appwin-launch-idle-146
backup/macos01-20261106/claude/J80-s1-run
wip/j259
trust-285-p3c
runtime-lock-j216f
mesh-ssh-p3-j175
tun-proof-p3b
trust-285-p3
terminal-polish-j271
tun-proof-p3
ssh-install-flakes-j216i
fuzz-fixes-j264
trust-285-a
trust-285-b
restart-oversized-fixture-j198
backup/macos01-20261106/lume/appwin-icons-j207
restart-bound-j216h
up-preflight-p3-j198
backup/macos01-20261106/lume/j251
up-preflight-j198
wip/up-preflight-j198-j245-p2
wip/up-preflight-j198-j245-p1
agent-fsync-offloop-j196
wip/up-preflight-j198-j245
settings-offscreen-j231
wip/up-preflight-j198-j226-inspection
wip/j103f
themes-j206
wip/up-preflight-j198-j226
flakes-j216c
backup/macos01-20261106/claude/j197
flakes-j216b
backup/macos01-20261106/claude/j197-red
wip/up-preflight-j198-review
flakes-j216
backup/macos01-20261106/claude/appwin-icons-j207
engineering-j208b
appwin-mock-j209
toast-stack-j165
engineering-j208
decisions-d351
decisions-d350
decisions-d349
appearance-presets-mock-j129
decisions-d348
docs-audit-spec
doc-coverage-baseline-raise
decisions-d347
decisions-d346b
decisions-d346
j88h-profile
ui-consistency-j195-deferred
ui-consistency-j195
engineering-practices-j194
preferred-login-ui-j166
signin-pools-263-j174
macos-node-265-s1
decisions-d345
decisions-d344
proxy-cgroup-j164
verify-quick-fuzz-329
proxy-start-io-j168
timing-flakes-j163
up-263-s1
mcp-events-j147
verify-quick-fuzz-j158
proxy-p3-j159
agent-resource-j157-detect
wip/j103d-final
remote-cancel-hang-j155
proxy-traefik-281-j62d
j149-verify-quick
proxy-traefik-281-j62b
j150-drop-unnamed
wip/j79d-red-r4
wip/j103d-d332
rootless-toast-j142
wip/j103d-head
wip/j103d
j125c-mcp
macos-build-j136
backup/macos01-20261106/claude/j136
wip/j79d-red-cli
wip/j79d-red-server
j121-link-liveness
j118c-tracer-failures
wip/j79c-head
release-desktop-j131
j124c-signed-macos
wip/j79c-red-p3
wip/j79c-red-p23
wip/j79c-red-p22
merge-j128-check
perf-deferred-j128
sidebar-toggle-260
j127-shortcut-changed-dot
j125-mcp
j118-tracer-failures
j126-account-summary
settings-sections-mock-j92
j120-pinch-lock
sidebar-292
backup/macos01-20261106/claude/j120
taste-2026-11-03
row-actions-242-215
backup/macos01-20261106/claude/stash-0-untracked
backup/macos01-20261106/claude/J80-265-s1-run
backup/macos01-20261106/claude/J80-macos-s1-20261102
j112-canvas-commands
ui-no-overshoot-scroll
fix-recovery-restart
backup/macos01-20261106/claude/stash-1-untracked
taste-2026-11-02
size-baseline-ratchet
machine-cards-structure-j108
j109-boot-copy-mockups
fix-dev-red
wip/up-263-s1
j95b-settings-rows
proxy-traefik-281
j95-option-rows
docs-human-j91
docs-keys-palette
fix-flood-1013-270-j38d
mesh-ssh-s1
mesh-ssh-s0
addhost-d291-tunnel
test-stability-load
mesh-relay-220
repro-296
shim-thp-off-24
mesh-pins-258-v2
mesh-dns
signin-d311-merged
docs-pages
ui-size-283
fix-ui-batch-specs
wip/j12b-edge-update
gate-on-arm
fix-rename-sync-293
trust-285-j60b
fix-focus-ring-clip
integ-ui-1101
edge-update-v2
signin-d311
taste-2026-11-01
layout-per-tab-250
ui-approved-splitopt-224
ui-approved-splitopt-224-on-dev
icon-text-centre-282
ui-approved-189-212-216
research-reverse-proxy
transfer-budget-320
review-mesh-pins-258-r2
sidebar-pill-259
review-mesh-relay-220
wip/j12-edge-update-v2
nix-package
status-crash-loop-237
fix-dev-test-failures
fix-fixture-socket-path
wip/mesh-relay-220-pre-dev-advance-rebase
fix-canvas-side-clip
research-head-to-head
frosted-real-256
review-mesh-pins-258
wip/mesh-relay-220-pre-final-rebase
review-layout-per-tab-250-r2
broad-suite-triage
nix-devshell
review-status-crash-loop-237-r3
wip/nix-devshell-pre-p3
taste-frosted-real
wip/code-serve-demo-2026-10-30
wip/code-serve-glass-2026-10-30
wip/code-serve-clusters-2026-10-30
wip/code-merge-release94-dev-2026-10-30
wip/rproxy-delta-scratch-2026-10-30
wip/stale-note-257-staged-2026-10-30
wip/d241-size-staged-2026-10-30
review-broad-suite-207
wip/mesh-pins-258-pre-split
wip/mesh-relay-220-pre-rebase
mesh-measure-220
plan-211-update
review-edge-autoupdate-r3
perf24-reconnect
review-stale-note-r2
release-prod-live
d241-shell-marker
review-mesh-pins-server-258
review-revocation-r3
review-setup-token-r2
review-sync-journal-r3
wip/review-mesh-pins-258-prune-review-1995fee46
frosted-scroll-256
sync-journal-r3
revocation-per-account-wip
review-tokio-asyncfd-0386
review-sync-p3s
wip/stash-8by64-stash0-2026-10-30
mesh-drag-r2
setup-token-data-wip
release-9-4
auth-busy-1013
mesh-view-overlap
sync-p3s
review-auth-busy-wake
review-readd-r8-wip
mesh-drag-bounds
audit-auth-93
app-windows-stream-start
review-authority-cap-r3
app-windows-r7-measure
readd-minimal-r6
readd-minimal-r5
app-windows-r7-soak
readd-minimal-r4
app-windows-r7
app-windows-r6
readd-minimal-r3
readd-minimal-r2
readd-minimal
merge-release8-dev
review-busy-page-liveness-r2
review-busy-page-liveness
mesh-view-trim
review-authority-read-retry-r2
review-remove-uninstall-r2
release-retry-reattach
release-retry
review-remove-uninstall
review-authority-read-retry
app-windows-ship
mesh-autoswitch-p2
mesh-ssh
mesh-relay
mesh-macos-node
screen-and-control
session-labels
review-real-logins-r5
review-real-logins-r4
review-real-logins-r3
shim-memory-r2
review-real-logins-r2
shim-memory
shadow-addhost-instant
shadow-real-logins
shadow-same-session-flood
shadow-prod-perf-fix
hosts-from-server
app-windows-real
app-windows-transport
release-prod-6w
mesh-policy-verify
quiet-close-toast
dev-merge-r4
review-mesh-agent-transport
review-app-windows-transport
settings-roundtrip
review-release-pipeline-r4
mesh-agent-transport
ended-strip-fix
review-audit-ca-update-d244
settings-rows
phone-width
signout-clear
fix-restart-tests
dev-merge-rp
signer-hardening
review-audit-ca-update
terminal-fidelity
review-audit-ca-update-wip
mesh-integrate
review-mesh-agent-transport-515d3712
review-mesh-dataplane-feec1988
mesh-dataplane
signout
research-canvas-node
wip/review-renderer-cost
wip/review-terminal-fidelity
padlock-glyph
review-release-pipeline-2e95b689
phone-polish
sidebar-polish
inbox-generic
review-mesh-dataplane-378d4055
prod-batch
ui-inbox
ui-ca-unlock
ui-machine-sections
review-mesh-dataplane-a5f744fb
tls-session-prod
session-bounds-prod
fix-dead-session
session-bounds
tls-session
palette-polish
shortcuts-d222
research-appmeta
phone-gutter
ui-centre-button
wip/ui-centre-button
wip/tls-session
review-addhost-breakit
ui-platform
renderer-cost
remote-agents
mesh-api
ssh-bootstrap
prod-hotfix2
prod-fixes
review-remote-agents
review-mesh-dataplane
session-life
research-browser
review-mesh-api
research-capture
review-mesh-api-round3
review-mesh-api-round1
gate-stability
review-gate-stability
review-relay-direct
review-mesh-api-findings
proto-sessions
font-picker
proto-addhost
proto-windows
mesh-core
latency-gate
research-bsd
research-discovery
keytray-mods
mock-core
ui-tweaks
fix-motion-sel
fix-motion
integrate2
fix-robust
t-web
t-server
vt-ghostty
fix-snap-echo
t-web-auth
review-vt2
t-agent
lane-protocol
lane-shim
lane-auth
s1-base
s1-contracts
s1-workspace
No results found.
No labels
launch-qa
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
kayg/infraternal#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
S4 remote desktop, after DECISIONS 104–107 (owner answers on #23):
Spike plan (measure, don't choose; the owner decides the engine):
Needs: a macOS target. The M5 Ultra Mac Studio when it arrives, or ask the owner about using the calternal macOS VM.
Target access checked (orchestrator, 2026-10-06):
netbird ssh --no-browser calternal@10.69.69.21works. The VM runs macOS 27.0 (26A428), arm64, 4 vCPU, 8 GB. It is shared with calternal, so the spike must not change system settings and must leave the VM as it found it.netbird ssh -L 15900:localhost:5900 calternal@10.69.69.21 'sleep N'exposes it on localhost:15900.RFB 003.889(Apple's dialect). The offered security types are 30, 33, 36, 31, 32, 35. Type 2 (VNC password) is not offered, so a session needs the Apple authentication methods (macOS account credentials).Open (owner): which macOS account and password the spike may use, and where they are stored (not in the repo, logs or argv). Until then the spike surveys authentication and benchmarks encodings on screen content captured over SSH.
Starting phase A on branch spike-vnc at base SHA
b66edda; reading existing #35 and parent #23 findings. No macOS account credentials are available, so the protocol survey will stop before authentication.Owner provided a macOS account for the spike (2026-10-06). It is stored at
~/.config/infraternal-secrets/macos-vnc.env(mode 600, keys VNC_USER and VNC_PASS). Load it into the environment only; never print it, pass it in argv, log it or commit it. Phase B (a real authenticated session) uses it after phase A reports.Handshake spike committed as
bb236e1d5a. Live probe against the SSH-forwarded macOS VM read RFB 003.889 and the six offered types [30,33,36,31,32,35]; selecting 30 sent one byte and closed before reading or answering auth. cargo build and cargo clippy both passed.Corpus step complete; manifest committed as
9819d80d50. The external corpus has 27 files / 146,739,237 bytes: 22 PNG stills at 5004x2652 and three 4-second H.264 captures at 4096x2170 (27, 51 and 45 frames). Terminal scroll and eight scripted window-movement positions are represented. worked over SSH. Payloads are in ; only hashes, sizes and capture metadata are committed in research/vnc/SPIKE-A-CORPUS-MANIFEST.md. The VM was left with the generated Terminal window closed and Notes foreground.Correction to the prior corpus comment: shell quoting removed the screencapture -v and scratch-path text. Corpus step complete; commit
9819d80d50indexes 27 external files / 146,739,237 bytes: 22 5004x2652 PNG stills and three 4096x2170 H.264 movies (27, 51, 45 frames). The videos were captured over SSH. Manifest: research/vnc/SPIKE-A-CORPUS-MANIFEST.md; payloads: /home/kayg/.cache/codex-scratch/spike-vnc/corpus/. The generated Terminal window was closed and Notes restored. No authentication data was read or sent.Rect codec finding (
d1afae3+f09773f): release Rust encoder measured 22 screenshot frames per codec/resolution, including dirty diff and crop. At 1280x800: JPEG q75 13.32/23.34 ms p50/p99, 48,948 B/frame, terminal PSNR 40.22 dB; WebP q75 30.73/59.19 ms, 20,950 B/frame, 42.35 dB; zstd L1 3.85/5.86 ms, 253,520 B/frame; LZ4 3.00/7.98 ms, 325,435 B/frame; QOI 2.97/5.10 ms, 234,352 B/frame. Chromium 153 decode p50/p99: JPEG q75 4.4/11.1 ms, WebP q75 4.5/10.9 ms, zstd WASM 2.9/11.2 ms, LZ4 WASM 2.0/5.1 ms, QOI WASM 4.9/15.5 ms. Results and 396-row per-frame dataset are in $HOME/.cache/codex-scratch/spike-vnc/rects/rects.json and browser-decode.json; runner is committed under research/vnc/benchmark/.Path clarification for the codec finding: benchmark outputs are at /home/kayg/.cache/codex-scratch/spike-vnc/rects/rects.json and /home/kayg/.cache/codex-scratch/spike-vnc/rects/browser-decode.json.
Rectangle benchmark step complete at
c550f5a: browser decoder now times canvas composite separately; 396 rows cover 22 stills, 9 codecs and 2 sizes. At 1280x800 JPEG q75 measured 13.57/24.22 ms p50/p99, 48,948 B/frame, 40.23 dB terminal PSNR; WebP q75 32.40/61.70 ms, 20,950 B/frame, 42.39 dB; QOI 3.65/5.26 ms, 234,352 B/frame and lossless. These wire rates use the 23 s still sequence; native changed-rect JPEG q75 took 206.3/353.5 ms. Browser timings are headless Chromium on the Linux host.H.264 benchmark step complete at
4d0fc55: 12 x264 cases, 180 frames each; all 12 decoded 180/180 through Chromium WebCodecs. At 1280x800, 4:2:0 CRF30 measured 1.79/7.45 ms encode wall p50/p99 (10.91/58.15 ms user+sys), 4,910 B/frame, 73.6 kB/s, terminal SSIM 0.999072 mean / 0.995984 min; browser decode 21.4/28.6 ms plus canvas 4.2/6.5 ms. At 4096x2170 the same setting had 14.08/26.90 ms encode wall and 88.4/99.4 ms browser decode plus 18.4/24.2 ms draw. Mac VideoToolbox was unavailable because ffmpeg is absent on the VM; no install was attempted.Runner cleanup finding: Chromium wrote into its temporary profile after its parent exited; one completed rect decode run wrote browser-decode.json but exited 1 with ENOTEMPTY removing .chromium-profile. Bounded fs.rm retries are in
de35df0; rerun completed with exit 0 and removed the profile.Authentication survey finding: live offer order is 30,33,36,31,32,35; type 2 is absent. I selected 30 only to confirm the selection byte, then closed before reading its challenge. The reverse-engineered Apple write-up describes AES-CBC/zero-IV for type-30 credentials, while current noVNC and TigerVNC code use AES-ECB; macOS 27 interoperability is unresolved. IANA does not explain 31/32. No credentials were read or used; the owner inputs and source links are recorded in SPIKE-A.md.
Correction to the earlier rectangle p50 figures: I used the lower-middle sample when summarizing 22 frames. Using the median (mean of the two middle samples) for the final table gives JPEG q75 13.76/24.22 ms, WebP q75 34.61/61.70 ms and QOI 3.66/5.26 ms p50/p99. Byte counts and quality figures are unchanged; SPIKE-A.md has the corrected values.
Report step complete at
e2ee906: research/vnc/SPIKE-A.md records the auth/source matrix, owner credential inputs, corpus reference, all 30 rectangle/H.264 cases and modeled stage budgets. Rechecked all 27 corpus manifest hashes/sizes against the out-of-repo corpus. No encoding or auth method is selected; open questions include the type-30 cipher discrepancy, types 31/32, phone/network targets and sessions per holder.Phase A complete on branch spike-vnc. HEAD
e2ee906b6b. Corpus and compact metrics remain in the permitted scratch directory; generated targets, codec payloads, FFmpeg intermediates, browser bundles/profiles and node_modules were removed. No push, deploy or issue closure.cargo build output:
Finished
devprofile [unoptimized + debuginfo] target(s) in 0.11scargo clippy output:
Finished
devprofile [unoptimized + debuginfo] target(s) in 0.09sStarting phase B on branch spike-vnc at base SHA
e2ee906b6b. Issue #35 and parent #23 comments are read; phase A findings and owner decisions are carried forward.Network baseline: NetBird SSH forward is active on 127.0.0.1:15900. PING 10.69.69.21 (10.69.69.21) 56(84) bytes of data.
64 bytes from 10.69.69.21: icmp_seq=1 ttl=64 time=154 ms
64 bytes from 10.69.69.21: icmp_seq=2 ttl=64 time=154 ms
64 bytes from 10.69.69.21: icmp_seq=3 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=4 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=5 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=6 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=7 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=8 ttl=64 time=182 ms
64 bytes from 10.69.69.21: icmp_seq=9 ttl=64 time=190 ms
64 bytes from 10.69.69.21: icmp_seq=10 ttl=64 time=156 ms
64 bytes from 10.69.69.21: icmp_seq=11 ttl=64 time=153 ms
64 bytes from 10.69.69.21: icmp_seq=12 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=13 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=14 ttl=64 time=153 ms
64 bytes from 10.69.69.21: icmp_seq=15 ttl=64 time=152 ms
64 bytes from 10.69.69.21: icmp_seq=16 ttl=64 time=153 ms
64 bytes from 10.69.69.21: icmp_seq=17 ttl=64 time=162 ms
64 bytes from 10.69.69.21: icmp_seq=18 ttl=64 time=776 ms
64 bytes from 10.69.69.21: icmp_seq=19 ttl=64 time=157 ms
64 bytes from 10.69.69.21: icmp_seq=20 ttl=64 time=154 ms
--- 10.69.69.21 ping statistics ---
20 packets transmitted, 20 received, 0% packet loss, time 19033ms
rtt min/avg/max/mdev = 151.914/188.068/775.816/135.210 ms received 20/20 (0% loss), RTT min/avg/max 151.556/229.208/1414.520 ms, mdev 277.305 ms; end-to-end latency samples will include substantial link jitter.
Dependency step complete at
3bb26c361e. Added auth and async WebSocket dependencies to the spike only; cargo check passed in 29.70 s using the required cache target. No product engine choice.Zeroization dependency step complete at
e9210eee39. is limited to byte buffers, which it can reliably wipe; Rust limbs do not expose a guaranteed wipe API, so that experiment-specific limitation is documented. cargo check passed in 0.50 s.Correction: the byte-buffer wiping dependency is zeroize, and Rust BigUint limbs still have no guaranteed wipe API. The limitation is specific to this temporary spike implementation. The
e9210eedependency step passed cargo check in 0.50 s.Type-30 auth step complete at
3f80228e18. In spikes/vnc/src/apple_auth.rs, ECB type 30 authenticated against macOS 27.0 build 26A428 after replying RFB 003.008 to 003.889. Result: 5004x2652, server pixel format 32 bpp / 24 depth / little-endian / true-colour / max 255,255,255 / shifts 16,8,0; desktop name calternal. Offered types remained [30,33,36,31,32,35], type 2 absent. Unit tests 2/2 and clippy passed. Since ECB worked, CBC and fallback types were not attempted.Framebuffer finding, first probe: spikes/vnc/src/rfb.rs authenticated successfully and negotiated 32 bpp / 24 depth, but over 10 seconds received only four metadata rectangles: Apple DisplayGeometry 1105, Capabilities 1107, KeyboardLayout 1109 and MachineModel 1110. Total was 255 RFB bytes; no Raw raster rectangle arrived. Isolating the SetEncodings offer and initial-update sequence before treating this as a server limitation.
Finding: type-30 auth reaches ServerInit, but a standard RFB probe receives only 4 Apple metadata rectangles (255 bytes, 120 bytes sent in 10 s) and no pixels. The reverse-engineered Apple flow requires ViewerInfo, encryption setup/rekey, then encrypted SetDisplayConfiguration/SetEncodings and AutoFrameBufferUpdate before raster delivery. Source: https://github.com/renegadelink/iShareScreen/blob/main/docs/apple_vnc_rfc.md. No VM settings were changed; implementing that bootstrap next.
Step complete: added the Apple 0x44f rekey unwrap and authenticated directional CBC record codec in spikes/vnc/src/apple_record.rs. Two focused tests pass (valid two-record chain and corrupt-tag rejection). Commit
5f6b814. This is protocol research from the reverse-engineered reference, not an engine choice.Step complete: type-30 auth now returns its MD5-derived wrap key in zeroizing storage for the Apple 0x44f rekey path. The existing synthetic-peer ECB auth test still passes. Commit
cbf0238.Finding: type-30 wrap-key derivation and Apple 0x44f rekey succeed (generation 1); record tags validate and encrypted client controls are accepted. After a static 0x1d descriptor, SetEncodings, non-incremental update request, and AutoFrameBufferUpdate, the VM sends 4 metadata-only rectangles (DesktopSize, 1107 VendorKeysym, 1109 KeyboardInputSource, 1110 DeviceInfo) and no pixel rectangle. Testing the physical-console path without a display descriptor next; no persistent VM settings changed.
Finding: the initial FramebufferUpdateRequest builder was 8 bytes; RFB requires 10. After correcting it, the live VM responds with Zlib rectangles (encoding 6), proving the physical-console path is active. The parser stopped at the first Zlib rectangle; adding a persistent inflater before continuing. This also confirms Raw is not the server-selected encoding for the advertised preference list.
Finding: the physical-console bootstrap reaches a complete 5004×2652 keyframe. ServerInit and client SetPixelFormat are both 32 bpp/24 depth, little-endian true-colour, maxima 255, shifts 16/8/0. First image was a Zlib (encoding 6) rectangle with 6,746,778 compressed bytes; macOS also sent DesktopSize (-223), VendorKeysym (1107), KeyboardInputSource (1109), and DeviceInfo (1110). It did not send Raw or CopyRect in this run. Startup metadata accounted for 7 preceding rectangles. Code now parses the persistent Zlib stream.
Task 1 complete in
2e7c368; cargo test passes 9/9. Live join-to-first-image is 7.910 s with AutoFBU and 10.277 s with 20 Hz incremental polling. In the incremental run, macOS sent 11 updates and 7,346,490 RFB bytes during the 10 s idle window (734,649 B/s received, 37 B/s sent). It selected Zlib (6), RichCursor (-239), DesktopSize (-223), and emitted Apple 1107 VendorKeysym, 1109 KeyboardInputSource, 1110 DeviceInfo. 1105 DisplayLayout was offered but not sent. Pixel formats and the type-30 ECB success are recorded above.Finding: the browser subscriber decodes/draws the first JPEG rectangle and WebCodecs H.264 keyframe. For a first 4-event JPEG pointer probe, server-acknowledged pointer overlay samples were 353.2, 244.9, 269.8, and 1010.9 ms; RFB arrival dominated (343.9, 233.2, 254.6, 997.1 ms). The holder draws the pointer overlay only after a subsequent RFB update carries that input sequence, so this is not browser-side optimistic echo.
Measurement finding: 200 unique input-to-canvas samples per browser encoding on infraternal-dev (8-core i9-9900K, 32 GiB) to VirtualMac2,1/macOS 27.0 (4 vCPU, 8 GiB), NetBird RTT 20/20 avg 152.111 ms. JPEG p50/p99 382.1/1031.9 ms; H.264 703.9/952.9 ms. Median stage times JPEG RFB/scale/encode/WS/decode/draw 360.2/10.5/1.0/0.6/1.6/0.1 ms; H.264 374.3/17.9/286.3/2.4/10.3/5.6 ms. H.264 currently starts one ffmpeg per frame. Capture JSONs are under the allowed scratch directory. The canvas change is a holder diagnostic pointer marker applied after the next RFB update carries the input sequence; macOS sent no PointerPos updates, so this is a server-round-trip proxy, not native cursor or camera-measured photon latency.
Task 2 complete at
8426daa: holder retains one 5004x2652 macOS RFB session and serves loopback HTTP/WebSocket subscribers. On the rebuilt release holder, first RFB image arrived in 3.419 s; the TCP connection remained established after JPEG and H.264 subscribers disconnected. Idle sample: 4 updates/15 s and 37,024 RFB bytes received (2,468 B/s); a later 15 s post-disconnect sample had no framebuffer updates and the holder remained connected.Task 3 complete at
2c3595e: Chromium decoded both WebCodecs H.264 and JPEG changed-rectangle subscribers to the 1280x800 canvas; pointer and keyboard messages route through the holder. The two 200-event captures are saved in the task scratch until report data is recorded: JPEG 382.1/1031.9 ms p50/p99; H.264 703.9/952.9 ms. No iPhone/Safari run was available.Parser finding and fix at
965235c: a 1 MiB Zlib payload length for a 1x1 rectangle previously reached allocation before EOF; the regression assertion failed before the bound and passes after it. Compressed bodies are now capped at decoded rectangle size plus 64 KiB (and 256 MiB absolute cap). Added fuzz targets for type-30 auth, Apple records, and RFB messages; runs completed 443, 891,239, and 60,769 cases respectively with no crash. Cargo tests pass 10/10.Task 5 and work complete at head
a557cc1633. Report: research/vnc/SPIKE-B.md. Type 30 ECB succeeded; JPEG/H.264 each have 200 samples; parser regression and three fuzz targets are recorded. cargo test passed 10/10, release build and Chromium smoke passed. Required gate output verbatim: zsh:1: no such file or directory: scripts/verify. Holder and NetBird forward are stopped, ports are closed, and the job scratch directory is removed. No encoding or engine was selected; no iPhone run was available.Starting phase C on branch spike-vnc at base SHA
a557cc1633. Read all comments on #35 and parent #23; carrying forward phase A/B measurements and owner decisions 104–107. Working in the prescribed scratch directory; the shared macOS display configuration will remain untouched.Task 1 finding: with a 1x1 nonincremental FBU request, 320 update replies in 25 s measured request-to-update p50/p99 46.267/129.407 ms; same-window ICMP ping averaged 153.148 ms (0% loss), so this RFB value is not a trustworthy symmetric-path RTT estimate. Four outstanding requests produced reply intervals 153.709/782.951 ms p50/p99 but queued request ages 614.866/938.921 ms; pipelining depth 4 worsened freshness. Apple 0x09 AutoFBU yielded only 3 full updates/10 s idle; standard ContinuousUpdates (150) and Fence (248) produced no reply/stream evidence. Continuing with encoding and scale measurements.
Task 1 refined with a direct-path probe: 20 TCP connects through local SSH forward 127.0.0.1:15900 to the RFB banner measured p50 158.706 ms, mean 162.894 ms (min/max 153.372/237.899 ms); contemporaneous 20-packet NetBird ICMP ping averaged 154.747 ms (0% loss). This matches the network floor. The prior 46.267 ms FBU age is not a valid RTT because replies were not causally correlated one-for-one with the request timestamps. Depth-4 queue-age result remains evidence against deep pipelining.
Task 2 completed; measured logs are in /home/kayg/.cache/codex-scratch/spike-vnc-c/runs/enc-*.log. At 5004x2652, macOS emitted ZRLE (~3,992,385 B/update; 31.6 ms full-rectangle inflate-only CPU), Apple 1000 (~128,241 B; 1.43–1.56 ms), Apple 1001 (~352,452 B; 4.05–5.90 ms), Apple 1002 (~1,716,205 B; 19.1–20.3 ms), and Apple 1011 (213,069–306,229 B full body; DCT decoder unavailable). The Apple CPU values exclude pixel reconstruction; 1011 handling-wall excludes actual DCT decode. Tight/Hextile/TRLE offers were previously answered with Raw (~53,082,444 B); CopyRect was not emitted on the static view. Candidate parser adds 2 bound tests; cargo test passes 12.
Task 3 completed. In a 6 s repeat, ScaleFactor 0.5 ended at retained framebuffer 2502x1326 (ServerInit still says 5004x2652; VM display settings were untouched). Full Zlib rectangles: native 5,065,408 B p50 / 5,065,419 B p99 and decode+pixel CPU 67.004/69.129 ms; scaled 1,525,880/1,526,114 B and 24.546/29.054 ms. That's ~70% fewer wire bytes and ~63% lower median decode/conversion CPU. Logs: /home/kayg/.cache/codex-scratch/spike-vnc-c/runs/poll50.log and apple-scale-half.log.
Task 4 completed in
4166e9a: one persistent ffmpeg/libx264 pipe emits an initial browser-decodable frame and then P-frames in a live Chromium smoke (10 successive input frames, no follow-up IDR). For those 10 1280x800 4:2:0 pointer-marker frames, encode p50/p99 10.648/12.960 ms and payload p50/p99 649/19,696 B; JPEG encode was 0.706/0.895 ms. The initial H.264 join image was 73,036 B. Full 200-event runs will use the post-input RFB probe because incremental pointer-only updates stopped after 104 events.Task 5 completed; artifacts: /home/kayg/.cache/codex-scratch/spike-vnc-c/runs/jpeg-200.json and h264-200.json (200/200 each, ~41 s each). Stages below are independent p50/p99 ms; H.264 uses persistent x264 P-frames after its join IDR. JPEG total 175.5/212.6; RFB 156.4/188.3; scale 9.9/26.6; encode 1.0/5.0; WS 0.8/10.8; browser decode 1.8/10.2; draw 0.0/0.2; payload 800/6,334 B. H.264 total 184.0/235.8; RFB 156.1/182.8; scale 6.3/20.2; encode 13.4/45.0; WS 0.6/5.7; decode 1.0/9.6; draw 4.7/12.2; payload 174/12,134 B. Each input was followed by a forced 1x1 FBU while the full incremental request remained active, so this reaches the RFB response floor but is not proof of OS input application/native cursor rendering. A pointer-only run without this probe stalled at 104 events. Terminal test typed then Backspace; each produced a canvas update (317/218 ms).
Task 5 completed; artifacts: /home/kayg/.cache/codex-scratch/spike-vnc-c/runs/jpeg-200.json and h264-200.json (200/200 each, about 41 s each). Stages are independent p50/p99 ms; H.264 uses persistent x264 P-frames after its join IDR. JPEG total 175.5/212.6; RFB 156.4/188.3; scale 9.9/26.6; encode 1.0/5.0; WS 0.8/10.8; browser decode 1.8/10.2; draw 0.0/0.2; payload 800/6,334 B. H.264 total 184.0/235.8; RFB 156.1/182.8; scale 6.3/20.2; encode 13.4/45.0; WS 0.6/5.7; decode 1.0/9.6; draw 4.7/12.2; payload 174/12,134 B. Each input was followed by a forced 1x1 FBU while the full incremental request remained active, so this reaches the RFB response floor but is not proof of OS input application or native cursor rendering. A pointer-only run without this probe stalled at 104 events. Terminal test typed p then Backspace; each produced a canvas update (317/218 ms).
CopyRect follow-up: offered CopyRect plus Raw for 30 s while producing Terminal output with jot 100 and paging through it. macOS sent Raw only (no CopyRect), including 1758x996 and 516x54 rectangles; the run received 116,765,900 B including two 53,082,444 B full rectangles. Evidence: /home/kayg/.cache/codex-scratch/spike-vnc-c/runs/enc-copyrect-scroll.log. This VM and quality tier did not use CopyRect for the tested scroll.
Task 5 final-code follow-up at
861ffe9; adjacent 200-event runs are in jpeg-200-final.json and h264-200-final.json. JPEG total 172.5/246.0 ms p50/p99; stages RFB 150.4/184.7, scale 16.0/46.5, encode 1.9/11.1, WS 1.3/11.9, browser decode 2.2/12.0, draw 0.0/0.2; payload 799/5,919 B. H.264 total 189.2/269.1; stages RFB 156.4/198.9, scale 9.5/34.4, encode 16.3/41.1, WS 0.7/8.4, decode 1.3/8.9, draw 5.8/15.8; payload 174/12,046 B; all 200 follow-up frames were P-frames. Dev host infraternal-dev has 8 CPUs and load average 11.72/6.97/5.91 with concurrent Rust/C compilation; treat these as exploratory, not a performance-budget result. The 1x1 post-input request proxy limitation from the prior comment still applies.Task 6 complete: research/vnc/SPIKE-C.md records a 158.706 ms p50 path baseline and a rough 175.4 ms path-plus-frame floor. Final 200-event marker proxy was JPEG 172.5/246.0 ms and persistent H.264 189.2/269.1 ms p50/p99; the forced 1x1 response is not proof of macOS input-to-pixel latency. Nightly rfb_message fuzz run: 92,532 executions in 11 s, no crash. Owner questions and remaining real-pixel/camera measurement are in the report.
Task 4 capacity addendum: during a short 40-event H.264 sample, 100 ms process sampling saw FFmpeg max RSS 75,812 KiB and 37.5% peak CPU; holder max RSS 69,020 KiB and 3.5% CPU. One H.264 process is owned per WebSocket subscriber; the measured desktop had one subscriber, so it was one encoder for that run. Sharing across subscribers and late-join IDR recovery remain open owner questions in SPIKE-C.md.
Finished: phase C report committed at research/vnc/SPIKE-C.md. Head SHA:
3a10a17472. Validation: cargo test 12 passed; release holder build passed; nightly rfb_message fuzz completed 92,532 executions in 11 s without a crash; final JPEG/H.264 browser runs each completed 200/200 events. Holder and SSH forward stopped, Notes restored, scratch directory removed. scripts/verify fast output (verbatim): zsh:1: no such file or directory: scripts/verifyOrchestrator note on phase C (spike-vnc
3a10a17, SPIKE-C.md):Owner questions for the morning (from SPIKE-B/C):
kayg referenced this issue2026-10-28 17:53:55 +00:00
kayg referenced this issue2026-10-28 17:53:56 +00:00