Conversation
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 192789f925
ℹ️ 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".
| return "", fmt.Errorf("invalid Python package root requirement %q", requirement) | ||
| } | ||
| remainder := strings.TrimPrefix(value, name) | ||
| if strings.HasPrefix(remainder, "[") { |
There was a problem hiding this comment.
Reject extras from portable package roots
When a catalog root such as demo[http]>=1.2 reaches this branch, the extras are parsed and the validator returns success. This contradicts the PTD-01 acceptance contract in docs/PORTABLE_TOOL_DEFINITION_IMPLEMENTATION_PLAN.md, which explicitly requires roots containing extras to fail, so future catalog validation can admit unsupported definitions. Reject any bracketed extras instead of validating and accepting them.
Useful? React with 👍 / 👎.
|
Returning to draft: remote review for this slice is deferred. The stack PTD-01 through PTD-11 is being built with local review and full local checks only, then reviewed bottom-up once review capacity is available. |
5b75ce3 to
8616433
Compare
Add canonical direct-root requirement validation and normalized distribution-name extraction to the Python provider. Direct URLs, environment markers, embedded whitespace, malformed extras, and non-canonical specifier sets are rejected so an immutable catalog root cannot depend on external location or runtime state. Add canonical interpreter-version validation for the major.minor and major.minor.patch forms used by portable binding compatibility lists, rejecting non-numeric, non-canonical, and out-of-range components. These helpers are exposed for the portable tool catalog slices that follow and change no existing provider behavior. Delivers PTD-01 of docs/PORTABLE_TOOL_DEFINITION_IMPLEMENTATION_PLAN.md.
Add canonical direct-root requirement validation and normalized distribution-name extraction to the Python provider. Direct URLs, environment markers, embedded whitespace, malformed extras, non-canonical extras, and non-canonical specifier sets are rejected so an immutable catalog root cannot depend on external location or runtime state, and cannot be spelled two ways.
Add canonical interpreter-version validation for the major.minor and major.minor.patch forms used by portable binding compatibility lists, rejecting non-numeric, non-canonical, and out-of-range components.
Scope authority
Task: PTD-01 — Expose Portable Python Requirement Validation, defined in docs/PORTABLE_TOOL_DEFINITION_IMPLEMENTATION_PLAN.md (PR #86 in this stack), under the normative Portable Tool Definition Design.
Acceptance criteria:
go.modremains stable undergo mod tidy;go test ./internal/providers/pythonpasses.Local review findings, applied
demo[b,a]anddemo[a,a]were accepted, so one dependency could be spelled several ways and produce different record digests, against the design's canonical identity rule that every other record collection already follows;ValidatePackageRootRequirementV1was removed. It was exported but called by nothing here, at the stack tip, or in either retired source;Exclusions: record types, catalog behavior, Python resolver changes, and module dependency promotion, which belongs to PTD-04. The two remaining exports have no in-tree caller until PTD-04 consumes them. Source: parked extraction source
b39985d247e5from retired PR #83.