housebroken-cli 0.2.6__tar.gz → 0.2.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (21) hide show
  1. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/PKG-INFO +1 -1
  2. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/pyproject.toml +1 -1
  3. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/inbox.sh +9 -2
  4. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/skills/housebroken/SKILL.md +9 -2
  5. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/.gitignore +0 -0
  6. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/LICENSE +0 -0
  7. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/README.md +0 -0
  8. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/bin/housebroken +0 -0
  9. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/hatch_build.py +0 -0
  10. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/check-ai-policy.sh +0 -0
  11. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/comment-census.sh +0 -0
  12. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/diff-defaults.sh +0 -0
  13. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/distinct-outside.sh +0 -0
  14. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/file-pr.sh +0 -0
  15. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/fork-hygiene.sh +0 -0
  16. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/notes.sh +0 -0
  17. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/pr-sweep.sh +0 -0
  18. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/prior-art.sh +0 -0
  19. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/scripts/verify-filed-pr.sh +0 -0
  20. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/src/housebroken/__init__.py +0 -0
  21. {housebroken_cli-0.2.6 → housebroken_cli-0.2.8}/src/housebroken/cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: housebroken-cli
3
- Version: 0.2.6
3
+ Version: 0.2.8
4
4
  Summary: Agent-written pull requests that do not make a mess in someone else's house.
5
5
  Project-URL: Repository, https://github.com/lenamonj/housebroken
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "housebroken-cli"
7
- version = "0.2.6"
7
+ version = "0.2.8"
8
8
  description = "Agent-written pull requests that do not make a mess in someone else's house."
9
9
  dynamic = ["readme"]
10
10
  license = "MIT"
@@ -126,12 +126,18 @@ if [ "$do_ci" -eq 1 ]; then
126
126
  claimed="$(gh api "search/issues?q=is:pr+author:$user+is:open&per_page=1" --jq '.total_count' 2>/dev/null)"
127
127
  case "$claimed" in
128
128
  ''|*[!0-9]*) echo "CENSUS UNVERIFIED: could not read the open pull request count from the API" ;;
129
- *) [ "$claimed" -eq "$total" ] || echo "CENSUS INCOMPLETE: search returned $total of $claimed open pull requests, so this census covers only part of them; re-run when the search rate limit recovers" ;;
129
+ *) [ "$total" -ge "$claimed" ] || echo "CENSUS INCOMPLETE: search returned $total of $claimed open pull requests, so this census covers only part of them; re-run when the search rate limit recovers" ;;
130
130
  esac
131
131
  flagged=0
132
+ unreadable=0
133
+ unreadable_list=""
132
134
  while read -r repo num draft; do
133
135
  [ -n "$repo" ] || continue
134
- j="$(gh pr view "$num" --repo "$repo" --json mergeable,reviewDecision,statusCheckRollup 2>/dev/null)" || continue
136
+ j="$(gh pr view "$num" --repo "$repo" --json mergeable,reviewDecision,statusCheckRollup 2>/dev/null)"
137
+ if [ -z "$j" ]; then
138
+ # A pull request we could not read is not a clean one: say so rather than skipping in silence.
139
+ unreadable=$((unreadable + 1)); unreadable_list="$unreadable_list $repo#$num"; continue
140
+ fi
135
141
  why="$(jq -r --arg draft "$draft" '
136
142
  [ ( [.statusCheckRollup[]? | (.conclusion // .state // "")] | if any(. == "FAILURE" or . == "ERROR") then "FAILING" elif any(. == "ACTION_REQUIRED") then "needs-run-approval" else empty end ),
137
143
  ( if .mergeable == "CONFLICTING" then "CONFLICTING" else empty end ),
@@ -143,6 +149,7 @@ if [ "$do_ci" -eq 1 ]; then
143
149
  echo "$repo#$num: $why${fails:+ [$fails]}"
144
150
  fi
145
151
  done <<<"$prs"
152
+ [ "$unreadable" -eq 0 ] || echo "CENSUS UNREADABLE: could not read $unreadable of $total pull requests, so their state is unknown, not clean:$unreadable_list"
146
153
  echo "$flagged of $total open pull requests flagged"
147
154
  fi
148
155
 
@@ -71,11 +71,18 @@ report it in one line and do not proceed to the next step.
71
71
  that fails on the default branch for a wrong value, a crash or an
72
72
  out-of-bounds access, and "less memory" is not that test.
73
73
 
74
- 4. **Prove it red first.**
74
+ 4. **Prove it red first, and prove the proof.**
75
75
  On a fresh clone of the upstream default branch, not the tree you found
76
76
  the bug in, write the test that fails. Run it and keep the failing output.
77
77
  Apply the patch. Run it again. Both results go into the pull request as
78
- the test itself; the body states the fact in one sentence. When the
78
+ the test itself; the body states the fact in one sentence.
79
+ Ask what each step would print if it did nothing, and make that answer
80
+ different from success: revert by content and compare hashes rather than
81
+ trusting a command's exit code, check the clone's line endings before the
82
+ first edit, export PATH explicitly in any detached script and report every
83
+ step's exit code. Two arms of an experiment that agree exactly have not
84
+ tested the variable. Before filing, hash the changed file on disk against
85
+ the blob in the commit: a branch can carry the test and not the fix. When the
79
86
  patched function serves several public entry points or has several
80
87
  branches, the test is a grid: every entry point through every branch,
81
88
  plus the zero, identity and signed-boundary rows. A reviewer lists the
File without changes