Repository navigation
feat(notebooks): Publish the notebook producer endpoints - #130740
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2013c59. Configure here.
| class OrganizationNotebooksIndexEndpoint(OrganizationNotebooksBaseEndpoint): | ||
| owner = ApiOwner.ML_AI | ||
| publish_status = {"GET": ApiPublishStatus.PRIVATE, "POST": ApiPublishStatus.PRIVATE} | ||
| publish_status = {"GET": ApiPublishStatus.PRIVATE, "POST": ApiPublishStatus.PUBLIC} |
There was a problem hiding this comment.
🤖 Publishing writes that a read-only org:read token can perform
NotebookPermission (notebooks/endpoints/base.py, outside this diff) maps POST/PUT/DELETE to org:read. That lets members write in open-membership orgs. Once these methods are public, though, the published contract says a user token minted with only org:read, which people treat as read-only, can do all of the following:
- create notebooks
- overwrite producer blocks by key, including reviving deleted ones
- reorder blocks
- delete blocks
Runtime behaviour doesn't change: private endpoints already accepted tokens. What changes is that the public docs advertise it, and tightening the scope later would break public clients. Is org:read the scope you want to commit to for public notebook writes? A member-held write scope such as event:write might fit better. If you do want org:read, it may be worth a sentence in the tag description.
Written by an AI agent and included in this review by its author.
28e5d3f to
d5bcd18
Compare
2013c59 to
06ded32
Compare
d5bcd18 to
7300b7c
Compare
fe57c9a to
6cef709
Compare
7300b7c to
e9b49bb
Compare
6cef709 to
3b2d1c7
Compare
e9b49bb to
1bf82e1
Compare
3b2d1c7 to
6f84aa6
Compare
1bf82e1 to
8653e2f
Compare
6f84aa6 to
66ddef2
Compare
8653e2f to
ea2728e
Compare
9ca5197 to
e573180
Compare
ea2728e to
8b9bcb7
Compare
e573180 to
91ebb4b
Compare
8b9bcb7 to
91d706e
Compare
91ebb4b to
8fcfa93
Compare
91d706e to
9a16983
Compare
8fcfa93 to
d3f754e
Compare
9a16983 to
f2f72b3
Compare
…he agent token matrix Declare Response[T] shapes on the newly public notebook endpoints, and give the public API matrix real notebooks, blocks, payloads, and the investigations flag.
…nd the agent token matrix Send notebookVersion in the service account tests, and key the matrix's notebook request bodies by the renamed endpoint classes.
Filter on is_published, so an EXPERIMENTAL method stays in the private investigation schema.
…tebooks tag Mark the published methods PUBLIC_EXPERIMENTAL, since the API may still change. Name their operations and responses after notebooks, and give them a Notebooks tag. Private methods keep their Investigation names.
d3f754e to
5227fe3
Compare

We're moving the notebook tables (Investigation*) into a new
sentry.notebooksapp, separate from the hypothesis engine that writes them, so other Seer producers like Autofix and triage can write notebooks too.Notebook create, details, and block writes become public so Seer producers can call them through Code Mode. They accept only notebookVersion, and the response types are fully documented.