housebroken-cli 0.6.4__tar.gz → 0.6.6__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.
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/PKG-INFO +2 -2
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/README.md +1 -1
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/pyproject.toml +1 -1
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/branch-check.sh +4 -2
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/pr-sweep.sh +28 -4
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/skills/housebroken/SKILL.md +8 -3
- housebroken_cli-0.6.6/src/housebroken/__init__.py +1 -0
- housebroken_cli-0.6.4/src/housebroken/__init__.py +0 -1
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/.gitignore +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/LICENSE +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/bin/housebroken +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/hatch_build.py +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/check-ai-policy.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/claim-check.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/comment-census.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/comment-check.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/diff-defaults.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/distinct-outside.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/file-issue.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/file-pr.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/fork-hygiene.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/inbox.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/notes.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/prior-art.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/review.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/scripts/verify-filed-pr.sh +0 -0
- {housebroken_cli-0.6.4 → housebroken_cli-0.6.6}/src/housebroken/cli.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: housebroken-cli
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.6
|
|
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
|
|
@@ -126,7 +126,7 @@ uv tool install git+https://github.com/lenamonj/housebroken
|
|
|
126
126
|
| `scripts/file-pr.sh` | the only way a pull request gets filed: five gates in front of `gh pr create` |
|
|
127
127
|
| `scripts/file-issue.sh` | the only way an issue gets filed: the same printouts and prose, and a fix offered is a fix linked |
|
|
128
128
|
| `scripts/verify-filed-pr.sh` | the filed pull request is what was meant, and CI settled |
|
|
129
|
-
| `scripts/pr-sweep.sh` | every open pull request where the ball is in your court |
|
|
129
|
+
| `scripts/pr-sweep.sh` | every open pull request where the ball is in your court, and every merged or closed one whose fork branch is still there, repeated each run until it is gone |
|
|
130
130
|
| `scripts/inbox.sh` | what GitHub has to tell you since you last looked, bodies included, with a census of every open pull request |
|
|
131
131
|
| `scripts/notes.sh` | what this repository's maintainers have asked for before |
|
|
132
132
|
| `scripts/fork-hygiene.sh` | branches deleted after merge or close, orphan forks listed |
|
|
@@ -114,7 +114,7 @@ uv tool install git+https://github.com/lenamonj/housebroken
|
|
|
114
114
|
| `scripts/file-pr.sh` | the only way a pull request gets filed: five gates in front of `gh pr create` |
|
|
115
115
|
| `scripts/file-issue.sh` | the only way an issue gets filed: the same printouts and prose, and a fix offered is a fix linked |
|
|
116
116
|
| `scripts/verify-filed-pr.sh` | the filed pull request is what was meant, and CI settled |
|
|
117
|
-
| `scripts/pr-sweep.sh` | every open pull request where the ball is in your court |
|
|
117
|
+
| `scripts/pr-sweep.sh` | every open pull request where the ball is in your court, and every merged or closed one whose fork branch is still there, repeated each run until it is gone |
|
|
118
118
|
| `scripts/inbox.sh` | what GitHub has to tell you since you last looked, bodies included, with a census of every open pull request |
|
|
119
119
|
| `scripts/notes.sh` | what this repository's maintainers have asked for before |
|
|
120
120
|
| `scripts/fork-hygiene.sh` | branches deleted after merge or close, orphan forks listed |
|
|
@@ -91,8 +91,10 @@ while IFS= read -r f; do
|
|
|
91
91
|
[ -n "$entry" ] || continue
|
|
92
92
|
mode=$(printf '%s\n' "$entry" | awk '{print $1}')
|
|
93
93
|
|
|
94
|
-
# A mode is only wrong relative to the file's own neighbours
|
|
95
|
-
|
|
94
|
+
# A mode is only wrong relative to the file's own neighbours, and only the
|
|
95
|
+
# branch's to answer for when the base does not already carry it.
|
|
96
|
+
base_mode=$(git ls-tree "$base" -- "$f" 2>/dev/null | awk '{print $1}')
|
|
97
|
+
if [ "$mode" = "100755" ] && [ "$base_mode" != "100755" ]; then
|
|
96
98
|
case "$f" in
|
|
97
99
|
*.*) ext=".${f##*.}" ;;
|
|
98
100
|
*) ext="" ;;
|
|
@@ -9,7 +9,10 @@
|
|
|
9
9
|
#
|
|
10
10
|
# A merge or a close drops a PR out of the open list without a word, so each
|
|
11
11
|
# run writes its open set to a state file and the next run reports what left
|
|
12
|
-
# it.
|
|
12
|
+
# it. A PR that left still owns a branch on our fork until someone deletes it,
|
|
13
|
+
# so the sweep records that branch in the state file and prints a TIDY line on
|
|
14
|
+
# every run until `housebroken hygiene` has removed it. The obligation is in
|
|
15
|
+
# the output, not in anyone's memory.
|
|
13
16
|
#
|
|
14
17
|
# Usage:
|
|
15
18
|
# bash pr-sweep.sh # only PRs where the ball is in our court
|
|
@@ -77,14 +80,21 @@ if [ -f "$STATE" ]; then
|
|
|
77
80
|
exit 1
|
|
78
81
|
fi
|
|
79
82
|
echo "--- merged or closed since $last"
|
|
83
|
+
tidy="$(jq -r '.tidy[]?' "$STATE" | tr -d '\r')"
|
|
80
84
|
gone="$(comm -23 <(jq -r '.open[]?' "$STATE" | tr -d '\r' | sort) <(printf '%s\n' "$open_ids"))"
|
|
81
85
|
while read -r id; do
|
|
82
86
|
[ -n "$id" ] || continue
|
|
83
87
|
gone_repo="${id%#*}"; gone_num="${id##*#}"
|
|
84
|
-
if ! v="$(gh pr view "$gone_num" --repo "$gone_repo" --json state,mergedAt,closedAt,mergedBy)"; then
|
|
88
|
+
if ! v="$(gh pr view "$gone_num" --repo "$gone_repo" --json state,mergedAt,closedAt,mergedBy,headRefName,headRepository,headRepositoryOwner)"; then
|
|
85
89
|
echo "pr-sweep.sh: gh pr view $id failed" >&2
|
|
86
90
|
continue
|
|
87
91
|
fi
|
|
92
|
+
head_owner="$(printf '%s' "$v" | jq -r '.headRepositoryOwner.login // "-"' | tr -d '\r')"
|
|
93
|
+
head_fork="$(printf '%s' "$v" | jq -r '.headRepository.name // "-"' | tr -d '\r')"
|
|
94
|
+
head_branch="$(printf '%s' "$v" | jq -r '.headRefName // "-"' | tr -d '\r')"
|
|
95
|
+
if [ "$head_owner" = "$ME" ] && [ "$gone_repo" != "$ME/$head_fork" ] && [ "$head_branch" != "-" ]; then
|
|
96
|
+
tidy="$(printf '%s\n%s\n' "$tidy" "$ME/$head_fork $head_branch $id")"
|
|
97
|
+
fi
|
|
88
98
|
case "$(printf '%s' "$v" | jq -r '.state // "-"' | tr -d '\r')" in
|
|
89
99
|
MERGED)
|
|
90
100
|
printf 'MERGED %s by %s at %s\n' "$id" \
|
|
@@ -99,10 +109,22 @@ if [ -f "$STATE" ]; then
|
|
|
99
109
|
done <<< "$gone"
|
|
100
110
|
else
|
|
101
111
|
echo "--- no previous sweep recorded"
|
|
112
|
+
tidy=""
|
|
102
113
|
fi
|
|
103
114
|
|
|
104
|
-
|
|
105
|
-
|
|
115
|
+
# every recorded fork branch is checked again; it leaves the list only once GitHub says it is gone
|
|
116
|
+
keep=""; ntidy=0
|
|
117
|
+
while read -r fork branch id; do
|
|
118
|
+
[ -n "$fork" ] || continue
|
|
119
|
+
gh api "repos/$fork/git/refs/heads/$branch" >/dev/null 2>&1 || continue
|
|
120
|
+
ntidy=$((ntidy + 1))
|
|
121
|
+
keep="$(printf '%s\n%s\n' "$keep" "$fork $branch $id")"
|
|
122
|
+
printf 'TIDY %-38s fork branch %s %s still exists: run housebroken hygiene\n' "$id" "$fork" "$branch"
|
|
123
|
+
done <<< "$(printf '%s\n' "$tidy" | awk 'NF == 3 && !seen[$0]++')"
|
|
124
|
+
|
|
125
|
+
if ! jq -n --arg t "$(date -u +%Y-%m-%dT%H:%M:%SZ)" \
|
|
126
|
+
--arg open "$(printf '%s\n' "$open_ids")" --arg tidy "$(printf '%s\n' "$keep")" \
|
|
127
|
+
'{lastRun: $t, open: ($open | split("\n") | map(select(length > 0))), tidy: ($tidy | split("\n") | map(select(length > 0)))}' > "$STATE"; then
|
|
106
128
|
echo "pr-sweep.sh: cannot write $STATE" >&2
|
|
107
129
|
exit 1
|
|
108
130
|
fi
|
|
@@ -136,3 +158,5 @@ while IFS=$'\t' read -r repo num updated title; do
|
|
|
136
158
|
fi
|
|
137
159
|
done <<< "$list"
|
|
138
160
|
echo "open PRs: $n; needing action: $act"
|
|
161
|
+
[ "$ntidy" -gt 0 ] && echo "fork branches to tidy: $ntidy (housebroken hygiene)"
|
|
162
|
+
exit 0
|
|
@@ -99,8 +99,11 @@ report it in one line and do not proceed to the next step.
|
|
|
99
99
|
commit, so a correction made after that commit is not in the new one. When the
|
|
100
100
|
patched function serves several public entry points or has several
|
|
101
101
|
branches, the test is a grid: every entry point through every branch,
|
|
102
|
-
plus the zero, identity and signed-boundary rows. A
|
|
103
|
-
|
|
102
|
+
plus the zero, identity and signed-boundary rows. A patch that
|
|
103
|
+
reconciles two coupled setters keeps a value that already satisfies the
|
|
104
|
+
invariant instead of resetting it, and its grid has a row for every
|
|
105
|
+
order the two are called in, the same value twice and null included. A
|
|
106
|
+
reviewer lists the empty cells otherwise.
|
|
104
107
|
|
|
105
108
|
5. **Run their CI, not yours.**
|
|
106
109
|
Run the project's own test target on the fresh clone, and every gate its
|
|
@@ -184,7 +187,9 @@ report it in one line and do not proceed to the next step.
|
|
|
184
187
|
`housebroken verify owner/repo PR` re-derives from GitHub that the head is
|
|
185
188
|
the intended commit, the diff is exactly the intended files, and CI
|
|
186
189
|
settled. `housebroken sweep` lists every open pull request where the ball
|
|
187
|
-
is in your court
|
|
190
|
+
is in your court, and prints a `TIDY` line for every merged or closed
|
|
191
|
+
pull request whose fork branch still exists, on every run until
|
|
192
|
+
`housebroken hygiene` has deleted it. `housebroken inbox` is the first thing a session does
|
|
188
193
|
and the only way you learn a thread's state: it prints every event on
|
|
189
194
|
your threads since the last acknowledged cursor with the full body, the
|
|
190
195
|
thread's state, and a census of failing, blocked and conflicting checks
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.6"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.4"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|