Skip to content

Split _type_results.py: Extract Execution-Scoped Types#2129

Merged
Trecek merged 6 commits into
developfrom
split-type-results-py-extract-execution-scoped-types-into-ty/2037
May 7, 2026
Merged

Split _type_results.py: Extract Execution-Scoped Types#2129
Trecek merged 6 commits into
developfrom
split-type-results-py-extract-execution-scoped-types-into-ty/2037

Conversation

@Trecek
Copy link
Copy Markdown
Collaborator

@Trecek Trecek commented May 7, 2026

Summary

Extract four execution-scoped types (SessionTelemetry, ProviderOutcome, RecipeIdentity, CIRunScope) from core/types/_type_results.py into a new peer module core/types/_type_results_execution.py. The re-export hub (types/__init__.py) star-imports the new module, so all downstream from autoskillit.core import X paths continue to work unchanged. The test filter cascade for the new file targets 4 directories instead of the original 13, reducing unnecessary test runs when only execution-scoped types change.

Requirements

  • REQ-SPLIT-001: Create src/autoskillit/core/types/_type_results_execution.py with the execution-scoped types
  • REQ-SPLIT-002: Add from ._type_results_execution import * to core/types/__init__.py for backward compat
  • REQ-SPLIT-003: Add _type_results_execution to MODULE_CASCADE_CORE in tests/_test_filter.py with cascade to {"execution", "server", "pipeline", "fleet", "cli"}
  • REQ-SPLIT-004: Update __all__ in _type_results.py to remove moved types
  • REQ-SPLIT-005: Update core/__init__.pyi if needed
  • REQ-SPLIT-006: All existing tests must continue to pass — no consumer import changes needed (re-export preserves from autoskillit.core import X)

Implementation Plan

Plan file: /home/talon/projects/autoskillit-runs/impl-20260506-224109-386997/.autoskillit/temp/make-plan/split_type_results_execution_plan_2026-05-06_224500.md

🤖 Generated with Claude Code via AutoSkillit

Token Usage Summary

Step Model count uncached output cache_read peak_ctx turns cache_write time
plan claude-opus-4-6 1 3.0k 16.2k 835.2k 76.5k 58 63.3k 6m 30s
verify claude-sonnet-4-6 1 56 12.4k 1.7M 78.1k 188 64.9k 10m 42s
implement* MiniMax-M2.7-highspeed 1 1.4M 12.3k 1.3M 67.2k 95 100.6k 5m 1s
prepare_pr* MiniMax-M2.7-highspeed 1 124.0k 3.9k 341.5k 28.7k 24 15.1k 1m 41s
compose_pr* MiniMax-M2.7-highspeed 1 46.5k 1.5k 198.0k 28.7k 14 15.0k 44s
review_pr claude-sonnet-4-6 2 2.0k 53.2k 808.5k 70.6k 70 117.3k 16m 45s
resolve_review claude-opus-4-6 2 117 36.9k 3.6M 101.2k 147 172.7k 23m 20s
Total 1.5M 136.4k 8.7M 101.2k 549.0k 1h 4m

* Step used a non-Anthropic provider; caching behavior may differ.

Token Efficiency

Step LoC Changed cache_read/LoC cache_write/LoC output/LoC
plan 0
verify 0
implement 292 4426.2 344.7 42.2
prepare_pr 0
compose_pr 0
review_pr 0
resolve_review 103 34732.6 1676.4 358.2
Total 395 22125.9 1389.8 345.4

Model Usage Breakdown

Model steps uncached output cache_read cache_write time
claude-opus-4-6 2 3.1k 26.9k 2.6M 167.6k 24m 9s
claude-sonnet-4-6 1 56 12.4k 1.7M 64.9k 10m 42s
MiniMax-M2.7-highspeed 3 1.5M 17.8k 1.8M 130.8k 7m 27s

Trecek and others added 6 commits May 6, 2026 23:05
…ults_execution.py

Extract SessionTelemetry, ProviderOutcome, RecipeIdentity, CIRunScope into a new
peer module _type_results_execution.py. The re-export hub (types/__init__.py)
star-imports the new module so all downstream autoskillit.core import paths
continue to work. Test cascade for the new module targets 4 directories
(core, execution, server, pipeline) instead of the original 13.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Tests were importing SessionTelemetry, ProviderOutcome, RecipeIdentity,
and CIRunScope from the old _type_results module. Updated all test files
to import from _type_results_execution. Also added the new module to the
expected set in test_subpackage_structure.py.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The _flush helper in conftest.py also imported ProviderOutcome,
RecipeIdentity, SessionTelemetry from the old _type_results module.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test_test_filter_core_cascade.py test validates that
MODULE_CASCADE_CORE keys match the actual core/types/ module stems.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…__ ordering

Move ProviderOutcome from _type_results_execution.py back to _type_results.py
to eliminate the cross-import that undermined the test cascade narrowing.
SkillResult.provider references ProviderOutcome, and SkillResult is consumed
by 13+ directories — the cross-import meant changes to _type_results_execution
could break all those consumers but only 4 directories were tested.

