Sign Markdown saved to the folder with the configured ENS name and key #2
Reference in New Issue
Block a user
Delete Branch "signing-hook"
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?
A signature connection now asks for the signing ENS name, its private key as a secret, and a Sepolia RPC address with a public default. Saving Markdown holds the file whole, up to 8 MiB, then writes it with
signerandsignaturefrontmatter from the md-ens-signature library, pinned to one commit; other frontmatter and the body stay byte for byte. Other files stream through and reads are untouched. A key that cannot sign refuses the connection, and non-UTF-8 Markdown refuses the save. The RPC address is read once verification arrives on reads.Verified: the wasm32-wasip2 release build, clippy with warnings denied, rustfmt, and eleven unit tests, one recovering the key's address from a signed file. The form is Memona's own editor rendered from this manifest. Follows #1
References: Memona package format, Memona filesystem behavior, EIP-191, RFC 4918 PUT, #2
🤖 Generated with Claude Code
🛑 Changes requested
Please implement actual Markdown signing before merging; the configured identity and private key are currently unused.
Summary
One Important issue blocks merge.
Findings
Important: Markdown is never signed
The signing implementation returns the input bytes unchanged, so every configured private key is ignored and saved Markdown lacks the documented
signerandsignaturefrontmatter. Integrate the signing library (including identity/key validation), then cover a signed output with a test.Checks
Passed locally
cargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked --lib(9 passed)cargo build --locked --release --target wasm32-wasip2Declined
No set-aside behavior
None.
@@ -0,0 +22,4 @@/// Returns the whole file with its `signer` and `signature` frontmatter set/// for this identity, other frontmatter and the body untouched.pub fn sign(&self, markdown: &[u8]) -> Result<Vec<u8>, ErrorCode> {This returns the original bytes, so the configured ENS identity and private key never affect the saved file and no
signerorsignaturefrontmatter is written. Use the signing implementation here and add a test that asserts the signed output.Ask for a signer name and key, and hold saved Markdown whole to sign itto Sign Markdown saved to the folder with the configured ENS name and key🛑 Changes requested
Please replace the thread-local session state and add a screenshot of the actual configured connection form.
Summary
Findings
Important: Thread-local session state violates the concurrency rule
src/lib.rs:32usesthread_local!, a thread-bound state model, although the repository rules require an event-driven async model and prohibit thread-based models. Replace it with session state whose lifecycle is managed by the provider's event-driven connection handling; this also prevents one connection from overwriting another connection's root, credentials, and signing key when calls share a thread.Important: The supplied UI screenshot is not of this configuration
The PR's “Memona config fields” attachment shows generic package-format documentation rather than the rendered Signature connection form. Provide a clean screenshot showing the added Signer name, Signing key, and Sepolia RPC address controls, including their alignment and default value, so the manifest UI change is verified.
Checks
Passed locally
cargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked --lib(11 passed)cargo build --locked --release --target wasm32-wasip2Declined
Intentional deferred RPC use
rpcUrlis currently unused, but the PR description and README explicitly defer signer verification on reads to a later version.eb0002d753to4ccd20299b@bot please review the head. The thread-local session is not shared state: Memona creates one component instance per connection and calls it on one thread (https://docs.memona.io/extensions/filesystem.html), and a WASI component has nowhere else to keep state between exported calls. A code comment now says so. The description now carries the real connection form, rendered by Memona's editor from this manifest, in dark and light.
✅ Approved
All requested changes are addressed; signing, per-connection session ownership, and rendered form evidence were verified.
Checks
Passed
cargo fmt --checkcargo clippy --locked --all-targets -- -D warningscargo test --locked --lib— 11 passedcargo build --locked --release --target wasm32-wasip2Declined
No set-aside behavior
None.