MCPcopy
hub / github.com/github/awesome-copilot / _resolve_artifact_path

Function _resolve_artifact_path

skills/quality-playbook/quality_gate.py:554–571  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

552
553
554def _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
574def has_file_matching(directory, patterns):

Callers 15

check_file_existenceFunction · 0.85
check_tdd_sidecarFunction · 0.85
check_tdd_logsFunction · 0.85
check_recheck_sidecarFunction · 0.85
check_mechanicalFunction · 0.85
check_patchesFunction · 0.85
check_writeupsFunction · 0.85
check_version_stampsFunction · 0.85
check_run_metadataFunction · 0.85
_bug_writeup_textFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected