Skip to content

Fix issue 2310 validation test paths - #5631

Closed
minyanyi wants to merge 1 commit into
Scottcjn:mainfrom
minyanyi:codex/ci-followup-issue2310
Closed

minyanyi wants to merge 1 commit into
Scottcjn:mainfrom
minyanyi:codex/ci-followup-issue2310

Conversation

@minyanyi

Copy link
Copy Markdown
Contributor

Summary

  • replace Windows-only bounties\issue-2310 subprocess paths with pathlib-built absolute paths
  • keep the existing cp1252 stdout validation and package import coverage intact

Why

The broad CI test job currently reports tests/test_issue2310_package_validation.py failures on Linux because the test subprocess uses Windows backslash paths. On Windows this passes, but on Linux it can import the wrong src module and cannot open bounties\issue-2310\validate_bounty_2310.py.

Validation

  • python -B -m pytest -q tests/test_issue2310_package_validation.py --tb=short -p no:cacheprovider -> 2 passed
  • python -B -m py_compile tests/test_issue2310_package_validation.py
  • git diff --check

This is one focused follow-up for the repo-wide CI failure currently blocking otherwise approved PRs.

Signed-off-by: minyanyi <109479933+minyanyi@users.noreply.github.com>
@github-actions

Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Non-doc PRs have a BCOS-L1 or BCOS-L2 label
  • Doc-only PRs are exempt from BCOS tier labels when they only touch docs/**, *.md, or common image/PDF files
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) tests Test suite changes size/XS PR: 1-10 lines labels May 18, 2026
@minyanyi

Copy link
Copy Markdown
Contributor Author

CI note: the current red test job on this PR stops before reaching tests/test_issue2310_package_validation.py because the base branch is still missing CI collection dependencies:

  • aiohttp for tests/test_agent_economy_sdk.py
  • flask_cors for tests/test_faucet_service_wallet_validation.py
  • matplotlib for tests/test_hardware_visualizer.py and tests/test_pse_analyze_results.py

That is the earlier dependency collection blocker covered by #5587. The focused validation for this PR passes locally:

  • python -B -m pytest -q tests/test_issue2310_package_validation.py --tb=short -p no:cacheprovider -> 2 passed
  • python -B -m py_compile tests/test_issue2310_package_validation.py
  • git diff --check

@HCIE2054 HCIE2054 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.

LGTM!

@kekehanshujun kekehanshujun 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.

Approved current head d04c8eacd22173c2522290d2d922732bc75307af.

This is a focused portability fix for tests/test_issue2310_package_validation.py. The old subprocess calls used the literal Windows path bounties\issue-2310, which is the reason the test can pass on Windows while Linux interprets the path as a single filename component. The PR switches both subprocess entry points to Path-built absolute paths under REPO_ROOT, while preserving the existing import assertion and cp1252 stdout validation.

Validation I ran locally after applying the PR hunk to a RustChain worktree:

python -B -m pytest -q tests/test_issue2310_package_validation.py --tb=short -p no:cacheprovider
# 2 passed

python -B -m py_compile tests/test_issue2310_package_validation.py
# passed

git diff --check -- tests/test_issue2310_package_validation.py
# passed

I also checked the PR comments about broader CI: the currently red collection failures are for missing base-branch dependencies (aiohttp, flask_cors, matplotlib) before this focused test is reached, so they are separate from this path portability change. I do not see a blocker in this PR.

@jaxint jaxint 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.

LGTM! Great work on this PR. 🚀

@HCIE2054 HCIE2054 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.

LGTM!

@HCIE2054 HCIE2054 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.

LGTM!

@HCIE2054 HCIE2054 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.

LGTM!

@HCIE2054 HCIE2054 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.

LGTM!

@TJCurnutte TJCurnutte left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approved. This makes the issue-2310 validation tests portable instead of asking POSIX runners to resolve bounties\\issue-2310 as a literal backslash path.

Validation I ran against head d04c8eacd22173c2522290d2d922732bc75307af:

git diff --check origin/main...HEAD -- tests/test_issue2310_package_validation.py
python3 -B -m py_compile tests/test_issue2310_package_validation.py
PYTHONPATH=. python3 -B -m pytest -q tests/test_issue2310_package_validation.py --noconftest -o addopts=''

Result: 2 passed in 0.23s.

I also ran that same focused pytest on a clean origin/main worktree for comparison. Both tests failed there: the import path resolved the wrong src module (AttributeError: module 'src' has no attribute 'CRTPatternGenerator') and the validator subprocess could not open bounties\\issue-2310\\validate_bounty_2310.py. This PR removes that platform-path failure without changing the validator package itself.

@HCIE2054 HCIE2054 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.

LGTM!

@HCIE2054 HCIE2054 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.

LGTM!

@HCIE2054 HCIE2054 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.

LGTM!

@HCIE2054 HCIE2054 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.

LGTM!

@HCIE2054 HCIE2054 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.

LGTM!

@Scottcjn

Copy link
Copy Markdown
Owner

Closing as stale branch — would cause destructive deletions if merged.

Your branch was filed roughly 155 commits behind current main. Since then, many overlapping fixes from other contributors have landed via parallel PRs. GitHub's mergeable=clean indicator only catches text-level conflicts — it doesn't detect "this branch is so old that merging would silently delete code that landed after it was filed."

Bounty credit acknowledged

If your fix addressed a real bug, the canonical version has very likely already shipped via a parallel contributor's PR over the past two weeks. Specific cases covered by today's audit:

If you want fresh review

Rebase against current main and verify your diff shows roughly the size of the changes you originally made:

git fetch upstream main
git rebase upstream/main
git diff main..HEAD --shortstat

If the deletion count is significantly higher than what you added, the branch is still picking up stale assumptions — recreate from a fresh main.

Thanks for the contribution work this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) size/XS PR: 1-10 lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants