Skip to content

test: characterize cA2A advertisement with pinned official A2A TCK - #266

Open
dinakarjs wants to merge 14 commits into
agentrust-io:mainfrom
dinakarjs:test/pinned-a2a-tck-differential
Open

dinakarjs wants to merge 14 commits into
agentrust-io:mainfrom
dinakarjs:test/pinned-a2a-tck-differential

Conversation

@dinakarjs

@dinakarjs dinakarjs commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

Problem and resulting behavior

The ordinary-path TCK comparator previously allowed nonzero protected-handler counts, and the experiment installed vulnerable dependency pins. It now requires integer-zero counts and clean source provenance, refuses dirty TCK checkouts, clears inherited pytest settings, and reruns for relevant source/dependency changes. Both modes enable streaming; the counter measures successful protected lookup after authentication and payload checks.

The SUT environment pins pyasn1 0.6.5, filelock 4.2.1, msgpack 1.2.3, opentelemetry-api 1.45.1 and setuptools 84.1.0. The workflow checks installed dependency consistency and audits that environment before TCK execution. The committed dependency triage records all 15 remaining findings and their remediation; no findings are ignored. The separate upstream TCK environment is outside that audit, and version pins are not a complete hash lock.

Validation — 3 November 2026

Head: 2c7b6b3ef94f21b401da5498bd21b363b14e2a1a. Executable changes are published at 98f4fd69d789509ea81be8aa2a43870d586d91cb, whose tree exactly matches the locally tested source; the final commit adds the validation record only.

  • Fresh 97-package SUT environment: pip check passes; pip-audit reports zero known findings.
  • Both official JSON-RPC MUST runs: 79 passed / 156 skipped / 30 deselected; identical per-test outcomes, integer-zero protected-handler invocations and no timeout.
  • All 70 comparator/bridge/loopback tests pass.
  • Separate hash-locked development environment: 796 unit tests pass / 2 skip; Ruff, mypy (47 source files) and configured Bandit pass.
  • SDK/OpenTelemetry context-detach and pending-task cleanup diagnostics occurred. This is not a warning-free execution claim.

Source mapping, environment digest, audit inventory and result observations are committed under experiments/a2a-tck/. Original measurements at 806d1147c0bc834ee8aabb698b341c926cd8531e remain explicitly historical.

Review and limits

@drk-ram: the requested pyasn1 installation-path correction and the remaining dependency triage/remediation are published for re-review. The new formal reviewer request returned HTTP 403, so no successful reassignment is claimed. Hosted TCK run 41650479261 passed on the current head: its logs confirm a clean SUT audit, accepted paired comparison and 70 passing focused tests. All returned current-head technical checks, including the Linux/Windows matrix and governance, now pass. The maintainer approval gate remains failed.

Ordinary-path advertisement characterization only: no protected-path/full-A2A certification, fresh local Windows or hardware execution, cross-language assurance or production acceptance. Prepared with OpenAI Codex; DCO-signed.

Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🟡 Contributor Check: MEDIUM

Check Result
Profile MEDIUM
Credential LOW
Overall MEDIUM

Automated check by AgenTrust Contributor Check.

@github-actions github-actions Bot added the needs-review:MEDIUM Contributor check flagged MEDIUM risk label Oct 21, 2026
Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <dinakarjs@gmail.com>
Preserve existing contribution history and bounded evidence claims; validate the merged tree.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Signed-off-by: Srinivasa Consultants <78673153+dinakarjs@users.noreply.github.com>
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@dinakarjs
dinakarjs marked this pull request as ready for review October 31, 2026 03:43
@dinakarjs
dinakarjs requested review from a team, carloshvp and zohebk8s as code owners October 31, 2026 03:43

Copy link
Copy Markdown
Contributor Author

@carloshvp Please review the pinned official A2A TCK advertisement comparison and its comparator controls at current head 877ade76e03878ccf83bb16ef059948a9cb1d40a. This PR is now ready for independent review, and the existing reviewer requests are populated. All returned current-head technical workflows succeed (validation evidence); the PR description records the prior local tests and their revisions.

Ordinary-path characterization only; no protected-handler TCK coverage, full A2A certification or hardware acceptance.

Please identify any remaining change required or disposition this bounded contribution. This request does not claim independent approval, a new full-suite rerun, or merge readiness. Prepared with OpenAI Codex.

