fix(fund): Arc raw-key cleanup — key-blind product surfaces - #190
Merged
Merged
Conversation
resolveArcDepositEnv no longer returns SELAT_PRIVATE_KEY on its wire type. The key stays in-process (WeakMap + child overlay) for the sign call only; identity is a masked fingerprint. Signer results are signature + address or fingerprint. Errors, env/argv dumps, copy-debug bundles, and Arc child stdout/stderr redact before serialize. Fatal SELAT_DEBUG stacks use the same redaction. Closes nothing — TPM/CEO merge gate for #189. Co-authored-by: SELAT-DEV <SELAT-DEV@users.noreply.github.com>
assert.doesNotMatch requires a RegExp — switch secret checks to substring asserts. Inject stdout/stderr into fund() so Arc reprint tests do not patch process.stdout.write (that swallowed TAP and hid the other cases). npm test: 597/597. Co-authored-by: SELAT-DEV <SELAT-DEV@users.noreply.github.com>
SELAT-DEV
marked this pull request as ready for review
September 17, 2026 10:00
This was referenced Sep 17, 2026
SELAT-DEV
added a commit
that referenced
this pull request
Sep 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #189.
Arc fund raw-key cleanup (CTO+Security see-boundary). Companion is SELAT-AI/selat-discovery#169 (separate PR). Do not merge — TPM/CEO merge gate.
What changed
Investigation confirmed the hypothesis:
resolveArcDepositEnvreturned{ env: { SELAT_PRIVATE_KEY, ARC_RPC_URL } }as a serializable object, and fatal/SELAT_DEBUGpaths printed rawerr.message/err.stack.lib/arc-fund-signer.mjsreturns{ signature, address }or{ signature, fingerprint }only. Nokey/privateKey/mnemonicfield on the wire type.arcDepositSpawnEnv(secret-load path for setup.mjs). The key is not placed on argv and is not sent to the router.lib/redact.mjscovers env dumps, argv dumps, error + upstream 4xx/5xx bodies, copy-debug bundles, and quote/claim objects (withoutKeyFieldsso the client cannot invent a key field).bin/selat.mjsserializes errors through the redactor before printing.Out of scope (per #189): fund/SIWx redesign, refund redesign, catalog-count copy.
QA matrix (P0 = any raw key/mnemonic)
--raw-key; Arc key does not enter the routerTests
test/arc-fund-keyblind.test.mjspins signer return shape, error serialize, env/argv/copy-debug dumps, quote/claimwithoutKeyFields, and Arc fund stdout/stderr reprint.Local: 597/597 (
npm test).Merge
TPM + CEO only. Do not merge from this agent.