qig-stack 0.1.23__tar.gz → 0.1.24__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {qig_stack-0.1.23 → qig_stack-0.1.24}/PKG-INFO +1 -1
- {qig_stack-0.1.23 → qig_stack-0.1.24}/pyproject.toml +1 -1
- {qig_stack-0.1.23 → qig_stack-0.1.24}/src/qig_stack/doctor.py +66 -0
- {qig_stack-0.1.23 → qig_stack-0.1.24}/tests/test_doctor.py +19 -0
- {qig_stack-0.1.23 → qig_stack-0.1.24}/.gitignore +0 -0
- {qig_stack-0.1.23 → qig_stack-0.1.24}/README.md +0 -0
- {qig_stack-0.1.23 → qig_stack-0.1.24}/src/qig_stack/__init__.py +0 -0
- {qig_stack-0.1.23 → qig_stack-0.1.24}/src/qig_stack/contract.json +0 -0
- {qig_stack-0.1.23 → qig_stack-0.1.24}/tests/test_contract.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: qig-stack
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.24
|
|
4
4
|
Summary: QIG toolchain metapackage — pins the mutually-tested latest set and ships the qig-doctor launch preflight (version gate + entry-point wiring gate + capability-slot report)
|
|
5
5
|
Project-URL: Homepage, https://braden.com.au
|
|
6
6
|
Project-URL: Repository, https://github.com/Arcane-Fly/qig-stack
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "qig-stack"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.24"
|
|
8
8
|
description = "QIG toolchain metapackage — pins the mutually-tested latest set and ships the qig-doctor launch preflight (version gate + entry-point wiring gate + capability-slot report)"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -507,6 +507,59 @@ def print_report(report: Report, use_network: bool) -> None:
|
|
|
507
507
|
print(f" - {issue.slot_id}: {issue.detail}")
|
|
508
508
|
|
|
509
509
|
|
|
510
|
+
|
|
511
|
+
WORKBENCH_PLAYBOOK: tuple[str, ...] = (
|
|
512
|
+
"1) Mesh Connect: call dm_list_devices() -> explicitly dm_select_device(<id>) before start_process().",
|
|
513
|
+
"2) Pure QIG Exec on Any Node: uv run --no-cache --with qig-stack python -m qig_stack.doctor --no-network",
|
|
514
|
+
"3) GeoQ Mental Workbench: from qig_core.geometry.geoq_workbench import workbench_dispatch",
|
|
515
|
+
"4) Programme Truth on Boot/Compaction: memory_get('qig_session_latest'), memory_get('qig_workbench_and_package_atlas_canonical'), memory_get('qig_todo_master')",
|
|
516
|
+
"5) Pre-Experiment Rule: inspect all qig-stack capability slots and qig_core.constants BEFORE designing any experiment; zero hardcoded English word lists or hand-rolled geometry.",
|
|
517
|
+
)
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
def build_atlas_payload(contract_path: Path) -> dict[str, object]:
|
|
521
|
+
"""Build a self-updating capability atlas + workbench playbook directly from contract.json."""
|
|
522
|
+
contract = _load_contract(contract_path)
|
|
523
|
+
pins = dict(contract.get("version_policy", {}).get("stack_packages_latest_at_authoring", {}))
|
|
524
|
+
by_pkg: dict[str, list[dict[str, str]]] = {}
|
|
525
|
+
for slot in contract.get("slots", []):
|
|
526
|
+
if not isinstance(slot, dict) or not slot.get("shipped", True):
|
|
527
|
+
continue
|
|
528
|
+
pkg = str(slot.get("provider_pkg") or slot.get("provided_by") or "other")
|
|
529
|
+
by_pkg.setdefault(pkg, []).append(
|
|
530
|
+
{
|
|
531
|
+
"slot_id": str(slot.get("slot_id", "")),
|
|
532
|
+
"primitive": str(slot.get("primitive", "")),
|
|
533
|
+
"probe": str(slot.get("probe", "")),
|
|
534
|
+
"role": str(slot.get("role", "")),
|
|
535
|
+
}
|
|
536
|
+
)
|
|
537
|
+
return {
|
|
538
|
+
"contract": str(contract_path),
|
|
539
|
+
"stack_pins": pins,
|
|
540
|
+
"shipped_slot_count": sum(len(v) for v in by_pkg.values()),
|
|
541
|
+
"capabilities_by_package": by_pkg,
|
|
542
|
+
"workbench_and_mesh_playbook": list(WORKBENCH_PLAYBOOK),
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
def print_atlas(payload: dict[str, object]) -> None:
|
|
547
|
+
pins = payload["stack_pins"]
|
|
548
|
+
by_pkg = payload["capabilities_by_package"]
|
|
549
|
+
print(f"qig-doctor --atlas ({payload['shipped_slot_count']} shipped slots from {payload['contract']})")
|
|
550
|
+
if isinstance(pins, dict):
|
|
551
|
+
print(" PINNED CRYSTAL: " + ", ".join(f"{k}=={v}" for k, v in sorted(pins.items())))
|
|
552
|
+
print("\n CAPABILITY SLOTS BY PACKAGE (import directly -- never hand-roll):")
|
|
553
|
+
if isinstance(by_pkg, dict):
|
|
554
|
+
for pkg in sorted(by_pkg):
|
|
555
|
+
items = by_pkg[pkg]
|
|
556
|
+
print(f" [{pkg}] ({len(items)} slots):")
|
|
557
|
+
for item in items:
|
|
558
|
+
print(f" - {item['slot_id']} -> {item['probe']} | {item['role']}")
|
|
559
|
+
print("\n WORKBENCH & MESH PLAYBOOK:")
|
|
560
|
+
for line in payload["workbench_and_mesh_playbook"]: # type: ignore[union-attr]
|
|
561
|
+
print(f" {line}")
|
|
562
|
+
|
|
510
563
|
def main(argv: list[str] | None = None) -> int:
|
|
511
564
|
parser = argparse.ArgumentParser(
|
|
512
565
|
description="qig launch preflight (version gate + entry-point wiring gate + report)"
|
|
@@ -515,6 +568,7 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
515
568
|
"--no-network", action="store_true", help="skip PyPI; use contract snapshot"
|
|
516
569
|
)
|
|
517
570
|
parser.add_argument("--json", action="store_true", help="emit machine-readable JSON")
|
|
571
|
+
parser.add_argument("--atlas", action="store_true", help="print live capability/concept atlas + workbench/mesh playbook and exit 0")
|
|
518
572
|
parser.add_argument(
|
|
519
573
|
"--probe", action="store_true", help="import-check each entry-point resolves (off the gate)"
|
|
520
574
|
)
|
|
@@ -527,6 +581,18 @@ def main(argv: list[str] | None = None) -> int:
|
|
|
527
581
|
help="require live latest versions, active required declarations and resolving probes",
|
|
528
582
|
)
|
|
529
583
|
args = parser.parse_args(argv)
|
|
584
|
+
if args.atlas:
|
|
585
|
+
try:
|
|
586
|
+
atlas_payload = build_atlas_payload(_contract_path(args.contract))
|
|
587
|
+
except ContractError as exc:
|
|
588
|
+
sys.stderr.write(f"qig-doctor: {exc}\n")
|
|
589
|
+
return 1
|
|
590
|
+
if args.json:
|
|
591
|
+
print(json.dumps(atlas_payload, indent=2))
|
|
592
|
+
else:
|
|
593
|
+
print_atlas(atlas_payload)
|
|
594
|
+
return 0
|
|
595
|
+
|
|
530
596
|
if args.release_check and args.no_network:
|
|
531
597
|
parser.error("--release-check requires live PyPI queries; remove --no-network")
|
|
532
598
|
|
|
@@ -266,3 +266,22 @@ def test_release_rejects_newer_but_untested_combination(monkeypatch, capsys):
|
|
|
266
266
|
assert report['latest_verified']
|
|
267
267
|
assert report['release_pin_mismatches']
|
|
268
268
|
assert not report['release_gate_passed']
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
def test_doctor_atlas_prints_slots_and_workbench_playbook(capsys):
|
|
272
|
+
from qig_stack import doctor
|
|
273
|
+
|
|
274
|
+
rc = doctor.main(["--atlas"])
|
|
275
|
+
assert rc == 0
|
|
276
|
+
out = capsys.readouterr().out
|
|
277
|
+
assert "SLOT-QIG-GRAPH" in out
|
|
278
|
+
assert "SLOT-QIGRAM-V3" in out
|
|
279
|
+
assert "SLOT-FORESIGHT-4D" in out
|
|
280
|
+
assert "workbench_dispatch" in out
|
|
281
|
+
assert "dm_select_device" in out
|
|
282
|
+
|
|
283
|
+
rc_j = doctor.main(["--atlas", "--json"])
|
|
284
|
+
assert rc_j == 0
|
|
285
|
+
payload = json.loads(capsys.readouterr().out)
|
|
286
|
+
assert payload["shipped_slot_count"] >= 40
|
|
287
|
+
assert "qig-core" in payload["capabilities_by_package"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|