housebroken-cli 0.19.0__tar.gz → 0.20.0__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 (38) hide show
  1. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/PKG-INFO +2 -2
  2. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/README.md +1 -1
  3. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/pyproject.toml +1 -1
  4. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/proof.sh +28 -4
  5. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/skills/housebroken/SKILL.md +10 -5
  6. housebroken_cli-0.20.0/src/housebroken/__init__.py +1 -0
  7. housebroken_cli-0.19.0/src/housebroken/__init__.py +0 -1
  8. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/.gitignore +0 -0
  9. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/LICENSE +0 -0
  10. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/bin/housebroken +0 -0
  11. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/hatch_build.py +0 -0
  12. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/branch-check.sh +0 -0
  13. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/check-ai-policy.sh +0 -0
  14. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/ci-legs.sh +0 -0
  15. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/claim-check.sh +0 -0
  16. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/close.sh +0 -0
  17. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/comment-census.sh +0 -0
  18. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/comment-check.sh +0 -0
  19. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/common.sh +0 -0
  20. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/declare.sh +0 -0
  21. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/diff-defaults.sh +0 -0
  22. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/distinct-outside.sh +0 -0
  23. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/edit-pr.sh +0 -0
  24. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/file-issue.sh +0 -0
  25. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/file-pr.sh +0 -0
  26. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/fork-hygiene.sh +0 -0
  27. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/gate-hook.sh +0 -0
  28. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/inbox.sh +0 -0
  29. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/notes.sh +0 -0
  30. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/pr-sweep.sh +0 -0
  31. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/prior-art.sh +0 -0
  32. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/push.sh +0 -0
  33. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/ref-check.sh +0 -0
  34. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/refuse.sh +0 -0
  35. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/reply.sh +0 -0
  36. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/review.sh +0 -0
  37. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/scripts/verify-filed-pr.sh +0 -0
  38. {housebroken_cli-0.19.0 → housebroken_cli-0.20.0}/src/housebroken/cli.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: housebroken-cli
3
- Version: 0.19.0
3
+ Version: 0.20.0
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
@@ -61,7 +61,7 @@ A pull request passes through the door in order, and stops at the first rule it
61
61
  A change that rejects an input the project tolerated, changes a default, or narrows what the project publishes is the maintainer's call. It is sent with the call stated in the body: what breaks for existing users, and an offer to narrow or close it. A finding whose only evidence is a measurement is a hold, not a pull request.
62
62
 
63
63
  **4. Prove it red first, and prove the proof.**
64
- On a fresh clone of the upstream default branch, the new test fails; with the patch, it passes. Every arm of the experiment prints evidence that its precondition held, files are swapped by content and checked by hash, and two arms that agree exactly have not tested the variable. `proof.sh` runs the experiment itself: the test on the head, then on the head with every changed non-test file swapped back to its content at the merge base, then the head restored and checked by hash, and it stamps the head only when the base arm fails and the head arm passes. A change with nothing to show red says so, with the reason, and the filing prints it.
64
+ On a fresh clone of the upstream default branch, the new test fails; with the patch, it passes. Every arm of the experiment prints evidence that its precondition held, files are swapped by content and checked by hash, and two arms that agree exactly have not tested the variable. `proof.sh` runs the experiment itself: the test on the head, then on the head with every changed non-test file swapped back to its content at the merge base, then the head restored and checked by hash, and it stamps the head only when the base arm fails and the head arm passes. Both arms run with `HTTP_PROXY`, `HTTPS_PROXY` and `ALL_PROXY` at local port 9 and `NO_PROXY` at loopback only, so a test whose client honors them fails instead of reaching the network, and an arm whose output carries a client's failure at that port is not stamped. A change with nothing to show red says so, with the reason, and the filing prints it.
65
65
 
66
66
  **5. Run their CI, not yours.**
67
67
  The project's own test target on the fresh clone, and every gate its pull request workflow runs: lint, format, mutation, API check. A gate not run is a red check the maintainer sees first.
@@ -49,7 +49,7 @@ A pull request passes through the door in order, and stops at the first rule it
49
49
  A change that rejects an input the project tolerated, changes a default, or narrows what the project publishes is the maintainer's call. It is sent with the call stated in the body: what breaks for existing users, and an offer to narrow or close it. A finding whose only evidence is a measurement is a hold, not a pull request.
50
50
 
51
51
  **4. Prove it red first, and prove the proof.**
52
- On a fresh clone of the upstream default branch, the new test fails; with the patch, it passes. Every arm of the experiment prints evidence that its precondition held, files are swapped by content and checked by hash, and two arms that agree exactly have not tested the variable. `proof.sh` runs the experiment itself: the test on the head, then on the head with every changed non-test file swapped back to its content at the merge base, then the head restored and checked by hash, and it stamps the head only when the base arm fails and the head arm passes. A change with nothing to show red says so, with the reason, and the filing prints it.
52
+ On a fresh clone of the upstream default branch, the new test fails; with the patch, it passes. Every arm of the experiment prints evidence that its precondition held, files are swapped by content and checked by hash, and two arms that agree exactly have not tested the variable. `proof.sh` runs the experiment itself: the test on the head, then on the head with every changed non-test file swapped back to its content at the merge base, then the head restored and checked by hash, and it stamps the head only when the base arm fails and the head arm passes. Both arms run with `HTTP_PROXY`, `HTTPS_PROXY` and `ALL_PROXY` at local port 9 and `NO_PROXY` at loopback only, so a test whose client honors them fails instead of reaching the network, and an arm whose output carries a client's failure at that port is not stamped. A change with nothing to show red says so, with the reason, and the filing prints it.
53
53
 
54
54
  **5. Run their CI, not yours.**
55
55
  The project's own test target on the fresh clone, and every gate its pull request workflow runs: lint, format, mutation, API check. A gate not run is a red check the maintainer sees first.
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "housebroken-cli"
7
- version = "0.19.0"
7
+ version = "0.20.0"
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"
@@ -16,6 +16,19 @@
16
16
  # can tell that from the bug. A run that does not show the fix removes any stamp
17
17
  # an earlier run left for this head.
18
18
  #
19
+ # Both arms run with HTTP_PROXY, HTTPS_PROXY and ALL_PROXY (and their lower
20
+ # case) at local port 9, where nothing normally listens, and NO_PROXY set to
21
+ # loopback only, so a test's own local server is still reached: the red arm
22
+ # of the test filed on teslamotors/vehicle-command #479 sent a real POST to
23
+ # the vendor's production API. A client that honors them fails instead of
24
+ # sending, and an arm whose output carries a client's failure at that port
25
+ # (Go and curl naming 127.0.0.1:9, requests' "Unable to connect to proxy",
26
+ # curl's "over proxy 127.0.0.1" or "via 127.0.0.1") is not stamped; a line naming a proxy variable is not read as
27
+ # one. A client that ignores the variables (Java, Node's fetch, a raw socket)
28
+ # is not held; one that fails without naming the proxy (urllib, httpx,
29
+ # reqwest) is held but not reported, and a base arm red only for that is
30
+ # still stamped. Fetch dependencies before the run.
31
+ #
19
32
  # A change with nothing to prove red, a documentation fix or a refactor
20
33
  # whose behaviour the existing suite already pins, says so with --none and a
21
34
  # reason; the stamp records the reason and the filing prints it.
@@ -135,8 +148,15 @@ echo "proof: taking away ${#fixes[@]} file(s): ${fixes[*]}${kept[0]:+; keeping $
135
148
 
136
149
  hash_of() { if [ -f "$1" ]; then git hash-object -- "$1"; else echo absent; fi; }
137
150
  hashes() { local f; for f in "${fixes[@]}"; do printf '%s %s\n' "$(hash_of "$f")" "$f"; done; }
138
- run_arm() { # label -> rc in arm_rc, output tail in arm_out
139
- arm_out=$(bash -c "$cmd" 2>&1); arm_rc=$?
151
+ blackhole=http://127.0.0.1:9
152
+ loopback=localhost,127.0.0.1,::1
153
+ run_arm() { # label -> rc in arm_rc, output tail in arm_out, a line showing a reach for the network in arm_net
154
+ arm_out=$(HTTP_PROXY=$blackhole HTTPS_PROXY=$blackhole ALL_PROXY=$blackhole \
155
+ http_proxy=$blackhole https_proxy=$blackhole all_proxy=$blackhole \
156
+ NO_PROXY=$loopback no_proxy=$loopback \
157
+ bash -c "$cmd" 2>&1); arm_rc=$?
158
+ arm_net=$(printf '%s\n' "$arm_out" | grep -v -E '_PROXY|_proxy' |
159
+ grep -m1 -E '127\.0\.0\.1(:| port )9([^0-9]|$)|Unable to connect to proxy|(over proxy|via) 127\.0\.0\.1( |$)' | cut -c1-200)
140
160
  arm_out=$(printf '%s\n' "$arm_out" | tail -15)
141
161
  echo "== $1 arm: exit $arm_rc"
142
162
  printf '%s\n' "$arm_out" | sed 's/^/ /'
@@ -144,7 +164,7 @@ run_arm() { # label -> rc in arm_rc, output tail in arm_out
144
164
 
145
165
  head_hashes=$(hashes)
146
166
  run_arm head
147
- head_rc=$arm_rc; head_out=$arm_out
167
+ head_rc=$arm_rc; head_out=$arm_out; head_net=$arm_net
148
168
 
149
169
  # The base arm: each fix file by its content at the merge base, through the
150
170
  # clone's own filters so line endings are what a checkout gives, or gone
@@ -176,7 +196,7 @@ for f in "${fixes[@]}"; do
176
196
  done
177
197
  base_hashes=$(hashes)
178
198
  run_arm base
179
- base_rc=$arm_rc; base_out=$arm_out
199
+ base_rc=$arm_rc; base_out=$arm_out; base_net=$arm_net
180
200
  restore
181
201
  trap - EXIT
182
202
 
@@ -201,6 +221,10 @@ case "$base_rc" in
201
221
  0) failed="${failed:+$failed; }the test passes without the fix, so it does not show the bug${kept[0]:+ (or the fix is in a kept file: ${kept[*]})}" ;;
202
222
  esac
203
223
  [ "$head_rc" -eq 0 ] || failed="${failed:+$failed; }the test fails with the fix"
224
+ for arm in base head; do
225
+ if [ "$arm" = base ]; then net=$base_net; else net=$head_net; fi
226
+ [ -z "$net" ] || failed="${failed:+$failed; }the $arm arm reached for the network through the blocked proxy ($net); stub the client the way the neighbouring tests do, and fetch dependencies before the run"
227
+ done
204
228
  if [ -n "$failed" ]; then
205
229
  echo "proof: not shown - $failed"
206
230
  exit 1
@@ -107,10 +107,13 @@ report it in one line and do not proceed to the next step.
107
107
  the bug in, write the test that fails. Run it and keep the failing output.
108
108
  Apply the patch. Run it again. Both results go into the pull request as
109
109
  the test itself; the body states the fact in one sentence.
110
- Run the red arm with egress blocked (`HTTPS_PROXY` and `HTTP_PROXY` at a
111
- black-hole address, or the equivalent): a test that then names a host has
112
- left the machine, and is rewritten to stub the client the way its
113
- neighbours do.
110
+ Run both arms with egress blocked. `housebroken proof` sets `HTTP_PROXY`,
111
+ `HTTPS_PROXY` and `ALL_PROXY` to local port 9 and `NO_PROXY` to loopback
112
+ only, and a test whose output then carries a client's failure at that
113
+ port is not stamped. A client that ignores those variables (Java, Node's
114
+ fetch, a raw socket, a proxy set in git or Cargo config) is not held by
115
+ that, so block it the language's way. A test that reaches the network is rewritten to stub the
116
+ client the way its neighbours do; fetch dependencies before the run.
114
117
  Ask what each step would print if it did nothing, and make that answer
115
118
  different from success: revert by content and compare hashes rather than
116
119
  trusting a command's exit code, check the clone's line endings before the
@@ -350,7 +353,9 @@ report it in one line and do not proceed to the next step.
350
353
  contributor or a first-timer is anyone who can type, and the inbox says
351
354
  so. Answer every maintainer comment the same day,
352
355
  in the user's voice, and run `housebroken claims` over the reply before
353
- it is posted. A voice with no role is read, never answered on your own:
356
+ it is posted. A reproduction a maintainer asks for is the shipped command
357
+ line or an exported function of a public package, run on a fresh clone,
358
+ with its real output pasted; a call into an internal package is not one. A voice with no role is read, never answered on your own:
354
359
  report what they said and answer only when the user says to, with
355
360
  `--outsider`, at most once, on the facts. A reply that concedes a point, disagrees, or rides on
356
361
  a code change goes through the adversarial review of step 9 first, with
@@ -0,0 +1 @@
1
+ __version__ = "0.20.0"
@@ -1 +0,0 @@
1
- __version__ = "0.19.0"