Skip to content

Sleep Through an Attest Alias and State the Refusal Ordering in the Wait README - #2942

Merged
ptr727 merged 1 commit into
developfrom
feature/attest-sleep-readme-2934
Oct 13, 2026
Merged

ptr727 merged 1 commit into
developfrom
feature/attest-sleep-readme-2934

Conversation

@ptr727

@ptr727 ptr727 commented Oct 13, 2026

Copy link
Copy Markdown
Owner
  • await_registered_head now sleeps through a module-level _attest_sleep = time.sleep alias, and TestAttest patches that alias, so the recorded sleeps no longer include the subprocess wait loop's own time.sleep calls. Assertions stay exact. No other test in the file patches time.sleep around a real subprocess; the other patches wrap mocked reads.
  • Proof: with the code calling time.sleep directly and the test patching the alias, TestAttest fails 3 of 13. With the fix, 30 runs of TestAttest under one busy loop per CPU all pass, and the full tests.test_pr_review suite passes.
  • The wait exit 41 sentence in scripts/README.md now says a genuine review of the head outranks a refusal only where it is the newer of the two or the round a --min-rounds baseline waited for, matching head_review_done and refusing_review.
  • The local review also found a neighbouring README sentence about the digest field that disagrees with the code, filed as README Says the Refusal Field Is Spent Like the Exit Code but It Is Not #2941.

Closes on promotion: #2934, #2824

🤖 Generated with Claude Code

Copilot AI lite review requested due to automatic review settings October 13, 2026 15:32
@ptr727

ptr727 commented Oct 13, 2026

Copy link
Copy Markdown
Owner Author

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

@coderabbitai

coderabbitai Bot commented Oct 13, 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: 70707bbb-97d9-41ae-b467-8c71e4007d64
  • 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

Only a minor documentation nit remains; no blocking issues were identified.

1 open finding
What changed in this PR

This PR isolates attestation sleep timing from subprocess polling and clarifies wait refusal ordering.

Changes:

  • Adds a dedicated attestation sleep alias and updates tests.
  • Documents refusal ordering with --min-rounds.
File Summary
tests/​test_pr_review.py Patches attestation-specific sleeps.
scripts/​README.md Documents refusal ordering.
scripts/​pr_review.py Uses the dedicated sleep alias.

🧠 Review effort: Lite


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread scripts/README.md Resolved
@codecov

codecov Bot commented Oct 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.96%. Comparing base (4f4ca8c) to head (9bbf584).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #2942   +/-   ##
========================================
  Coverage    59.96%   59.96%           
========================================
  Files           17       17           
  Lines         8777     8778    +1     
========================================
+ Hits          5263     5264    +1     
  Misses        3514     3514           
Flag Coverage Δ
python-3.13 59.96% <100.00%> (+<0.01%) ⬆️

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 e999d3e into develop Oct 13, 2026
14 checks passed
ptr727 added a commit that referenced this pull request Oct 13, 2026
…nd Attest Sleep Alias to Main (#2950)

- #2945 makes `gh-write-guard` fail closed on the push shapes it could
not read: a push inside an `eval`/`source` argument, a quoted command
handed to `bisect run` or `submodule foreach`, a here-string or attached
`-c` wrapper body, a `-c`/`--config-env` override on a push, a bare push
inside a wrapper body or after a head-moving command, `HEAD`/`@`/`:`
destinations, and `--admin` inside a wrapper. It also denies a mutating
git command whose `-C`, `--work-tree`, `--git-dir`, `GIT_DIR=`, or
leading `cd` holds a `..` component. A differential over 1043 commands
found no command the new guard allows that the previous one denied. The
over-denials it introduces are listed in that pull request with their
workarounds, and the shared gaps outside both issues are tracked on
#2943
- #2944 hardens `tests/test_cli_usage.py`: the unknown-flag case must
see the flag itself refused, the help case must open on a usage line
naming the script, the tree check sees ignored paths and empty
directories, every config home is redirected, detached grandchildren are
found through `/proc`, extensionless shebang CLIs are discovered, and
PowerShell entry points run natively on Windows.
`repo-config/configure.sh` passes `--` before a name
- #2942 sleeps through an alias in `pr_review.py`'s attest head wait, so
the `TestAttest` timing tests no longer record subprocess polling
sleeps, and states in `scripts/README.md` when a genuine review outranks
a refusal on the same head
- #2952 answers this promotion's first review round: the guard reads
every `-c`/`--config-env` spelling and `--attr-source`, judges a head
move per push (scanning the whole command where a pipe, background job,
loop, or fused redirection can reorder it), stops reading a lone `:` as
a deletion, and the CLI usage gate sets aside only the host's own
PowerShell startup cache. Three precision findings from the second
round, each a broader deny rather than a new allow, are deferred to
#2953

Closes #2824
Closes #2831
Closes #2932
Closes #2934
Closes #2936

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@ptr727
ptr727 deleted the feature/attest-sleep-readme-2934 branch October 13, 2026 20:20
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