Visitar URL original
Keep hub_fetch_run.py in the Repo Root for Both Hook Shapes by ptr727 · Pull Request #4080 · ptr727/ProjectTemplate · GitHub
Skip to content

Keep hub_fetch_run.py in the Repo Root for Both Hook Shapes - #4080

Merged
ptr727 merged 5 commits into
developfrom
feature/hub-fetch-run-root
Nov 11, 2026
Merged

ptr727 merged 5 commits into
developfrom
feature/hub-fetch-run-root

Conversation

@ptr727

@ptr727 ptr727 commented Nov 11, 2026 •

Copy link
Copy Markdown
Owner

Summary

Every fleet repo now keeps hub_fetch_run.py in its repo root, whichever commit hook it wires.

  • Before: the Husky.Net snippet kept the helper at .husky/hub_fetch_run.py, and the pre-commit framework snippet kept it in the root.
  • Why the split could go: nothing required it.
    • The Husky.Net hook already moves to the top level before it runs a gate.
    • The audit and python_directories.py exempt the helper by its file name, wherever it sits.
    • The helper reads nothing relative to its own location.
  • Why the root: it is the only directory both hook types share.

Changes

  • catalog/snippets/husky/pre-commit: resolves the helper as $PWD/hub_fetch_run.py after the existing cd to the top level, where it used to resolve it from dirname "$0". One edited comment corrects the stated location, hence the comments label.
  • catalog/snippets/configs/vscode-tasks.json: the 12 Lint task arguments now name ${workspaceFolder}/hub_fetch_run.py.
  • catalog/snippets/configs/vscode-tasks-python.json: drops the two comment lines describing the old Husky.Net layout.
  • GOVERNANCE.md, STANDUP.md, catalog/snippets/husky/README.md, docs/pre-commit-hooks-rollout.md: each now names the repo root as the helper's location.
  • RESYNC.md step 6: a helper still under .husky/ moves to the root in the same commit as its callers.
  • tests/test_hub_fetch_run.py: both task snippets are checked against one root path. Two new tests:
    • every task argument naming the helper names the root copy
    • the Husky.Net hook resolves the helper only after its cd to the top level

Fleet impact

A live read of every registered repo's develop found none carrying .husky/hub_fetch_run.py, so no repo needs to move the file.

  • The Husky.Net repos do not call the helper from their hooks yet.
  • Every repo that does carry it uses the pre-commit framework and already keeps it in the root.
  • Two repos keep a stale comment from the old Python tasks snippet. It changes no behaviour, and the next routine resync replaces it.

Verification

  • Full unittest suite, run with tests/requirements.txt: 3882 tests passed, 11 skipped.
  • shellcheck and shfmt -d on the hook snippet: clean.
  • Prose gate and EOL check: clean, with comments allowed for the one edited hook comment.
  • Local strict review, two passes:
    • The first raised three introduced findings, all fixed in 2d7fb37e: an assertion that could not fail, the RESYNC rename-and-move wording, and the rollout doc's copy destination.
    • The second raised none.
  • After develop was merged in, with two conflicts resolved by keeping both sides:
    • The full suite passed: 3880 tests.
    • A further local pass raised one introduced finding. The root-location claim said "every fleet repo", although the hub keeps no root copy. It was fixed in 0f252f20 by scoping the claim to downstream repos, and the re-review raised none.

🤖 Generated with Claude Code

ptr727 and others added 3 commits November 11, 2026 10:46
The Husky.Net snippet kept the helper beside its hook at
.husky/hub_fetch_run.py, while the pre-commit framework snippet kept it
in the repo root. Nothing required the split. The hook already moves to
the top level before it runs a gate, and the audit exempts the helper by
name wherever it sits. The root is the only directory both shapes share,
so every fleet repo now keeps the helper there.

The Husky.Net hook resolves the helper from the root after its cd, the
.NET VS Code tasks snippet calls the root copy, and RESYNC.md moves a
helper still under .husky/ to the root in the same commit as its callers.
The hook's one edited comment corrects a location that no longer holds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RESYNC.md no longer tells a helper both to stay in place and to move.
The rollout doc says only the helper goes into the repo root, never the
hook snippet. The Husky hook test drops an assertion that could not fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727 ptr727 added the comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses label Nov 11, 2026
Copilot AI lite review requested due to automatic review settings November 11, 2026 18:52
@ptr727

ptr727 commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 2d7fb37e8f25bb291e0353b3f048e1c15899b9e7, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Pre-merge checks: Passed 1 · Inconclusive 1

Failed Failed checks: 1 inconclusive

Check name Status Explanation Resolution
Title check Pending This assessment has not completed. The check will be retried on the next pre-merge check run.
Passed Passed checks: 1 passed

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active issues are identified across the helper-location updates, related documentation, hook/task changes, and accompanying tests.

