Commit28b2cd91Recorded6 Sep 2026Repositorysigil-cloudflare
Use implicit core imports and keep shared Sigil guidance at user scope
Changed
AGENTS.md | 6 ++----
README.md | 11 ++++++++++-
src/cloudflare/r2.sgl | 6 +++---
src/cloudflare/r2/signing.sgl | 3 +--
test/test-network.sgl | 3 +--
test/test-signing.sgl | 3 +--
6 files changed, 18 insertions(+), 14 deletions(-)Diff
AGENTS.mdmodified
@@ -1,7 +1,6 @@
1
# sigil-cloudflare 2
−3
Reusable Cloudflare clients for Sigil, initially R2. Use hierarchical modules:−4
`(cloudflare r2)`, `(cloudflare r2 signing)`, and future `(cloudflare SERVICE ...)`.+3
Reusable Cloudflare clients for Sigil, initially R2. 4
Keep Rezvibe permissions, UI, image validation and branding policy in Rezvibe. 5
Never log credentials, Authorization headers, signed URLs or private object data. 6
Binary object bodies must remain bytevectors throughout transport. Use sigil-http@@ -9,5 +8,4 @@ and sigil-crypto. Preserve raw-key UTF-8 signing semantics and test against an
8
independent reference, including maximum key sizes and malformed input. 9
Run `sigil test --sgl --strict` and `node test/http.mjs`; the latter starts an 10
ephemeral loopback fake service. Tests must never use real credentials or R2.−12
Keep README limits and verification evidence accurate. Format Sigil with readable−13
line breaks and consistent indentation; avoid compressing statements and bindings.+11
Keep README limits and verification evidence accurate.README.mdmodified
@@ -48,7 +48,16 @@ on the R2 bucket; this helper does not create DNS or enable public access.
48
49
## Scope and limits 50
−51
Calls buffer request/response bodies in memory. Set application upload limits;+51
Calls return a result directly and buffer request/response bodies in memory.+52
This direct-return API does not imply that every stage is scheduler-friendly:+53
sigil-http's nonblocking body I/O yields through Sigil's scheduler, but the+54
current native DNS, TCP connect and TLS handshake paths can block the process.+55
Connect/handshake waits are bounded by the configured timeout; DNS is subject+56
to the system resolver's own limits. Spawning another cooperative task around+57
an R2 call does not remove those native blocking stages. Fully cooperative+58
connection establishment requires changes in shared socket/TLS/HTTP transport.+59
+60
Set application upload limits; 61
use this initial API for bounded assets. The timeout is sigil-http's connection 62
and idle I/O timeout, not a total operation budget. Responses with a mismatched 63
Content-Length are rejected. Generic response buffering/chunk framing retainsrc/cloudflare/r2.sglmodified
@@ -1,7 +1,7 @@
−1
;;; Cloudflare R2's S3 API. All calls are synchronous, buffered and do not retry.+1
;;; Cloudflare R2's S3 API. Calls return a buffered result and do not retry.+2
;;; Body I/O yields under the scheduler; DNS/connect/TLS may still block it. 3
(define-library (cloudflare r2)−3
(import (sigil core)−4
(sigil io)+4
(import (sigil io) 5
(sigil string) 6
(sigil list) 7
(sigil time)src/cloudflare/r2/signing.sglmodified
@@ -1,7 +1,6 @@
1
;;; S3 Signature Version 4. Inputs are raw paths/query strings, never pre-escaped. 2
(define-library (cloudflare r2 signing)−3
(import (sigil core)−4
(sigil io)+3
(import (sigil io) 4
(sigil math) 5
(sigil string) 6
(sigil list)test/test-network.sglmodified
@@ -1,5 +1,4 @@
−1
(import (sigil core)−2
(sigil test)+1
(import (sigil test) 2
(sigil process) 3
(sigil crypto) 4
(cloudflare r2))test/test-signing.sglmodified
@@ -1,5 +1,4 @@
−1
(import (sigil core)−2
(sigil test)+1
(import (sigil test) 2
(sigil crypto) 3
(cloudflare r2) 4
(cloudflare r2 signing))