docs: surface pst!/get! HTTP auto-unwrap forms (#5bm)#526
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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
The
!auto-unwrap suffix has worked onget/pst/get-to/pst-tosince the bang family was generalised, butskills/ilo/ilo-builtins-io.mdonly called it out under JSON. Several recent persona runs (basic-auth, webhook-sender) reached for the manual?r{~v:v;^e:^e}shape on every HTTP call site, paying ~30 tokens per call that the bang form would have saved. Pure doc gap, not a runtime gap.Fix: add a paragraph in the HTTP section showing all three forms (
get,get!,get!!) with a one-line caveat on when to reach for which, plus a tiny runnable example so the engines harness pins the contract.Manifesto framing: token-minimal language only works if the token-minimal idiom is the obvious one. Hiding
pst!under the JSON heading made the longer shape feel default.Repro before / after
Before, basic-auth persona wrote:
After, same shape collapses to:
inside any function that already returns
R.What's in the diff
add http-bang example pinning get!/pst! propagation:examples/http-bang.iloexercisesget!/pst!/get-to!/pst-to!via the engines harness. Uses connection-refused on loopback for a stable Err, then matches on the Result tag so the assertion is OS-portable.surface HTTP bang forms in skills io doc: adds the three-form table + one-line caveat to the HTTP section ofskills/ilo/ilo-builtins-io.md. Mirrors the wording style of the existing!paragraph under JSON.Test plan
cargo test --release --features cranelift, full suite greencargo test --release --test examples_engines,http-bang.ilopassescargo fmt --checkcargo clippy --release --features cranelift -- -D warningsilo examples/http-bang.ilo --vm probe-{get,pst,get-to,pst-to}all emiterr propagatedFollow-ups
None. SPEC.md already documents
get!;ai.txtlists the builtin signatures and inherits the!rule from the language spec. This PR only closes the skills-doc gap.