Skip to content

Move the Release-Guard Tests' Workflow-Command Checks Onto runner_commands - #3118

Merged
ptr727 merged 2 commits into
developfrom
feature/auto-3115
Oct 16, 2026
Merged

ptr727 merged 2 commits into
developfrom
feature/auto-3115

Conversation

@ptr727

@ptr727 ptr727 commented Oct 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • tests/test_audit.py runs spec/audit.py audit_repo against a faked gh, with a constructed Python repository holding .codecov.yml and no codecov.yml. It asserts the alternative is read and that no file-presence finding names codecov.yml as absent. A control case holding neither asserts the one LETTER naming both paths, which shows the baseline loop ran.
  • tests/test_fidelity_honesty.py runs spec/fidelity_honesty.py fidelity_pass against a faked gh, with the same repository shape holding the canonical text at .codecov.yml. It asserts the copy lands in match and not in unavailable.
  • The fake raises on any read it does not expect, so a guessed answer cannot steer either run past the code under test. The hub's tracked paths and the canonical's git history are patched to empty, since both walk git and fetch the hub's origin, which a shallow CI checkout refuses.

Verification

  • Reverting alternatives.get(path, []) to [] at the audit_repo call site fails both test_audit cases. Reverting alternatives.get(down_path, []) to [] at the fidelity_pass call site fails the test_fidelity_honesty case. With the argument restored, all three pass.
  • The three tests pass with audit._hub_main_rev and audit._require_full_history replaced by functions that raise, so no fetch or history read is reached.
  • python3 spec/audit.py --selftest, python3 spec/validate.py, and python -m unittest discover -s tests pass, and ruff format, ruff check, mypy, and the prose gate are clean.
  • Local strict review: two passes. The first raised three findings (two hermeticity defects and one sentence length), all fixed in db9db6b. The second raised 0.

Closes on promotion: #3107

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings October 16, 2026 04:31
@ptr727

ptr727 commented Oct 16, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 2055efc64631dab08c9f082c81c410bf44b7e718, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Repository: ptr727/ProjectTemplate/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fe18a3ec-9bac-4a1f-99ac-668f06673a9b
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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 unresolved review findings remain.

0 open findings

What changed in this PR

Strengthens release-guard tests by using shared workflow-command parsing and expanding Unicode-whitespace injection coverage.

Changes:

  • Uses runner_commands.forged_lines for command detection.
  • Adds ideographic-whitespace injection coverage.
  • Verifies exact emitted workflow commands.
File Description
tests/​test_release_guards.py Uses shared command parsing and expands injection tests.

🧠 Review effort: Lite


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@codecov

codecov Bot commented Oct 16, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (develop@5d369fd). Learn more about missing BASE report.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #3118   +/-   ##
==========================================
  Coverage           ?   63.94%           
==========================================
  Files              ?       17           
  Lines              ?     9145           
  Branches           ?        0           
==========================================
  Hits               ?     5848           
  Misses             ?     3297           
  Partials           ?        0           
Flag Coverage Δ
python-3.13 63.94% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptr727
ptr727 merged commit 0a0660d into develop Oct 16, 2026
14 checks passed
@ptr727
ptr727 deleted the feature/auto-3115 branch October 16, 2026 04:43
ptr727 added a commit that referenced this pull request Oct 16, 2026
… Fixes to Main (#3146)

- #3135 makes `gh-write-guard` read a gh write's subcommand and target
the way gh parses them: the subcommand is found past flags before the
command and before the subcommand, an `R` inside a short-option cluster
is read as a target, `GH_REPO` is read as a target, a run-time
repository owner on a write fails closed, and a run-time word where `pr`
or `merge` goes fails closed beside `--admin` or where word splitting
may split it
- #3139 releases the bootstrap lock when a `bootstrap.ps1` run ends
rather than when its process does, so a second run typed at the same
pwsh prompt is no longer refused the lock
- #3130 matches tool names and the `all` keyword by case in the Windows
agents loaders, as the Linux loaders already do
- #3128 reads CodeRabbit's rate limit on a reply to an explicit review
command in `pr_review.py`
- #3126 reconciles VSCode-Server-DotNetCore in the hub after its resync
- #3124 logs the Docker task's build-base leg in to Docker Hub
- #3122 names the carried skill and the skipped review correctly
- #3120 states the subprocess encoding rule in `CODESTYLE.md`, where
carriers read Python style
- #3118 and #3111 move the release-guard tests' workflow-command checks
onto `runner_commands`, and test the alternatives wiring at the
`audit_repo` and `fidelity_pass` call sites
- #3116 stops the doc gates' printed names forging workflow commands
- #3113 adds a catalog snippet for the release-with-smoke caller
- #3109 moves the `workflow_reuse` fetch onto `audit.contents_text`
- #3105 accepts `.codecov.yml` as an alternative to `codecov.yml`
- #3103 adds a pip ecosystem to the carried Dependabot snippet
- #3100 prefers the venv's ruff and pyright for a declared pip directory
- #3098 tracks composite action pins in Dependabot
- #3096 reads an uppercase Markdown suffix as Markdown at every prose
gate branch

After this merges, the host-safety installer payload changes, so the
maintainer runs the installer after promotion.

Closes #1416
Closes #1425
Closes #1578
Closes #1874
Closes #1892
Closes #1899
Closes #2804
Closes #2850
Closes #2852
Closes #2854
Closes #2996
Closes #3065
Closes #3067
Closes #3069
Closes #3079
Closes #3080
Closes #3089
Closes #3093
Closes #3101
Closes #3106
Closes #3107
Closes #3137

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
* Added a pull-request smoke build that runs when relevant release files
change and reports the combined validation and build status.
* Repository audits now recognize `.codecov.yml` as an alternative to
`codecov.yml`.

* **Improvements**
* Python linting and type checks use tools from declared project
environments when available, with fallbacks for missing tools.
* Workflow and lint reports safely display unusual filenames and
command-like text.
* GitHub write-target checks now account for additional command forms
and fail closed when targets cannot be verified.
* Rate-limit detection now recognizes another CodeRabbit response
format.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
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