Open
opened 2026-11-09 08:14:08 +00:00 by kayg
·
7 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#449
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?
Duplicate "Trust and continue" in Add host can end in an error instead of continuing (J395b, #439 final comment). A trust must be idempotent: one setup step however many clicks.
Branch:
fix-trust-key-double-click, baseorigin/dev4754b14a7. Job J419.Findings so far (code reading, not yet reproduced):
TrustedOpenSsh::confirm(crates/plugins/ssh/src/trust.rs) removes the pending challenge on first use, so an identical second confirm hitsdenied()("The SSH host-key confirmation needs review. Retry the host check.") even though the key was just pinned.bootstrap_api.rs): while one confirmation runs, any further text frame is answered{"error":"host-key confirmation busy…"}.ProvisioningRun.confirmHostKeyrejects a second call while one is pending, and anerrorframe rejects the pending one and raisesonError(the failure screen).real.ts trustHostKeyonly forgets the observation after the await, so a repeat after success throws "Check the host key again before trusting it."trustKey()has abusyguard that disables the foot buttons, but that is only a disabled state, with no pending marker.Plan (about 2 h): red specs first (server duplicate-trust test, service-level and production-build browser double/triple click), then: server remembers a consumed challenge with its fingerprint for the observation's remaining lifetime so an identical repeat answers success while a different key is still refused; client trustHostKey joins an in-flight trust and answers a repeat for an already-trusted key; the button gets
aria-busyon the first click.Progress (J419). Branch
fix-trust-key-double-click, head15ff4aba7, pushed. Nothing merged or deployed.Cause, both sides (from the code, with one red run so far):
crates/plugins/ssh/src/trust.rs):confirmremoves the pending challenge on first use. An identical second confirmation therefore finds nothing and returns the genericdenied()error ("The SSH host-key confirmation needs review. Retry the host check."), although the key was just pinned.bootstrap_api.rs): while one confirmation is looking up, every other frame, including an identical repeat, gets thehost-key confirmation busyerror. The screen treats any error frame as a failure and rejects the pending trust.apps/tracer/src/canvas/addhost/real.tstrustHostKey): it forgot the observation only after the confirmation resolved, andProvisioningRun.confirmHostKeyrejects a second one while one is pending. A repeat therefore failed with "Host-key confirmation is unavailable", or, after success, with "Check the host key again before trusting it."trustKey()already had abusyguard that disables the foot buttons, so a plain double-click on the button sends one request. The failures above can still reach the service from any caller or timing that gets past the button. The button had no explicit pending marker.Red (client service), run on dev-02 against
bc9b2034dwith bun:real.test.tsgives 14 pass and 2 fail. The failures are the two repeat cases:Green (same file, head): 16 pass, 0 fail.
Fixes (atomic commits):
de39de93fserver remembers a confirmed challenge (destination and fingerprint, 120 s, at most 128) and answers an exact repeat with success after the live authority check, writing nothing; a different key, another destination or an unknown challenge stays refused.1e01266edthe socket drops an identical in-flight confirmation instead of answering busy.real.tstrust joins an in-flight trust and answers a repeat after success.wizard.tssetsaria-busyon the primary button.Still to run, queued on dev-02 behind other jobs: Rust red/green (
host_trust_repeat,bootstrap_apibusy tests), the production-build Playwright double and triple click,verify quick.J419 finish. Not merged, not deployed.
Branch:
fix-trust-key-double-click, head6f83ee00fd218484585ed449278e227842b3e701, confirmed withgit ls-remote origin fix-trust-key-double-click. Baseorigin/dev4754b14a7.Cause: see my earlier comment. In short, a trust is not idempotent in three places:
confirmconsumes the challenge, so an identical repeat gets the generic host-key error;trustHostKeyrejects a second concurrent call and, after success, a repeat too.What did not reproduce: a plain double or triple click on the real button. The wizard already disables the foot buttons on the first click, so the production-build spec is green on the unfixed client (
red-browser.log, run onbc9b2034d: 2 passed). It stays in as a regression guard: exactly oneconfirm-host-keyframe goes out and the flow reaches the done row. The red specs are the server and service ones below. I did not run J395b's rig on compute01. It needs the root VM and a mesh claim, and the red/green evidence above covers the server and service paths without it. J395b's own failure therefore came through one of the paths in the cause list (a faster or non-button caller, or the socket timing). I can't say which from here.Red then green (logs in
~/.cache/codex-scratch/j419/on dev-02):crates/plugins/ssh/tests/host_trust_repeat.rs: red on8a89e8341(red-ssh.log: 2 passed, 2 failed,confirmation 2 of the same key must answer successand the simultaneous case with twoHostKeyerrors); green on15ff4aba7(green-ssh.log: 4 passed, 0 failed).bootstrap_api_tests::an_identical_confirmation_during_a_pending_one_is_not_refused_as_busy: red onb485ea514(red-ws.log:an identical confirmation got a reply while the first was pending … "host-key confirmation busy; retry after confirmation"); green on15ff4aba7(green-ws2.log: 2 passed, 0 failed, with the existing busy test).real.test.tsservice-level repeat tests: red 14 pass / 2 fail onbc9b2034d, green 16 pass / 0 fail on head.What changed:
trust.rs: remembers each confirmed challenge (destination and fingerprint, 120 s, at most 128) and answers an exact repeat with success after the live authority check; a tokio mutex makes simultaneous identical requests take turns. Adds the tokiosyncfeature to the ssh crate (no new dependency).bootstrap_api.rs: an identical in-flight confirmation frame is dropped, so the one reply answers both; any other request still gets the busy error.real.ts:trustHostKeyjoins an in-flight trust, answers a repeat after success, and forgets that on a new observation; an unseen fingerprint is still refused.wizard.ts:aria-busyon the primary button while a request is in flight.verify quickon6f83ee00f(quick3.log, dev-02,VERIFY_QUICK_BASE=origin/dev), verbatim:Two earlier quick runs failed on fmt and on missing D345 doc comments in my own files; both were fixed in
79eb2462band6f83ee00f.verify fastwas not run (the task asked for quick); the orchestrator reruns it on merge. No screenshots: the only UI change is anaria-busyattribute.Cleanup: the cargo target and temporary archives are deleted. The dev-02 worktree
~/worktrees/j419is left detached at the head, and the logs are small. Nothing of mine is running.Review start (J423, independent security review). Reviewing
fix-trust-key-double-clickat6f83ee00fd(base origin/dev4754b14a7). Scratch merge with origin/dev54a9da2a8is clean (825a760e9, local only, on compute01~/worktrees/j423). Red/green runs, two reviewer probes andverify quickare queued in one build-slot job (compute01 queue is 8 deep).verify fastwill not get a slot within 30 min, so it is skipped. Nothing will be pushed, merged or deployed. Evidence:~/.cache/codex-scratch/j423/evidence/on compute01 and on code.J423 security review: REQUEST CHANGES. Reviewed
fix-trust-key-double-clickat6f83ee00fd(base origin/dev4754b14a7; scratch merge with origin/dev54a9da2a8is clean). Nothing pushed, merged or deployed.There are two P2s. Both are small and live in
confirmincrates/plugins/ssh/src/trust.rs. I found no way to replay or bypass the trust check, and the socket and client parts hold up.P2-1: the new
confirminglock makes every confirmation on the server wait in one lineconfirming: tokio::sync::Mutex<()>is a field ofTrustedOpenSsh, and there is one per server (bootstrap_runtime.rs:176).confirmholds it for the whole confirmation:ssh -G,ssh-keygen -F(up to 3 s per known-hosts path), the liveauthorize()lookup and the pin write. So a confirmation for host B, or for another user, waits behind any confirmation that is slow, on any host.review_probe.rs,debug.log). Host A's authority takes 3 s. Host B's unrelated confirmation starts 200 ms later and finishes afterb_elapsed_ms=2814(PROBE_B a=Ok(()) b=Ok(()) b_elapsed_ms=2814 total_ms=3015). On base the two run in parallel.last_failurechallenge. The lock only serves thesimultaneous_identical_confirmations_all_succeedtest, which calls the transport directly.pending/confirmed, so only an identical challenge waits. This is a latency regression under CLAUDE.md priority 1, and no benchmark comes with it.P2-2: a repeat answers "trusted" even when the pin is gone or holds another key
The repeat path checks only
(challenge, destination, fingerprint, ≤120 s)plus live authority. It never checks that the pin it wrote is still there. Within the 120 s window:remote_removal.rs→forget_pin): a repeat returnsOk, and the socket replieshost_key_confirmed {fingerprint}, but no pin exists. Evidence: probe A,PROBE_A pins_after_forget=0 repeat_result=Ok(())(debug.log).Connections still fail closed, because the next connect checks the actual pin. But the trust flow reports the wrong thing about which key is trusted, which is exactly what this flow exists to show. Since the repeat path writes nothing, a lie isn't needed.
policyandrecordinConfirmed. On a repeat, requireself.recorded(&policy)? == Some(record)(withPUBLICATIONheld), and answerdenied()otherwise. Add probe A as a test, plus a replaced-pin case.P3-1 (client): a new observation can join an old trust, and the old trust then deletes the new observation
In
real.ts,trustingandtrustedare keyed byhost\nfingerprint, without the challenge. Suppose a new observation for the same host and the same fingerprint arrives while an older trust is in flight. A trust call for it joins the old promise, which confirms the old challenge. When that finishes,observations.delete(host)removes the new observation (the unconditional delete was already there before this branch). Mitigation: the wizard is busy during a trust, so this is unlikely. Fix: put the challenge in the key, or delete onlyif (observations.get(host) === observed).P3-2: the field failure is still not reproduced
The author's finish note says a real double or triple click was green on the unfixed client, because the wizard already disables the button. The fix therefore covers the likely paths (socket busy reply, server consuming the challenge, service repeat) without showing which one J395b actually hit. That is fine as defence in depth. Keep #449's root cause marked "unconfirmed" until J395b's rig or the test server shows it.
Checked and fine
confirm_host_keyrequiresbatch.inner.authority.owner == owner, a batch that belongs to this socket, a failed and non-running state, andlast_failure.host_key_challenge == challenge. An API-key socket is refused outright.authority.authorize()live, and the author's test with a revoked authority is refused. The socket'srevocation.changed()also tears the socket down.same == false→denied()).Confirmed.observedis the observation'sreceivedtime.confirmedholds at most 128 entries and expired ones are pruned on insert. When it is full, the code falls back to the old refusal.is_same_confirmationcompares every field ofConfirmHostKey(target, challenge, fingerprint). Anything else still gets the busy reply. Frames come only from the already-authenticated owner socket, so no other party's frame can be dropped.finallyclears the in-flight entry.trustedis keyed by host and cleared on a new observation and ondispose, so I found no stale success across hosts.Runs (dev-02, scratch merge
52ae8a1f0, build-slot)host_trust_repeatconfirmation 2 of the same key must answer success, simultaneous → twoHostKeyerrors)an_identical_confirmation_during_a_pending_one…bootstrap_apifilter: 19 passed / 0 failedreal.test.tsLogs:
redgreen-ssh.log,red-socket.log,green-socket.log,red-real.log,green-real.log,debug.log. Note: my first ssh run (green-ssh.log,red-ssh.log) usedINFRATERNAL_TEST_STATE_ROOT=/tmp/j423s. Under that root the rig's stand-inopenfails withInstall, notHostKey, so those two logs say nothing about the change. The rerun with the default scratch is the valid one.scripts/verify quickon the scratch merge (pre-check only, not the gate), fromverify-quick.log:verify fastwas not run. compute01's queue was 9 deep (oldest waiting 3 h), so no slot was free within 30 minutes.Evidence (probe source, scripts, all logs) is at
~/.cache/codex-scratch/j423/evidence/on code. The probe source is also attached here. The VM worktrees and the dev-02 target are deleted.J419 round 2 progress (answers J423's REQUEST CHANGES on
6f83ee00f). Branchfix-trust-key-double-click, head45198e736009277fb041c09bc06ba3c8b2d770d7(fixes plus a merge of current origin/dev), pushed. Not merged or deployed.verify fastis queued on compute01 (position 10 of 15 at 12:29 IST); I'll quote it when it finishes.Commits:
d9d7422dfred tests,881a5237eserver fix,273702b0dclient fix,45198e736merge of origin/dev.confirminglock is now one lock per challenge, kept in a table whose entries are removed by a drop guard (also on cancellation). New testconfirmations_for_different_hosts_do_not_wait_for_each_otherholds host A inside its authority check until host B has finished, with a 10 s deadlock guard (not a speed budget). Red:host B was held up behind host A for 10.00182269s: Err(Elapsed(())). Green.Confirmedkeeps the policy and the exact record. A repeat succeeds only while that record is still the pin on disk (checked underPUBLICATION); otherwise the usual refusal. New tests: pin deleted, pin replaced by another key. Both red before, green after.real.tskeys in-flight trusts by challenge; a finished trust deletes and records only the observation it confirmed. New service test with two runs. Red 16 pass / 1 fail, green 17 pass / 0 fail.host_trust_repeat: red ond9d7422dfis 4 passed / 3 failed (r2-red-ssh.log); green on45198e736is 7 passed / 0 failed (r3-green-ssh.log).verify quickon45198e736(r3-quick.log, dev-02):P3-2, which path J395b hit. I did not run the rig. It lives under
/root/j395-vm, whichclaudecannot read, and compute01's queue is 15 deep. I read J395b's kept evidence instead (~/.cache/codex-scratch/j395/evidence/harness-trust-final-kayg-039-kayg/andfix_trust.py):fix_trust.py). Its log showsSTEP host key trustedthree times, and after the first click the page still showed "Check 127.0.0.1's key" with thetrust-keybutton.showError, busy cleared). That means a click did go through the button; the failure came afterwards, in the confirmation. Two more clicks followed, then "Something went wrong with 127.0.0.1".awaiting host key confirmationline, with no success or refusal line. Load average was 25–40.provisioning-client.ts) ran out under load while the server was still checking, so the button re-enabled with the challenge already being consumed. The next click then hit the server'sdenied(challenge gone) or the busy reply, and the error frame turned the batch into the failure page. Every step of that is now handled: an identical repeat joins or is answered as already trusted, with no error frame.J419 round 2 finish. Branch
fix-trust-key-double-click, head51414e63608b3b1ac56d121d1d3549068c9c0997(confirmed withgit ls-remote). Not merged or deployed.Fixes for J423's findings were already described in my earlier round-2 comment: per-challenge confirm lock (P2-1), a repeat only while the pin on disk still matches (P2-2), and in-flight trusts keyed by challenge (P3-1). The head is those commits plus merges of current origin/dev.
verify faston51414e636(compute01, build-slot, log~/.cache/codex-scratch/j419/fast.logon compute01), verbatim:Two earlier fast runs failed for reasons outside this change: on
45198e736, cargo-deny (RUSTSEC-2026-0459, fixed on dev by #473; origin/dev itself passed deny) and one shim churn test (passed on the next run); on899687ef0, the tracer test "a closing notice cannot hide its replacement", which passes on current origin/dev and on this head (startup-toastplus addhost: 84 pass, 0 fail). Also green earlier on the pre-merge head:host_trust_repeat7/7,real.test.ts17/17,verify quick, and the double/triple-click browser spec (2 passed). Red runs:host_trust_repeat4 pass / 3 fail ond9d7422df; the cross-host test fails withhost B was held up behind host A for 10.00s.P3-2 (which path J395b hit): not reproduced with the rig (it is under
/root/j395-vm, unreadable forclaude). From J395b's kept evidence (run 039): the trust button reappeared after the first click, so the first confirmation did not complete. Most likely the client's 5 s confirmation timer ran out under load while the server was still checking, then the next click met the consumed challenge or the busy reply. Unproven; I did not change the 5 s timer. Keep the root cause marked "unconfirmed".J467 security re-review (round 2): APPROVE. Reviewed
fix-trust-key-double-clickat51414e6360against origin/dev. Nothing pushed, merged or deployed. I added one adversarial test to a local VM copy only. Evidence is in~/.cache/codex-scratch/j467/evidence/on dev-02.No P0, P1 or P2 findings. All three round-1 findings are fixed.
The round-1 fixes
ChallengeTurnkeeps onetokio::sync::Mutexper challenge UUID, and a challenge waits only on itself.confirmations_for_different_hosts_do_not_wait_for_each_otherpasses.Confirmedentry (same destination, same fingerprint, observation under 120 s old) and a liveauthorize(). Then, underPUBLICATION, the pin on disk must equal the exactrecordthis challenge wrote. The deleted-pin and replaced-pin tests both pass.trustingis keyed by challenge, and a finished trust deletes the observation only whenobservations.get(host) === observed. A new observation clearstrustedfor that host.The security questions
Same host, two challenges, two keys. The per-challenge lock does not order these two, but it doesn't need to: the global
PUBLICATIONcompare-and-replace (recorded == observation.previous) still does. The first write changes the pin, so the second fails its compare. A later repeat of the loser has noConfirmedentry and is refused. A repeat of the winner passes only while its record is still the pin. My adversarial testj467_two_challenges_two_keys_same_host_pin_exactly_oneobserves key K1 (challenge A), swaps the scanned key to K2 (challenge B), confirms A and B together withtokio::join!and checks:It passes, and it passed 200 out of 200 loops, together with the simultaneous-identical and cross-host tests (
race-200.log).No TOCTOU between the pin check and the success reply. The repeat path checks
recorded(&policy) == recordwhile holdingPUBLICATION, does no await in between, and returns. The socket reply goes out after the lock is released. That gap is the same one the first-time path already has (write, release, reply). A Forget that lands in the gap is ordinary ordering and does not get around the check.The lock map is bounded.
ChallengeTurn::newclones theArcunder the table lock.Droptakes the table lock and removes the entry whenstrong_count <= 2(the table's copy plus its own), so nobody can be waiting on a removed lock._heldis dropped beforeturn.lock().awaitalso runsDrop.pending.removeand its entry goes away at once. The map never holds more than the confirmations in flight.confirmedis capped at 128 entries. Each lives at most 120 s, pruned when a later confirmation succeeds.Scope.
Runner::confirm_host_key(bootstrap.rs:1898) still ties the challenge to this batch's owner and to its current failedHostKeystate. A repeat can't be replayed from another batch or another user.Client.
is_same_confirmationdrops only an exact repeat of (target, challenge, fingerprint). Anything else still gets the busy error, and text that doesn't parse never counts as a repeat.provisioning-client.tsmatcheshost_key_confirmedby target and fingerprint, so one reply settles the confirmation.setBusydisables the foot buttons and setsaria-busy.P3 (non-blocking)
configured_trustand the effective-policy recheck. If known-hosts trust appears within 120 s, a repeat still answers success. This is harmless: the pin really is there, and connecting already refuses pin-plus-external trust as ambiguous. A one-line comment on why it is left out would help.provisioning-client.ts:307) is unchanged. If the server's confirm takes longer than that under load (ssh -G,ssh-keygen -Fup to 3 s per path, authority lookup), the first click still shows an error. What this branch adds is a working retry: the next click either joins the reply still in flight (the server drops the identical frame) or gets the repeat-path success. A follow-up should measure the confirm's p99 under load, then lengthen the timeout or keep the confirmation pending until the socket closes. That is out of scope for this branch.Tests I ran (dev-02, build-slot,
CARGO_INCREMENTAL=0, worktree at51414e636)cargo test -p infraternal-plugin-ssh --test host_trust_repeat, with my test added: 8 passed, 0 failed (ssh-tests.log).j467_,simultaneousandconfirmations_for: 200/200 ok, 0 failed (race-200.log).cargo test -p infraternal-server --lib bootstrap_api: 19 passed, 0 failed, includingan_identical_confirmation_during_a_pending_one_is_not_refused_as_busyanda_client_request_during_a_pending_confirmation_keeps_the_batch(rust.log).INFRATERNAL_TEST_STATE_ROOT=/tmp/j467sat mode 0755, and all 7 rig tests failed withInstall, as the code should (a non-private root fails closed). Without it they pass (rust.loghas the failing first attempt).fast.logon compute01 instead. It is at51414e636, its 4 newreal.test.tscases pass, and it ends withFAST_EXIT=0. The author ran the double- and triple-click browser specs on the head before the merge (2 passed). Per the reviewer rule, I did not runverify fastorverify quick.dev-02 cleanup: worktree
~/worktrees/j467and its target are deleted. Evidence is kept (116K).