No open issues 🎉

What changed in this PR

This pull request standardizes hub_fetch_run.py in the repository root for both supported hook layouts and updates related hooks, VS Code tasks, documentation, migration guidance, and tests.

Changes:

  • Updates the Husky.Net hook and VS Code tasks to use the root-level helper.
  • Revises setup, governance, rollout, and resync documentation.
  • Adds tests covering root-path references and Husky.Net hook ordering.
File Description
tests/​test_hub_fetch_run.py Updates expectations and tests root helper references and Husky.Net hook ordering.
STANDUP.md Documents copying the helper into the repository root during setup.
RESYNC.md Documents moving existing .husky/ helpers to the repository root during resync.
GOVERNANCE.md Defines the repository root as the canonical helper location.
docs/​pre-commit-hooks-rollout.md Updates rollout instructions to use the root-level helper.
catalog/​snippets/​husky/​README.md Documents the root-level helper location for Husky.Net repositories.
catalog/​snippets/​husky/​pre-commit Resolves the helper after changing to the repository root.
catalog/​snippets/​configs/​vscode-tasks.json Updates Lint task paths to reference the root-level helper.
catalog/​snippets/​configs/​vscode-tasks-python.json Removes obsolete comments describing the former helper layout.

Review effort: Lite

@codecov

codecov Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.26%. Comparing base (b38e084) to head (0f252f2).
⚠️ Report is 153 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4080      +/-   ##
===========================================
+ Coverage    81.60%   82.26%   +0.65%     
===========================================
  Files           26       38      +12     
  Lines         9070    12933    +3863     
===========================================
+ Hits          7402    10639    +3237     
- Misses        1668     2294     +626     
Flag Coverage Δ
python-3.13 82.26% <ø> (+0.65%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…run-root

# Conflicts:
#	RESYNC.md
#	tests/test_hub_fetch_run.py
@ptr727

ptr727 commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@ptr727

ptr727 commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

/review

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

The hub runs its own gates directly and keeps no root copy of the helper,
so the Husky snippet's README and hook comment now say every downstream
repo keeps it in the root rather than every fleet repo.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ptr727

ptr727 commented Nov 11, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 0f252f20f7f3faa88e74b1271fd59e686ff74552, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@ptr727
ptr727 merged commit 111f353 into develop Nov 11, 2026
13 checks passed
@ptr727
ptr727 deleted the feature/hub-fetch-run-root branch November 11, 2026 19:55
ptr727 added a commit that referenced this pull request Nov 12, 2026
…s Rule, Companion-Free Lint, Root hub_fetch_run, .codecov.yml (#4083)

## Summary

Promotes burndown round 3 of the attended run of 2026-11-10, together
with two pull requests from other hub sessions, from `develop` to
`main`.

- #4082: `configure.sh apply` refuses a repository the registry does not
list, before any write. A repository whose entry is on `develop` but not
yet on `main` is configured and audited from a hub checkout at
`develop`. `OPERATIONS.md`, `AUDIT.md`, `GOVERNANCE.md` "Hub-Hosted
Tooling", and the standup, audit, and branch-protection skill text now
say so.
- #4081: `WORKFLOW.md`'s contradictory trigger, merge, and release rules
are reconciled. D1.5 requires a gate to trigger on `pull_request`, and
the audit reports a gate that does not. A retarget is cleared by a push
or a close and reopen.
- #4078: `CODESTYLE.md` gains an Interrupts rule with Python and Shell
mechanics. `build_dist.py` no longer carries a file's trailing link
definitions into an include of its last heading.
- #4076: `docker_lint.py` imports only the standard library, so the Lint
tasks fetch no companions. The provenance label and the ruff task labels
are corrected. `GOVERNANCE.md` "Repo-Scoped Secrets" states the
owner-first host secret stem.
- #4080, from another session: `hub_fetch_run.py` lives in the
repository root for both hook shapes.
- #4077, from another session: only `.codecov.yml` is accepted as the
Codecov configuration name.

Fixes #4061
Fixes #4011
Fixes #4051
Fixes #4048
Fixes #4060
Fixes #3947
Fixes #4072
Fixes #3915
Fixes #4059
Fixes #4071

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## Summary by CodeRabbit

* **Documentation**
* Clarified when repository checks and configuration use the `develop`
branch, and documented that configuration changes are not applied to
unregistered repositories.
* Expanded scripting guidance for handling interruptions, cleaning up
resources, and saving persistent state safely.
* Updated workflow, coverage, and hook setup guidance to reflect current
requirements and locations.

* **Bug Fixes**
* Audits now check only the declared baseline filename; repositories
using a different filename are reported as missing.
* Markdown heading extraction no longer includes trailing link
definitions in the heading body.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comments Permits the comment lines the pull request adds or edits, which the prose gate otherwise refuses

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants