Repository navigation
Description
Problem
Two hub tasks run a caller-owned hook while passing it nothing about why it runs, so a caller whose hook needs to know has no clean route. Both surfaced while ESPHome-NonRoot adopted the reusable chain (ptr727/ESPHome-NonRoot#319, landed as ptr727/ESPHome-NonRoot#326).
1. check-upstream-version-task.yml cannot serve two callers in one repository
docs/reusable-workflows.md "Adopting the Type-Specific Tasks" says ESPHome-NonRoot's upstream-dependency watcher becomes a second caller of check-upstream-version-task.yml, with a hook emitting {"docker_base_packages": "<list>"}. The task always runs one fixed hook path, .github/actions/resolve-upstream, and passes the hook no input. In a repository whose version tracker already owns that hook, the hook cannot tell the watcher's call from the tracker's, so it cannot emit the right document for each. ESPHome-NonRoot therefore keeps check-upstream-dependency.yml as a repo-owned workflow, against the doc.
2. validate-task.yml gives the validate hook no inputs
A caller cannot pass the hook a change-gate result, so an expensive hook cannot be gated by its caller. ESPHome-NonRoot's compile test takes over 10 minutes, so its validate hook re-derives the triggering event and diffs the push itself to decide whether to run. That duplicates logic the caller already holds and that the hook can get wrong independently.
Options
- Add a
hook-pathinput tocheck-upstream-version-task.yml, defaulting to.github/actions/resolve-upstream, so a second caller names its own hook. Or add a free-formhook-inputstring passed through to the hook, so one hook can branch on it. - Add an optional
hook-input(or a typedrun-domain-checkboolean) tovalidate-task.yml, passed to thevalidatehook, so a caller's existing change-gate decides. - Where neither is wanted, correct the "Adopting the Type-Specific Tasks" sentence so it no longer names a second caller the task cannot serve.
Done when
The adoption doc and the two tasks agree, and a downstream repository with two upstream-tracking needs, or an expensive domain check, can express them without re-deriving caller state inside a hook.
Found from ptr727/ESPHome-NonRoot. This issue reports findings and is not a pull request against the hub.
Activity
ptr727 commentedon Oct 22, 2026
An update on item 2 from ptr727/ESPHome-NonRoot#332, which moved that repository's CI to the hub's
pull_requesttrigger. Itsvalidatehook no longer diffs a push. It now fetches the test merge commit at depth 2 and diffs it against its first parent, which is the same basevalidate-task.yml's "Resolve prose base step" already resolves for the prose gate in the lint job. Avalidate-task.ymlinput carrying that resolved base, or the caller's paths-filter result, to the hook would remove the second copy.ptr727 commentedon Nov 1, 2026
Decision needed (decision triage, 2026-11-01)
Question: How should a caller's hook learn which caller is running it: an optional
hook-input(orhook-path) oncheck-upstream-version-task.ymland ahook-inputonvalidate-task.yml, or removing the claim indocs/reusable-workflows.md"Adopting the Type-Specific Tasks" that ESPHome-NonRoot's dependency watcher becomes a second caller?Options, recommended first:
hook-inputstring to both tasks (recommended): Passed only when non-empty (a guarded second step), so a hook declaring no such input is never handed one. One mechanism makes the doc's second-caller claim true and lets a caller hand its change-gate result or base to an expensivevalidatehook, so ESPHome-NonRoot can retire its repo-ownedcheck-upstream-dependency.yml. No work in flight in the hub.github.workflow_ref(thegithubcontext is the caller's). Cheapest, but ties the hook to a workflow filename and leaves item 2's duplicated base logic. No work in flight.run-domain-checkboolean on validate-task only, plus the doc fix: Solves item 2 and drops the second-caller claim, but cannot carry the resolved base the follow-up comment asks for. No work in flight.hook-pathinput: Not workable as proposed: a step'suses:takes no expression, so the task would need a dispatcher over fixed paths. No work in flight.Evidence: check-upstream-version-task.yml:77-86 runs the fixed
./.github/actions/resolve-upstreamwith nowith:, and none of its inputs reach the hook. docs/reusable-workflows.md:741 still claims a second instance with its own hook, and its Stage 5 item at :239 ("both trackers") is unchecked. validate-task.yml:823-828 runs thevalidatehook with no inputs. The maintainer's 2026-10-22 comment asks for the resolved base or paths-filter result, which validate-task.yml:543-554 computes in thelintjob, notvalidate.Blocks: none
ptr727 commentedon Nov 1, 2026
Maintainer answer (decision triage, 2026-11-01): Option 1: add an optional hook-input string to check-upstream-version-task.yml and validate-task.yml, passed to the hook only when non-empty. This is now work for the next burndown round.
ptr727 commentedon Nov 26, 2026
Released (2026-11-25): this group merged into develop as #4465 and its branch and worktree were cleaned up, so the claim holds no files.
Backlog burndown claim (away run 2026-11-25, round 2, group D2): branch
burndown/task-hook-input, issue #3325, per the maintainer's 2026-11-01 answer (option 1): an optionalhook-inputstring oncheck-upstream-version-task.ymlandvalidate-task.yml, passed to the caller's hook only when non-empty, so a caller passing nothing behaves as today.Predicted files:
.github/workflows/check-upstream-version-task.yml: the input and its hook step..github/workflows/validate-task.yml: the input and thevalidatehook step only.docs/reusable-workflows.md: "Adopting the Type-Specific Tasks" and wherever it describes either hook's inputs. The parked Merge Bot Fails on an Operational Develop When a Check Is Still Running #4377 claim passed this file out on 2026-11-24, and the receiving group released it on merging Drop Archived DevKitCIoT From the Reusable-Workflows Checklists and Fix a Normalization Docstring #4425, so it is free.tests/test_workflow_steps.py.Not claimed:
.github/actions/resolve-upstream/,.github/actions/validate/,.github/actions/validate-default/,spec/files.json, andWORKFLOW.md(held by the parked #4377 group).Any other group needing one of these files waits for this branch to merge.
Extended (2026-11-25, orchestrator):
.github/actions/resolve-upstream/action.ymland.github/actions/validate/action.yml, an optionalhook-inputdeclaration on each hub hook so actionlint accepts the newwith:input. No other group holds them.Hand a Caller's hook-input to the validate and resolve-upstream Hooks (…