Skip to content

Add mirror invariant guardrails#2

Closed
zrr1999 wants to merge 2 commits into
mainfrom
ci/mirror-invariant-guardrails
Closed

Add mirror invariant guardrails#2
zrr1999 wants to merge 2 commits into
mainfrom
ci/mirror-invariant-guardrails

Conversation

@zrr1999

@zrr1999 zrr1999 commented Apr 28, 2026

Copy link
Copy Markdown
Member

This PR adds guardrails for mirrored release metadata:\n- validate the pyproject version, dependency pin, and README rev stay in sync\n- run the invariant check and a smoke install in CI\n- reuse the same invariant check inside sync.py before publishing

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e79563d172

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread check_invariants.py Outdated


def read_dependency_pin(requirement: str) -> str:
match = re.fullmatch(r"spore-lang==(?P<version>\d+\.\d+\.\d+)", requirement)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Respect configured package name in invariant check

sync.py still advertises SPORE_PACKAGE_NAME as a runtime override, but read_dependency_pin hardcodes spore-lang in the new invariant guard. In any environment where the mirror is configured for another package and pyproject.toml is pinned correctly for that package, validate_repo_state() now fails before sync can run, which is a regression from prior behavior.

Useful? React with 👍 / 👎.

@zrr1999

zrr1999 commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

Dropped the invariant/smoke-test guardrail changes from this branch as requested. The branch now matches main, so this PR is obsolete.

@zrr1999 zrr1999 closed this Apr 30, 2026
@zrr1999 zrr1999 deleted the ci/mirror-invariant-guardrails branch April 30, 2026 13:38
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