Return the live path for an intermediate artifact directory or file under quality/. Tries top-level first (the legacy / current in-flight layout), then quality/workspace/ (the v1.5.4 end-of-run reorg layout). Returns the top-level path even when neither exists so callers that t
(quality_dir, name)
| 552 | |
| 553 | |
| 554 | def _resolve_artifact_path(quality_dir, name): |
| 555 | """Return the live path for an intermediate artifact directory or |
| 556 | file under quality/. Tries top-level first (the legacy / current |
| 557 | in-flight layout), then quality/workspace/<name> (the v1.5.4 |
| 558 | end-of-run reorg layout). Returns the top-level path even when |
| 559 | neither exists so callers that test ``.is_dir()`` / ``.is_file()`` |
| 560 | get a False rather than an exception. |
| 561 | |
| 562 | ``name`` may be a single segment (``"results"``) or a path with |
| 563 | segments (``"results/tdd-results.json"``); both forms work |
| 564 | regardless of layout.""" |
| 565 | top = quality_dir / name |
| 566 | if top.exists(): |
| 567 | return top |
| 568 | workspace = quality_dir / "workspace" / name |
| 569 | if workspace.exists(): |
| 570 | return workspace |
| 571 | return top |
| 572 | |
| 573 | |
| 574 | def has_file_matching(directory, patterns): |
no outgoing calls
no test coverage detected