Conversation
Add a local pre-commit hook that runs test_docs_generation.py when SDK source or SDK reference docs are modified. This catches session.mdx (and other docs) drift from the SDK before pushing, preventing CI failures from test_session_parameters_in_sync and related tests.
| files: ^docs/src/testers/.*\.py$ | ||
| pass_filenames: false | ||
| - id: session-docs-sync | ||
| name: Check session.mdx is in sync with SDK |
There was a problem hiding this comment.
Hook name only mentions
session.mdx
The name says "Check session.mdx is in sync with SDK", but test_docs_generation.py actually covers 8 resources: agent, session, workflow, vault, persona, file_storage, agent_fallback, and function. A developer seeing this hook fail for a workflow drift would find the name confusing.
| name: Check session.mdx is in sync with SDK | |
| name: Check SDK reference docs are in sync with SDK |
Prompt To Fix With AI
This is a comment left during a code review.
Path: .pre-commit-config.yaml
Line: 99
Comment:
**Hook name only mentions `session.mdx`**
The `name` says "Check session.mdx is in sync with SDK", but `test_docs_generation.py` actually covers 8 resources: agent, session, workflow, vault, persona, file_storage, agent_fallback, and function. A developer seeing this hook fail for a workflow drift would find the name confusing.
```suggestion
name: Check SDK reference docs are in sync with SDK
```
How can I resolve this? If you propose a fix, please make it concise.Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Good catch — updated the name to "Check SDK reference docs are in sync with SDK" in e648076. The test covers all 8 resources, so the broader name is more accurate.
|
2027 auto-runs evals against preview deployments of your docs. To enable this, install one of:
Once a preview is deployed, open a new PR and we'll run the eval automatically. Evaluating agent experience using 2027.dev · View dashboard |
Summary
session-docs-syncpre-commit hook that runstests/test_docs_generation.pywhen SDK source files (packages/notte-sdk/src/) or SDK reference docs (docs/src/sdk-reference/) are modifiedsession.mdxout of sync withSessionStartRequest) locally before pushing, preventing recurring CI failures fromtest_session_parameters_in_syncand related sync testsContext
Insight: test_session_parameters_in_sync fails when session.mdx docs drift from SDK
Over the past 14 days,
test_session_parameters_in_syncfailed on 4 different PRs — each with a different parameter mismatch. The root cause is developers modifying SDK parameters without updating the corresponding.mdxdocs. This hook provides immediate local feedback when relevant files are changed.Changes
.pre-commit-config.yaml: Addedsession-docs-synclocal hook at the end of therepo: localsectioncd docs/src && uv run python -m pytest tests/test_docs_generation.py -x -q^(packages/notte-sdk/src/|docs/src/sdk-reference/)are stagedpass_filenames: falsesince the test doesn't accept file argumentsNote
Created by Mendral. Tag @mendral-app with feedback or questions.
Greptile Summary
Adds a
session-docs-synclocal pre-commit hook that runstests/test_docs_generation.pywhenever files underpackages/notte-sdk/src/ordocs/src/sdk-reference/are staged. The hook name was updated from the previous review to accurately reflect that all SDK reference resources (not justsession.mdx) are covered.Confidence Score: 5/5
Safe to merge — single-line YAML addition with no logic changes and all prior review concerns addressed.
The change is a small, isolated pre-commit hook configuration. The previous naming concern was resolved. No P0/P1 issues found.
No files require special attention.
Important Files Changed
session-docs-syncpre-commit hook to runtests/test_docs_generation.pywhen SDK source or SDK reference docs are staged; hook name was updated from a prior review to reflect all 8 resources covered.Reviews (2): Last reviewed commit: "fix: broaden pre-commit hook name to cov..." | Re-trigger Greptile