Commit f866098
committed
Bring parity with macula-go-sdk: direct-dial, UCAN, RPC telemetry facts
cabi/go.mod was pinned to a2365b1 -- the commit immediately before
macula-go-sdk's entire parity push (direct-dial, periodic re-advertise,
supervised pubsub, UCAN, cert-chain, telemetry facts, streaming/content
direct-dial reuse). Bumped to 1bd1ae4 (current master).
Added, following this repo's existing cabi handle/errOut pattern exactly:
- Direct-dial: resolveDirect/callDirect/advertiseDirect (+WithCertChain
variants), streamOpenDirect(+WithCertChain), putDirect/getDirect.
Verified live: a real RESULT payload through resolve+dial+call, not
merely reaching the call stage (the weaker bar that hid a real bug in
macula-go-sdk's own AdvertiseDirect earlier in this SDK family's
development) -- see examples/08_*.
- UCAN: new Ucan/UcanPayload classes (create/verify/decode/introspect),
Session::callWithUcan, Session::serveWaitForCallGated. Found and fixed
a real design bug while building the live test: a call rejected by
policy never reaches the lookup rendezvous, so the Go wrapper's
ServeOneCallGated returns nil (success) via a path PHP could not tell
apart from a real PendingCall -- fixed by surfacing a distinguishable
errCallRejectedByPolicy. Verified live end-to-end: an unauthorized call
is refused with BOLT#4 Unauthorized before any PHP handler code runs,
an authorized one reaches and is answered by it -- see examples/09_*.
- RPC telemetry facts: no new export needed, confirmed (not assumed) via
an independent watcher session observing rpc.sent_v1/rpc.completed_v1
land during a plain call() -- see examples/11_rpc_telemetry_facts_check.php.
- Cert-chain: wiring verified reachable and produces the real, specific
Go-side error for malformed input; a full positive round trip needs an
Ed25519 X.509 leaf cert matching an external KeyPair's raw public key,
which PHP's openssl extension does not straightforwardly support --
deliberately not attempted rather than faked; the underlying algorithm
itself is already verified live in macula-go-sdk/macula-rust-sdk, both
thin wrappers over which this SDK is not.
Deliberately NOT exposed, documented in README and inline: periodic
re-advertise and the supervised PubSub wrapper (RunPublisher/RunSubscriber)
are both background-loop-shaped Go APIs; a PHP process can trivially loop
calling advertiseDirect()/subscribe()+recvEvent() itself, so wrapping a
second Go-side loop across the FFI boundary would add only callback
plumbing, not new capability.
21 pre-existing PHPUnit tests still pass unchanged.1 parent 59ce093 commit f866098
18 files changed
Lines changed: 1577 additions & 9 deletions
File tree
- cabi
- examples
- src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
28 | 43 | | |
29 | 44 | | |
30 | 45 | | |
| |||
79 | 94 | | |
80 | 95 | | |
81 | 96 | | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
82 | 101 | | |
83 | 102 | | |
84 | 103 | | |
| |||
0 commit comments