Also swap _results_all and _results_execution_all ordering in types/__init__.py
__all__ concatenation to match import ordering.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- CIRunScope test: assert default field value instead of `is not None`
- backward compat test: use `inspect.isclass` instead of `is not None`

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@Trecek Trecek added this pull request to the merge queue May 7, 2026
Merged via the queue into develop with commit 51692dd May 7, 2026
2 checks passed
@Trecek Trecek deleted the split-type-results-py-extract-execution-scoped-types-into-ty/2037 branch May 7, 2026 08:02
Trecek added a commit that referenced this pull request May 8, 2026
## Summary

Extract four execution-scoped types (`SessionTelemetry`,
`ProviderOutcome`, `RecipeIdentity`, `CIRunScope`) from
`core/types/_type_results.py` into a new peer module
`core/types/_type_results_execution.py`. The re-export hub
(`types/__init__.py`) star-imports the new module, so all downstream
`from autoskillit.core import X` paths continue to work unchanged. The
test filter cascade for the new file targets 4 directories instead of
the original 13, reducing unnecessary test runs when only
execution-scoped types change.

## Requirements

- REQ-SPLIT-001: Create
`src/autoskillit/core/types/_type_results_execution.py` with the
execution-scoped types
- REQ-SPLIT-002: Add `from ._type_results_execution import *` to
`core/types/__init__.py` for backward compat
- REQ-SPLIT-003: Add `_type_results_execution` to `MODULE_CASCADE_CORE`
in `tests/_test_filter.py` with cascade to `{"execution", "server",
"pipeline", "fleet", "cli"}`
- REQ-SPLIT-004: Update `__all__` in `_type_results.py` to remove moved
types
- REQ-SPLIT-005: Update `core/__init__.pyi` if needed
- REQ-SPLIT-006: All existing tests must continue to pass — no consumer
import changes needed (re-export preserves `from autoskillit.core import
X`)

## Implementation Plan

Plan file:
`/home/talon/projects/autoskillit-runs/impl-20260506-224109-386997/.autoskillit/temp/make-plan/split_type_results_execution_plan_2026-05-06_224500.md`

🤖 Generated with [Claude Code](https://claude.com/claude-code) via
AutoSkillit
<!-- autoskillit:pipeline-signature
steps=prepare_pr,run_arch_lenses,compose_pr,annotate_pr_diff,review_pr
-->

## Token Usage Summary

| Step | Model | count | uncached | output | cache_read | peak_ctx |
turns | cache_write | time |

|------|-------|-------|----------|--------|------------|----------|-------|-------------|------|
| plan | claude-opus-4-6 | 1 | 3.0k | 16.2k | 835.2k | 76.5k | 58 |
63.3k | 6m 30s |
| verify | claude-sonnet-4-6 | 1 | 56 | 12.4k | 1.7M | 78.1k | 188 |
64.9k | 10m 42s |
| implement* | MiniMax-M2.7-highspeed | 1 | 1.4M | 12.3k | 1.3M | 67.2k
| 95 | 100.6k | 5m 1s |
| fix | claude-opus-4-6 | 1 | 69 | 10.7k | 1.8M | 73.9k | 78 | 104.3k |
17m 38s |
| prepare_pr* | MiniMax-M2.7-highspeed | 1 | 124.0k | 3.9k | 341.5k |
28.7k | 24 | 15.1k | 1m 41s |
| compose_pr* | MiniMax-M2.7-highspeed | 1 | 46.5k | 1.5k | 198.0k |
28.7k | 14 | 15.0k | 44s |
| **Total** | | | 1.5M | 57.1k | 6.1M | 78.1k | | 363.3k | 42m 18s |

\* *Step used a non-Anthropic provider; caching behavior may differ.*

## Token Efficiency

| Step | LoC Changed | cache_read/LoC | cache_write/LoC | output/LoC |
|------|-------------|----------------|-----------------|------------|
| plan | 0 | — | — | — |
| verify | 0 | — | — | — |
| implement | 292 | 4426.2 | 344.7 | 42.2 |
| fix | 50 | 35756.3 | 2086.2 | 214.5 |
| prepare_pr | 0 | — | — | — |
| compose_pr | 0 | — | — | — |
| **Total** | **342** | 17957.9 | 1062.3 | 166.9 |

## Model Usage Breakdown

| Model | steps | uncached | output | cache_read | cache_write | time |
|-------|-------|----------|--------|------------|-------------|------|
| claude-opus-4-6 | 2 | 3.1k | 26.9k | 2.6M | 167.6k | 24m 9s |
| claude-sonnet-4-6 | 1 | 56 | 12.4k | 1.7M | 64.9k | 10m 42s |
| MiniMax-M2.7-highspeed | 3 | 1.5M | 17.8k | 1.8M | 130.8k | 7m 27s |

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant