fix: restore clippy and rustfmt on main, restructure secure-exec docs - #2004
Conversation
|
Stack for rivet-dev/agentos Get stack: change ztxnwqzw |
|
🚅 Environment agentos-pr-2004 in rivet-frontend has no services deployed. |
72efa1b to
b807ba9
Compare
b807ba9 to
de33b39
Compare
| name: "store", | ||
| description: "Read the order book.", | ||
| functions: { | ||
| listOrders: hostFunction({ |
There was a problem hiding this comment.
🟠 Medium · The new Code Mode example is rejected before execution
validateHostFunctions() only accepts function keys matching ^[a-z0-9]+(?:-[a-z0-9]+)*$, and VM creation calls that validator whenever hostFunctions are supplied. The listOrders key therefore throws Host function name "listOrders" must be lowercase alphanumeric with optional single hyphen separators, so this new runnable example and its embedded docs snippet cannot reach evaluate. Name the registered function "list-orders"; the guest-facing identifier will still be converted to listOrders.
| - Packages install into the working directory, `/workspace`. Run your code from a | ||
| file there so it finds them. Inline code has a | ||
| [limitation](/secure-exec/docs/limitations) here. | ||
| here. |
There was a problem hiding this comment.
🔵 Low · The npm guidance now ends with a broken sentence
Removing the limitations link leaves the rendered bullet as “Inline code has a here,” so readers no longer get either a valid explanation or usable prose. Replace these two lines with a complete description of the inline import-resolution limitation, or link to the section that now owns that guidance.
| name: "math", | ||
| description: "Math utilities", | ||
| hostFunctions: ["add"], | ||
| functions: ["add"], |
There was a problem hiding this comment.
🟠 Medium · The same host-function assertion remains broken in the nightly suite
This updates the migration-parity expectation to match listHostFunctionsPayload(), which emits functions, but packages/core/tests/sidecar-host-function-dispatch.nightly.test.ts:66 still expects the old hostFunctions field for the identical agentos list-host-functions response. That nightly test will continue failing whenever it runs. Update the duplicate assertion in the same change, or share one response fixture so the two suites cannot drift again.
de33b39 to
eb03942
Compare
|
|
||
| - **Set `timeoutMs` on every call** that runs code you did not write. |
There was a problem hiding this comment.
🟠 Medium · The docs stop treating a VM as the tenant isolation boundary
This removes the only explicit multi-tenant isolation rule while the remaining VM docs still state that calls in one VM share its filesystem, network, packages, processes, and limits. Reusing such a VM for mutually untrusted tenants lets one tenant observe or affect state left by another, including files and long-running processes; changing only the per-session credential does not isolate that shared VM state. Keep the one-tenant-per-VM guidance in the security responsibilities (and the credential example), or document an equally strong tenant boundary.
| published as host ports. | ||
| - External network access is **denied by default**. Grant it, or specific hosts, | ||
| with [permissions](/secure-exec/docs/permissions). | ||
| - Read or cancel response bodies you request. See |
There was a problem hiding this comment.
🟠 Medium · The networking disposal workaround disappears while the behavior remains
The deleted limitations page documents that VMs which used the network can take several seconds longer to dispose, and much longer when a response body is left unread (tracked in #1989). This diff does not change that runtime behavior, but it removes both the limitations page and this networking-page instruction to read or cancel bodies. Users can now follow the networking docs and encounter unexplained cleanup stalls with no mitigation. Preserve this warning and workaround on the networking page until the underlying issue is fixed.
- Silence clippy too_many_arguments on ActiveUnixListener::from_virtual and fix three rustfmt violations that landed broken on main. - Restructure the Secure Exec sidebar into General, Use Cases, Executing Code, Security, and Reference; drop icons outside the first two groups. - Delete the Platforms, Execution Model, Errors, Limitations, API Reference, Going Further, and Python pages, folding what survives into Execute & Evaluate and Quickstart. - Remove per-tenant VM guidance from all docs and examples. - Add a Code Mode use case page and example on the current host functions API. - Trim the Introduction to the snippet, feature bullets, and Where to start.
eb03942 to
06db7b1
Compare
|
|
||
| - **Set `timeoutMs` on every call** that runs code you did not write. |
There was a problem hiding this comment.
🟠 Medium · The docs stop treating a VM as the tenant isolation boundary
This still removes the only explicit multi-tenant isolation rule while the remaining VM docs state that calls in one VM share its filesystem, network, packages, processes, and limits. Reusing such a VM for mutually untrusted tenants lets one tenant observe or affect state left by another; changing only the per-session credential does not isolate that shared state. Keep the one-tenant-per-VM guidance in the security responsibilities and credential example, or document an equally strong tenant boundary.
| published as host ports. | ||
| - External network access is **denied by default**. Grant it, or specific hosts, | ||
| with [permissions](/secure-exec/docs/permissions). | ||
| - Read or cancel response bodies you request. See |
There was a problem hiding this comment.
🟠 Medium · The networking disposal workaround disappears while the behavior remains
The deleted limitations page documents that VMs which used the network can take several seconds longer to dispose, and much longer when a response body is left unread (tracked in #1989). This head still does not change that runtime behavior, but removes both the limitations page and this instruction to read or cancel bodies. Preserve the warning and workaround on the networking page until the underlying issue is fixed.
Uh oh!
There was an error while loading. Please reload this page.