chore(repo): make the release gate reproducible and clean product URLs
PyJHora absence is now partial, tests write research manifests to tmp, the registry allows experimental_variant, and product links point at the Gitea repo. Early logs move to docs/history. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -30,6 +30,7 @@ def build_capability_evidence_pool_summary(registry: dict[str, Any] | None = Non
|
||||
prediction_counts = Counter()
|
||||
primary_entries: list[str] = []
|
||||
audit_only_entries: list[str] = []
|
||||
comparison_only_entries: list[str] = []
|
||||
alias_entries: list[str] = []
|
||||
|
||||
for tech_id, tech in techniques.items():
|
||||
@@ -50,6 +51,8 @@ def build_capability_evidence_pool_summary(registry: dict[str, Any] | None = Non
|
||||
primary_entries.append(tech_id)
|
||||
elif evidence_role == "audit_only":
|
||||
audit_only_entries.append(tech_id)
|
||||
elif evidence_role == "comparison_only":
|
||||
comparison_only_entries.append(tech_id)
|
||||
elif evidence_role == "alias":
|
||||
alias_entries.append(tech_id)
|
||||
|
||||
@@ -67,12 +70,14 @@ def build_capability_evidence_pool_summary(registry: dict[str, Any] | None = Non
|
||||
"prediction_verification_counts": dict(sorted(prediction_counts.items())),
|
||||
"primary_entries": sorted(primary_entries),
|
||||
"audit_only_entries": sorted(audit_only_entries),
|
||||
"comparison_only_entries": sorted(comparison_only_entries),
|
||||
"alias_entries": sorted(alias_entries),
|
||||
"conclusion_policy": {
|
||||
"primary_chain_required": True,
|
||||
"all_89_entries_must_not_be_flattened_into_conclusions": True,
|
||||
"supporting_entries_can_only_raise_or_lower_confidence": True,
|
||||
"audit_only_entries_cannot_affect_astrological_conclusions": True,
|
||||
"comparison_only_entries_cannot_affect_astrological_conclusions": True,
|
||||
"conflicts_must_downgrade_confidence": True,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -161,6 +161,19 @@ def _relative(path: Path) -> str:
|
||||
return str(path.relative_to(ROOT))
|
||||
|
||||
|
||||
def _artifact_ref(path: Path) -> str:
|
||||
try:
|
||||
return path.resolve().relative_to(ROOT.resolve()).as_posix()
|
||||
except ValueError:
|
||||
return str(path)
|
||||
|
||||
|
||||
def _relocate_report(path: Path, output_dir: Path | None) -> Path:
|
||||
if output_dir is None:
|
||||
return path
|
||||
return Path(output_dir) / path.name
|
||||
|
||||
|
||||
def _should_skip(path: Path) -> bool:
|
||||
try:
|
||||
rel_parts = path.relative_to(ROOT).parts
|
||||
@@ -1313,9 +1326,21 @@ def main(argv: list[str] | None = None) -> int:
|
||||
)
|
||||
parser.add_argument("--no-write", action="store_true", help="Print the manifest without writing report artifacts.")
|
||||
parser.add_argument("--summary-only", action="store_true", help="Print only summary fields; still writes full artifacts unless --no-write is set.")
|
||||
parser.add_argument(
|
||||
"--output-dir",
|
||||
default="",
|
||||
help="Write report artifacts here instead of docs/research. Tests must pass a tmp directory.",
|
||||
)
|
||||
args = parser.parse_args(argv)
|
||||
|
||||
report = build_manifest(scope=args.scope, write=not args.no_write)
|
||||
report = build_manifest(scope=args.scope, write=False)
|
||||
output_dir = Path(args.output_dir) if args.output_dir else None
|
||||
json_path = _relocate_report(ROOT / report["artifacts"]["json_report"], output_dir)
|
||||
markdown_path = _relocate_report(ROOT / report["artifacts"]["markdown_report"], output_dir)
|
||||
report["artifacts"]["json_report"] = _artifact_ref(json_path)
|
||||
report["artifacts"]["markdown_report"] = _artifact_ref(markdown_path)
|
||||
if not args.no_write:
|
||||
_write_reports(report, json_report=json_path, markdown_report=markdown_path)
|
||||
printable = _summary_view(report) if args.summary_only else report
|
||||
print(json.dumps(printable, ensure_ascii=False, indent=2))
|
||||
return 0 if report["status"] == "pass" else 1
|
||||
|
||||
@@ -17,5 +17,9 @@ ROWS=[
|
||||
def build():
|
||||
return {'scope':'hard_gap_source_hunt','created_at':'2026-07-23','claim_status':'source_hunt_only','truth_matrix_allowed':False,'production_tuning_allowed':False,'rows':ROWS,'summary':{'source_count':len(ROWS),'ready_numeric_oracle_count':0,'partial_numeric_candidate_count':1,'timing_holdout_status':'blocked_until_independent_human_labels'},'next_actions':['If RoxyAPI key/terms are available, capture pinned KP /cusps raw for a public fixed chart and compare against VedicAstro observation only.','For Gulika fragment, locate place/timezone or keep candidate blocked.','For Tajika/Saham, require solar return input plus expected Saham longitude before replay.','For timing/rectification, freeze independent human labels before blind ranking.'],'boundary':'No source found in this pass satisfies complete input + expected numeric values + replay raw/hash. All hard gaps remain blocked or candidate-only.'}
|
||||
def main():
|
||||
data=build(); OUT.write_text(json.dumps(data,ensure_ascii=False,indent=2)+'\n'); print(json.dumps(data,ensure_ascii=False,indent=2)); return 0
|
||||
import argparse
|
||||
ap=argparse.ArgumentParser(); ap.add_argument('--no-write', action='store_true'); args=ap.parse_args(); data=build()
|
||||
if not args.no_write:
|
||||
OUT.write_text(json.dumps(data,ensure_ascii=False,indent=2)+'\n')
|
||||
print(json.dumps(data,ensure_ascii=False,indent=2)); return 0
|
||||
if __name__=='__main__': raise SystemExit(main())
|
||||
|
||||
@@ -17,5 +17,9 @@ ROWS=[
|
||||
def build():
|
||||
return {'scope':'numeric_oracle_gap_queue_v3','created_at':'2026-07-23','claim_status':'candidate_queue','truth_matrix_allowed':False,'production_tuning_allowed':False,'rows':ROWS,'summary':{'candidate_count':len(ROWS),'numeric_packet_ready_count':0,'partial_numeric_candidate_count':sum(r['status']=='partial_numeric_candidate' for r in ROWS),'blocked_domains':sorted(set(r['domain'] for r in ROWS))},'promotion_requirements':['complete input','expected numeric values','source URL/page/line or screenshot hash','license/copyright-safe boundary','local replay raw/hash','claim gate remains non-truth until cross-source consistency'],'boundary':'This queue records public candidates only. It does not upgrade KP, Prashna, Tajika, Saham, Gulika or Sphuta truth status.'}
|
||||
def main():
|
||||
data=build(); OUT.write_text(json.dumps(data,ensure_ascii=False,indent=2)+'\n'); print(json.dumps(data,ensure_ascii=False,indent=2)); return 0
|
||||
import argparse
|
||||
ap=argparse.ArgumentParser(); ap.add_argument('--no-write', action='store_true'); args=ap.parse_args(); data=build()
|
||||
if not args.no_write:
|
||||
OUT.write_text(json.dumps(data,ensure_ascii=False,indent=2)+'\n')
|
||||
print(json.dumps(data,ensure_ascii=False,indent=2)); return 0
|
||||
if __name__=='__main__': raise SystemExit(main())
|
||||
|
||||
@@ -19,7 +19,14 @@ from urllib import request
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
DEFAULT_GITHUB_SLUG = "732642856/yinduzhanxing"
|
||||
|
||||
|
||||
def classify_remote_provider(url: str) -> str:
|
||||
if github_slug_from_remote_url(url):
|
||||
return "github"
|
||||
if re.search(r"git\.copse\.top[:/]", url.strip()):
|
||||
return "gitea"
|
||||
return "other"
|
||||
|
||||
|
||||
def run_command(args: list[str], timeout: int) -> dict[str, Any]:
|
||||
@@ -103,21 +110,39 @@ def build_report(timeout: int) -> dict[str, Any]:
|
||||
local_branch = run_command(["git", "rev-parse", "--abbrev-ref", "HEAD"], timeout)
|
||||
local_head = run_command(["git", "rev-parse", "HEAD"], timeout)
|
||||
urls = git_remote_urls(timeout)
|
||||
slug = next((github_slug_from_remote_url(url) for url in urls if github_slug_from_remote_url(url)), DEFAULT_GITHUB_SLUG)
|
||||
git_checks = [git_ls_remote(url, timeout) for url in urls] or [git_ls_remote(f"https://github.com/{slug}.git", timeout)]
|
||||
api_check = github_api_branches(slug, timeout)
|
||||
github_slug = next((github_slug_from_remote_url(url) for url in urls if github_slug_from_remote_url(url)), None)
|
||||
providers = [classify_remote_provider(url) for url in urls]
|
||||
if "github" in providers:
|
||||
provider = "github"
|
||||
elif "gitea" in providers:
|
||||
provider = "gitea"
|
||||
else:
|
||||
provider = providers[0] if providers else "unknown"
|
||||
git_checks = [git_ls_remote(url, timeout) for url in urls]
|
||||
git_verified = any(check["ok"] and check["ref_count"] > 0 for check in git_checks)
|
||||
api_visible = api_check["ok"]
|
||||
status = "verified" if git_verified else ("web_visible_git_blocked" if api_visible else "blocked")
|
||||
if github_slug:
|
||||
api_check = github_api_branches(github_slug, timeout)
|
||||
api_visible = api_check["ok"]
|
||||
status = "verified" if git_verified else ("web_visible_git_blocked" if api_visible else "blocked")
|
||||
else:
|
||||
api_check = {
|
||||
"method": "github_api_branches",
|
||||
"url": None,
|
||||
"ok": False,
|
||||
"branches": [],
|
||||
"error": "not_github_remote",
|
||||
}
|
||||
status = "verified" if git_verified else "blocked"
|
||||
return {
|
||||
"scope": "remote_repo_visibility_check",
|
||||
"status": status,
|
||||
"provider": provider,
|
||||
"must_not_claim_synced": status != "verified",
|
||||
"local": {
|
||||
"branch": local_branch.get("stdout", "").strip(),
|
||||
"head": local_head.get("stdout", "").strip(),
|
||||
},
|
||||
"github_slug": slug,
|
||||
"github_slug": github_slug,
|
||||
"git_checks": git_checks,
|
||||
"github_api": api_check,
|
||||
}
|
||||
|
||||
@@ -122,8 +122,8 @@ RELEASE_CRITICAL_UNTRACKED_PATHS = [
|
||||
"docs/research/open_source_scan_2026_06_22.md",
|
||||
"docs/research/product_gap_matrix_2026_06_22.md",
|
||||
"docs/research/whole_machine_git_audit_2026_06_23.md",
|
||||
"findings.md",
|
||||
"progress.md",
|
||||
"docs/history/findings.md",
|
||||
"docs/history/progress.md",
|
||||
"references/oracle/dasha_shadbala_oracle_cases.json",
|
||||
"scripts/audit_fragments.py",
|
||||
"scripts/deep_varga_avastha.py",
|
||||
@@ -134,7 +134,7 @@ RELEASE_CRITICAL_UNTRACKED_PATHS = [
|
||||
"scripts/oracle_boundary_audit.py",
|
||||
"scripts/oracle_collection_queue.py",
|
||||
"scripts/oracle_evidence_validator.py",
|
||||
"task_plan.md",
|
||||
"docs/history/task_plan.md",
|
||||
"tests/test_api_server_security.py",
|
||||
"tests/test_dasha_reference_audit.py",
|
||||
"tests/test_deep_varga_avastha.py",
|
||||
|
||||
@@ -12,7 +12,7 @@ except ModuleNotFoundError: # pragma: no cover - direct script execution
|
||||
from diagnose_external_engine_adapters import build_report as external_engine_report
|
||||
|
||||
|
||||
REPO_URL = "https://github.com/732642856/yinduzhanxing"
|
||||
REPO_URL = "https://git.copse.top/root/Jyotisha"
|
||||
|
||||
|
||||
def _external_boundary() -> dict[str, Any]:
|
||||
|
||||
@@ -24,7 +24,7 @@ SKIP_NAMES = {".env", ".env.local"}
|
||||
GENERATED_DOCS = {
|
||||
"INSTALL.md": """# Jyotish Skill Install
|
||||
|
||||
Basic Git version: https://github.com/732642856/yinduzhanxing
|
||||
Basic Git version: https://git.copse.top/root/Jyotisha
|
||||
|
||||
1. Unzip this package into a local folder.
|
||||
2. Run `python3 scripts/public_release_privacy_scan.py`.
|
||||
|
||||
@@ -79,6 +79,20 @@ def _strict_summary(report: dict[str, Any]) -> dict[str, Any]:
|
||||
}
|
||||
|
||||
|
||||
def resolve_acceptance_status(errors: list[str], adapter_report: dict[str, Any]) -> str:
|
||||
"""Hard failures stay fail; a missing reference engine is a partial, not a fail."""
|
||||
if errors:
|
||||
return "fail"
|
||||
engines = adapter_report.get("engines") if isinstance(adapter_report.get("engines"), dict) else {}
|
||||
for details in engines.values():
|
||||
if not isinstance(details, dict):
|
||||
continue
|
||||
blockers = details.get("readiness_blockers") or []
|
||||
if details.get("missing_dependency") or "missing_dependency" in blockers:
|
||||
return "partial"
|
||||
return "pass"
|
||||
|
||||
|
||||
def main() -> int:
|
||||
pytest_check = _run(
|
||||
[
|
||||
@@ -162,9 +176,10 @@ def main() -> int:
|
||||
if adapter_report.get("status") not in usable_adapter_statuses:
|
||||
errors.append("external_adapter_status_unusable")
|
||||
|
||||
status = resolve_acceptance_status(errors, adapter_report)
|
||||
result = {
|
||||
"scope": "user_invocation_acceptance_check",
|
||||
"status": "pass" if not errors else "fail",
|
||||
"status": status,
|
||||
"errors": errors,
|
||||
"checks": {
|
||||
"user_invocation_tests": pytest_check["returncode"] == 0,
|
||||
@@ -177,7 +192,7 @@ def main() -> int:
|
||||
"external_engines": _engine_summary(adapter_report),
|
||||
}
|
||||
print(json.dumps(result, ensure_ascii=False, indent=2, sort_keys=True))
|
||||
return 0 if not errors else 1
|
||||
return 0 if status != "fail" else 1
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
Reference in New Issue
Block a user