Markdown shows whether its ENS signature holds when read #5

Merged
temeddix merged 2 commits from verify-on-read into main 2026-09-25 20:11:59 +00:00
Owner

Reading a Markdown file now checks its signature against ENSv2 on Sepolia, through the host HTTP to the configured RPC address, and hands Memona the file with an ens-verification line in its frontmatter, which Memona shows as a badge: Verified, Tampered, Unauthorized, Unsigned, or Not checked. A new optional trusted parent limits who counts. Saves drop the line before signing, so the server never stores a verdict, and a stored one is replaced on read. Verdicts are cached for 30 seconds. Stat, list and write keep reporting the stored size and the server etag, so If-Match and Memona's own-save check are unchanged. Memona gives each call 20 million instructions, so verification covers files up to 40 KiB and signing up to 96 KiB; larger ones are marked or refused instead of trapping.

Verified: the component in Memona's host runtime against WsgiDAV and Sepolia produced every badge below; 25 unit tests, clippy and rustfmt pass.

Live check Unit tests
Live check Unit tests
Opened in Memona Edited and saved in Memona
Signed note opened in Memona Same note after an edit and save in Memona

🤖 Generated with Claude Code

Reading a Markdown file now checks its signature against ENSv2 on Sepolia, through the host HTTP to the configured RPC address, and hands Memona the file with an `ens-verification` line in its frontmatter, which Memona shows as a badge: Verified, Tampered, Unauthorized, Unsigned, or Not checked. A new optional trusted parent limits who counts. Saves drop the line before signing, so the server never stores a verdict, and a stored one is replaced on read. Verdicts are cached for 30 seconds. Stat, list and write keep reporting the stored size and the server etag, so If-Match and Memona's own-save check are unchanged. Memona gives each call 20 million instructions, so verification covers files up to 40 KiB and signing up to 96 KiB; larger ones are marked or refused instead of trapping. Verified: the component in Memona's host runtime against WsgiDAV and Sepolia produced every badge below; 25 unit tests, clippy and rustfmt pass. | Live check | Unit tests | | --- | --- | | ![Live check](https://git.capsulizers.com/attachments/93761cb7-f00f-4268-a0ba-0996214bb2a3) | ![Unit tests](https://git.capsulizers.com/attachments/6e8b7c43-1775-4e08-ac44-220f0fe27dac) | | Opened in Memona | Edited and saved in Memona | | --- | --- | | ![Signed note opened in Memona](https://git.capsulizers.com/attachments/981afbc3-27e5-44c6-876a-84ceb75b4334) | ![Same note after an edit and save in Memona](https://git.capsulizers.com/attachments/c6f50b5b-5c9e-4f07-9a79-92b2b6838871) | 🤖 Generated with [Claude Code](https://claude.com/claude-code)
temeddix added 1 commit 2026-09-25 19:53:41 +00:00
Markdown shows whether its ENS signature holds when read
Agents / agent (pull_request) Has been skipped
cded904552
Author
Owner

@bot please review the head; check the frontmatter injection and stripping, the verdict cache, the no-op-waker executor around the blocking host HTTP, and the size and revision decision documented on open_read. The 40 KiB and 96 KiB limits come from measured fuel against the host's 20 million per call.

@bot please review the head; check the frontmatter injection and stripping, the verdict cache, the no-op-waker executor around the blocking host HTTP, and the size and revision decision documented on open_read. The 40 KiB and 96 KiB limits come from measured fuel against the host's 20 million per call.
bot requested changes 2026-09-25 19:58:15 +00:00
Dismissed
bot left a comment
Owner

🛑 Changes requested
Please enforce the 96 KiB limit after removing the injected verdict.

Important

Decorated limit blocks read-back
  • Anchored finding below.
### Checks
Passed
  • cargo test --locked --lib
  • cargo fmt --check
  • cargo clippy --locked --all-targets -- -D warnings
  • cargo build --locked --release --target wasm32-wasip2
Declined to judge
  • None.

Profile: codex · gpt-5.6-terra

🛑 Changes requested Please enforce the 96 KiB limit after removing the injected verdict. ### Important <details> <summary>Decorated limit blocks read-back</summary> - Anchored finding below. </details> ### Checks <details> <summary>Passed</summary> - `cargo test --locked --lib` - `cargo fmt --check` - `cargo clippy --locked --all-targets -- -D warnings` - `cargo build --locked --release --target wasm32-wasip2` </details> <details> <summary>Declined to judge</summary> - None. </details> > Profile: `codex` · `gpt-5.6-terra`
src/lib.rs Outdated
@@ -221,3 +271,3 @@
};
let mut markdown = markdown.borrow_mut();
if markdown.len() + data.len() > MAX_MARKDOWN {
if markdown.len() + data.len() > MAX_SIGNED {
Owner

A stored Markdown file at the documented 96 KiB limit is rendered with the injected ens-verification line, so saving that unedited read-back exceeds this pre-strip limit and fails with Unsupported. Permit the bounded presentation overhead, strip the badge at finish, then enforce the 96 KiB limit on the bytes passed to Signer::sign.

Profile: codex · gpt-5.6-terra

A stored Markdown file at the documented 96 KiB limit is rendered with the injected `ens-verification` line, so saving that unedited read-back exceeds this pre-strip limit and fails with `Unsupported`. Permit the bounded presentation overhead, strip the badge at finish, then enforce the 96 KiB limit on the bytes passed to `Signer::sign`. > Profile: `codex` · `gpt-5.6-terra`
Author
Owner

@bot please review the head; the 96 KiB limit now applies to the bytes signed, after the verdict line is dropped, and a save may carry 4 KiB beyond it before that. Checked in the host runtime: a 98,252-byte file read back with its badge (98,308 bytes) saves unedited within the fuel budget, and the stored copy holds no badge.

@bot please review the head; the 96 KiB limit now applies to the bytes signed, after the verdict line is dropped, and a save may carry 4 KiB beyond it before that. Checked in the host runtime: a 98,252-byte file read back with its badge (98,308 bytes) saves unedited within the fuel budget, and the stored copy holds no badge.
temeddix added 1 commit 2026-09-25 20:06:58 +00:00
bot approved these changes 2026-09-25 20:11:23 +00:00
bot left a comment
Owner

✅ Approved
Summary: The 96 KiB signed-byte limit and 4 KiB pre-strip allowance are correctly enforced.

Checks

Passed
  • cargo test --all-targets — 25 passed.
  • cargo clippy --all-targets -- -D warnings
  • cargo fmt --check
  • Repository-wide policy scan.

Strengths

Verified behavior
  • Read verdicts are removed before signing and never written back to storage.
  • The post-strip signed-byte bound preserves an unedited decorated save at the stated limit.
  • The no-op-waker executor returns an error if a host call unexpectedly yields.

Declined to judge

None

No behavior was set aside.

Profile: codex · gpt-5.6-terra

✅ Approved Summary: The 96 KiB signed-byte limit and 4 KiB pre-strip allowance are correctly enforced. ## Checks <details> <summary>Passed</summary> - `cargo test --all-targets` — 25 passed. - `cargo clippy --all-targets -- -D warnings` - `cargo fmt --check` - Repository-wide policy scan. </details> ## Strengths <details> <summary>Verified behavior</summary> - Read verdicts are removed before signing and never written back to storage. - The post-strip signed-byte bound preserves an unedited decorated save at the stated limit. - The no-op-waker executor returns an error if a host call unexpectedly yields. </details> ## Declined to judge <details> <summary>None</summary> No behavior was set aside. </details> > Profile: `codex` · `gpt-5.6-terra`
temeddix merged commit bf0e4561c0 into main 2026-09-25 20:11:59 +00:00
temeddix deleted branch verify-on-read 2026-09-25 20:11:59 +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#5