Question
A pipeline consists of tasks `(inputs, output, duration)`. A dataset never produced by any task is a source available at time `0`. A task may start as soon as every input is available, and independent tasks run in parallel. Implement: ```python def min_pipeline_time(tasks: list[tuple[list[str], str, int]], goal: str) -> int: ... ``` Return the earliest time at which `goal` is available. A goal that is already a source returns `0`. Reject negative durations, duplicate output producers, dependency cycles, and unknown goals with `ValueError`. Durations are non-negative non-boolean integers; dataset names are strings. A known source is a dataset mentioned as an input but never produced; an arbitrary unmentioned name is unknown. Validate the complete pipeline, including cycles disconnected from the goal. Duplicate input names do not require multiple executions. Do not modify tasks. The provided `run_case` batches fixtures and is not candidate work. ## Design discussion (not graded) 1. Return the critical path responsible for the completion time. 2. Report a concrete dependency cycle. 3. Add a fixed number of workers so ready tasks no longer all run simultaneously. 4. Recompute efficiently after one task duration changes.