|
| 1 | +"""Release-candidate readiness reporting for HRM neural future work.""" |
| 2 | + |
| 3 | +from __future__ import annotations |
| 4 | + |
| 5 | +from typing import Any, Dict, Iterable, List |
| 6 | + |
| 7 | + |
| 8 | +EVIDENCE_LEVEL = "release_candidate_hardening_audit" |
| 9 | +GENERATED_AT = "2026-05-04T00:00:00Z" |
| 10 | +CLAIM_BOUNDARY = ( |
| 11 | + "This v0.1.0 readiness report is simulation-only. It does not claim hardware validation, " |
| 12 | + "foundry calibration, measured transfer matrices, production inference readiness, physical " |
| 13 | + "accuracy, hardware latency, hardware energy efficiency, quantum advantage, or a completed " |
| 14 | + "hardware benchmark." |
| 15 | +) |
| 16 | + |
| 17 | + |
| 18 | +def run_release_readiness_report( |
| 19 | + stage_reports: Iterable[Dict[str, Any]], |
| 20 | + supplemental_reports: Iterable[Dict[str, Any]], |
| 21 | +) -> Dict[str, Any]: |
| 22 | + stages = list(stage_reports) |
| 23 | + supplemental = list(supplemental_reports) |
| 24 | + completed_simulation_stages = [ |
| 25 | + _stage_summary(report) |
| 26 | + for report in sorted(stages, key=lambda row: row["stage"]) |
| 27 | + if report["stage"] <= 4 and report["stageStatus"] == "complete" |
| 28 | + ] |
| 29 | + blocked_hardware_gates = [ |
| 30 | + _blocked_gate_summary(report) |
| 31 | + for report in sorted(stages, key=lambda row: row["stage"]) |
| 32 | + if report["stage"] in {5, 6, 7} |
| 33 | + ] |
| 34 | + return { |
| 35 | + "id": "release-readiness-v0.1.0", |
| 36 | + "title": "v0.1.0 release-candidate readiness audit", |
| 37 | + "stage": 0, |
| 38 | + "evidenceLevel": EVIDENCE_LEVEL, |
| 39 | + "stageStatus": "complete", |
| 40 | + "generatedAt": GENERATED_AT, |
| 41 | + "releaseCandidateFor": "v0.1.0", |
| 42 | + "completedSimulationStages": completed_simulation_stages, |
| 43 | + "completedSimulationStageCount": len(completed_simulation_stages), |
| 44 | + "supplementalReports": [_supplemental_summary(report) for report in sorted(supplemental, key=lambda row: row["id"])], |
| 45 | + "supplementalReportCount": len(supplemental), |
| 46 | + "blockedHardwareGates": blocked_hardware_gates, |
| 47 | + "blockedHardwareGateCount": len(blocked_hardware_gates), |
| 48 | + "verificationCommands": [ |
| 49 | + "make check", |
| 50 | + "jq empty reports/future-work/hrm-neural-mapping/release-readiness-v0.1.0.json", |
| 51 | + "sha256sum -c reports/future-work/hrm-neural-mapping/ARTIFACTS.sha256", |
| 52 | + "python3 scripts/check_artifact_hash_coverage.py", |
| 53 | + "python3 scripts/check_no_local_paths.py", |
| 54 | + "python3 scripts/check_claim_boundary.py", |
| 55 | + "git diff --check", |
| 56 | + ], |
| 57 | + "documentationAudit": { |
| 58 | + "readmeCurrent": True, |
| 59 | + "alphaMilestonesListedThrough": "v0.1.0-alpha.12", |
| 60 | + "simulationOnlyBoundaryPresent": True, |
| 61 | + "stage5To7BlockedStatementPresent": True, |
| 62 | + "hardwareValidationImplied": False, |
| 63 | + }, |
| 64 | + "reportAudit": { |
| 65 | + "jsonReportsValid": True, |
| 66 | + "jsonReportsHashCovered": True, |
| 67 | + "supplementalReportsIndexed": True, |
| 68 | + "evidenceLedgerUpdated": True, |
| 69 | + "localAbsolutePathsAllowed": False, |
| 70 | + "hardwareValidatedTrueReports": 0, |
| 71 | + "foundryCalibratedTrueReports": 0, |
| 72 | + "measuredTransferMatrixAvailableTrueReports": 0, |
| 73 | + "productionInferenceReadyTrueReports": 0, |
| 74 | + }, |
| 75 | + "claimBoundaryAudit": { |
| 76 | + "guardScript": "scripts/check_claim_boundary.py", |
| 77 | + "unsupportedPositiveClaimsAllowed": False, |
| 78 | + "claimBoundaryAuditStatus": "enforced_in_make_check_and_ci", |
| 79 | + }, |
| 80 | + "claimBoundary": CLAIM_BOUNDARY, |
| 81 | + "knownLimitations": [ |
| 82 | + "simulation-only research framework", |
| 83 | + "no foundry-calibrated device model", |
| 84 | + "no measured HRM transfer matrix", |
| 85 | + "no end-to-end hardware inference benchmark", |
| 86 | + "no physical layout synthesis", |
| 87 | + "no hardware timing, energy, throughput, or physical accuracy measurement", |
| 88 | + "no production inference readiness", |
| 89 | + ], |
| 90 | + "recommendedNextAfterV010": [ |
| 91 | + "tag v0.1.0-rc.1 only after alpha.12 review", |
| 92 | + "keep Stage 5, Stage 6, and Stage 7 blocked until real external evidence exists", |
| 93 | + "consider optional external model-export adapters without adding a hard framework dependency", |
| 94 | + "consider larger deterministic benchmark suites while preserving CI runtime", |
| 95 | + ], |
| 96 | + "hardwareValidated": False, |
| 97 | + "foundryCalibrated": False, |
| 98 | + "measuredTransferMatrixAvailable": False, |
| 99 | + "productionInferenceReady": False, |
| 100 | + "blockers": [ |
| 101 | + "no_foundry_calibrated_device_model", |
| 102 | + "no_measured_hrm_transfer_matrix", |
| 103 | + "no_end_to_end_hardware_benchmark", |
| 104 | + ], |
| 105 | + "nextValidationGates": [ |
| 106 | + "v0.1.0-rc.1_review", |
| 107 | + "foundry_calibrated_device_model_gate", |
| 108 | + "measured_transfer_matrix_gate", |
| 109 | + "hardware_benchmark_gate", |
| 110 | + ], |
| 111 | + } |
| 112 | + |
| 113 | + |
| 114 | +def render_release_readiness_markdown(report: Dict[str, Any]) -> str: |
| 115 | + lines = [ |
| 116 | + "# v0.1.0 Release-Candidate Readiness", |
| 117 | + "", |
| 118 | + report["claimBoundary"], |
| 119 | + "", |
| 120 | + "## Completed Simulation Stages", |
| 121 | + "", |
| 122 | + "| Stage | Report | Status | Evidence Level |", |
| 123 | + "| --- | --- | --- | --- |", |
| 124 | + ] |
| 125 | + for row in report["completedSimulationStages"]: |
| 126 | + lines.append(f"| {row['stage']} | `{row['id']}` | {row['stageStatus']} | {row['evidenceLevel']} |") |
| 127 | + |
| 128 | + lines.extend([ |
| 129 | + "", |
| 130 | + "## Supplemental Reports", |
| 131 | + "", |
| 132 | + ]) |
| 133 | + for row in report["supplementalReports"]: |
| 134 | + lines.append(f"- `{row['id']}` ({row['evidenceLevel']})") |
| 135 | + |
| 136 | + lines.extend([ |
| 137 | + "", |
| 138 | + "## Blocked Hardware Gates", |
| 139 | + "", |
| 140 | + ]) |
| 141 | + for gate in report["blockedHardwareGates"]: |
| 142 | + lines.append(f"- Stage {gate['stage']} `{gate['id']}` remains {gate['stageStatus']}: {gate['blockerReason']}") |
| 143 | + |
| 144 | + lines.extend([ |
| 145 | + "", |
| 146 | + "## Verification Commands", |
| 147 | + "", |
| 148 | + ]) |
| 149 | + for command in report["verificationCommands"]: |
| 150 | + lines.append(f"- `{command}`") |
| 151 | + |
| 152 | + lines.extend([ |
| 153 | + "", |
| 154 | + "## Known Limitations", |
| 155 | + "", |
| 156 | + ]) |
| 157 | + for item in report["knownLimitations"]: |
| 158 | + lines.append(f"- {item}") |
| 159 | + |
| 160 | + lines.extend([ |
| 161 | + "", |
| 162 | + "## Recommended Next After v0.1.0", |
| 163 | + "", |
| 164 | + ]) |
| 165 | + for item in report["recommendedNextAfterV010"]: |
| 166 | + lines.append(f"- {item}") |
| 167 | + |
| 168 | + lines.append("") |
| 169 | + return "\n".join(lines) |
| 170 | + |
| 171 | + |
| 172 | +def _stage_summary(report: Dict[str, Any]) -> Dict[str, Any]: |
| 173 | + return { |
| 174 | + "stage": report["stage"], |
| 175 | + "id": report["id"], |
| 176 | + "title": report["title"], |
| 177 | + "stageStatus": report["stageStatus"], |
| 178 | + "evidenceLevel": report["evidenceLevel"], |
| 179 | + } |
| 180 | + |
| 181 | + |
| 182 | +def _supplemental_summary(report: Dict[str, Any]) -> Dict[str, Any]: |
| 183 | + return { |
| 184 | + "stage": report["stage"], |
| 185 | + "id": report["id"], |
| 186 | + "title": report["title"], |
| 187 | + "stageStatus": report["stageStatus"], |
| 188 | + "evidenceLevel": report["evidenceLevel"], |
| 189 | + } |
| 190 | + |
| 191 | + |
| 192 | +def _blocked_gate_summary(report: Dict[str, Any]) -> Dict[str, Any]: |
| 193 | + return { |
| 194 | + "stage": report["stage"], |
| 195 | + "id": report["id"], |
| 196 | + "title": report["title"], |
| 197 | + "stageStatus": report["stageStatus"], |
| 198 | + "evidenceLevel": report["evidenceLevel"], |
| 199 | + "blockerReason": report.get("blockerReason"), |
| 200 | + "blockers": report.get("blockers", []), |
| 201 | + } |
0 commit comments