The Pause's port says why each scope it could not read was unreadable (#688's dry runs 5 to 7, first of two)
User description
This is the first half of #728, "A Pause the port could not read is named by which read it was and why", split in two to stay under the Factory's review budget: #728's diff was 61,082 characters against 60,000, and the Factory held it too_large. This half is 30,814 characters and 371 lines. It is hardening, not a fix.
Why
Slice 1's dry runs 5, 6 and 7 on "AGENTS.md: say what is built; drop the model claim no check holds" (#688) each stopped in the approving act:
| Dry run | Release | Code | What it told us |
|---|---|---|---|
| 5 | v0.1.5 | facts_unreadable | Some read failed |
| 6 | v0.1.5 | facts_unreadable | The same, after the Maintainer added Variables: read to the machine user's token |
| 7 | v0.1.6 | pause_unreadable | The Pause, by record 0187's naming; not which of its two reads, or how |
The cause was the machine user's token: its Variables grant was waiting for the org's approval. Once the Maintainer approved it, dry run 8 passed the approve step. A code that said "GitHub refused the list of the org's variables" would have pointed at the grant at dry run 5.
What this half changes
adapters/pause.py gains explained, which hands back the same read as read, and beside it why each scope it could not read was unreadable, by a code of the port's own:
| Part | When |
|---|---|
org_refused | GitHub answered the repo's list of the org's variables 403 or 404 |
org_unnamed | That list was read whole and does not name FACTORY_PAUSED |
repo_refused | GitHub answered the repo's own variable 403 |
org, repo | Anything else of that scope's read |
- A 403 that is a rate limit's, answered with no request left or a time to wait, is anything else, not a refusal. So is a refusal on the last request left, which the port cannot tell from one. A 404 is never a limit's.
- A 404 on the repo's own variable is still a variable GitHub holds none of, as before.
readis nowexplained(...)[0], so the Controller, its brake and its health file read the Pause as they did.
Nothing calls explained yet. The second half makes the approving act ask the read again for the Pause by name and record pause_<part>_unreadable, and carries the decision record, whose boundary rows name this half's test and mutants.
Checks it adds
tests/test_effects.py::test_a_pause_not_read_says_which_read_and_why: each part on both sides of its boundary, the order of the parts, and that the read beside them isread's.- Thirty-one new mutants of
adapters/pause.py, each killed by that test, and six older mutants of the file reworded to the text as it now stands.
Checks
| Check | Result |
|---|---|
make checks | OK |
tests.test_effects, test_steps, test_approve, test_controller | OK, 113 tests |
Mutants of adapters/pause.py, run alone on an export | 50 of 50 killed |
Full make verify | Not run locally, by the Maintainer's standing change of 2026-11-09; CI's verify is the answer |
Reviews
The five readers read this code on #728. This half's adapters/pause.py and tests/test_effects.py are #728's at ff8e4f4 but for two comments that no longer cite a record this half does not hold, and its mutants are #728's for this file, so no reader read again.
| Reviewer | Head on #728 | Unread parts | Blocking | Major | Minor | Info |
|---|---|---|---|---|---|---|
| agy (Carbon) | ec6c7a5 | none | 0 | 4 | 2 | 0 |
| muse | aa0e10d | none | 1 | 1 | 0 | 0 |
| astra | dd12cb2 | none | 0 | 0 | 0 | 0 |
| claude-review | aa0e10d | none | 0 | 0 | 2 | 1 |
| claude-security | aa0e10d | none | 0 | 0 | 0 | 0 |
Every finding and its disposition is in #728's description. Those that touched this half: the next-page cases and their mutant (Muse, the Claude review, Carbon); a rate limit's 403 (the Claude review), and that a 404 is never a limit's (Astra, Carbon); the order of two repos' parts (Carbon); a mutant for each other unreadable return (Carbon). All are fixed in what this half holds. Muse and the two Claude reads did not read the two rate-limit changes; Carbon and Astra did.
🤖 Generated with Claude Code
CodeAnt-AI Description
Explain why organization and repository pause settings cannot be read
What Changed
- Callers can now identify why an organization or repository pause setting is unreadable.
- Organization read issues distinguish access refusals, a complete list that omits the pause setting, and other failures; repository issues distinguish access refusals from other failures.
- Rate-limit responses are not mistaken for permission refusals, and existing pause values and read behavior remain unchanged.
Impact
✅ Identify pause-setting access refusals
✅ Distinguish an omitted organization setting from other read failures
✅ Keep rate limits separate from permission errors
💡 Usage Guide
Checking Your Pull Request
Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.
Talking to CodeAnt AI
Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:
@codeant-ai ask: Your question here
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
@codeant-ai ask: Can you suggest a safer alternative to storing this secret?
Preserve Org Learnings with CodeAnt
You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:
@codeant-ai: Your feedback here
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
@codeant-ai: Do not flag unused imports.
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
@codeant-ai: review
Check Your Repository Health
To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.