feat(stdlib/Http): RSR rewire — surface hpm-http-rsr Zig FFI (10 exports)#425
Merged
Conversation
🔍 Hypatia Security ScanFindings: 81 issues detected
View findings[
{
"reason": "Action actions/checkout@v6 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action denoland/setup-deno@v2 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in affine-vscode-publish.yml",
"type": "unknown",
"file": "affine-vscode-publish.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
hyperpolymath
added a commit
that referenced
this pull request
May 28, 2026
🔍 Hypatia Security ScanFindings: 81 issues detected
View findings[
{
"reason": "Action actions/checkout@v6 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action denoland/setup-deno@v2 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in affine-vscode-publish.yml",
"type": "unknown",
"file": "affine-vscode-publish.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
…rts)
Adds the server-side counterpart to `http_request` by surfacing the 10
HTTP-server primitives from `hyperpolymath/http-capability-gateway`'s
Zig FFI as `pub extern` declarations in stdlib/Http.affine. This is the
last AffineScript stdlib gate for the OikosBot port (oikos#41,
`bot-integration-affine/`) to reach feature parity with the retired
ReScript webhook receiver.
The 10 exports:
* hpm_http_server_listen / _port / _free / _accept
* hpm_http_request_method / _path / _header / _body / _respond / _free
Effect rows: `/ Net` for the sync ops; `/ { Net, Async }` for the
blocking `accept`. Native lowering is responsible for adapting the Zig
size-query convention (`isize`, NULL/0 → required size, then re-call)
into the AS-friendly `String` / `Option<String>` returns the externs
declare; AS callers never see the two-step protocol.
**Native-only**: no Deno-ESM lowering, consistent with the existing
`http_request_thenable` + `response*` wasm-path externs already in the
module. The natural deployment target is WasmGC / native-C linking
libhttp_capability_gateway alongside libhpm_crypto.
Verified: `affinescript check` passes on stdlib/Http.affine and on an
external smoke consumer importing all 12 names + sketching the
OikosBot webhook accept loop (POST /webhook with HMAC signature
verification placeholder, 404 on other paths). Full test suite: same
2 pre-existing failures as main, no regressions (341 tests run).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
686da15 to
986f33e
Compare
🔍 Hypatia Security ScanFindings: 81 issues detected
View findings[
{
"reason": "Action actions/checkout@v6 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Action denoland/setup-deno@v2 needs attention",
"type": "unpinned_action",
"file": "publish-jsr.yml",
"action": "pin_sha",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in affine-vscode-publish.yml",
"type": "unknown",
"file": "affine-vscode-publish.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in casket-pages.yml",
"type": "unknown",
"file": "casket-pages.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
},
{
"reason": "Issue in ci.yml",
"type": "unknown",
"file": "ci.yml",
"action": "flag",
"rule_module": "workflow_audit",
"severity": "medium"
}
]Powered by Hypatia Neurosymbolic CI/CD Intelligence |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surfaces the 10 HTTP-server Zig FFI exports from
hyperpolymath/http-capability-gatewayaspub externdeclarations instdlib/Http.affine. This is the last AffineScript stdlib gate for the OikosBot port (oikos#41,bot-integration-affine/) to reach feature parity with the retired ReScript webhook receiver.The 10 exports
hpm_http_server_listen,hpm_http_server_port,hpm_http_server_free,hpm_http_server_accepthpm_http_request_method,hpm_http_request_path,hpm_http_request_header,hpm_http_request_bodyhpm_http_request_respond,hpm_http_request_freePlus two opaque types:
pub extern type HpmHttpServer;,pub extern type HpmHttpRequest;.Effect-row choices
/ Netfor the sync ops (listen,port,free, all request inspectors +respond+ request-free)/ { Net, Async }for the blockingacceptNative-only — no Deno-ESM lowering
Consistent with the existing
http_request_thenable/response*wasm-path externs already in the module. The natural deployment is WasmGC / native-C linkinglibhttp_capability_gatewayalongsidelibhpm_crypto.Native lowering is responsible for adapting the Zig size-query convention (
isize, NULL/0 → required size, then re-call to write into a caller-provided buffer) into the AS-friendlyString/Option<String>returns the externs declare. AS callers never see the two-step protocol.Verification
affinescript check stdlib/Http.affine— type checksdune build— cleandune runtest— same 2 pre-existing failures asmain, no regressions (341 tests run vs 340 on main: harness picked up an extra check on the modified file).affinemodule importing all 12 names + sketching the OikosBot webhook accept loop (POST/webhookwith HMAC signature placeholder; 404 on other paths) type checks end-to-endVocabulary
"Zig FFI" not "C-ABI" — the C calling convention is an implementation detail of Zig's
export fn. Estate convention is Zig=FFIs / Idris2=ABIs (matches affinescript#421 forhpm-json-rsr).Test plan
affinescript check stdlib/Http.affinestill green after rebaseoikos/bot-integration-affine/) canuse Http::{...}the new names and link the native FFI library🤖 Generated with Claude Code