Skip to content

M14 api runner contract#17338

Closed
m-cahill wants to merge 121 commits intoAUTOMATIC1111:masterfrom
m-cahill:m14-api-runner-contract
Closed

M14 api runner contract#17338
m-cahill wants to merge 121 commits intoAUTOMATIC1111:masterfrom
m-cahill:m14-api-runner-contract

Conversation

@m-cahill
Copy link

Description

  • a simple description of what you're trying to accomplish
  • a summary of changes in code
  • which issues it fixes, if any

Screenshots/videos:

Checklist:

m-cahill added 30 commits March 6, 2026 19:17
- docs/serena.md: Living ledger, phase map, invariants, milestone table
- docs/milestones/M00/: M00_plan, preflight, e2e_baseline, ci_inventory, toolcalls
- scripts/dev/: run_m00_baseline_e2e.ps1, .sh (thin verification helpers)
- Baseline tag baseline-pre-refactor created on 82a973c

No runtime/structural changes. Behavior-preserving docs and verification only.

Made-with: Cursor
- Add Invariant Registry and Serena Refactor Principles to serena.md
- Create M00_run1.md, M00_summary.md, M00_audit.md
- Update milestone ledger: M00 Completed
- Document CI evidence (Linter pass; Tests fail pre-existing)

Made-with: Cursor
…irmation

- Update ledger with CI run IDs 22794525690 (Linter ✓), 22794525698 (Tests ✗)
- Refresh M00_summary.md and M00_audit.md per governance closeout
- Add M00_run2.md (latest CI analysis)

Made-with: Cursor
- Remove same-repo PR skip condition (CI runs on all PRs)
- Install setuptools before env setup; add --do-not-download-clip
- Add pip-audit (non-blocking) before environment setup
- Add smoke startup step (verify app boots before full tests)
- Add --cov-fail-under=60 coverage threshold
- Pin GitHub Actions to commit SHAs
- Add .gitattributes for CRLF/LF normalization
- Add M01 plan and toolcalls ledger

Made-with: Cursor
Fixes pkg_resources in pip's isolated build env. Build-time fix only.

Made-with: Cursor
CLIP fix worked. Git clone of Stability-AI fails without auth.
Add token-based URLs for Stability-AI repos.

Made-with: Cursor
- Add --exit handling when --skip-prepare-environment (launch.py)
- Setup: python launch.py --skip-prepare-environment --skip-torch-cuda-test --exit
- Smoke: python launch.py --skip-prepare-environment --skip-torch-cuda-test --test-server --use-cpu all --exit

CI no longer depends on external git clones. Requires repositories cache to be seeded.

Made-with: Cursor
Fixes ModuleNotFoundError: torch when using --skip-prepare-environment.
Repositories still required from cache for paths.py.

Made-with: Cursor
- Create scripts/dev/create_stub_repos.py to satisfy paths.py assertion
  and import chain without cloning external repos
- Add Create stub repositories step before Setup environment in run_tests
- Remove Cache repositories step (stubs are deterministic, no network)

Made-with: Cursor
…onditioner stubs; M01_run3 and M01_summary

Made-with: Cursor
…Denoiser, BrownianTreeNoiseSampler, trange)

Made-with: Cursor
m-cahill added 25 commits March 11, 2026 20:07
M09: Execution Context Introduction
* M10: ProcessingRunner skeleton

- Add modules/runtime/runner.py with ProcessingRunner and ProcessingRequest
- Wire process_images to delegate through runner (internal only)
- Add test/quality/test_processing_runner.py contract test

Behavior-preserving. Zero blast radius. All callers unchanged.

Made-with: Cursor

* M10: Add run1 and toolcalls update

Made-with: Cursor

* M10: Update Phase III roadmap, add closeout prompt

- Phase III: M11 lifecycle, M12 instrumentation, M13 txt2img, M14 API, M15 queue
- Phase IV-VII renumbered (M16-M33)
- Add M10_closeout_prompt.md for Cursor

Made-with: Cursor
)

Quality tests fail during collection because test_processing_runner imports
modules.processing at module level, which triggers sd_samplers before
shared.opts is initialized. Defer import to inside test and add initialize
fixture so webui/opts are loaded first.

Made-with: Cursor
* docs(M10): closeout — run2, summary, audit, ledger

Made-with: Cursor

* docs(M10): seed M11 milestone folder

Made-with: Cursor
- Refactor ProcessingRunner.run() to delegate through lifecycle stages
- Add prepare(), execute(), finalize() with pass-through behavior
- Add test_runner_lifecycle_order contract test
- Preserve identical behavior; no API/CLI changes

Phase III — Runner & Service Boundary

Made-with: Cursor
Made-with: Cursor
…alize)

- Add optional no-op hooks to ProcessingRunner lifecycle
- Hooks invoked: prepare -> on_prepare -> execute -> on_execute -> finalize -> on_finalize
- Add test_runner_hooks_called contract test
- No runtime behavior change; structural seam for M13+ progress/cancellation

Made-with: Cursor
* M13: txt2img path through runner — contract test and verification

- Add test_txt2img_runner_contract.py verifying txt2img invokes ProcessingRunner
- No routing changes: process_images already delegates to runner (M10)
- Update M13_plan, M13_toolcalls, M13_run1
- Scope: UI txt2img only; API/img2img in M14/M15

Made-with: Cursor

* docs(M13): add CI run1 results — smoke tests pass

Made-with: Cursor
- Add test_api_runner_contract.py: proves API txt2img path invokes ProcessingRunner
- No routing changes: API continues to call process_images (orchestration boundary)
- Monkeypatch CI env + runner.run; call API method directly
- M14_plan.md, M14_toolcalls.md: governance docs

Phase III — Runner & Service Boundary

Made-with: Cursor
@m-cahill m-cahill requested a review from AUTOMATIC1111 as a code owner March 17, 2026 06:37
@m-cahill m-cahill closed this Mar 17, 2026
@m-cahill m-cahill reopened this Mar 17, 2026
Upstream @AUTOMATIC1111 has no members in this fork; blocks merge.
Fork owner can now satisfy code owner review.

Made-with: Cursor
@m-cahill m-cahill closed this Mar 17, 2026
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