Sign Markdown saved to the folder with the configured ENS name and key #2

Merged
temeddix merged 2 commits from signing-hook into main 2026-09-25 17:02:53 +00:00
Owner

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 signer and signature frontmatter 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

Connection form, dark Connection form, light
Form, dark Form, light
Build output EIP-191
Memona filesystem behavior RFC 4918 PUT

References: Memona package format, Memona filesystem behavior, EIP-191, RFC 4918 PUT, #2

🤖 Generated with Claude Code

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 `signer` and `signature` frontmatter from the [md-ens-signature](https://github.com/capsulizers/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 https://git.capsulizers.com/commons/memona-plugin-signature/pulls/1 | Connection form, dark | Connection form, light | | --- | --- | | ![Form, dark](https://git.capsulizers.com/attachments/ea29fdcd-6d2e-4168-95ed-0f1875a9bec6) | ![Form, light](https://git.capsulizers.com/attachments/3bf734c9-2550-4ef0-9dd3-17efde632ca8) | | ![Build output](https://git.capsulizers.com/attachments/26642656-0185-4373-8040-adf82bff52d8) | ![EIP-191](https://git.capsulizers.com/attachments/02c8f55b-3f47-40a2-9756-75b7b73cc604) | | ![Memona filesystem behavior](https://git.capsulizers.com/attachments/c4f98fca-3958-4635-ae3e-450ad02126ca) | ![RFC 4918 PUT](https://git.capsulizers.com/attachments/d7d5709a-dc88-48fe-a728-8d092dc196d8) | References: [Memona package format](https://docs.memona.io/extensions/package.html), [Memona filesystem behavior](https://docs.memona.io/extensions/filesystem.html), [EIP-191](https://eips.ethereum.org/EIPS/eip-191), [RFC 4918 PUT](https://www.rfc-editor.org/rfc/rfc4918.html#section-9.7), https://git.capsulizers.com/commons/memona-plugin-signature/pulls/2 🤖 Generated with [Claude Code](https://claude.com/claude-code)
temeddix requested review from bot 2026-09-25 16:41:04 +00:00
bot requested changes 2026-09-25 16:44:17 +00:00
Dismissed
bot left a comment
Owner

🛑 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 signer and signature frontmatter. Integrate the signing library (including identity/key validation), then cover a signed output with a test.

Checks

Passed locally
  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked --lib (9 passed)
  • cargo build --locked --release --target wasm32-wasip2

Declined

No set-aside behavior

None.

Profile: codex · gpt-5.6-terra

🛑 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 <details> <summary>Important: Markdown is never signed</summary> The signing implementation returns the input bytes unchanged, so every configured private key is ignored and saved Markdown lacks the documented `signer` and `signature` frontmatter. Integrate the signing library (including identity/key validation), then cover a signed output with a test. </details> ## Checks <details> <summary>Passed locally</summary> - `cargo fmt --check` - `cargo clippy --locked --all-targets -- -D warnings` - `cargo test --locked --lib` (9 passed) - `cargo build --locked --release --target wasm32-wasip2` </details> ## Declined <details> <summary>No set-aside behavior</summary> None. </details> > Profile: `codex` · `gpt-5.6-terra`
src/sign.rs Outdated
@@ -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> {
Owner

This returns the original bytes, so the configured ENS identity and private key never affect the saved file and no signer or signature frontmatter is written. Use the signing implementation here and add a test that asserts the signed output.

Profile: codex · gpt-5.6-terra

This returns the original bytes, so the configured ENS identity and private key never affect the saved file and no `signer` or `signature` frontmatter is written. Use the signing implementation here and add a test that asserts the signed output. > Profile: `codex` · `gpt-5.6-terra`
temeddix changed title from Ask for a signer name and key, and hold saved Markdown whole to sign it to Sign Markdown saved to the folder with the configured ENS name and key 2026-09-25 16:48:39 +00:00
temeddix requested review from bot 2026-09-25 16:48:48 +00:00
bot requested changes 2026-09-25 16:53:47 +00:00
Dismissed
bot left a comment
Owner

🛑 Changes requested
Please replace the thread-local session state and add a screenshot of the actual configured connection form.

Summary

  • 2 Important issues block merge.

Findings

Important: Thread-local session state violates the concurrency rule

src/lib.rs:32 uses thread_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 --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked --lib (11 passed)
  • cargo build --locked --release --target wasm32-wasip2

Declined

Intentional deferred RPC use

rpcUrl is currently unused, but the PR description and README explicitly defer signer verification on reads to a later version.

Profile: codex · gpt-5.6-terra

🛑 Changes requested Please replace the thread-local session state and add a screenshot of the actual configured connection form. ## Summary - 2 Important issues block merge. ## Findings <details> <summary>Important: Thread-local session state violates the concurrency rule</summary> `src/lib.rs:32` uses `thread_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. </details> <details> <summary>Important: The supplied UI screenshot is not of this configuration</summary> 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. </details> ## Checks <details> <summary>Passed locally</summary> - `cargo fmt --check` - `cargo clippy --locked --all-targets -- -D warnings` - `cargo test --locked --lib` (11 passed) - `cargo build --locked --release --target wasm32-wasip2` </details> ## Declined <details> <summary>Intentional deferred RPC use</summary> `rpcUrl` is currently unused, but the PR description and README explicitly defer signer verification on reads to a later version. </details> > Profile: `codex` · `gpt-5.6-terra`
temeddix changed target branch from scaffold to main 2026-09-25 16:54:16 +00:00
temeddix added 2 commits 2026-09-25 16:54:35 +00:00
temeddix force-pushed signing-hook from eb0002d753 to 4ccd20299b 2026-09-25 16:54:35 +00:00 Compare
Author
Owner

@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.

@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.
bot approved these changes 2026-09-25 17:02:06 +00:00
bot left a comment
Owner

✅ Approved
All requested changes are addressed; signing, per-connection session ownership, and rendered form evidence were verified.

Checks

Passed
  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo test --locked --lib — 11 passed
  • cargo build --locked --release --target wasm32-wasip2
  • Dark/light screenshots match the manifest fields and default.

Declined

No set-aside behavior

None.

Profile: codex · gpt-5.6-terra

✅ Approved All requested changes are addressed; signing, per-connection session ownership, and rendered form evidence were verified. ## Checks <details> <summary>Passed</summary> - `cargo fmt --check` - `cargo clippy --locked --all-targets -- -D warnings` - `cargo test --locked --lib` — 11 passed - `cargo build --locked --release --target wasm32-wasip2` - Dark/light screenshots match the manifest fields and default. </details> ## Declined <details> <summary>No set-aside behavior</summary> None. </details> > Profile: `codex` · `gpt-5.6-terra`
temeddix merged commit 5db8ed318a into main 2026-09-25 17:02:53 +00:00
temeddix deleted branch signing-hook 2026-09-25 17:02:53 +00:00
Sign in to join this conversation.
No Reviewers
No Label
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: commons/memona-plugin-signature#2