fix: harden bundle and workflow step integrity - #4470
Conversation
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The reviewed changes have appropriate regression coverage and no unresolved issues.
Pull request overview
Enforces bundle-declared version pins when installing workflow steps.
Changes:
- Validates requested step versions against catalog metadata.
- Adds regression coverage ensuring mismatches prevent installation.
File summaries
| File | Description |
|---|---|
tests/unit/test_bundler_primitives.py |
Tests rejection of mismatched step versions. |
src/specify_cli/bundler/services/primitives.py |
Adds step version-pin validation before installation. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This is excellent work — you've filed a focused, well-tested set of bundle-integrity fixes (#4466–#4470: component scoping, duplicate rejection, step-version mismatch, record-save rollback, and version-pin enforcement), all green with regression coverage and clear disclosure. Genuinely high-value stuff. One process note: that's 5 open PRs, past the 3-open-PR guidance in CONTRIBUTING, and since they're all the same theme touching the bundler, they'd be much faster to review as a single consolidated PR (or a smaller stack) rather than five separate ones. Could you group the related ones? I want to land these — consolidating just helps them move quicker. Marking this one |
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Consolidated all five fixes here on |
There was a problem hiding this comment.
🟡 Changes recommended
Missing package versions and catalog lookup failures can still bypass the new version-integrity checks.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
- Files reviewed: 11/11 changed files
- Comments generated: 2
- Review effort level: Balanced
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Assisted-by: GitHub Copilot (model: gpt-5.6-sol, autonomous) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Addressed both current-head review findings in |
There was a problem hiding this comment.
🟡 Changes recommended
Provenance-save failures during bundle updates can leave refreshed or removed components inconsistent with the retained record.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
tests/unit/test_bundler_primitives.py:123
- The new step-pin tests cover only rejection paths (mismatch, absent metadata, and lookup failure). Add a matching catalog-version case that asserts
workflow_step_addis invoked, so a regression that rejects every valid pinned step cannot satisfy this test group.
- Files reviewed: 11/11 changed files
- Comments generated: 2
- Review effort level: Balanced
| # ``bundle list`` keeps reporting when the bundle was first installed. | ||
| installed_at=existing.installed_at if existing is not None else None, | ||
| ) | ||
| save_records(project_root, upsert_record(records, record)) |
| ("None", None, False), | ||
| ], | ||
| ) | ||
| def test_add_rejects_step_yml_version_mismatch( |
Description
Consolidate five related bundle and workflow-step integrity fixes at maintainer
request:
project, including same-path reloads that could otherwise reuse stale
bytecode.
preserving valid identical IDs across different kinds.
catalog metadata.
Each behavior has focused regression coverage and remains in a separate commit.
This PR supersedes #4466, #4467, #4468, and #4469.
Testing
uv run specify --helpuv sync && uv run pytestValidation on the consolidated current head:
pwsh, which is unavailablelocally and fails identically on unchanged upstream.
uvx ruff@0.15.0 check src testsuvx --from pip-audit==2.10.0 pip-audit --disable-pip --require-hashes -r .github/security-audit-requirements.txt --progress-spinner offgit diff --check upstream/main...HEADupstream/main.AI Disclosure
GitHub Copilot (GPT-5.6 Sol) autonomously reproduced the bugs, wrote the
regression tests and implementations, consolidated the reviewed commits, and
ran verification under @marcelsafin's direction and review.