Feature/task redesign - #68
Merged
Merged
Conversation
Redesign task execution around stable invocation IDs and provider-owned scopes. - add task IDs, metadata, dependencies, dependency-data selection, and always-run semantics - plan configured-target, target, and region task instances deterministically - execute dependency graphs with bounded concurrency and stable result ordering - support skipped work, partial failure results, cancellation, and activated cleanup - preserve provider runtime lifecycle, session reuse, and ordinary execution fast paths - carry task identity through result queries, HTML reports, SARIF reports, and summaries
Migrate built-in tasks to the redesigned keyword-only invocation contract. - replace provider-specific execution arguments with provider-neutral target identity - accept separate metadata and dependency_data inputs - preserve existing task behavior, logging, actions, and dry-run safeguards - keep task modules compatible with discovery and runtime validation
Add comprehensive coverage for the redesigned task model. - verify invocation IDs, dependency validation, metadata merging, and result selection - cover scope expansion, fan-out, fan-in, ordering, concurrency, and cancellation - protect fail-fast and always-run finalizer activation semantics - validate provider lifecycle, AWS configured-target identity, and session reuse - cover skipped and partial results across JSONL, queries, HTML, SARIF, and CLI output - validate advanced examples and provider-neutral built-in task signatures
- demonstrate repeated components, fan-out, fan-in, partial results, and cleanup - add a complete configured-target AWS cleanup workflow - use descriptive IDs in advanced provider examples - produce SARIF findings without redundant Lambda inventory calls - refresh returned-result and action-recorder examples
Update the Anvil task-builder skill for redesigned task execution. - document provider-neutral task signatures and module-declared scopes - explain invocation IDs, dependencies, dependency data, and partial results - add configured-target, fan-in, and always-run workflow guidance - clarify task granularity, provider behavior, and validation expectations - direct task authors to the complete cleanup workflow example
task_planner.py now indexes producer instances by target and target-region coordinate. Dependency matching is proportional to actual edges while preserving all scope and ordering semantics. task_scheduler.py now calculates eligibility and groups fan-in results in one traversal. Added structural performance regressions for both paths. Benchmark for 20,000 planned instances: - Before: 6.375s - After: 0.032–0.034s
- Replaced per-account scans of the entire schedule with one indexing pass. - Grouped each account’s regional results once rather than rescanning for every region. - Prevented eager min, max, and timestamp parsing when lifecycle timings already exist. - 100 accounts (1/2/4 regions): 0.285/0.579/1.200 ms -> 0.030/0.049/0.086 ms - 1,000 accounts: 26.0/52.6/103.9 ms -> 0.306/0.499/1.068 ms - 10,000 accounts: 2.58/5.16/10.28 s -> 3.74/5.61/9.71 ms
Ensure regional producer results appear before target-scoped consumers during mixed-scope fan-in. - add result-order barrier stages for narrow-to-broad dependencies - preserve existing target-first and region-major ordering within each stage - add regression coverage for region-to-target result ordering not very elegant but is what it is for now
Allow AWS organization targets to use `management` or `payer` in both include and exclude filters. Resolve these case-insensitive aliases to the discovered management account ID while keeping their semantics owned by the AWS provider. Reject the keywords in explicit accounts mode, document the behavior, update the AWS include/exclude example, and add validation and execution coverage.
…cy reference Adds a new reference doc for building or editing Anvil tasks whose workflow targets only the payer/management account, and cross-links it from the existing concurrency guidance.
Add an AWS task that discovers disabled IAM Identity Center users and removes them from the owner account.
Raise the minimum versions of prek, Ruff, and ty, and refresh the uv lockfile.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Redesign the Anvil task runtime to support dependency-aware, provider-neutral
task execution across multiple scopes.
Changes
uv.lock.Checklist
ruffandpytest) were successful.