@rajnisht7 rajnisht7 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the overall changes looks good, but the evidence gate has a gap that matters for what this PR claims

  • compare.py never asserts that protected_handler_invocations is 0 on either side. It only reports the numbers. I reproduced both [0, 7] and [7, 7] still returning identical_test_outcomes: true when the rest of the provenance and JUnit outcomes match. The README claims 0/0 and the runner records the count specifically for this isolation property, so the comparator should enforce it.

Please add the zero-check in compare() and a negative-control test (or three) covering non-zero / unequal counts. The existing negative controls cover everything else except this.

A couple of related notes while we’re here:

  • The counter only increments inside _lookup() after successful auth + payload checks, so early rejects on the protected path stay at 0. The field name is a bit stronger than the actual metric.
  • Streaming is forced True on both sides (original card is False). The differential is still controlled, but the “only removes the advertisement” wording is slightly imprecise.
  • The new workflow only triggers on the experiment/demo paths; changes under src/ won’t re-run it.
  • TCK cleanliness check uses --untracked-files=no.
  • Child process inherits PYTEST_ADDOPTS etc.
  • Small pin differences (cedarpy 4.12.1 vs current 4.12.2, setup-python still on v7.0.0).
  • ca2a_tracked_changes is recorded but never compared.
    even though none of these break runtime. The missing zero assertion is the one that needs fixing before this can land, since the whole point of the PR is ordinary-path characterization evidence.

Reject nonzero or malformed protected-handler counts and dirty tracked source. Cover unequal and equal nonzero counts with valid twins. Clarify the counter and streaming fixture, reject untracked TCK changes, clear inherited pytest options, and schedule on source/dependency changes.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

dinakarjs commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor Author

@rajnisht7 The zero-count finding is addressed at current head 306f91f. Both sides must report genuine integer zero; 0/7, 7/0, 7/7 and malformed counts fail with valid 0/0 controls. Fifteen comparator tests pass; the old comparator fails nine. Tracked-source comparison, untracked TCK cleanliness, inherited PYTEST_* settings, relevant source/dependency triggers and precise streaming/counter wording are addressed. The current head also carries #303's reviewed pyasn1 repair after the earlier hosted audit failure; local audit is clean. The current-head paired TCK workflow succeeds. Historical dependency/action pins remain fixed experimental inputs; no fresh local TCK measurement is claimed. Please re-review this head. Formal reviewer assignment returned 403, so this conversation is the re-review request. Prepared with OpenAI Codex.

Carry the exact reviewed agentrust-io#303 dependency input, lock and SDK/dev-extra floors into this branch to clear the current hosted security audit failure. Preserve this PR's own runtime/tests and changelog entry. No security gate is bypassed.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

@drk-ram drk-ram left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed head 306f91f46fe64953977b29d82024233f8cb241b1.

Requesting changes. The comparator repair is real and I am not re-litigating it. The install surface this PR adds still executes pyasn1==0.6.4.

experiments/a2a-tck/environment.txt pins pyasn1==0.6.4. .github/workflows/a2a-tck.yml installs that file into the SUT venv (uv pip install -r experiments/a2a-tck/environment.txt) and then runs the adapter from that interpreter. The follow-up commit updates pyproject.toml, requirements/dev.in, and requirements/dev.txt to the reviewed #303 floor, and the changelog says the floor was carried. It was not carried into the file this workflow actually installs. Main CI pip-audit can go green on dev.txt while every src/** pull request still stands up a SUT with the vulnerable pin.

0.6.4 is still inside all four advisories fixed by 0.6.5: GHSA-9m75-vc3g-4x39, GHSA-2qm8-x737-gmw5, GHSA-mm57-4v3p-rchx, and GHSA-fm9c-5rcf-2q5p. pyasn1 is pulled in by google-auth on the SDK path. It is not an input to the advertisement differential, so raising that one pin to 0.6.5 does not re-date the historical JSON-RPC table, provided the README keeps those rows marked as the original measurement. The "historical pins, remeasure separately" note is a fair rule for cedarpy and the action SHAs. It is not a reason to keep a known-vulnerable ASN.1 decoder in a job that clones and runs third-party TCK code beside the SUT.

Please bump that pin to 0.6.5 (and say so next to the historical-pin paragraph). Hash-locking environment.txt the way dev.txt is locked would close the related substitution gap; I am not holding the PR on a full hash lock if the vulnerable version is gone.

