mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-04-20 11:51:09 -07:00
docs(M06): closeout — run2, audit, summary, ledger update
Made-with: Cursor
This commit is contained in:
parent
6744152a79
commit
5f54c4510c
4 changed files with 183 additions and 0 deletions
72
docs/milestones/M06/M06_audit.md
Normal file
72
docs/milestones/M06/M06_audit.md
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
# M06 Audit — Prompt / Seed Preparation Extraction
|
||||
|
||||
**Milestone:** M06
|
||||
**Title:** Prompt / seed prep extraction
|
||||
**Branch:** m06-prompt-seed-prep
|
||||
**Audit date:** 2026-03-10
|
||||
**Mode:** DELTA AUDIT
|
||||
**Range:** ae161cbb (M05) → 6744152a (M06 merge)
|
||||
**CI Status:** Green (Quality 22890285319)
|
||||
**Refactor Posture:** Behavior-Preserving
|
||||
**Audit Verdict:** 🟢 Milestone objectives met. Mechanical extraction; no runtime behavior change. Proceed to M07.
|
||||
|
||||
---
|
||||
|
||||
## 1. Executive Summary
|
||||
|
||||
M06 successfully extracted prompt and seed preparation logic from `process_images_inner()` into a dedicated module, introducing the second Phase II runtime seam.
|
||||
|
||||
**Wins:**
|
||||
* `prepare_prompt_seed_state(p)` isolates all_seeds/all_subseeds computation
|
||||
* `setup_prompts()` and `fill_fields_from_opts()` left intact on `StableDiffusionProcessing`
|
||||
* Writes directly to `p`; no new state object (Phase II rule: seams before containers)
|
||||
* Minimal blast radius: only `modules/processing.py` and new `modules/prompt_seed_prep.py`
|
||||
* txt2img and img2img smoke tests exercise the critical path
|
||||
|
||||
**Risks:** None identified.
|
||||
|
||||
**Next action:** Proceed to M07 (opts snapshot introduction).
|
||||
|
||||
---
|
||||
|
||||
## 2. CI Evidence
|
||||
|
||||
| Check | Result |
|
||||
|-------|--------|
|
||||
| Smoke Tests (PR #20) | 22889778495 ✓ |
|
||||
| Linter (PR #20) | 22889778518 ✓ |
|
||||
| Quality Tests (post-merge) | 22890285319 ✓ |
|
||||
| Coverage | ≥40% gate satisfied |
|
||||
| verify_pinned_deps | ✓ Passed |
|
||||
| pip-audit | Informational (M27) |
|
||||
| Artifacts | coverage.xml ✓, ci_environment ✓ |
|
||||
|
||||
---
|
||||
|
||||
## 3. Delta Map & Blast Radius
|
||||
|
||||
| Changed | Impact |
|
||||
|---------|--------|
|
||||
| modules/prompt_seed_prep.py | New — prepare_prompt_seed_state(p) |
|
||||
| modules/processing.py | Refactored — call prepare_prompt_seed_state after setup_prompts |
|
||||
| docs/milestones/M06/* | Plan, toolcalls, run reports |
|
||||
|
||||
**Blast radius:** Prompt/seed preparation path only. No API/CLI/schema changes. Extensions reading p.all_seeds, p.all_subseeds behave identically.
|
||||
|
||||
---
|
||||
|
||||
## 4. Category Scores
|
||||
|
||||
| Category | Score | Notes |
|
||||
|----------|-------|-------|
|
||||
| Refactor discipline | 5 | Mechanical extraction; boundaries respected |
|
||||
| Behavior preservation | 5 | No runtime drift; smoke + quality pass |
|
||||
| Test coverage | 5 | Existing smoke tests cover critical path |
|
||||
| CI integrity | 5 | All gates green |
|
||||
| **Overall** | **5.0** | |
|
||||
|
||||
---
|
||||
|
||||
## 5. Verdict
|
||||
|
||||
Milestone objectives met. Prompt and seed preparation isolated behind a clean function boundary. Second Phase II seam; enables M07 opts snapshot and M09 execution context.
|
||||
48
docs/milestones/M06/M06_run2.md
Normal file
48
docs/milestones/M06/M06_run2.md
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
# M06 CI Run 2 — Post-Merge Quality Verification
|
||||
|
||||
**Date:** 2026-03-10
|
||||
**Branch:** main (post-merge)
|
||||
**Merge commit:** 6744152a
|
||||
**Trigger:** push (Merge PR #20)
|
||||
|
||||
---
|
||||
|
||||
## 1. Workflow Identity
|
||||
|
||||
| Workflow | Run ID | Trigger | Branch | Commit | Status |
|
||||
|----------|--------|---------|--------|--------|--------|
|
||||
| Quality Tests | **22890285319** | push | main | 6744152a | ✓ success |
|
||||
| Linter | 22890285314 | push | main | 6744152a | ✓ success |
|
||||
|
||||
---
|
||||
|
||||
## 2. Quality Tests (22890285319)
|
||||
|
||||
| Job / Step | Required? | Purpose | Pass/Fail |
|
||||
|------------|-----------|---------|-----------|
|
||||
| Verify repository | Yes | Guardrail: m-cahill/serena only | ✓ |
|
||||
| Verify ref | Yes | Guardrail: push to main | ✓ |
|
||||
| Checkout Code | Yes | Fetch merge commit | ✓ |
|
||||
| Set up Python 3.10 | Yes | Runtime | ✓ |
|
||||
| Cache models | Yes | Deterministic model path | ✓ |
|
||||
| Install dependencies | Yes | torch, CLIP, requirements_versions | ✓ |
|
||||
| pip-audit | Informational | Dependency vuln scan | ⚠ (deferred M27) |
|
||||
| verify_pinned_deps | Yes | Pinned deps enforcement | ✓ |
|
||||
| Create stub repositories | Yes | CI fake inference | ✓ |
|
||||
| Setup environment | Yes | launch.py --exit | ✓ |
|
||||
| Start test server | Yes | Live server for API tests | ✓ |
|
||||
| **Run quality tests** | **Yes** | **pytest test** (coverage ≥40%) | **✓** |
|
||||
| Kill test server | Yes | Cleanup | ✓ |
|
||||
| Upload artifacts | No (always) | coverage.xml, htmlcov, output | ✓ |
|
||||
|
||||
**Duration:** 3m24s
|
||||
|
||||
**Annotation:** pip-audit found vulnerabilities. Remediation deferred to M27. See M04_audit.md.
|
||||
|
||||
---
|
||||
|
||||
## 3. Verdict
|
||||
|
||||
**CI Status:** Green
|
||||
|
||||
All gates passed. M06 closeout verified. Ready for audit and summary generation.
|
||||
60
docs/milestones/M06/M06_summary.md
Normal file
60
docs/milestones/M06/M06_summary.md
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
# M06 Summary — Prompt / Seed Preparation Extraction
|
||||
|
||||
**Project:** Serena
|
||||
**Phase:** Phase II — Runtime Seam Preparation
|
||||
**Milestone:** M06 — Prompt / seed prep extraction
|
||||
**Status:** Closed
|
||||
**Branch:** m06-prompt-seed-prep
|
||||
**PR:** #20
|
||||
**Commit:** 6744152a (merge)
|
||||
**Quality Run:** 22890285319 ✓
|
||||
|
||||
---
|
||||
|
||||
## Accomplished
|
||||
|
||||
| Item | Status |
|
||||
|------|--------|
|
||||
| Created `modules/prompt_seed_prep.py` | ✓ |
|
||||
| Extracted `prepare_prompt_seed_state(p)` | ✓ |
|
||||
| Replaced inline all_seeds/all_subseeds logic in process_images_inner | ✓ |
|
||||
| Left `setup_prompts()` on StableDiffusionProcessing | ✓ |
|
||||
| Left `fill_fields_from_opts()` in process_images_inner | ✓ |
|
||||
| Mutate p.seed/p.subseed before call; write to p | ✓ |
|
||||
| Preserved behavior (prompt lists, seed lists, extension compatibility) | ✓ |
|
||||
|
||||
---
|
||||
|
||||
## CI Layout After M06
|
||||
|
||||
| Workflow | Trigger | Coverage | Security |
|
||||
|----------|---------|----------|----------|
|
||||
| Smoke Tests | pull_request (main) | No gate | None |
|
||||
| Linter | pull_request | — | — |
|
||||
| Quality Tests | push to main | ≥40% | pip-audit (informational) |
|
||||
|
||||
---
|
||||
|
||||
## Invariants Preserved
|
||||
|
||||
- Prompt lists identical
|
||||
- Negative prompt behavior unchanged
|
||||
- Seed generation identical (subseed, variation, batch)
|
||||
- Extension compatibility (p.all_seeds, p.all_subseeds on p)
|
||||
- API compatibility (txt2img/img2img)
|
||||
- Generation determinism
|
||||
|
||||
---
|
||||
|
||||
## Blast Radius
|
||||
|
||||
| File | Change |
|
||||
|------|--------|
|
||||
| modules/prompt_seed_prep.py | New |
|
||||
| modules/processing.py | Modified |
|
||||
|
||||
---
|
||||
|
||||
## Refactor Result
|
||||
|
||||
Prompt and seed preparation isolated behind a clean function boundary. Second Phase II runtime seam; prepares for M07 opts snapshot and M09 execution context.
|
||||
|
|
@ -135,9 +135,12 @@ Core principles:
|
|||
| M03 | Test architecture (smoke / quality / nightly) | Completed | m03-test-architecture | #2 | 975dda4b | Linter ✓; Smoke 22834384359 ✓; Quality 22834861040 ✓ | 5.0 / 5 | 2026-03-09 |
|
||||
| M04 | Coverage/security/reproducibility guardrails | Completed | m04-coverage-guardrails | #4 | 47439cac | Quality 22871471473 ✓ (coverage 40%, pip-audit, verify_pinned_deps) | 5.0 / 5 | 2026-03-09 |
|
||||
| M05 | Override isolation / temporary opts seam | Completed | m05-override-isolation | #18 (+ #19 fix) | ae161cbb | Quality 22888808682 ✓ | 5.0 / 5 | 2026-03-10 |
|
||||
| M06 | Prompt/seed prep extraction | Completed | m06-prompt-seed-prep | #20 | 6744152a | Quality 22890285319 ✓ | 5.0 / 5 | 2026-03-10 |
|
||||
|
||||
**M05:** Introduced `temporary_opts()` context manager — first Phase II runtime seam. Isolates override_settings mutation from global `shared.opts`; preserves behavior (opts.set, setattr restore, k in opts.data). Model/VAE reload and token merging remain in process_images. Enables future opts snapshot injection (M07).
|
||||
|
||||
**M06:** Extracted `prepare_prompt_seed_state(p)` into `modules/prompt_seed_prep.py`. Second Phase II runtime seam. Populates p.all_seeds and p.all_subseeds; setup_prompts and fill_fields_from_opts unchanged. Enables M07 opts snapshot and M09 execution context.
|
||||
|
||||
---
|
||||
|
||||
## 5. Standing Invariants
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue