Skip to main content

Module why

Module why 

Source
Expand description

haz why <TASK> per AUX-013..AUX-016.

Read-only introspection of a single task. The executor:

  1. Loads the workspace + validated graph (DISC-001..DISC-009, DAG-001..DAG-018).
  2. Resolves the positional task reference to exactly one node (P, A) per REF-001..REF-008; rejects zero-match and multi-match cases with diagnostics directing the user to a more specific form.
  3. Walks the transitive hard-predecessor closure, deriving each predecessor’s cache key and reading its stdout_hash / stderr_hash from the cached manifest. If any predecessor lacks a cache entry, derivation of the target’s key would be ambiguous; the executor surfaces a typed diagnostic naming the missing predecessor.
  4. Derives the target’s cache key per CACHE-001..CACHE-009 and performs a read-only manifest lookup per CACHE-014, discriminating the four AUX-015 step 11 sub-states.
  5. Enumerates materialised input paths (AUX-015 step 3) and annotates each with its producer set per DAG-013 / AUX-015 step 3 (“produced by”, “producer: undetermined”, or no annotation when zero producers).
  6. Renders the AUX-015 report. Optional sections (inputs:, outputs:, deps:, weakDeps:, mutex:, env.from_host:, env.override:) are omitted when the underlying field is absent so headers never dangle.

Functions§

execute
Execute haz why <TASK> against cwd.