Implement planned topic: 0041-pydantic-ai#249
Open
skill-temporal-developer-updater[bot] wants to merge 1 commit into
Open
Implement planned topic: 0041-pydantic-ai#249skill-temporal-developer-updater[bot] wants to merge 1 commit into
skill-temporal-developer-updater[bot] wants to merge 1 commit into
Conversation
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.
Validation Report — Pydantic AI integration
Skill:
temporal-developerTopic: Pydantic AI Temporal integration (Python)
Files under validation:
references/python/integrations/pydantic-ai.md(new, 259 lines)references/integrations.md(one new catalog row)Source of truth used:
/tmp/upstream_temporal.md(mirrored fromhttps://raw.githubusercontent.com/pydantic/pydantic-ai/main/docs/durable_execution/temporal.md)https://pydantic.dev/docs/ai/api/pydantic-ai/durable_exec/pydantic_ai_slim/pyproject.tomlpyproject.tomlpydantic_ai_slim/pydantic_ai/durable_exec/temporal/__init__.pypydantic-ai(provides_extra,requires_dist)temporalio.client.Client.connect)../documentation/docs/) for Temporal-side identifier resolutionGo / no-go
Overall verdict: RE-RUN AUTHORING
Triggered by Check 4 falling below 95%. Two of the failing claims are factually wrong in ways that an AI agent reader would propagate into user code: the umbrella install extra, and the "register plugin on both Client and Worker" instruction. These need to be re-grounded — they are not spot-fix-style typos. Check 6 cleanup (de-duplication of Hard Constraints vs Common Mistakes) can ride along but is independently a MINOR FIX.
Check 1 findings (citation audit)
22 inline citation tags inspected. 21 resolve cleanly. The single failure:
Finding 1.1 —
pydantic-ai.md:21The umbrella \pydantic-ai[temporal]` also works if you want the full Pydantic AI install.`<!-- pydantic-ai: docs/ai/overview/install/ -->[temporal]extra on the umbrellapydantic-aidistribution. PyPI metadata confirmsprovides_extraforpydantic-ai==1.106.0does not includetemporal(the list isa2a, dbos, examples, outlines-*, prefect, sentence-transformers, voyageai). Apip install "pydantic-ai[temporal]"dry-run produces:WARNING: pydantic-ai 1.106.0 does not provide the extra 'temporal'Temporal support reaches the user only because the umbrella's hardcoded base dependency line is
pydantic-ai-slim[..., temporal, ...]==1.106.0— the[temporal]suffix on the umbrella is silently ignored.pip install pydantic-ai(no extra) works because the slim-with-temporal is pulled in transitively. The skill could correctly cite the install page for that claim, but not thepydantic-ai[temporal]form.All hyperlinks are fully-qualified
https://URLs. The example-repo linkhttps://github.com/pydantic/pydantic-ai-temporal-examplereturns HTTP 200.Statistics: 22 citations, 21 supported, 1 unsupported → 95.5% (threshold 98%).
Check 2 findings (reverse-grep / fabrication)
Every factual token in the authored file resolves to either upstream Pydantic AI documentation/source or Temporal documentation. Spot examples:
TemporalAgent,PydanticAIPlugin,AgentPlugin,PydanticAIWorkflow,LogfirePlugin,TemporalRunContext,__pydantic_ai_agents__,provider_factory,event_stream_handler,model_activity_config,toolset_activity_config,tool_activity_config,run_context_type,pydantic_ai.durable_exec.temporal,pydantic_ai.exceptions.UserError) — all confirmed in upstreamtemporal.md, the API reference, or the plugin source.pydantic_data_converter,workflow.defn,workflow.run,workflow.unsafe.imports_passed_through,start_to_close_timeout) — all resolve in../documentation/docs/.temporal.md:172verbatim. (Upstream API reference lists three additional fields —loaded_capability_ids,discovered_tool_names,capability_loaded— but that is an upstream doc inconsistency, not a skill fabrication; the skill cites the guide, not the API page, for this list.)temporalio>=1.24.0version pin (L19) — confirmed verbatim inpydantic_ai_slim/pyproject.toml.No fabrications found.
Check 3 findings (regression patterns)
Universal patterns (none present):
--profile— absent.TEMPORAL_TLS_CLIENT_CERT_PATH/_KEY_PATH/_CA_CERT_PATH— absent.tcld service-account— absent.--output text/--output jsonl— absent.saas-api.tmprl.cloud:7233— absent.Topic-specific:
temporalio.contrib.pydantic_ai— appears only atpydantic-ai.md:245inside the Common Mistakes section, explicitly flagging it as the wrong path. Not a regression hit.temporalio[pydantic-ai]extra — absent.Zero regression-pattern hits.
Check 4 findings (independent re-verification)
Sample of 10 claims drawn evenly across the file, plus 6 spot checks. Two substantive mismatches.
Finding 4.1 —
pydantic-ai.md:21(also see Finding 1.1)pydantic-ai[temporal]also works if you want the full Pydantic AI install."pydantic-aidoes not declare atemporalextra.pip install "pydantic-ai[temporal]"triggersWARNING: pydantic-ai 1.106.0 does not provide the extra 'temporal'; the install succeeds only because the umbrella's base dependency line already pulls inpydantic-ai-slim[..., temporal, ...].pip install pydantic-ai(no extra) installs temporalio, because the umbrella distribution already enumeratestemporalinside its basepydantic-ai-slim[...]dependency. Alternatively, the slim formpip install "pydantic-ai-slim[temporal]"(which the file recommends earlier at L16) is the documented path.pip install "pydantic-ai[temporal]"into a project'srequirements.txt/ install instructions and the user sees a pip warning. Mild reader confusion, easy fix.Finding 4.2 —
pydantic-ai.md:90,:237, and Common-Mistakes adjacencyPydanticAIPlugin()to both the TemporalClientandWorker"PydanticAIPluginon both Client and Worker. The Client side configurespydantic_data_converter; the Worker side registers the dynamically created Activities."Client.connect, verified byinspect.getsource):Client.connect(plugins=[PydanticAIPlugin()])only;Worker(client, task_queue=..., workflows=[...])is constructed with noplugins=argument. The Worker inherits the plugin from the Client.Client.connect. So the prose at L90 and the hard constraint at L237 contradict both the upstream SDK guidance and the file's own example.Worker(client, plugins=[PydanticAIPlugin()], ...). Per the Temporal SDK docstring, this is the wrong shape: plugins implementing bothClientandWorkerplugin protocols should be registered on the Client only. Worst-case this re-runs configuration hooks twice (duplicate activity registration, duplicate workflow_runner replacement) and produces sandbox / activity errors that are hard to diagnose. The file's example code does not exhibit the bug, but its constraint list and prose tell the reader to introduce it.Spot checks that all matched: L5 wrapper-overview claim, L19
temporalio>=1.24.0, L42 / L44 name/id mandatory-and-stable, L86 60s default timeout, L112 PydanticAIPlugin's three responsibilities, L142 deps must be Pydantic-serializable, L144 RunContext field list (matches upstream guide verbatim), L150 streaming unsupported set, L114 don't double-wire data_converter, L86 per-tier overrides, L122__pydantic_ai_agents__pattern, L66 module-scope construction, L156-158 LogfirePlugin alongside on Client, L169 pandas import-race workaround.Statistics: sample size 16 (10 primary + 6 spot checks). Matches: 14. Mismatches: 2. Match rate: 87.5% (threshold 95%).
Note on severity: both mismatches were caught only by going beyond
temporal.mdto the Temporal SDK's own docstring and PyPI metadata. The authored claims are internally plausible because Pydantic AI'sPydanticAIPluginsource code is described as a "Temporal client and worker plugin" — but the Temporal SDK's plugin-propagation contract makes registering on both an anti-pattern. This is precisely the subtle-wrong shape Check 4 exists to catch.Check 5 findings (integration layout)
All six sub-checks pass:
references/python/integrations/pydantic-ai.mdmatches the catalog convention. ✅references/integrations.mdfor Pydantic AI, with name, language, description, reference path, and Related column. ✅SKILL.mdedit —git diff HEAD -- SKILL.mdis empty. ✅references/python/python.md—git diff HEAD -- references/python/python.mdis empty. ✅ai-patterns.md(Python or core). The cross-references inpydantic-ai.mdlink outward to those files; that's expected for the new page. ✅Check 6 findings (tone and scope)
No Pattern 1 (workaround-disclosure) findings. The streaming section uses the supported "Don't do X — use Y" form: "
Agent.run_stream(),Agent.run_stream_events(), andAgent.iter()are not supported... The supported alternative isevent_stream_handler..." This is good guidance, not a cookie-jar disclosure.Finding 6.1 — Pattern 9 (constraints duplicated outside the canonical section)
name=on the Agent" duplicates the L234Agent.nameconstraint.id=on@agent.toolset" duplicates the L235 toolset-id constraint.temporalio.contrib.pydantic_ai" duplicates the L236 ships-in-pydantic_ai.durable_exec.temporalconstraint.Agent.run_stream" duplicates the L239 streaming constraint.Modelinstance" duplicates the L238 Model-instances constraint.data_converter=pydantic_data_converterin addition toPydanticAIPlugin()" and (b) the@agent.toolsetframing (which adds the wrap-time-raise detail not in the hard constraint).raisebehavior). Drop the others.Finding 6.2 — Pattern 10 (Resources pointing at a source tree, minor)
pydantic/pydantic-ai-temporal-exampleGitHub repo. Borderline acceptable since it is the upstream-blessed example, but per the pattern, prefer linking to a focused docs page when one exists. Low-priority.Acceptable patterns observed (no findings):
data_converter=...— the plugin owns that wiring") — terse don't-do-X form.with workflow.unsafe.imports_passed_through(): import pandasblock is an upstream-prescribed pattern, not the imports-inside-function anti-pattern).Check 7 findings (cross-language structure)
Skipped — Pydantic AI integration is Python-only; no
references/core/<feature>.mdpage is expected.Statistics
https://, all reachable)Summary of required follow-up
pydantic-ai[temporal]with either the no-extra umbrella formpip install pydantic-aior simply drop the umbrella mention and rely on the slim form already given at L16.Client.connect(plugins=[...])only; the Worker inherits it via the Client, per the Temporal Python SDKClient.connectdocstring. The file's own example code is already correct — only the prose / constraint list need to be brought in line. Also reconcile the "Common mistake" framing so it does not contradict this.pydantic-ai-temporal-examplerepo link with a focused upstream doc page if one exists, otherwise leave as-is (Finding 6.2).Items 1 and 2 jointly justify the RE-RUN AUTHORING verdict. Items 3 and 4 can be folded into a single cleanup commit alongside the re-authoring pass.