-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion: protocol specification #155
Comments
I would love if there were a single interface definition - it seems like the best place to put docs that won't drift out of date. While it would be cool to define the schema with IPLD, the typescript-first approach makes sense as a practical first step (assuming the bugs are squishable). |
I think it's a good idea to document the protocol separately from any given implementation (e.g. typescript). Implementations drift. Sometimes this is on purpose, e.g. an update to the implementation that corresponds to an update to the protocol. But sometimes it's an accident, i.e. an accidental regression. If you derive your protocol definition from an implementation, the protocol definition may also 'accidentally' drift from its intended definition. Not good. If someone accidentally nudges the implementation to not match the protocol, I'd want that to fail CI, not regenerate docs with no-questions-asked. |
That is a really good point! |
One other thing I forgot to mention is something I just ran into with #163 Ideally we should be able to iterate on the protocol without having to update all of the implementations everywhere. Put it differently we'll need to version protocol and some implementations may be implementing older spec. If we just derive protocol spec from implementation we no longer can iterate on the spec independent of the implementation. |
i agree with @gobengo, IMO we should write spec markdown docs and iterate there, and implementations can update/adjust deviations at their own pace. |
- a number of copy updates - a number of small styling changes - introduce `react-tooltip` to give us more capable tooltips that match the referrals spec <img width="1191" alt="Screenshot 2024-12-09 at 2 02 29 PM" src="https://github.com/user-attachments/assets/253d880d-c879-42b9-8cac-2ce85903cbfb">
🤖 I have created a release *beep* *boop* --- ## [1.16.0](storacha/console@w3console-v1.15.2...w3console-v1.16.0) (2024-12-09) ### Features * add a PNG version of our logo ([#153](storacha/console#153)) ([2812b27](storacha/console@2812b27)) * point staging env referral link at staging marketing site ([3937048](storacha/console@3937048)) * prototype of referral system in console ([#142](storacha/console#142)) ([6f760fe](storacha/console@6f760fe)) * referrals tweaks ([#155](storacha/console#155)) ([7e58678](storacha/console@7e58678)) * update TOS links to point to the Storacha docs ([#148](storacha/console#148)) ([68d09b5](storacha/console@68d09b5)) ### Bug Fixes * use the correct referral URL ([#149](storacha/console#149)) ([bc29a2b](storacha/console@bc29a2b)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
I would like to discuss and decide how are we going to approach protocol specification, so all arguments are weighted and we arrive to a best compromise as team.
Long term I would like to embrace IPLD schema for it, but in practice we need something pragmatic sooner.
My vision was to use TS interfaces for describing capabilities and corresponding protocol as described here.
However @hugomrdias encountered problems in the past with this approach, because TS would complain about mismatching types due to some inference bugs in the ucanto. There may have been other problems, but probably @hugomrdias can fill us in on those.
As a result of the issues we moved to an approach where types and protocol is basically inferred from implementation
https://github.com/web3-storage/w3protocol/blob/9d4b5bec1f0e870233b071ecb1c7a1e09189624b/packages/access/src/capabilities/types.ts#L8-L22
After conversation with @yusefnapora I'm recognizing bunch of downsides with current approach:
InferInvokedCapability<typeof account>
is pretty useless when reading protocol spec.Infer*
stuff and there are bunch of capability defs from which actual types are derived (with some jsdoc comments that don't even stick to the corresponding fields)https://github.com/web3-storage/w3protocol/blob/9d4b5bec1f0e870233b071ecb1c7a1e09189624b/packages/access/src/capabilities/upload.js#L28-L50
Given all the above I think it would be a good idea to take a step back and identify:
The text was updated successfully, but these errors were encountered: