Skip to content

Bound reference service config and expose canonical wheel lock - #7

Merged
brettheap merged 2 commits into
mainfrom
019-main-gate-repairs
Nov 17, 2026
Merged

brettheap merged 2 commits into
mainfrom
019-main-gate-repairs

Conversation

@brettheap

@brettheap brettheap commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

The first complete openXwallet main scan exposes an unbounded reference-service config read and fails to recognize the existing noncanonical wheel-lock filename. Bound --config to the invocation directory or a separately selected OPENWALLET_REFERENCE_CONFIG_ROOT. Descriptor-relative no-follow reads reject escapes, links, nonregular/hardlinked/untrusted writable files and oversized documents before registry/TLS/listener effects. Paths inside admitted JSON retain their existing process-cwd semantics. No live service is started by this repair.

Publish the exact previously reviewed 18-package closure as requirements.txt, retain requirements-ci.lock as a compatibility include, and have both CI jobs consume the canonical input with unchanged binary/hash enforcement. Every version and wheel hash remains identical; no project build backend is invoked.

Validation: 165 tests passed, with the one pre-existing neutral carve-history comparison skip; its actual full-history adapter comparison remains required in openXwallet. New real config/path/descriptor/side-effect/optimized-Python tests and immutable closure checks pass. Syntax gate, plain/strict validators and actionlint pass. The eight manifest-owned artifacts, immutable release tag, separate future train, frozen integration owner and active sessions remain unchanged.

Governance is the existing harden-wallet-source-validation amendment and paired spec feature019. Parent/adapter pins and exact-main Sonar verification follow normal admitted publication. Tracks openXwallet #73; no finding waiver, threshold change, source exclusion, billing change, operational activation or credential rotation.

Summary by Sourcery

Harden reference service configuration admission and make the reviewed wheel closure canonical under requirements.txt.

New Features:

  • Bound reference service configuration reads to a trusted operator-selected root with strict file validation and refusal before service side effects.
  • Publish the reviewed hashed wheel dependency closure under canonical requirements.txt while retaining requirements-ci.lock as a compatibility include.

Bug Fixes:

  • Reject escaped, linked, nonregular, writable, hardlinked, untrusted-owner, and oversized service configuration files.
  • Update CI dependency installation to use the canonical requirements filename without changing binary or hash enforcement.

CI:

  • Have both validation workflows install the canonical hashed wheel closure.

Documentation:

  • Document the reference service configuration read boundary and canonical dependency closure.

Tests:

  • Add coverage for configuration path safety, refusal ordering, optimized Python behavior, race resistance, and immutable dependency-closure metadata.

@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

API

Route the CLI's --config operand through bounded admission before constructing the registry, TLS context, or listener, while preserving its existing arguments and process exit behavior.

  • openwallet_runtime/reference_service.py L215, L220-224

Implementation

Implement descriptor-relative, no-follow config reads under the invocation directory or a separately selected root, rejecting untrusted files and oversized documents; include the required ExitStack import.

  • openwallet_runtime/reference_service.py L4, L169-214

Configuration

Switch both CI jobs to install the canonical requirements input with binary-only and hash enforcement, and update the direct dependency input.

  • .github/workflows/pytest-suite.yml L34
  • .github/workflows/wallet-validation.yml L43
  • requirements-ci.txt L1

Documentation

Document the canonical dependency closure and the reference-service config boundary, including the independent external-root setting and unchanged path semantics.

  • README.md L84-92
  • docs/reference-custody.md L35-47

Tests

Verify config admission and refusal cases, refusal-before-side-effects, optimized-Python behavior, and preservation of successful CLI behavior.

  • tests/reference_config/test_service_config.py L1-200

Check that the canonical dependency closure retains its approved bytes and that CI and the compatibility include use it as intended.

  • tests/reference_config/test_canonical_requirements.py L1-32

Lock files and vendored code

Publish the reviewed hashed wheel closure under requirements.txt and retain the former lock filename as a compatibility include.

  • requirements-ci.lock L1-2
  • requirements.txt L1-22

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

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

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-17T02:56:11.527707Z
We couldn’t complete this review. Comment @codex review to try again.
ed567ed Manual request
ℹ️ 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sonarqubecloud

Copy link
Copy Markdown

@brettheap
brettheap marked this pull request as ready for review November 17, 2026 02:55
@brettheap

Copy link
Copy Markdown
Contributor Author

@codex review

@brettheap
brettheap merged commit ed567ed into main Nov 17, 2026
3 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@sourcery-ai

sourcery-ai Bot commented Nov 17, 2026

Copy link
Copy Markdown

Sorry @brettheap, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 5 days and 1 hour by commenting @sourcery-ai review. Upgrade to get a review now.

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