Skip to content

Align Python provider contracts - #6

Merged
GTrunSec merged 11 commits into
mainfrom
agent/asp-contract-alignment
Aug 25, 2026
Merged

Align Python provider contracts#6
GTrunSec merged 11 commits into
mainfrom
agent/asp-contract-alignment

Conversation

@GTrunSec

@GTrunSec GTrunSec commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • align provider doctor, workspace-scope, query-pack, and invocation contracts
  • keep semantic language registry and owner-item evidence on schema v1
  • remove legacy direct-read projection tests and add structural-selector/provider-doctor coverage
  • sync semantic-structural-index.v1 with the shared ASP schema extension

Verification

  • uv run --frozen --group test python -m pytest -o addopts= tests (376 passed on the earlier aligned snapshot)
  • uv run --frozen py-harness check --full .
  • root ASP profile-copy + structural-index gate passed
  • latest CI formatting and lint pass; provider test baseline remains red
  • pre-commit ruff and ruff-format passed

@GTrunSec
GTrunSec marked this pull request as ready for review August 25, 2026 00:18
@GTrunSec
GTrunSec merged commit 801b634 into main Aug 25, 2026
1 check passed
@GTrunSec
GTrunSec deleted the agent/asp-contract-alignment branch August 25, 2026 00:18

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ebd8abc742

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +136 to +140
packet: dict[str, Any] = {
"schemaId": RESPONSE_SCHEMA_ID,
"schemaVersion": "1",
"languageId": "python",
"providerId": "asp-python",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Emit the required exact-response fields

Every successful query response built here violates the newly registered provider-native-exact-response.v1 schema: the resolved branch requires both ownerPath and normalizedParserFacts, but this packet includes neither. A schema-driven ASP client will therefore reject otherwise successful source and callable-skeleton projections before consuming their payload.

Useful? React with 👍 / 👎.

Comment on lines +60 to +61
kind=parts[-2],
symbol=unquote(parts[-1]),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Parse the item identity before scoped selector suffixes

For every method selector emitted by _projection_batch.py, such as #item/method/run/scope/implementation-owner/type/Agent, taking the final two path components produces kind="type" and symbol="Agent". find_function() then rejects the selector because its kind is not function or method, so resident exact queries cannot materialize any projected method; parse the item/<kind>/<symbol> portion separately and retain the following scope components for disambiguation.

Useful? React with 👍 / 👎.

Comment on lines +28 to +34
package_ids_by_name = {
package["name"]: package["packageId"] for package in packages
}
internal_dependencies = []
external_dependencies = []
for dependency in dependencies:
to_package_id = package_ids_by_name.get(dependency["packageName"])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Normalize distribution names before matching workspace packages

When one workspace package depends on another using an equivalent normalized spelling—such as package name my_pkg and requirement my-pkg, or merely different case—this exact lookup misses the package and emits an external dependency instead of an internal edge. Python distribution names treat runs of -, _, and . case-insensitively as equivalent, so both package names and dependency names need the same normalization before this match.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant