Update Healer Man server
This commit is contained in:
1 parent
fdb6739f8d
commit
f90ba7d989
41 files changed
+1671
-118
No files matched your search
+38
-8
@@ -196,15 +196,12 @@ def readiness_eligible_builds(
|
||||
policy: dict[str, Any] | None,
|
||||
include_beta_specs: bool,
|
||||
) -> list[dict[str, Any]]:
|
||||
"""Filter only WoW NPC builds; CoA and RoM catalogs remain unchanged."""
|
||||
"""Return the Ready pool across every source; Beta requires explicit opt-in."""
|
||||
published = policy or {}
|
||||
config = published.get("config", published)
|
||||
statuses = config.get("statuses", {}) if isinstance(config, dict) else {}
|
||||
eligible: list[dict[str, Any]] = []
|
||||
for build in builds:
|
||||
if build.get("source") != "wow":
|
||||
eligible.append(build)
|
||||
continue
|
||||
specialization_id = build.get("specializationId")
|
||||
status = statuses.get(specialization_id, build.get("readinessStatus", "needs-testing"))
|
||||
if status == "ready" or (include_beta_specs and status == "beta"):
|
||||
@@ -282,7 +279,12 @@ def coverage_parties(
|
||||
continue
|
||||
available_by_role: dict[str, list[dict[str, Any]]] = defaultdict(list)
|
||||
targets_by_role: dict[str, list[dict[str, Any]]] = defaultdict(list)
|
||||
source_fillers = [build for build in (filler_builds or builds) if build["source"] == source]
|
||||
filler_catalog = list(filler_builds or builds)
|
||||
# Prefer same-source companions, then fall back to the globally Ready
|
||||
# pool so an intentional Needs Testing target can still be diagnosed
|
||||
# without admitting other uncertified seats.
|
||||
source_fillers = [build for build in filler_catalog if build["source"] == source]
|
||||
source_fillers.extend(build for build in filler_catalog if build["source"] != source)
|
||||
default_builds = [build for build in source_fillers if build.get("defaultTalentBuild")]
|
||||
for build in default_builds or source_fillers:
|
||||
available_by_role[build["role"]].append(build)
|
||||
@@ -1443,7 +1445,9 @@ def parser() -> argparse.ArgumentParser:
|
||||
result.add_argument("--companion-readiness-policy", type=Path,
|
||||
help="published companion readiness policy JSON; defaults to shipped catalog statuses")
|
||||
result.add_argument("--include-beta-specs", action="store_true",
|
||||
help="include Beta WoW specs in automatic, random, and filler NPC seats")
|
||||
help="include Beta specs in automatic, random, and filler NPC seats")
|
||||
result.add_argument("--ready-only", action="store_true",
|
||||
help="reject explicit Needs Testing targets; used by certification and regression runs")
|
||||
result.add_argument("--output-dir", type=Path, help="report directory")
|
||||
result.add_argument("--list-members", action="store_true")
|
||||
result.add_argument("--list-bosses", action="store_true")
|
||||
@@ -1507,7 +1511,14 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
raise SystemExit(f"Could not read --companion-readiness-policy: {error}") from error
|
||||
eligible_builds = readiness_eligible_builds(builds, readiness_policy, args.include_beta_specs)
|
||||
if args.party_mode == "automatic":
|
||||
sources = ("wow", "coa", "rom") if args.source == "all" else (args.source,)
|
||||
requested_sources = ("wow", "coa", "rom") if args.source == "all" else (args.source,)
|
||||
sources = requested_sources if args.spec_selection == "specific" else tuple(
|
||||
source for source in requested_sources
|
||||
if any(build["source"] == source for build in eligible_builds)
|
||||
)
|
||||
if not sources:
|
||||
session.close()
|
||||
raise SystemExit("No Ready companion builds exist for the selected source. Promote specs before running automatic coverage.")
|
||||
if args.spec_selection != "specific" and args.spec:
|
||||
session.close()
|
||||
raise SystemExit("--spec values require --spec-selection specific")
|
||||
@@ -1521,6 +1532,14 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
selected_build_ids = list(dict.fromkeys(
|
||||
resolve_build(selector, builds)["id"] for selector in args.spec
|
||||
))
|
||||
if args.ready_only:
|
||||
eligible_ids = {build["id"] for build in eligible_builds}
|
||||
rejected = [build_id for build_id in selected_build_ids if build_id not in eligible_ids]
|
||||
if rejected:
|
||||
session.close()
|
||||
raise SystemExit(
|
||||
"--ready-only rejected Needs Testing targets: " + ", ".join(rejected)
|
||||
)
|
||||
configurations = coverage_parties(
|
||||
eligible_builds if args.spec_selection == "all" else builds,
|
||||
sources,
|
||||
@@ -1538,13 +1557,23 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
session.close()
|
||||
raise SystemExit("Manual mode requires exactly five --member values.")
|
||||
party = [resolve_build(selector, builds) for selector in args.member]
|
||||
if args.ready_only:
|
||||
eligible_ids = {build["id"] for build in eligible_builds}
|
||||
rejected = [build["id"] for build in party if build["id"] not in eligible_ids]
|
||||
if rejected:
|
||||
session.close()
|
||||
raise SystemExit("--ready-only rejected Needs Testing members: " + ", ".join(rejected))
|
||||
active_slot = args.active_slot or next(
|
||||
(index + 1 for index, build in enumerate(party) if build["role"] == "healer"), 1
|
||||
)
|
||||
configurations = [{"id": f"{args.source}-party-001", "source": args.source,
|
||||
"party": party, "activeSlot": active_slot - 1}]
|
||||
else:
|
||||
party = random_party(eligible_builds, args.party_seed)
|
||||
random_pool = [
|
||||
build for build in eligible_builds
|
||||
if args.source == "all" or build["source"] == args.source
|
||||
]
|
||||
party = random_party(random_pool, args.party_seed)
|
||||
active_slot = args.active_slot or next(
|
||||
(index + 1 for index, build in enumerate(party) if build["role"] == "healer"), 1
|
||||
)
|
||||
@@ -1583,6 +1612,7 @@ def main(argv: Sequence[str] | None = None) -> int:
|
||||
"mode": "automatic",
|
||||
"seatSweep": args.seat_sweep,
|
||||
"includeBetaSpecs": args.include_beta_specs,
|
||||
"readyOnly": args.ready_only,
|
||||
"companionReadinessPolicy": readiness_policy,
|
||||
"specSelection": args.spec_selection,
|
||||
"selectedBuildIds": selected_build_ids,
|
||||
|
||||
Reference in new issue
Block a user