From 0bb658ea5993306f4dfb85296c1f97ec2f006db5 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 15 Aug 2026 06:22:04 +0900 Subject: [PATCH 1/7] test(core): require standard action-intent digest error --- .../tests/action_intent_digest_error_contract.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 crates/originweave-core/tests/action_intent_digest_error_contract.rs diff --git a/crates/originweave-core/tests/action_intent_digest_error_contract.rs b/crates/originweave-core/tests/action_intent_digest_error_contract.rs new file mode 100644 index 000000000..00e752f65 --- /dev/null +++ b/crates/originweave-core/tests/action_intent_digest_error_contract.rs @@ -0,0 +1,13 @@ +use std::error::Error as _; + +use originweave_core::ActionIntentDigestError; + +#[test] +fn action_intent_digest_error_exposes_standard_error_contract() { + let error = ActionIntentDigestError::InvalidFormat; + assert_eq!( + error.to_string(), + "action intent digest must be sha256 followed by 64 lowercase hexadecimal digits" + ); + assert!(error.source().is_none()); +} From ef2859bbd8a7d120cca35bb1aa1208f89d8feabe Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 15 Aug 2026 06:36:05 +0900 Subject: [PATCH 2/7] fix(core): implement action intent digest error contract --- crates/originweave-core/src/lib.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/crates/originweave-core/src/lib.rs b/crates/originweave-core/src/lib.rs index e33a7e7e5..ba2578fc3 100644 --- a/crates/originweave-core/src/lib.rs +++ b/crates/originweave-core/src/lib.rs @@ -503,6 +503,18 @@ pub enum ActionIntentDigestError { InvalidFormat, } +impl fmt::Display for ActionIntentDigestError { + fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { + match self { + Self::InvalidFormat => formatter.write_str( + "action intent digest must be sha256 followed by 64 lowercase hexadecimal digits", + ), + } + } +} + +impl std::error::Error for ActionIntentDigestError {} + /// The browser execution mode that owns an action. #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)] pub enum SessionMode { @@ -1091,4 +1103,4 @@ pub fn evaluate_extension_access( return ExtensionAccessDecision::DenyCapabilityNotGranted; } ExtensionAccessDecision::Allow -} +} \ No newline at end of file From 4ce1dd831ddde4428fe965cf93784030858307c8 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 15 Aug 2026 06:37:58 +0900 Subject: [PATCH 3/7] style(core): restore source trailing newline --- crates/originweave-core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/originweave-core/src/lib.rs b/crates/originweave-core/src/lib.rs index ba2578fc3..226f05b94 100644 --- a/crates/originweave-core/src/lib.rs +++ b/crates/originweave-core/src/lib.rs @@ -1103,4 +1103,4 @@ pub fn evaluate_extension_access( return ExtensionAccessDecision::DenyCapabilityNotGranted; } ExtensionAccessDecision::Allow -} \ No newline at end of file +} From 8223c8dcf095bf9aa04aa7f70a0d546c0fbc45ce Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 15 Aug 2026 06:43:40 +0900 Subject: [PATCH 4/7] docs(changelog): record action-intent error contract --- CHANGELOG.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f747adeae..614af64d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,8 +31,7 @@ All notable changes to OriginWeave are documented in this file. The format follo - Credential-free TLS evidence containing canonical origin, TCP peers, reference identity, TLS version, cipher-suite identifier, selected ALPN or explicit absence, leaf certificate and SPKI hashes, server-presented certificate hashes and bounds, trust-bundle identity and hash, validity interval, fixed verification time, revocation configuration, and measured handshake duration. - Credential-free sensitive-handle lifecycle evidence binds issuance, exclusive expiry, bounded uses, observed resolution count, and revocation to the exact credential-free `OpaqueHandleOnly` sensitive-access receipt, preserving tenant, actor, task, field set, purpose, destination, classification, policy version, and decision time without storing opaque handle tokens or protected values. - Credential-free connection and redirect evidence containing canonical addresses, destination classes, target digests, hop numbers, and approved-address counts. -- Credential-free verified TCP evidence containing the logical origin, requested socket, observed peer, destination class, successful attempt number, and per-attempt timeout. -- Standard `Display` and `std::error::Error` contracts for destination, redirect, digest, direct-network, TLS, and resource-budget failures, including preserved destination-policy, rustls, and operating-system sources where applicable. +- Standard `Display` and `std::error::Error` contracts for destination, redirect, evidence-digest, action-intent-digest, direct-network, TLS, and resource-budget failures, including preserved destination-policy, rustls, and operating-system sources where applicable. - Real loopback TCP integration proof plus deterministic timeout, refusal, retry, peer-inspection, peer-mismatch, canonicalization, IPv6 metadata, and single-use replay tests. - Real loopback rustls integration covering trusted DNS SAN, Common-Name fallback rejection, wrong-name and untrusted-root rejection, fixed-time expiry and not-yet-valid failures, exact IPv4 and IPv6 SANs, TLS 1.2/TLS 1.3, required and optional ALPN, and transport-origin binding. - Cumulative interactive-first RAM, VRAM, batch, local-model, admission, pause, and compositor-pressure mitigation plans, including active-consumer reduction at exact hard limits. From 1cb5720e73ea1f4f81796efeac61fb9d01f1bed3 Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 15 Aug 2026 06:59:38 +0900 Subject: [PATCH 5/7] test(core): require canonical digest prefix in error text --- .../tests/action_intent_digest_error_contract.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/originweave-core/tests/action_intent_digest_error_contract.rs b/crates/originweave-core/tests/action_intent_digest_error_contract.rs index 00e752f65..ed5d731cd 100644 --- a/crates/originweave-core/tests/action_intent_digest_error_contract.rs +++ b/crates/originweave-core/tests/action_intent_digest_error_contract.rs @@ -7,7 +7,7 @@ fn action_intent_digest_error_exposes_standard_error_contract() { let error = ActionIntentDigestError::InvalidFormat; assert_eq!( error.to_string(), - "action intent digest must be sha256 followed by 64 lowercase hexadecimal digits" + "action intent digest must be sha256: followed by 64 lowercase hexadecimal digits" ); assert!(error.source().is_none()); } From 31972410ce7133b1619637179f9c716a8f32edbb Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 15 Aug 2026 07:01:28 +0900 Subject: [PATCH 6/7] fix(core): name canonical digest prefix in error contract --- crates/originweave-core/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/originweave-core/src/lib.rs b/crates/originweave-core/src/lib.rs index 226f05b94..5bc5d13e0 100644 --- a/crates/originweave-core/src/lib.rs +++ b/crates/originweave-core/src/lib.rs @@ -413,12 +413,12 @@ pub enum NodeHandleError { BrowsingContextMismatch { /// Context that originally produced the node handle. observed: BrowsingContextId, - /// Context currently active for the requested action. + /// Context currently active in the browser context. current: BrowsingContextId, }, /// The browser context is now at a different canonical origin. OriginMismatch, - /// The browser context is now at a different document epoch. + /// The node handle belongs to an older document lifetime. StaleDocumentEpoch { /// Epoch that originally produced the node handle. observed: DocumentEpoch, @@ -507,7 +507,7 @@ impl fmt::Display for ActionIntentDigestError { fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result { match self { Self::InvalidFormat => formatter.write_str( - "action intent digest must be sha256 followed by 64 lowercase hexadecimal digits", + "action intent digest must be sha256: followed by 64 lowercase hexadecimal digits", ), } } From 28c6d18bf9e57bc2da2fede1639896eecefc148d Mon Sep 17 00:00:00 2001 From: Seongho Bae Date: Sat, 15 Aug 2026 07:04:11 +0900 Subject: [PATCH 7/7] fix(core): restore unrelated node-handle rustdoc --- crates/originweave-core/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/originweave-core/src/lib.rs b/crates/originweave-core/src/lib.rs index 5bc5d13e0..c7e3d5b13 100644 --- a/crates/originweave-core/src/lib.rs +++ b/crates/originweave-core/src/lib.rs @@ -413,12 +413,12 @@ pub enum NodeHandleError { BrowsingContextMismatch { /// Context that originally produced the node handle. observed: BrowsingContextId, - /// Context currently active in the browser context. + /// Context currently active for the requested action. current: BrowsingContextId, }, /// The browser context is now at a different canonical origin. OriginMismatch, - /// The node handle belongs to an older document lifetime. + /// The browser context is now at a different document epoch. StaleDocumentEpoch { /// Epoch that originally produced the node handle. observed: DocumentEpoch,