From 3039abb1a061bbb37e1f88eb21a73233e8a48a2a Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Mon, 9 Mar 2026 15:33:11 -0700 Subject: [PATCH 1/2] fix(M05): ensure config exists so opts.data populated for test_opts_override When opts.load() gets FileNotFoundError, opts.data = {}. temporary_opts only applies overrides for keys in opts.data. Initialize fixture now creates minimal config.json when missing. Made-with: Cursor --- docs/milestones/M05/M05_run1.md | 19 ++++++++++++++++++- test/conftest.py | 12 ++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/docs/milestones/M05/M05_run1.md b/docs/milestones/M05/M05_run1.md index 3f2864ceb..8392ae81e 100644 --- a/docs/milestones/M05/M05_run1.md +++ b/docs/milestones/M05/M05_run1.md @@ -162,4 +162,21 @@ No failures. All jobs passed. |-------|--------|--------| | Smoke Tests | 22876253113 | ✓ success | | Linter | 22876253091 | ✓ success | -| Quality Tests | — | Pending (push to main) | +| Quality Tests | 22877674534 | ✗ failed (test_opts_override) | + +--- + +## 11. Quality Run 1 — Post-Merge (22877674534) + +**Status:** Failed +**Cause:** `test_opts_override.py` — 2 failures + +### Failure + +When `opts.load()` gets `FileNotFoundError` (no config.json), it sets `opts.data = {}`. +`temporary_opts` only applies overrides for keys in `opts.data`, so no overrides are applied and `samples_save` stays at its default (True). + +### Fix + +Ensure a minimal config exists before loading webui so `opts.data` is populated. +Updated `test/conftest.py` `initialize` fixture to create `config.json` with `{"samples_save": True}` when missing. diff --git a/test/conftest.py b/test/conftest.py index 13e88206c..31050ed28 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -45,4 +45,16 @@ def mask_basic_image_base64() -> str: @pytest.fixture(scope="session") def initialize() -> None: + """Load webui; ensure config exists so opts.data is populated for quality tests.""" + import json + import os + + from modules.shared_cmd_options import cmd_opts + + config_path = cmd_opts.ui_settings_file + if not os.path.exists(config_path): + os.makedirs(os.path.dirname(config_path) or ".", exist_ok=True) + with open(config_path, "w", encoding="utf-8") as f: + json.dump({"samples_save": True}, f) + import webui # noqa: F401 From 715db891f3405e4bd381ee3f087f66dda4734ae4 Mon Sep 17 00:00:00 2001 From: Michael Cahill Date: Mon, 9 Mar 2026 16:43:19 -0700 Subject: [PATCH 2/2] docs(M05): add M05_run2.md CI report for fix PR Made-with: Cursor --- docs/milestones/M05/M05_run2.md | 79 +++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 docs/milestones/M05/M05_run2.md diff --git a/docs/milestones/M05/M05_run2.md b/docs/milestones/M05/M05_run2.md new file mode 100644 index 000000000..797b84c08 --- /dev/null +++ b/docs/milestones/M05/M05_run2.md @@ -0,0 +1,79 @@ +# M05 CI Run 2 — Fix: Config for test_opts_override + +**Date:** 2026-03-09 +**Branch:** m05-fix-opts-test +**PR:** #19 +**Trigger:** pull_request (fix for Quality failure in Run 1) + +--- + +## 1. Workflow Identity + +| Workflow | Run ID | Trigger | Branch | Status | +|----------|--------|---------|--------|--------| +| Smoke Tests | 22877868495 | pull_request | m05-fix-opts-test | ✓ success | +| Linter | 22877868499 | pull_request | m05-fix-opts-test | ✓ success | +| Quality Tests | — | push to main | — | Pending (runs after merge) | + +--- + +## 2. Fix Context + +| Item | Value | +|------|-------| +| Run type | Corrective (fix for Run 1 Quality failure) | +| Change | `test/conftest.py` — initialize fixture creates minimal config.json when missing | +| Cause addressed | opts.load() sets opts.data = {} on FileNotFoundError; temporary_opts only applies keys in opts.data | + +--- + +## 3. Run 2 Results + +### Smoke Tests (22877868495) + +| Step | Result | +|------|--------| +| Verify repository | ✓ | +| Verify base branch | ✓ | +| Checkout, Setup, Install | ✓ | +| Create stub repositories | ✓ | +| Start test server | ✓ | +| **Run smoke tests** | **✓** | +| Kill test server | ✓ | + +**Duration:** 2m38s + +### Linter (22877868499) + +| Job | Result | +|-----|--------| +| ruff | ✓ | +| eslint | ✓ | + +--- + +## 4. Verdict + +**Fix PR #19:** Smoke Tests ✓ | Linter ✓ + +**Quality Tests:** Will run on push to main after merge. Expected to pass with config fixture ensuring opts.data is populated. + +--- + +## 5. Summary Table + +| Check | Run ID | Result | +|-------|--------|--------| +| Smoke Tests | 22877868495 | ✓ success | +| Linter | 22877868499 | ✓ success | +| Quality Tests | — | Pending (post-merge) | + +--- + +## 6. Next Actions + +| Action | Owner | +|--------|-------| +| Merge PR #19 | Human | +| Verify Quality run post-merge | Human/Cursor | +| Generate M05 closeout (summary, audit, ledger) | Cursor (after Quality green) |