sdetkit 1.0.3__py3-none-any.whl
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.
- sdetkit/__init__.py +122 -0
- sdetkit/__main__.py +136 -0
- sdetkit/_entrypoints.py +14 -0
- sdetkit/_legacy_lane.py +86 -0
- sdetkit/_toml.py +14 -0
- sdetkit/acceleration_closeout_43.py +462 -0
- sdetkit/agent/__init__.py +3 -0
- sdetkit/agent/actions.py +402 -0
- sdetkit/agent/cli.py +434 -0
- sdetkit/agent/core.py +538 -0
- sdetkit/agent/dashboard.py +346 -0
- sdetkit/agent/demo.py +87 -0
- sdetkit/agent/omnichannel.py +431 -0
- sdetkit/agent/providers.py +90 -0
- sdetkit/agent/templates.py +595 -0
- sdetkit/apiclient.py +601 -0
- sdetkit/apiget.py +834 -0
- sdetkit/apiget_dispatch.py +50 -0
- sdetkit/argv_flags.py +15 -0
- sdetkit/artifact_contract_index.py +114 -0
- sdetkit/atomicio.py +93 -0
- sdetkit/author_problem.py +2211 -0
- sdetkit/baseline_dispatch.py +75 -0
- sdetkit/bools.py +66 -0
- sdetkit/case_study_launch_closeout_73.py +398 -0
- sdetkit/case_study_prep1_closeout_69.py +392 -0
- sdetkit/case_study_prep2_closeout_70.py +394 -0
- sdetkit/case_study_prep3_closeout_71.py +400 -0
- sdetkit/case_study_prep4_closeout_72.py +411 -0
- sdetkit/cassette.py +291 -0
- sdetkit/checks/__init__.py +60 -0
- sdetkit/checks/__main__.py +6 -0
- sdetkit/checks/artifacts.py +694 -0
- sdetkit/checks/base.py +154 -0
- sdetkit/checks/builtin.py +398 -0
- sdetkit/checks/cache.py +117 -0
- sdetkit/checks/main.py +268 -0
- sdetkit/checks/planner.py +351 -0
- sdetkit/checks/registry.py +132 -0
- sdetkit/checks/results.py +195 -0
- sdetkit/checks/runner.py +293 -0
- sdetkit/ci.py +139 -0
- sdetkit/cli.py +813 -0
- sdetkit/cli_shortcuts.py +86 -0
- sdetkit/cli_timing.py +26 -0
- sdetkit/community_activation.py +411 -0
- sdetkit/community_program_closeout_62.py +33 -0
- sdetkit/community_touchpoint_closeout_77.py +411 -0
- sdetkit/continuous_upgrade_closeout_1.py +18 -0
- sdetkit/continuous_upgrade_closeout_10.py +18 -0
- sdetkit/continuous_upgrade_closeout_11.py +18 -0
- sdetkit/continuous_upgrade_closeout_2.py +18 -0
- sdetkit/continuous_upgrade_closeout_3.py +18 -0
- sdetkit/continuous_upgrade_closeout_4.py +18 -0
- sdetkit/continuous_upgrade_closeout_5.py +18 -0
- sdetkit/continuous_upgrade_closeout_6.py +18 -0
- sdetkit/continuous_upgrade_closeout_7.py +18 -0
- sdetkit/continuous_upgrade_closeout_8.py +18 -0
- sdetkit/continuous_upgrade_closeout_9.py +18 -0
- sdetkit/contract.py +126 -0
- sdetkit/contributor_activation_closeout_55.py +467 -0
- sdetkit/contributor_funnel.py +281 -0
- sdetkit/contributor_recognition_closeout_76.py +398 -0
- sdetkit/core_preparse_dispatch.py +35 -0
- sdetkit/demo.py +276 -0
- sdetkit/demo_asset2_34.py +25 -0
- sdetkit/demo_asset_33.py +25 -0
- sdetkit/distribution_batch_38.py +27 -0
- sdetkit/distribution_closeout_36.py +26 -0
- sdetkit/distribution_scaling_closeout_74.py +399 -0
- sdetkit/docs_loop_closeout_53.py +514 -0
- sdetkit/docs_navigation.py +281 -0
- sdetkit/docs_qa.py +260 -0
- sdetkit/doctor.py +3451 -0
- sdetkit/ecosystem_priorities_closeout_78.py +405 -0
- sdetkit/enterprise_assessment.py +686 -0
- sdetkit/enterprise_readiness.py +503 -0
- sdetkit/entrypoints.py +15 -0
- sdetkit/evidence.py +261 -0
- sdetkit/evidence_narrative_closeout_84.py +411 -0
- sdetkit/evidence_workspace.py +184 -0
- sdetkit/execution_prioritization_closeout_50.py +31 -0
- sdetkit/expansion_automation_41.py +27 -0
- sdetkit/expansion_closeout_45.py +441 -0
- sdetkit/experiment_lane_37.py +29 -0
- sdetkit/external_contribution.py +463 -0
- sdetkit/feature_registry.py +173 -0
- sdetkit/feature_registry_cli.py +182 -0
- sdetkit/first_contribution.py +388 -0
- sdetkit/forensics.py +183 -0
- sdetkit/gate.py +838 -0
- sdetkit/github_actions_quickstart.py +572 -0
- sdetkit/gitlab_ci_quickstart.py +603 -0
- sdetkit/governance_handoff_closeout_87.py +409 -0
- sdetkit/governance_priorities_closeout_88.py +409 -0
- sdetkit/governance_scale_closeout_89.py +411 -0
- sdetkit/growth_campaign_closeout_81.py +395 -0
- sdetkit/help_surface.py +57 -0
- sdetkit/import_hazards.py +38 -0
- sdetkit/inspect_compare.py +581 -0
- sdetkit/inspect_compare_forwarding.py +33 -0
- sdetkit/inspect_data.py +954 -0
- sdetkit/inspect_forwarding.py +15 -0
- sdetkit/inspect_project.py +641 -0
- sdetkit/inspect_project_forwarding.py +18 -0
- sdetkit/integration.py +642 -0
- sdetkit/integration_expansion2_closeout_66.py +405 -0
- sdetkit/integration_expansion3_closeout_67.py +411 -0
- sdetkit/integration_expansion4_closeout_68.py +416 -0
- sdetkit/integration_feedback_closeout_82.py +411 -0
- sdetkit/intelligence.py +388 -0
- sdetkit/judgment.py +268 -0
- sdetkit/kits.py +385 -0
- sdetkit/kpi_audit.py +29 -0
- sdetkit/kpi_deep_audit_closeout_57.py +31 -0
- sdetkit/kpi_instrumentation_35.py +25 -0
- sdetkit/kpi_report.py +152 -0
- sdetkit/kvcli.py +171 -0
- sdetkit/launch_readiness_closeout_86.py +409 -0
- sdetkit/legacy_adapters/__init__.py +16 -0
- sdetkit/legacy_adapters/closeout.py +51 -0
- sdetkit/legacy_adapters/continuous_upgrade.py +15 -0
- sdetkit/legacy_adapters/foundation.py +36 -0
- sdetkit/legacy_cli.py +54 -0
- sdetkit/legacy_commands.py +55 -0
- sdetkit/legacy_namespace.py +21 -0
- sdetkit/main_.py +3 -0
- sdetkit/maintenance/__init__.py +5 -0
- sdetkit/maintenance/__main__.py +6 -0
- sdetkit/maintenance/checks/__init__.py +1 -0
- sdetkit/maintenance/checks/clean_tree_check.py +76 -0
- sdetkit/maintenance/checks/custom_example_check.py +27 -0
- sdetkit/maintenance/checks/deps_check.py +59 -0
- sdetkit/maintenance/checks/doctor_check.py +115 -0
- sdetkit/maintenance/checks/github_automation_check.py +341 -0
- sdetkit/maintenance/checks/lint_check.py +85 -0
- sdetkit/maintenance/checks/security_check.py +243 -0
- sdetkit/maintenance/checks/tests_check.py +55 -0
- sdetkit/maintenance/cli.py +360 -0
- sdetkit/maintenance/main.py +6 -0
- sdetkit/maintenance/registry.py +42 -0
- sdetkit/maintenance/types.py +47 -0
- sdetkit/maintenance/utils.py +8 -0
- sdetkit/netclient.py +1042 -0
- sdetkit/notify.py +83 -0
- sdetkit/notify_plugins.py +54 -0
- sdetkit/objection_closeout_48.py +29 -0
- sdetkit/objection_handling.py +534 -0
- sdetkit/onboarding.py +293 -0
- sdetkit/onboarding_optimization.py +458 -0
- sdetkit/ops.py +980 -0
- sdetkit/ops_control.py +371 -0
- sdetkit/optimization_closeout_42.py +477 -0
- sdetkit/optimization_closeout_46.py +444 -0
- sdetkit/optional_httpx.py +65 -0
- sdetkit/parsed_shortcuts.py +63 -0
- sdetkit/parser_helpers.py +23 -0
- sdetkit/partner_outreach_closeout_80.py +458 -0
- sdetkit/patch.py +959 -0
- sdetkit/phase1_hardening_29.py +342 -0
- sdetkit/phase1_wrap_30.py +28 -0
- sdetkit/phase2_hardening_closeout_58.py +388 -0
- sdetkit/phase2_kickoff_31.py +27 -0
- sdetkit/phase2_wrap_handoff_closeout_60.py +383 -0
- sdetkit/phase3_kickoff_closeout_61.py +438 -0
- sdetkit/phase3_preplan_closeout_59.py +378 -0
- sdetkit/phase3_wrap_publication_closeout_90.py +418 -0
- sdetkit/phase_boost.py +48 -0
- sdetkit/playbook_aliases.py +20 -0
- sdetkit/playbook_post_39.py +27 -0
- sdetkit/playbooks_cli.py +523 -0
- sdetkit/plugin_system.py +114 -0
- sdetkit/plugins.py +870 -0
- sdetkit/policy.py +274 -0
- sdetkit/portfolio_readiness.py +159 -0
- sdetkit/premium_gate_engine.py +1915 -0
- sdetkit/production_readiness.py +357 -0
- sdetkit/projects.py +553 -0
- sdetkit/proof.py +214 -0
- sdetkit/public_command_surface.json +41 -0
- sdetkit/public_surface_contract.py +151 -0
- sdetkit/quality_contribution_delta.py +488 -0
- sdetkit/readiness.py +403 -0
- sdetkit/release_cadence_32.py +25 -0
- sdetkit/release_communications.py +488 -0
- sdetkit/release_dispatch.py +32 -0
- sdetkit/release_prioritization_closeout_85.py +412 -0
- sdetkit/release_readiness.py +423 -0
- sdetkit/reliability_closeout_47.py +29 -0
- sdetkit/reliability_evidence_pack.py +500 -0
- sdetkit/repo.py +4807 -0
- sdetkit/repo_adoption.py +166 -0
- sdetkit/repo_init_forwarding.py +24 -0
- sdetkit/report.py +1095 -0
- sdetkit/review.py +2555 -0
- sdetkit/review_engine.py +1052 -0
- sdetkit/review_forwarding.py +26 -0
- sdetkit/roadmap.py +147 -0
- sdetkit/roadmap_manifest.py +298 -0
- sdetkit/scale_closeout_44.py +458 -0
- sdetkit/scale_lane_40.py +27 -0
- sdetkit/scale_upgrade_closeout_79.py +396 -0
- sdetkit/sdet_package.py +318 -0
- sdetkit/security.py +176 -0
- sdetkit/security_gate.py +1460 -0
- sdetkit/serve.py +391 -0
- sdetkit/serve_forwarding.py +12 -0
- sdetkit/ship_readiness.py +230 -0
- sdetkit/sqlite_scalar.py +196 -0
- sdetkit/stabilization_closeout_56.py +451 -0
- sdetkit/startup_readiness.py +352 -0
- sdetkit/templates/__init__.py +0 -0
- sdetkit/templates/enterprise_python/__init__.py +0 -0
- sdetkit/test_bootstrap.py +33 -0
- sdetkit/test_bootstrap_contract.py +126 -0
- sdetkit/test_bootstrap_validate.py +66 -0
- sdetkit/textutil.py +47 -0
- sdetkit/triage_templates.py +449 -0
- sdetkit/trust_assets.py +523 -0
- sdetkit/trust_assets_refresh_closeout_75.py +398 -0
- sdetkit/trust_faq_expansion_closeout_83.py +417 -0
- sdetkit/upgrade_audit.py +2439 -0
- sdetkit/upgrade_hub.py +148 -0
- sdetkit/versioning.py +10 -0
- sdetkit/weekly_review.py +161 -0
- sdetkit/weekly_review_28.py +24 -0
- sdetkit/weekly_review_closeout_49.py +27 -0
- sdetkit/weekly_review_closeout_65.py +405 -0
- sdetkit-1.0.3.dist-info/METADATA +314 -0
- sdetkit-1.0.3.dist-info/RECORD +236 -0
- sdetkit-1.0.3.dist-info/WHEEL +5 -0
- sdetkit-1.0.3.dist-info/entry_points.txt +12 -0
- sdetkit-1.0.3.dist-info/licenses/LICENSE +160 -0
- sdetkit-1.0.3.dist-info/top_level.txt +2 -0
- sdkit/__init__.py +3 -0
- sdkit/__main__.py +6 -0
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
import argparse
|
|
4
|
+
import json
|
|
5
|
+
import shlex
|
|
6
|
+
import subprocess
|
|
7
|
+
import sys
|
|
8
|
+
from pathlib import Path
|
|
9
|
+
from typing import Any
|
|
10
|
+
|
|
11
|
+
_PAGE_PATH = "docs/integrations-acceleration-closeout.md"
|
|
12
|
+
_TOP10_PATH = "docs/top-10-github-strategy.md"
|
|
13
|
+
_DAY42_SUMMARY_PATH = (
|
|
14
|
+
"docs/artifacts/optimization-closeout-pack-42/optimization-closeout-summary-42.json"
|
|
15
|
+
)
|
|
16
|
+
_DAY42_BOARD_PATH = "docs/artifacts/optimization-closeout-pack-42/delivery-board-42.md"
|
|
17
|
+
_DAY42_LEGACY_SUMMARY_PATH = "docs/artifacts/optimization-closeout-foundation-pack/optimization-closeout-foundation-summary.json"
|
|
18
|
+
_DAY42_LEGACY_BOARD_PATH = "docs/artifacts/optimization-closeout-foundation-pack/delivery-board.md"
|
|
19
|
+
_SECTION_HEADER = "# — Acceleration closeout lane"
|
|
20
|
+
_REQUIRED_SECTIONS = [
|
|
21
|
+
"## Why this lane matters",
|
|
22
|
+
"## Required inputs (optimization closeout foundation)",
|
|
23
|
+
"## Command lane",
|
|
24
|
+
"## Acceleration closeout contract",
|
|
25
|
+
"## Acceleration quality checklist",
|
|
26
|
+
"## Delivery board",
|
|
27
|
+
"## Scoring model",
|
|
28
|
+
]
|
|
29
|
+
_REQUIRED_COMMANDS = [
|
|
30
|
+
"python -m sdetkit acceleration-closeout --format json --strict",
|
|
31
|
+
"python -m sdetkit acceleration-closeout --emit-pack-dir docs/artifacts/acceleration-closeout-pack --format json --strict",
|
|
32
|
+
"python -m sdetkit acceleration-closeout --execute --evidence-dir docs/artifacts/acceleration-closeout-pack/evidence --format json --strict",
|
|
33
|
+
"python scripts/check_acceleration_closeout_contract.py",
|
|
34
|
+
]
|
|
35
|
+
_EXECUTION_COMMANDS = [
|
|
36
|
+
"python -m sdetkit acceleration-closeout --format json --strict",
|
|
37
|
+
"python -m sdetkit acceleration-closeout --emit-pack-dir docs/artifacts/acceleration-closeout-pack --format json --strict",
|
|
38
|
+
"python scripts/check_acceleration_closeout_contract.py --skip-evidence",
|
|
39
|
+
]
|
|
40
|
+
_REQUIRED_CONTRACT_LINES = [
|
|
41
|
+
"Single owner + backup reviewer are assigned for acceleration lane execution and KPI follow-up.",
|
|
42
|
+
"The acceleration lane references optimization winners and misses with deterministic growth loops.",
|
|
43
|
+
"Every section includes docs CTA, runnable command CTA, KPI target, and rollout guardrail.",
|
|
44
|
+
" closeout records acceleration learnings and scale priorities.",
|
|
45
|
+
]
|
|
46
|
+
_REQUIRED_QUALITY_LINES = [
|
|
47
|
+
"- [ ] Includes acceleration summary, growth matrix, and rollback strategy",
|
|
48
|
+
"- [ ] Every section has owner, publish window, KPI target, and risk flag",
|
|
49
|
+
"- [ ] CTA links point to docs + runnable command evidence",
|
|
50
|
+
"- [ ] Scorecard captures baseline, current, delta, and confidence for each KPI",
|
|
51
|
+
"- [ ] Artifact pack includes acceleration plan, growth matrix, KPI scorecard, and execution log",
|
|
52
|
+
]
|
|
53
|
+
_REQUIRED_DELIVERY_BOARD_LINES = [
|
|
54
|
+
"- [ ] acceleration plan draft committed",
|
|
55
|
+
"- [ ] review notes captured with owner + backup",
|
|
56
|
+
"- [ ] growth matrix exported",
|
|
57
|
+
"- [ ] KPI scorecard snapshot exported",
|
|
58
|
+
"- [ ] scale priorities drafted from learnings",
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
_DEFAULT_PAGE_TEMPLATE = "# — Acceleration closeout lane\n\nThis lane closes with a major acceleration upgrade that converts optimization evidence into deterministic improvement loops.\n\n## Why this lane matters\n\n- Converts optimization proof into growth-first operating motion.\n- Protects quality with owner accountability, command proof, and KPI guardrails.\n- Produces a deterministic handoff from acceleration outcomes into scale priorities.\n\n## Required inputs (optimization closeout foundation)\n\n- `docs/artifacts/optimization-closeout-pack-42/optimization-closeout-summary-42.json`\n- `docs/artifacts/optimization-closeout-pack-42/delivery-board-42.md`\n\n## Command lane\n\n```bash\npython -m sdetkit acceleration-closeout --format json --strict\npython -m sdetkit acceleration-closeout --emit-pack-dir docs/artifacts/acceleration-closeout-pack --format json --strict\npython -m sdetkit acceleration-closeout --execute --evidence-dir docs/artifacts/acceleration-closeout-pack/evidence --format json --strict\npython scripts/check_acceleration_closeout_contract.py\n```\n\n## Acceleration closeout contract\n\n- Single owner + backup reviewer are assigned for acceleration lane execution and KPI follow-up.\n- The acceleration lane references optimization winners and misses with deterministic growth loops.\n- Every section includes docs CTA, runnable command CTA, KPI target, and rollout guardrail.\n- closeout records acceleration learnings and scale priorities.\n\n## Acceleration quality checklist\n\n- [ ] Includes acceleration summary, growth matrix, and rollback strategy\n- [ ] Every section has owner, publish window, KPI target, and risk flag\n- [ ] CTA links point to docs + runnable command evidence\n- [ ] Scorecard captures baseline, current, delta, and confidence for each KPI\n- [ ] Artifact pack includes acceleration plan, growth matrix, KPI scorecard, and execution log\n\n## Delivery board\n\n- [ ] acceleration plan draft committed\n- [ ] review notes captured with owner + backup\n- [ ] growth matrix exported\n- [ ] KPI scorecard snapshot exported\n- [ ] scale priorities drafted from learnings\n\n## Scoring model\n\n weighted score (0-100):\n\n- Docs contract + command lane completeness: 30 points.\n- Discoverability alignment (README/docs index/top-10): 20 points.\n- continuity and strict baseline carryover: 35 points.\n- Acceleration contract lock + delivery board readiness: 15 points.\n"
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
def _read(path: Path) -> str:
|
|
65
|
+
return path.read_text(encoding="utf-8") if path.exists() else ""
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def _load_json(path: Path) -> dict[str, Any] | None:
|
|
69
|
+
if not path.exists():
|
|
70
|
+
return None
|
|
71
|
+
try:
|
|
72
|
+
data = json.loads(path.read_text(encoding="utf-8"))
|
|
73
|
+
except json.JSONDecodeError:
|
|
74
|
+
return None
|
|
75
|
+
return data if isinstance(data, dict) else None
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
def _load_optimization_closeout(path: Path) -> tuple[float, bool, int]:
|
|
79
|
+
data = _load_json(path)
|
|
80
|
+
if data is None:
|
|
81
|
+
return 0.0, False, 0
|
|
82
|
+
summary = data.get("summary")
|
|
83
|
+
checks = data.get("checks")
|
|
84
|
+
score = summary.get("activation_score") if isinstance(summary, dict) else None
|
|
85
|
+
strict_pass = summary.get("strict_pass") if isinstance(summary, dict) else False
|
|
86
|
+
check_count = len(checks) if isinstance(checks, list) else 0
|
|
87
|
+
resolved_score = float(score) if isinstance(score, (int, float)) else 0.0
|
|
88
|
+
return resolved_score, bool(strict_pass), check_count
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
def _board_stats(path: Path) -> tuple[int, bool, bool]:
|
|
92
|
+
text = _read(path)
|
|
93
|
+
items = [line for line in text.splitlines() if line.strip().startswith("- [")]
|
|
94
|
+
return len(items), "" in text, "" in text
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
def _contains_all_lines(text: str, expected: list[str]) -> list[str]:
|
|
98
|
+
return [line for line in expected if line not in text]
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
def _resolve_existing_path(root: Path, primary: str, legacy: str) -> Path:
|
|
102
|
+
primary_path = root / primary
|
|
103
|
+
if primary_path.exists():
|
|
104
|
+
return primary_path
|
|
105
|
+
return root / legacy
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
def build_acceleration_closeout_summary(root: Path) -> dict[str, Any]:
|
|
109
|
+
readme_path = "README.md"
|
|
110
|
+
docs_index_path = "docs/index.md"
|
|
111
|
+
docs_page_path = _PAGE_PATH
|
|
112
|
+
top10_path = _TOP10_PATH
|
|
113
|
+
|
|
114
|
+
page_path = root / docs_page_path
|
|
115
|
+
page_text = _read(page_path)
|
|
116
|
+
readme_text = _read(root / readme_path)
|
|
117
|
+
docs_index_text = _read(root / docs_index_path)
|
|
118
|
+
top10_text = _read(root / top10_path)
|
|
119
|
+
|
|
120
|
+
missing_sections = [s for s in [_SECTION_HEADER, *_REQUIRED_SECTIONS] if s not in page_text]
|
|
121
|
+
missing_commands = [c for c in _REQUIRED_COMMANDS if c not in page_text]
|
|
122
|
+
missing_contract_lines = _contains_all_lines(
|
|
123
|
+
page_text, [f"- {line}" for line in _REQUIRED_CONTRACT_LINES]
|
|
124
|
+
)
|
|
125
|
+
missing_quality_lines = _contains_all_lines(page_text, _REQUIRED_QUALITY_LINES)
|
|
126
|
+
missing_board_items = _contains_all_lines(page_text, _REQUIRED_DELIVERY_BOARD_LINES)
|
|
127
|
+
|
|
128
|
+
optimization_closeout_summary = _resolve_existing_path(
|
|
129
|
+
root, _DAY42_SUMMARY_PATH, _DAY42_LEGACY_SUMMARY_PATH
|
|
130
|
+
)
|
|
131
|
+
optimization_closeout_board = _resolve_existing_path(
|
|
132
|
+
root, _DAY42_BOARD_PATH, _DAY42_LEGACY_BOARD_PATH
|
|
133
|
+
)
|
|
134
|
+
optimization_closeout_score, optimization_closeout_strict, optimization_closeout_check_count = (
|
|
135
|
+
_load_optimization_closeout(optimization_closeout_summary)
|
|
136
|
+
)
|
|
137
|
+
board_count, board_has_optimization_closeout, board_has_acceleration_closeout = _board_stats(
|
|
138
|
+
optimization_closeout_board
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
checks: list[dict[str, Any]] = [
|
|
142
|
+
{
|
|
143
|
+
"check_id": "docs_page_exists",
|
|
144
|
+
"weight": 10,
|
|
145
|
+
"passed": page_path.exists(),
|
|
146
|
+
"evidence": str(page_path),
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
"check_id": "required_sections_present",
|
|
150
|
+
"weight": 10,
|
|
151
|
+
"passed": not missing_sections,
|
|
152
|
+
"evidence": {"missing_sections": missing_sections},
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
"check_id": "required_commands_present",
|
|
156
|
+
"weight": 10,
|
|
157
|
+
"passed": not missing_commands,
|
|
158
|
+
"evidence": {"missing_commands": missing_commands},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
"check_id": "readme_acceleration_closeout_link",
|
|
162
|
+
"weight": 8,
|
|
163
|
+
"passed": "docs/integrations-acceleration-closeout.md" in readme_text,
|
|
164
|
+
"evidence": "docs/integrations-acceleration-closeout.md",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"check_id": "readme_acceleration_closeout_command",
|
|
168
|
+
"weight": 4,
|
|
169
|
+
"passed": "acceleration-closeout" in readme_text,
|
|
170
|
+
"evidence": "acceleration-closeout",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
"check_id": "docs_index_acceleration_closeout_links",
|
|
174
|
+
"weight": 8,
|
|
175
|
+
"passed": (
|
|
176
|
+
"impact-43-big-upgrade-report.md" in docs_index_text
|
|
177
|
+
and "integrations-acceleration-closeout.md" in docs_index_text
|
|
178
|
+
),
|
|
179
|
+
"evidence": "impact-43-big-upgrade-report.md + integrations-acceleration-closeout.md",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"check_id": "top10_acceleration_closeout_alignment",
|
|
183
|
+
"weight": 5,
|
|
184
|
+
"passed": ("" in top10_text and "" in top10_text),
|
|
185
|
+
"evidence": " + strategy chain",
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"check_id": "optimization_closeout_summary_present",
|
|
189
|
+
"weight": 10,
|
|
190
|
+
"passed": optimization_closeout_summary.exists(),
|
|
191
|
+
"evidence": str(optimization_closeout_summary),
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"check_id": "optimization_closeout_delivery_board_present",
|
|
195
|
+
"weight": 8,
|
|
196
|
+
"passed": optimization_closeout_board.exists(),
|
|
197
|
+
"evidence": str(optimization_closeout_board),
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"check_id": "optimization_closeout_quality_floor",
|
|
201
|
+
"weight": 10,
|
|
202
|
+
"passed": optimization_closeout_strict and optimization_closeout_score >= 95,
|
|
203
|
+
"evidence": {
|
|
204
|
+
"optimization_closeout_score": optimization_closeout_score,
|
|
205
|
+
"strict_pass": optimization_closeout_strict,
|
|
206
|
+
"optimization_closeout_checks": optimization_closeout_check_count,
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"check_id": "optimization_closeout_board_integrity",
|
|
211
|
+
"weight": 7,
|
|
212
|
+
"passed": board_count >= 5
|
|
213
|
+
and board_has_optimization_closeout
|
|
214
|
+
and board_has_acceleration_closeout,
|
|
215
|
+
"evidence": {
|
|
216
|
+
"board_items": board_count,
|
|
217
|
+
"contains_optimization_closeout": board_has_optimization_closeout,
|
|
218
|
+
"contains_acceleration_closeout": board_has_acceleration_closeout,
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
"check_id": "acceleration_contract_locked",
|
|
223
|
+
"weight": 5,
|
|
224
|
+
"passed": not missing_contract_lines,
|
|
225
|
+
"evidence": {"missing_contract_lines": missing_contract_lines},
|
|
226
|
+
},
|
|
227
|
+
{
|
|
228
|
+
"check_id": "acceleration_quality_checklist_locked",
|
|
229
|
+
"weight": 3,
|
|
230
|
+
"passed": not missing_quality_lines,
|
|
231
|
+
"evidence": {"missing_quality_items": missing_quality_lines},
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
"check_id": "delivery_board_locked",
|
|
235
|
+
"weight": 2,
|
|
236
|
+
"passed": not missing_board_items,
|
|
237
|
+
"evidence": {"missing_board_items": missing_board_items},
|
|
238
|
+
},
|
|
239
|
+
]
|
|
240
|
+
|
|
241
|
+
failed = [c for c in checks if not c["passed"]]
|
|
242
|
+
score = int(round(sum(c["weight"] for c in checks if c["passed"])))
|
|
243
|
+
critical_failures: list[str] = []
|
|
244
|
+
if not optimization_closeout_summary.exists() or not optimization_closeout_board.exists():
|
|
245
|
+
critical_failures.append("optimization_closeout_handoff_inputs")
|
|
246
|
+
if not optimization_closeout_strict:
|
|
247
|
+
critical_failures.append("optimization_closeout_strict_baseline")
|
|
248
|
+
|
|
249
|
+
wins: list[str] = []
|
|
250
|
+
misses: list[str] = []
|
|
251
|
+
handoff_actions: list[str] = []
|
|
252
|
+
|
|
253
|
+
if optimization_closeout_strict:
|
|
254
|
+
wins.append(
|
|
255
|
+
f"42 continuity is strict-pass with activation score={optimization_closeout_score}."
|
|
256
|
+
)
|
|
257
|
+
else:
|
|
258
|
+
misses.append(" strict continuity signal is missing.")
|
|
259
|
+
handoff_actions.append(
|
|
260
|
+
"Re-run optimization closeout command and restore strict pass baseline before lock."
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
if board_count >= 5 and board_has_optimization_closeout and board_has_acceleration_closeout:
|
|
264
|
+
wins.append(f"42 delivery board integrity validated with {board_count} checklist items.")
|
|
265
|
+
else:
|
|
266
|
+
misses.append(" delivery board integrity is incomplete (needs >=5 items and /43 anchors).")
|
|
267
|
+
handoff_actions.append("Repair delivery board entries to include and anchors.")
|
|
268
|
+
|
|
269
|
+
if not missing_contract_lines and not missing_quality_lines and not missing_board_items:
|
|
270
|
+
wins.append(
|
|
271
|
+
"Acceleration execution contract + quality checklist is fully locked for execution."
|
|
272
|
+
)
|
|
273
|
+
else:
|
|
274
|
+
misses.append(
|
|
275
|
+
"Acceleration contract, quality checklist, or delivery board entries are missing."
|
|
276
|
+
)
|
|
277
|
+
handoff_actions.append(
|
|
278
|
+
"Complete all acceleration contract lines, quality checklist entries, and delivery board tasks in docs."
|
|
279
|
+
)
|
|
280
|
+
|
|
281
|
+
if not failed and not critical_failures:
|
|
282
|
+
wins.append(" acceleration closeout lane is fully complete and ready for scale lane.")
|
|
283
|
+
|
|
284
|
+
return {
|
|
285
|
+
"name": "acceleration-closeout",
|
|
286
|
+
"inputs": {
|
|
287
|
+
"readme": readme_path,
|
|
288
|
+
"docs_index": docs_index_path,
|
|
289
|
+
"docs_page": docs_page_path,
|
|
290
|
+
"top10": top10_path,
|
|
291
|
+
"optimization_closeout_summary": str(optimization_closeout_summary.relative_to(root))
|
|
292
|
+
if optimization_closeout_summary.exists()
|
|
293
|
+
else str(optimization_closeout_summary),
|
|
294
|
+
"optimization_closeout_delivery_board": str(
|
|
295
|
+
optimization_closeout_board.relative_to(root)
|
|
296
|
+
)
|
|
297
|
+
if optimization_closeout_board.exists()
|
|
298
|
+
else str(optimization_closeout_board),
|
|
299
|
+
},
|
|
300
|
+
"checks": checks,
|
|
301
|
+
"rollup": {
|
|
302
|
+
"optimization_closeout_activation_score": optimization_closeout_score,
|
|
303
|
+
"optimization_closeout_checks": optimization_closeout_check_count,
|
|
304
|
+
"optimization_closeout_delivery_board_items": board_count,
|
|
305
|
+
},
|
|
306
|
+
"summary": {
|
|
307
|
+
"activation_score": score,
|
|
308
|
+
"passed_checks": len(checks) - len(failed),
|
|
309
|
+
"failed_checks": len(failed),
|
|
310
|
+
"critical_failures": critical_failures,
|
|
311
|
+
"strict_pass": not failed and not critical_failures,
|
|
312
|
+
},
|
|
313
|
+
"wins": wins,
|
|
314
|
+
"misses": misses,
|
|
315
|
+
"handoff_actions": handoff_actions,
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
def _render_text(payload: dict[str, Any]) -> str:
|
|
320
|
+
lines = [
|
|
321
|
+
"Acceleration closeout summary",
|
|
322
|
+
f"- Activation score: {payload['summary']['activation_score']}",
|
|
323
|
+
f"- Passed checks: {payload['summary']['passed_checks']}",
|
|
324
|
+
f"- Failed checks: {payload['summary']['failed_checks']}",
|
|
325
|
+
f"- Critical failures: {payload['summary']['critical_failures']}",
|
|
326
|
+
f"- 42 activation score: `{payload['rollup']['optimization_closeout_activation_score']}`",
|
|
327
|
+
f"- 42 checks evaluated: `{payload['rollup']['optimization_closeout_checks']}`",
|
|
328
|
+
f"- 42 delivery board checklist items: `{payload['rollup']['optimization_closeout_delivery_board_items']}`",
|
|
329
|
+
]
|
|
330
|
+
if payload["wins"]:
|
|
331
|
+
lines.append("- Wins:")
|
|
332
|
+
lines.extend([f" - {w}" for w in payload["wins"]])
|
|
333
|
+
if payload["misses"]:
|
|
334
|
+
lines.append("- Misses:")
|
|
335
|
+
lines.extend([f" - {m}" for m in payload["misses"]])
|
|
336
|
+
return "\n".join(lines)
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
def _write(path: Path, text: str) -> None:
|
|
340
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
341
|
+
path.write_text(text, encoding="utf-8")
|
|
342
|
+
|
|
343
|
+
|
|
344
|
+
def _emit_pack(root: Path, payload: dict[str, Any], pack_dir: Path) -> None:
|
|
345
|
+
target = root / pack_dir
|
|
346
|
+
target.mkdir(parents=True, exist_ok=True)
|
|
347
|
+
_write(target / "acceleration-closeout-summary.json", json.dumps(payload, indent=2) + "\n")
|
|
348
|
+
_write(target / "acceleration-closeout-summary.md", _render_text(payload) + "\n")
|
|
349
|
+
_write(
|
|
350
|
+
target / "acceleration-plan.md",
|
|
351
|
+
"# Acceleration plan\n\n- Objective: close with measurable quality and throughput gains.\n",
|
|
352
|
+
)
|
|
353
|
+
_write(
|
|
354
|
+
target / "growth-matrix.csv",
|
|
355
|
+
"stream,owner,backup,publish_window,docs_cta,command_cta,kpi_target,risk_flag\n"
|
|
356
|
+
"quality-floor,qa-lead,platform-owner,2026-03-12T10:00:00Z,docs/integrations-acceleration-closeout.md,python -m sdetkit acceleration-closeout --format json --strict,failed-checks:0,baseline-drift\n",
|
|
357
|
+
)
|
|
358
|
+
_write(
|
|
359
|
+
target / "acceleration-kpi-scorecard.json",
|
|
360
|
+
json.dumps(
|
|
361
|
+
{
|
|
362
|
+
"kpis": [
|
|
363
|
+
{
|
|
364
|
+
"id": "strict_pass",
|
|
365
|
+
"baseline": 1,
|
|
366
|
+
"current": int(payload["summary"]["strict_pass"]),
|
|
367
|
+
"delta": int(payload["summary"]["strict_pass"]) - 1,
|
|
368
|
+
"confidence": "high",
|
|
369
|
+
}
|
|
370
|
+
]
|
|
371
|
+
},
|
|
372
|
+
indent=2,
|
|
373
|
+
)
|
|
374
|
+
+ "\n",
|
|
375
|
+
)
|
|
376
|
+
_write(
|
|
377
|
+
target / "execution-log.md",
|
|
378
|
+
"# Acceleration execution log\n\n- [ ] 2026-03-12: Record misses, wins, and scale priorities.\n",
|
|
379
|
+
)
|
|
380
|
+
_write(
|
|
381
|
+
target / "delivery-board.md",
|
|
382
|
+
"# Acceleration delivery board\n\n" + "\n".join(_REQUIRED_DELIVERY_BOARD_LINES) + "\n",
|
|
383
|
+
)
|
|
384
|
+
_write(
|
|
385
|
+
target / "validation-commands.md",
|
|
386
|
+
"# Acceleration validation commands\n\n```bash\n"
|
|
387
|
+
+ "\n".join(_EXECUTION_COMMANDS)
|
|
388
|
+
+ "\n```\n",
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
|
|
392
|
+
def _execute_commands(root: Path, evidence_dir: Path) -> None:
|
|
393
|
+
evidence_path = root / evidence_dir
|
|
394
|
+
evidence_path.mkdir(parents=True, exist_ok=True)
|
|
395
|
+
events: list[dict[str, Any]] = []
|
|
396
|
+
for index, command in enumerate(_EXECUTION_COMMANDS, start=1):
|
|
397
|
+
argv = shlex.split(command)
|
|
398
|
+
if argv and argv[0] == "python":
|
|
399
|
+
argv[0] = sys.executable
|
|
400
|
+
proc = subprocess.run(argv, cwd=root, text=True, capture_output=True, check=False)
|
|
401
|
+
event = {
|
|
402
|
+
"command": command,
|
|
403
|
+
"returncode": proc.returncode,
|
|
404
|
+
"stdout": proc.stdout,
|
|
405
|
+
"stderr": proc.stderr,
|
|
406
|
+
}
|
|
407
|
+
events.append(event)
|
|
408
|
+
_write(evidence_path / f"command-{index:02d}.log", json.dumps(event, indent=2) + "\n")
|
|
409
|
+
_write(
|
|
410
|
+
evidence_path / "execution-summary.json",
|
|
411
|
+
json.dumps({"total_commands": len(events), "commands": events}, indent=2) + "\n",
|
|
412
|
+
)
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
def build_parser() -> argparse.ArgumentParser:
|
|
416
|
+
parser = argparse.ArgumentParser(description="Acceleration closeout checks")
|
|
417
|
+
parser.add_argument("--root", default=".")
|
|
418
|
+
parser.add_argument("--format", choices=["text", "json"], default="text")
|
|
419
|
+
parser.add_argument("--strict", action="store_true")
|
|
420
|
+
parser.add_argument("--emit-pack-dir")
|
|
421
|
+
parser.add_argument("--execute", action="store_true")
|
|
422
|
+
parser.add_argument("--evidence-dir")
|
|
423
|
+
parser.add_argument("--ensure-doc", action="store_true")
|
|
424
|
+
return parser
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
def build_acceleration_closeout_summary_impl(root: Path) -> dict[str, Any]:
|
|
428
|
+
"Compatibility alias for legacy -based builder name."
|
|
429
|
+
return build_acceleration_closeout_summary(root)
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
def main(argv: list[str] | None = None) -> int:
|
|
433
|
+
ns = build_parser().parse_args(argv)
|
|
434
|
+
root = Path(ns.root).resolve()
|
|
435
|
+
|
|
436
|
+
if ns.ensure_doc:
|
|
437
|
+
page = root / _PAGE_PATH
|
|
438
|
+
if not page.exists():
|
|
439
|
+
_write(page, _DEFAULT_PAGE_TEMPLATE)
|
|
440
|
+
|
|
441
|
+
payload = build_acceleration_closeout_summary(root)
|
|
442
|
+
|
|
443
|
+
if ns.emit_pack_dir:
|
|
444
|
+
_emit_pack(root, payload, Path(ns.emit_pack_dir))
|
|
445
|
+
if ns.execute:
|
|
446
|
+
evidence_dir = (
|
|
447
|
+
Path(ns.evidence_dir)
|
|
448
|
+
if ns.evidence_dir
|
|
449
|
+
else Path("docs/artifacts/acceleration-closeout-pack/evidence")
|
|
450
|
+
)
|
|
451
|
+
_execute_commands(root, evidence_dir)
|
|
452
|
+
|
|
453
|
+
if ns.format == "json":
|
|
454
|
+
print(json.dumps(payload, indent=2))
|
|
455
|
+
else:
|
|
456
|
+
print(_render_text(payload))
|
|
457
|
+
|
|
458
|
+
return 1 if ns.strict and not payload["summary"]["strict_pass"] else 0
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
if __name__ == "__main__":
|
|
462
|
+
raise SystemExit(main())
|