hooks
hooks
¶
Shared hook utilities.
Contains small pure helpers used by the daemon's inline hook executor
in daemon/manager.py. The former execution/hooks.py runner-side
hook executor has been removed (Phase 6b of the Pre-Instrument Execution
Atlas) — this module preserves the one utility that was still live:
expand_hook_variables().
Functions:¶
expand_hook_variables
¶
expand_hook_variables(template, *, workspace, job_id, job_status=None, sheet_count=None, score_dir=None, for_shell=False)
Expand template variables in hook paths/commands.
Known variables: {workspace}, {job_id}, {job_status},
{sheet_count}, {score_dir}.
Warns on unrecognized {var} patterns that remain after expansion.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
template
|
str
|
Template string with |
required |
workspace
|
str | Path
|
Workspace path to substitute. |
required |
job_id
|
str
|
Job identifier to substitute. |
required |
job_status
|
str | None
|
Optional terminal job status to substitute. |
None
|
sheet_count
|
int | None
|
Optional sheet count to substitute. |
None
|
for_shell
|
bool
|
When True, apply |
False
|