Commit 1d4e978
docs+chore: address third Copilot review on #716 + fix misleading regen comment
Three valid fixes — two from Copilot's third review pass on the
First-Push Safety rewording, plus the script-comment cleanup that
was deferred from the previous round.
## COMMIT_STANDARDS.md "First-Push Safety" example labels
The previous fix updated the rationale to acknowledge that
`git push -u origin <branch-name>` is safe by itself, but the
example block still labeled that form "Risky" — contradicting the
rationale above it. Reworked the example block to show three
distinct cases: DANGEROUS (under-specified pushes that genuinely
resolve to the tracked upstream), DISCOURAGED (the bare-branch-name
form — safe today but relies on push.default config staying
consistent forever), and REQUIRED (the explicit
`HEAD:refs/heads/<name>` form).
## COMMIT_STANDARDS.md and CONTRIBUTING.md hook claim
Both files claimed "a pre-push hook enforces this" / "enforces the
explicit form". Read the actual hook (scripts/pre-push-guard.sh):
it rejects pushes that land any non-`main` local ref on
`refs/heads/main`. It does NOT reject the bare-branch-name push
form (which targets `refs/heads/<name>`, not main).
Reworded both files to describe what the hook actually does — block
the specific originating-incident path — and explain that the
explicit refspec is the contributor-facing rule, not a hook-enforced
constraint.
## scripts/regenerate_client.py inline comment
The comment at line 347 said "Update main __init__.py with
flattened imports (preserve any custom content)" but the code
immediately overwrites the file via `.write_text(init_content)`
with no merge step. The comment misled the reader (and tripped
the Copilot review on this PR's first round). Rewrote the comment
to match actual behavior: overwrite verbatim, no merge, with a
pointer for where to add custom re-exports instead.
Refs #569.
Co-Authored-By: Claude <noreply@anthropic.com>1 parent a4669e8 commit 1d4e978
3 files changed
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
317 | | - | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
318 | 325 | | |
319 | 326 | | |
320 | | - | |
| 327 | + | |
| 328 | + | |
321 | 329 | | |
322 | 330 | | |
323 | 331 | | |
324 | 332 | | |
325 | | - | |
326 | | - | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
327 | 338 | | |
328 | 339 | | |
329 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
138 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
139 | 142 | | |
140 | 143 | | |
141 | 144 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
344 | 344 | | |
345 | 345 | | |
346 | 346 | | |
347 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
348 | 351 | | |
349 | 352 | | |
350 | 353 | | |
| |||
0 commit comments