What I am accepting, so this does not get reworked:

  • compare() now rejects a non-int or non-zero protected_handler_invocations on either side, and rejects a non-empty ca2a_tracked_changes. I ran python -m pytest experiments/a2a-tck/test_compare.py -q on this head: 15 passed, including unequal and equal non-zero counts, bool/float/None/negative counts, and dirty tracked source on each side.
  • The runner refuses tracked and untracked TCK dirt, clears inherited PYTEST_*, and the workflow also fires on src/**, requirements/**, and pyproject.toml.
  • The README now says both modes force streaming, and that the counter is successful protected _lookup() after authentication and payload checks, not proof the protected path was never entered. That is the right claim/execution split. Ordinary-path advertisement evidence is not protected-path certification, which is the same boundary draft-durga-agenttrust-trace-verification-00 draws between a published claim and execution evidence. The historical 79/156/30 table should stay dated to 806d1147c0bc834ee8aabb698b341c926cd8531e.

Hosted differential and the CI matrix are green on this head. The failed gate job is the maintainer-approval workflow. I did not re-run the official TCK locally; this characterization runner correctly refuses non-Linux process groups. The pin is the change I need before this can land.

Update the TCK SUT environment to pyasn1 0.6.5 and explain the security exception to historical pins. Preserve historical results and existing verification boundaries.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

Copy link
Copy Markdown
Contributor Author

@drk-ram Updated the experimental environment to pyasn1==0.6.5 and corrected the adjacent historical-pin explanation. #303 did not cover this installation path. Historical measurements remain attributed to 806d114; accepted comparator behavior and verification boundaries are unchanged.

Local validation: updated environment installation, dependency consistency, 70 comparator/bridge/loopback tests, compilation, targeted Ruff and whitespace checks passed. The experimental requirements audit reported 15 findings across filelock, msgpack, opentelemetry-api and setuptools, with none reported for pyasn1; no clean-audit claim is made. Those other pins are unchanged. No fresh local official TCK or full runtime-suite run is claimed.

Please re-review the requested pin/documentation correction. Prepared with OpenAI Codex.

Triage 15 known advisory findings and update four SUT pins. Retain historical measurements and audit the installed SUT before TCK execution.

Prepared with OpenAI Codex.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>
Retain exact source tree and local-to-published commit mapping. Report audit, paired TCK, focused and unit/static checks with limitations.

Signed-off-by: Srinivasa Dinakar Jainti <dinakarjs@gmail.com>

@carloshvp carloshvp left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed commit 2c7b6b3ef94f21b401da5498bd21b363b14e2a1a.

The experiment now has a precise scope: both servers use the same pinned scenario executor, and only extension advertisement differs. The comparator rejects changed test outcomes, mismatched provenance, modified tracked source, and any protected-handler count other than integer zero. It does not claim protected-path TCK certification.

Validation: all 15 comparator tests passed locally. I also inspected the completed current-head TCK job: dependency consistency and audit passed; paired outcomes were identical with 79 passed and 156 skipped, both protected-handler counters were zero, and the separate comparator/bridge/loopback suite passed all 70 tests. The historical result table remains clearly labeled.

@drk-ram drk-ram left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-reviewed at head 2c7b6b3ef94f21b401da5498bd21b363b14e2a1a (3fbd9a3, 98f4fd6, 2c7b6b3).

All findings from my review of 306f91f46fe64953977b29d82024233f8cb241b1 are resolved:

  1. experiments/a2a-tck/environment.txt now pins pyasn1==0.6.5 alongside the four additional dependency remediations documented in experiments/a2a-tck/dependency-triage.md (filelock==4.2.1, msgpack==1.1.2, opentelemetry-api==1.45.1, setuptools==82.0.1).
  2. .github/workflows/a2a-tck.yml runs python -m pip check and python -m pip_audit against the installed SUT virtual environment before cloning or executing the upstream TCK.
  3. experiments/a2a-tck/README.md accurately attributes the historical TCK table to 806d1147c0bc834ee8aabb698b341c926cd8531e without claiming a fresh TCK run or hash-locked SUT requirements.
  4. python -m pytest tests/test_a2a_tck_compare.py -q passes (15 passed).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review:MEDIUM Contributor check flagged MEDIUM risk

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants