Repository navigation
Update Pydantic AI to CLAI 2 and decode canonical sessions - #69136
Merged
Merged
Conversation
Pin the smoke and conformance workflows to the upstream 0.56.0 engine definition and retain observed canonical events in the Pydantic session adapter, with legacy partial stdout support. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The runtime replacement has unresolved capture-integrity issues and incomplete integration validation, requiring human review.
3 open findings
What changed in this PR
Migrates gh-aw’s Pydantic AI workflows to CLAI 2 and adds canonical session decoding for local audits.
Changes:
- Pin harness and CLAI 2 packages to 0.56.0 and regenerate workflows.
- Decode keyed session events with redaction while retaining partial legacy capture.
- Add regression coverage and patch release notes.
| File | Description |
|---|---|
| actions/setup/js/parse_pydantic_log.test.cjs | Adds canonical-frame and unified-session regression cases. |
| actions/setup/js/parse_pydantic_log.cjs | Decodes keyed canonical events before legacy parsing. |
| .github/workflows/smoke-pydantic.md | Updates the upstream engine pin. |
| .github/workflows/smoke-pydantic.lock.yml | Regenerates smoke execution for CLAI 2. |
| .github/workflows/engine-conformance-pydantic-ai.md | Updates the upstream engine pin. |
| .github/workflows/engine-conformance-pydantic-ai.lock.yml | Regenerates conformance execution for CLAI 2. |
| .github/aw/imports/pydantic/pydantic-ai/4f6799896fcb386cc5d0af7e84b4b17c17dd14c3/src_pydantic_ai_harness_gh-aw_pydantic.md | Adds the pinned runtime and canonical recorder definition. |
| .changeset/pydantic-ai-clai2-release.md | Documents the migration and decoding support. |
🧠 Review effort: Max
Regenerate Pydantic workflow locks with the latest firewall and gateway pins. Correct the unified-session regression assertion to use canonical camelCase usage fields. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Discard events whose envelope keys or event types were redacted, preserving valid neighboring records and avoiding partial-capture crashes. Add regressions for embedded mask commands targeting envelope keys and types. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
|
🎉 This pull request is included in a new release. Release: |
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.


Why
The Pydantic AI smoke and conformance workflows used harness 0.35.0 and the legacy
pairunner. Upstream v2.56.0, released October 13, 2026, provides CLAI 2 and canonical session capture. The local Pydantic adapter needs to understand these events instead of treating the new output as legacy terminal text.Not merge-ready: review confirmed an unresolved capture-integrity defect in the upstream definition. Its framing key and records enter an agent-readable, writable log. Matching-key framing therefore does not authenticate tool results, usage, terminal status or inference evidence. The prerequisite is now tracked in pydantic/pydantic-ai#10397; no fixed upstream revision was available in the inspected history/current main.
Approach
4f6799896fcb386cc5d0af7e84b4b17c17dd14c3, selecting matching harness and CLAI 2 packages at 0.56.0, and include the compiler-fetched definition and regenerated locks. The repository release tag itself still pins 0.55.0, so this uses upstream's subsequent version-bump commit.origin/mainat2687cab90cin commit5d0e56305c747cd6b671b668a4078c6395a89ac5. Regenerate both conflicting locks with firewall 0.28.59 and MCP gateway 0.4.33. Correct the unified-session usage assertion to canonical camelCase fields.a604435b7b41fed14bc1fc7f4db68539da44e8cb, revalidate event envelopes after redaction. Discard records whose envelope keys/types were masked while preserving valid neighbors. Add three regression cases for embedded mask commands targetingdata,typeand an event type.Validation and review status
make agent-report-progress BASE_REF=HEADgate passed, including 39 Pydantic tests, JavaScript lint and schema freshness; no Go changes required new Go tests. Two parser lint warnings remain visible and were not suppressed.actions/setup,pkg/constantsandpkg/workflowpassed. Custom Go linters and schema freshness passed. Restoring pinned dependencies used lifecycle scripts disabled.The earlier compile-only dry-run gate remains failed: shellcheck passed across 93 run-step resources and model inventory was available, but experimental-engine notices, the ignored native tool allow-list warning and the existing threat-detection fallback to Copilot were fatal to that gate. No warnings were suppressed. Normal locks were restored after diagnostic compilation. Passing normal compilation/drift checks do not replace that gate.
The initial security review's required same-reviewer continuation remains unavailable because the runtime does not support follow-up messages to the synchronous reviewer. Its incomplete coverage is not a security-review PASS. Subsequent review confirmed the framing-key exposure described above; fixing the local redaction crash does not repair capture integrity or establish live native inference/provider/MCP correctness.
Unresolved capture-integrity prerequisite
Comments 4289321180 and 4289419765 are accepted. Their discussions are resolved as upstream-tracked, but the defect remains unresolved in pydantic/pydantic-ai#10397. The header and every frame expose the same key in
/tmp/gh-aw/agent-stdio.log, which both generated workflows expose read-write to agent tools. Rechecked upstream main11807a4e1c44a21d03b483065cb42597fa032bacstill has the same definition blob511d7739e450de70cd4553ad750b620497b2e87bas the pin.A trusted recorder transport must be inaccessible to agent tools, with matching parser/runtime support and adversarial checks against stdout/shared-log forgery. Then update both immutable import pins and regenerate locks. Removing only the header breaks recording and leaves keys in frames; patching only the local adapter does not secure Actions' imported custom parser. Upstream-managed source and generated locks were not manually edited to hide this defect.
Live testing
No Actions smoke was dispatched. Live testing and merge readiness remain blocked by the capture-integrity defect, failed dry-run gate, incomplete technical review and missing current-session human validation of the exact revision and effects. The normal smoke lock does not encode the proposed five-credit bound. Conformance requires a real queue Claim and must not run standalone.
The PR was published at the user's explicit request for code review; local validation does not authorize live execution.