Skip to content

FE-1456: Add a usage manual for the Python bindings - #9253

Merged
kube merged 1 commit into
cf/fe-1340-webgpu-experiment-backendfrom
cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings
Aug 21, 2026
Merged

FE-1456: Add a usage manual for the Python bindings#9253
kube merged 1 commit into
cf/fe-1340-webgpu-experiment-backendfrom
cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings

Conversation

@kube

@kube kube commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

🌟 What is the purpose of this PR?

Implements FE-1456: the CLI has a usage manual attached to its layer, the Python bindings had only a package README and docstrings. A caller who wants to drive Petrinaut from Python now has the same kind of guide in the docs site, attached to the python-bindings layer.

Top of stack #9226, on FE-1415.

🔗 Related links

  • FE-1456 (internal): this PR
  • FE-1270 (internal): the package this documents
  • FE-1413 (internal): the CLI manual this is modelled on

🔍 What does this change?

One new authored page, content/python-bindings/usage-manual.mdx, plus a one-line cross-link from the CLI manual. Sections: depending on the package, opening a session, run requests, optimization studies, errors, timeouts and shutdown, end to end.

It documents the Python layer and links to the CLI manual for wire-level detail rather than repeating it. Every symbol, default, and limit was checked against the source, which corrected several claims the package README implies:

Claim What the source says
Line caps The bindings enforce 8 MiB on bootstrap and protocol lines, not the CLI's 10 MiB request cap
Error hierarchy PetrinautRunError extends RuntimeError directly; only PetrinautProtocolError extends PetrinautClientError
seedsPerTrial Defaults to 1 when absent or when study is not an object, and booleans are rejected
Response deadline 240 s per seed, so a two-seed study allows 480 s
Child environment Only PETRINAUT_CLI_NODE_OPTIONS is forwarded, under the child's NODE_OPTIONS
Concurrency The lock guards start and close only, so one session serves one caller

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • modifies a workspace but not a publishable library

📜 Does this require a change to the docs?

The changes in this PR:

  • require changes to docs which are made as part of this PR

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

🛡 What tests cover this?

lint:arch-docs validates attachTo and every doc:/layer: target, so a stale link fails the build. Authored pages go from 15 to 16.

❓ How to test this?

  1. turbo run dev --filter @apps/petrinaut-docs
  2. Open /architecture/python-bindings/usage-manual: it appears under the python-bindings layer beside its Overview, and its links to the CLI manual resolve.

🐾 Next steps

The CLI manual keeps its em dashes, so the two pages differ in punctuation style. Bringing the older page in line with the prose rules is a separate cleanup.

🤖 Generated with Claude Code

@kube kube self-assigned this Aug 19, 2026
@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview Aug 21, 2026 12:17am
petrinaut Ready Ready Preview Aug 21, 2026 12:17am
petrinaut-docs Ready Ready Preview Aug 21, 2026 12:17am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview Aug 21, 2026 12:17am

@vercel
vercel Bot temporarily deployed to Preview – petrinaut August 19, 2026 16:56 Inactive
@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team labels Aug 19, 2026
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from 1240da1 to 1491fbd Compare August 19, 2026 17:32
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from 1491fbd to f048ada Compare August 19, 2026 21:12
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from f048ada to ffcae61 Compare August 19, 2026 21:44
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from ffcae61 to 3ff18a3 Compare August 19, 2026 21:53
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from 3ff18a3 to 3811508 Compare August 19, 2026 22:16
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from 165b64b to a2cc6cc Compare August 20, 2026 00:50
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from a2cc6cc to 4ace5b4 Compare August 20, 2026 01:12
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from 4ace5b4 to 85ff59f Compare August 20, 2026 01:56
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from 85ff59f to 047f6be Compare August 20, 2026 09:31
@kube
kube force-pushed the cf/fe-1456-arch-docs-usage-manual-for-the-python-bindings branch from 047f6be to 02ba2b2 Compare August 20, 2026 10:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team

Development

Successfully merging this pull request may close these issues.

1 participant