fix: complete 0.3.0 Pacsea prerequisites - #7
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR finalizes arch-toolkit’s 0.3.0 “Pacsea prerequisite” hardening by adding a shared bounded HTTP response reader, tightening install command operand safety (validation + -- terminator + missing-helper failure behavior), and codifying the Pacsea feature/contract and CI coverage, along with packaging/docs updates.
Changes:
- Add a shared streamed response reader with a strict 10 MiB ceiling + UTF-8 validation and adopt it for AUR info/comments/PKGBUILD and
.SRCINFO. - Harden install/remove command construction with stricter package-name validation, always placing
--before operands, and making the no-AUR-helper fallback fail with stderr + exit 127. - Add/extend compatibility & integration contract tests, CI matrix coverage for the Pacsea feature projection, and crates.io
includepackaging allowlist.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/install_integration.rs | Adds regression tests for operand terminators, safe-name rules, and shell-fallback helper selection/error behavior. |
| tests/compatibility_contract.rs | Extends compatibility contract coverage for Pacsea feature projection + model fixtures. |
| src/lib.rs | Wires in the new internal http module under feature = "aur". |
| src/install/shell.rs | Tightens is_safe_package_name (leading-byte rule) and updates validation error pattern text/tests. |
| src/install/mod.rs | Updates install-module docs/examples for the new -- operand terminator. |
| src/install/command.rs | Adds -- operand terminator to install/remove builders and makes AUR shell fallback fail loudly (stderr + exit 127). |
| src/install/batch.rs | Updates batch-plan docs/tests and ensures batched commands inherit name validation + operand terminator. |
| src/http.rs | Introduces shared bounded response reader with extensive unit tests for size/stream/UTF-8 edge cases. |
| src/deps/srcinfo.rs | Applies bounded response reading + contextual errors to AUR .SRCINFO fetch; adds fixture tests. |
| src/aur/pkgbuild.rs | Applies bounded response reading to PKGBUILD fetch; adds fixture tests. |
| src/aur/info.rs | Bounds AUR info response text before JSON parse; makes malformed JSON return contextual Parse; adds fixture tests. |
| src/aur/comments.rs | Bounds comments HTML response before parsing; improves selector parse errors; adds fixture tests. |
| reports/pacsea-v0-3-0-upstream-prerequisites.html | Adds an implementation/verification report artifact for the 0.3.0 prerequisite work. |
| README.md | Updates dependency snippets to 0.3 and reflects -- in install/remove output examples. |
| CHANGELOG.md | Documents the 0.3.0 compatibility projection and the behavioral deltas (bounds, terminator, exit 127, parse errors). |
| Cargo.toml | Adds an explicit crates.io include allowlist for a leaner package payload. |
| .github/workflows/rust.yml | Adds CI row + dependency isolation check for the Pacsea feature projection. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
.SRCINFOresponses to 10 MiB.Validation
cargo package --listandcargo publish --dry-runpass.No tag, release, or crates.io publication is included.