Skip to content

feat(vault): land ClearSign Studio, Solana outflow check, and the 7.15 docs from #384 - #402

Open
BitHighlander wants to merge 4 commits into
developfrom
feat/land-clearsign-studio-outflow
Open

feat(vault): land ClearSign Studio, Solana outflow check, and the 7.15 docs from #384#402
BitHighlander wants to merge 4 commits into
developfrom
feat/land-clearsign-studio-outflow

Conversation

@BitHighlander

Copy link
Copy Markdown
Collaborator

Replaces the stale draft #384 by cherry-picking only its genuinely-new work onto current develop.

Why not just merge #384

#384 was cut on 2026-07-31 and has not moved since. Half of it already shipped on develop independently — NU6.3 Ironwood (d527cb31), and the reusable Solana/EVM signed clear-sign schemas (ad2bd911, 2b088f6a). The half that had not shipped was trapped behind a regression: the branch's fix(sdk): stabilize generated clear-sign methods regenerated the SDK from a pre-develop source and dropped getEntropy, the show_display signing timeout on /addresses/utxo, the /utxo/sign-transaction timeout, and the loadClearsignSigner timeout fix (18c6584f). Merging a 113-file conflicting draft to recover ~840 lines was the wrong trade.

What landed

ClearSign Studio — developer surface behind the device's AdvancedMode policy for attesting Solana schemas, loading a RAM-only signer, and exporting test evidence. Auto-closes when AdvancedMode is turned off.

Solana outflow check — host-side "what will I be left with?" panel on the opaque-signing consent screen. Reads post-execution balances from a single simulateTransaction rather than differencing two reads: on load-balanced public endpoints the pre-state and the simulation land on different slots and misattribute unrelated traffic (measured — a 1.5 SOL transfer reported 6.5 then 101 SOL of outflow, reproducibly). Worded as "checked on this computer", never as verification, because the device cannot confirm it.

Ironwood pending balancezcash-cli reported "pending": 0 unconditionally; it now reports the immature slice inside the MIN_CONFIRMATIONS window.

Solana ClearSign descriptor tests (offline + on-device KKSOLSW1) — these use only SDK methods develop already exposes, so none of #384's SDK lib/ edits came along.

verify-zcash-ironwood-protocol.mjs — asserts the pinned device-protocol round-trips ZcashSignPCZT fields 19/20 and action booleans. A pin can build cleanly and still lack them, and a missing setter degrades to a silently unshielded PCZT. Wired into preflight gate 5, not left as a script nobody runs.

63 docs/evidence files — 7.15 handoffs, the clear-sign attestor and trust-model spec, Solana swap metadata v1, and the on-device gate-3 captures.

Conflict resolutions — develop's newer work wins everywhere

File Kept
swap.ts develop's deviceErrorMessage unwrap; the blocked clear-sign event now reports the unwrapped reason
SwapDialog.tsx develop's host/device blind-sign cause split and its applyPolicy no-timeout call; outflow panel added alongside
bun/index.ts develop's verifyEvmSigner; unioned the new ClearSign type imports; dropped a duplicate os/path import
txbuilder/utxo.ts develop's scriptTypeOverride, unioned with this branch's memo param
DeviceSettingsDrawer.tsx the Experimental toggle stays removed (1f0cdb38)
HiveAccountPanel.tsx develop's deduped outlineBtn style

Deliberately not taken

postprocess-device-protocol.mjs and its CI plumbing. Develop already fixed device-protocol codegen a different way — the pbjs bin-link pin (5cadb708) — and swapping that out days before a release is risk with no matching benefit.

Verification

  • make preflight — all gates pass, including the new Ironwood field check
  • make test-unit — 353 pass / 0 fail across 20 files; both new test files added to the target (they were not wired into it on the source branch, so they would never have run in CI)
  • npm run test:solana-clearsign:offline — PASS (193B KKSOLSW1, exact-message + instruction binding)
  • make build — clean
  • typecheck 636 → 629; baseline tightened to lock it in

Not verified: on-device. ClearSign Studio and the outflow panel are both new UI paths that have never run against hardware on develop. Both need a device smoke before 1.5.1 ships.

Pure additions carried over from the stale ClearSign Studio / Ironwood
consolidation branch: 7.15 release handoffs, the clear-sign attestor and
trust-model spec, the Solana swap metadata v1 spec, and the on-device
gate-3 evidence captures for the attestor confirms and built-in anchor.

The root-level HANDOFF-PASSPHRASE-SIGNING-BUG.md moves under docs/ to
match every other handoff.
…384

Cherry-picked from the stale consolidation branch (5eed902) rather than
merging it, because that branch also carried a regression: its regenerated
SDK dropped getEntropy and the signing timeouts that shipped on develop
after it was cut. This takes only the new work.

ClearSign Studio — a developer surface behind the device's AdvancedMode
policy for attesting Solana schemas, loading a RAM-only signer, and
exporting test evidence. Closes itself when AdvancedMode is turned off.

Solana outflow check — a host-side "what will I be left with?" panel on
the opaque-signing consent screen. It reads post-execution balances out of
a single simulateTransaction call rather than differencing two reads,
because pre-state and simulation land on different slots on load-balanced
public endpoints and misattribute unrelated traffic (measured: a 1.5 SOL
transfer reported 6.5 and then 101 SOL of outflow, reproducibly). Presented
as "checked on this computer", never as verification — the device cannot
confirm these figures.

Conflict resolutions all keep develop's newer work: the deviceErrorMessage
unwrap in swap.ts, the host/device blind-sign cause split in SwapDialog,
verifyEvmSigner in bun/index.ts, the deduped Hive outline-button style, the
scriptTypeOverride param in estimateUtxoFee (unioned with this branch's
memo param), and the removed Experimental toggle stays removed.

Both new test files are wired into make test-unit — they were not in the
target on the source branch, so they would never have run in CI.
…pin check

Both carried over from #384, and both deliberately narrowed.

The SDK descriptor tests (offline + on-device KKSOLSW1) only call methods
develop's SDK already exposes — solanaGetAddress, loadClearsignSigner,
solanaSignTransaction — so the source commit's SDK changes are NOT taken.
Those edited only the generated lib/ and never src/, so `npm run build`
would erase them; they also dropped getEntropy and the signing timeouts
that shipped on develop after that branch was cut.

verify-zcash-ironwood-protocol.mjs asserts the pinned device-protocol
actually round-trips ZcashSignPCZT fields 19/20 and action booleans. The
pin can build cleanly and still be missing them, and a missing setter
degrades to a silently unshielded PCZT — so this runs as part of preflight
gate 5 rather than as a script nobody invokes. Passes on the current pin.

Not taken: postprocess-device-protocol.mjs and the CI plumbing around it.
Develop already fixed device-protocol codegen a different way (the pbjs
bin-link pin), and swapping that out days before a release is risk with no
matching benefit.
The cherry-picks came in below the old 636, so lock the improvement in —
otherwise the gate silently tolerates seven regressions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant