Commit a4669e8
docs: address second Copilot review on #716 — __init__.py + accurate git push behavior
Two valid Copilot findings:
1. **`__init__.py` missing from regeneration summary**: verified by
reading `scripts/regenerate_client.py:347` — `move_client_to_workspace`
writes a fixed flattened-import template to
`katana_public_api_client/__init__.py` on every regen, overwriting
whatever was there. The inline comment in the script says "preserve
any custom content" but the code doesn't merge — it just writes the
template. Added `__init__.py` to the rewritten-paths list with a
parenthetical flagging the misleading comment so contributors don't
put hand-maintained exports there expecting them to survive.
2. **Inaccurate `git push -u origin <branch>` rationale**: Copilot is
right that `git push -u origin <branch-name>` with an explicit
branch-name refspec creates/updates `refs/heads/<branch-name>` on
the remote — it's safe by itself. The trap the rule guards against
is under-specified pushes (bare `git push`, `git push -u origin`
without a refspec, or commands routed by `push.default = upstream`)
that resolve to the tracked upstream, which can be `main` if the
branch was created via `git checkout -b <name> origin/main`.
Reworded both the CONTRIBUTING walkthrough and the canonical
COMMIT_STANDARDS "First-Push Safety" section so the rationale is
technically accurate: the value of `HEAD:refs/heads/<name>` is
removing dependence on `push.default`, branch-tracking config, and
shell habits — not overriding refspec resolution that's already
correct in the safe case. Kept the incident reference (commit
`30f3fd86` reached main, tagged, and published before cancellation)
in COMMIT_STANDARDS so the rule's history is preserved.
Refs #569.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 808566f commit a4669e8
2 files changed
Lines changed: 29 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
301 | 301 | | |
302 | 302 | | |
303 | 303 | | |
304 | | - | |
305 | | - | |
306 | | - | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
307 | 308 | | |
308 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
309 | 315 | | |
310 | 316 | | |
311 | | - | |
| 317 | + | |
312 | 318 | | |
313 | 319 | | |
314 | | - | |
| 320 | + | |
315 | 321 | | |
316 | 322 | | |
317 | 323 | | |
318 | | - | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
319 | 327 | | |
320 | 328 | | |
321 | 329 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
| 125 | + | |
| 126 | + | |
129 | 127 | | |
130 | 128 | | |
131 | 129 | | |
132 | 130 | | |
133 | 131 | | |
134 | | - | |
135 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
136 | 139 | | |
137 | 140 | | |
138 | 141 | | |
| |||
321 | 324 | | |
322 | 325 | | |
323 | 326 | | |
324 | | - | |
325 | | - | |
326 | | - | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
327 | 332 | | |
328 | 333 | | |
329 | 334 | | |
| |||
0 commit comments