Skip to content

Fix baseline catalog and authentication tests - #71

Merged
toddysm merged 1 commit into
mainfrom
feature/test-baseline/repair-mocks-fd2ca782
Oct 29, 2026
Merged

toddysm merged 1 commit into
mainfrom
feature/test-baseline/repair-mocks-fd2ca782

Conversation

@toddysm

@toddysm toddysm commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Summary

Repair the five pre-existing test failures blocking validation of #68 and #70. This is a test/infrastructure-only change: no production library, command-line interface, or package behavior is modified.

  • Make configured catalog response sequences update client.last_response, matching the real client contract. Preserve the original result, page-count, cursor, and error-propagation assertions.
  • Add real-client contract coverage with mocked network responses in both middleware and legacy modes, covering successful pagination and a second-page failure.
  • Replace the stale one-call authentication expectation with the exact resource request followed by the /v2/ challenge probe. Still require the authentication error and verify that no credential exchange occurs.
  • Add the same hosted test workflow and test documentation already proposed in Support tag references when listing referrers #68/Add automatic OCI tag pagination to the library and CLI #70, so this repair can be validated independently. The release workflow is unchanged.

Validation

Testing mode: hosted. Head: 51a8b97cc1587265414862ae3c6af2c8d02af62f.

Before the fix, the affected baseline classes reproduced 5 failures and 6 passes on unchanged main 024c15bc7da136448a3856de59fe30deea0a49a5.

After the fix on Python 3.12.4:

  • Catalog and transport test files: 82 passed.
  • PYTHONDONTWRITEBYTECODE=1 python3 -B -m pytest -q -p no:cacheprovider: 1047 passed.
  • Scoped Ruff syntax/import checks, actionlint, and whitespace checks: passed.
  • Scoped mypy checks: passed using isolated request stubs and the existing nullable-default convention (--implicit-optional); imported-module diagnostics are suppressed.
  • Scoped self-review found no blocking issues. No assertions were removed to hide failures and no tests were skipped or disabled.

All registry/network responses in these checks are mocked; this is not live-registry validation.

Hosted run 40948711011 passed on the current head: 1047 tests passed on each of Python 3.10, 3.11, and 3.12. CodeQL checks passed. Copilot review completed for this commit, recommends approval, and has no findings or unresolved threads. The pull request remains open and unmerged for owner review.

Integration

This pull request is based directly on main, not stacked on either feature branch. It does not close the feature issues. Once merged with owner authorization, update #68 and #70 from main and rerun their checks. No merge is authorized as part of this task.

Make catalog pagination mocks update last_response, preserve existing result/cursor/error assertions, and add real-client contract cases. Verify the intended resource-to-v2 authentication probe sequence with no credential exchange. Add hosted test validation without changing production behavior.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 20:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-29T20:26:40.731070Z 51a8b97 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues were identified for the test, documentation, and CI updates.

No open issues 🎉

What changed in this PR

Repairs five baseline test failures blocking validation of #68 and #70, without changing production library, CLI, or release behavior.

Changes:

  • Align catalog mocks with the last_response contract and add real-client pagination coverage in both transport modes.
  • Verify authentication challenge discovery through /v2/, followed by failure without credential exchange.
  • Add hosted tests on Python 3.10–3.12 and document local test commands.
File Description
src/​regshape/​tests/​test_transport_client.py Corrects the expected authentication request sequence and checks that no credential exchange occurs.
src/​regshape/​tests/​test_catalog_operations.py Repairs pagination fixtures and adds real-client success and second-page failure coverage.
CONTRIBUTING.md Documents test installation, execution, and mocked-network scope.
.github/​workflows/​tests.yml Runs pytest across three Python versions for pull requests and pushes to main.

Review effort: Balanced

@toddysm
toddysm merged commit 6d2c188 into main Oct 29, 2026
7 checks passed
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.

2 participants