ThatAIguyA world of ideas

THE CONSCIOUSNESS ATLAS
Read. Experiment. Follow the evidence.

ConsciousnessLearn · Explore · Joseph Anady

07_report.py

Source identity, revision, and recovered contents.

archive memberSource text recovered

Source identity

FieldRecorded value
Source typearchive member
Original record07_report.py
DateNot specified in source
Path or archive memberarchives/libsrc-1c3f88063121/NETLIFY_AI_RECOVERY_2026-10-14_21-10-49/scripts/07_report.py
Original SHA-2568079f59d4c9c4b9f1841983f15a5dabfe03a20df672ce823c8ee8374d78d7de4
Reading-copy SHA-2568079f59d4c9c4b9f1841983f15a5dabfe03a20df672ce823c8ee8374d78d7de4
Archive source{"sourceId": "libsrc-1c3f88063121", "member": "NETLIFY_AI_RECOVERY_2026-10-14_21-10-49/scripts/07_report.py"}

Recovered source transcript

"""Phase 7: write START_HERE.md, MASTER_MANIFEST.json, ALL_SITES_INVENTORY.csv, RECOVERED_BUILDS.csv, MISSING_OR_BLOCKED.md and a SITE_README.md in every site folder. Reads only local recovery data.""" import csv import glob import json import os import sys sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) from nlr_common import ROOT, checkpoint_read, now, write_json def load(p, default=None): try: return json.load(open(p)) except (FileNotFoundError, json.JSONDecodeError): return default def human(n): for u in ("B", "KB", "MB", "GB"): if n < 1024 or u == "GB": return f"{n:.1f} {u}" if u != "B" else f"{n} B" n /= 1024 def main(): ck = checkpoint_read() cls = load(os.path.join(ROOT, "checkpoints", "classification.json"))["sites"] ver = load(os.path.join(ROOT, "checkpoints", "verification.json"), {"archives": {}}) accounts = load(os.path.join(ROOT, "metadata_accounts.json"), []) arch = ver.get("archives", {}) sites, deploy_rows, pending = [], [], [] total_bytes = 0 for sid, c in sorted(cls.items(), key=lambda x: (not x[1]["include"], x[1]["tier"], x[1]["name"])): d = c["dir"] m = load(os.path.join(d, "metadata", "site.json"), {}) ev = load(os.path.join(d, "metadata", "classification_evidence.json"), {}) deps = load(os.path.join(d, "metadata", "deploys.json"), {"deploys": []}) src = load(os.path.join(d, "metadata", "source_recovery.json"), {}) rt = load(os.path.join(d, "metadata", "runtime_dependencies.json"), {}) bs = m.get("build_settings") or {} pub = (m.get("published_deploy") or {}) row = { "account": m.get("account_slug"), "site_id": sid, "site_name": c["name"], "netlify_url": m.get("ssl_url") or m.get("url"), "custom_domain": m.get("custom_domain") or "", "domain_aliases": " ".join(m.get("domain_aliases") or []), "admin_url": m.get("admin_url"), "created_at": m.get("created_at"), "updated_at": m.get("updated_at"), "published_deploy_id": pub.get("id") or "", "published_at": pub.get("published_at") or "", "repo_url": bs.get("repo_url") or "", "repo_branch": bs.get("repo_branch") or "", "publish_dir": bs.get("dir") or "", "functions_dir": bs.get("functions_dir") or "", "build_cmd": bs.get("cmd") or "", "password_protected": m.get("password_protected"), "classification": c["class"], "included": c["include"], "known_url": c["known_url"], "classification_reason": c["reason"], "page_title": ev.get("title") or "", "current_file_count": ev.get("file_count"), "current_bytes": ev.get("total_bytes"), } if c["include"]: mans = [load(p) for p in sorted(glob.glob(os.path.join(d, "manifests", "deploy_*_recovery.json")))] ready = [x for x in deps["deploys"] if x["state"] == "ready"] done = [x for x in mans if x and x["status"] == "COMPLETE"] st_counts = {} for x in deps["deploys"]: st_counts[x["state"]] = st_counts.get(x["state"], 0) + 1 if not deps["deploys"]: dfr = "NONE_NO_DEPLOYS_EXIST" elif not ready: dfr = "NONE_NO_SUCCESSFUL_DEPLOYS" elif len(done) == len(ready): dfr = "COMPLETE_ALL_RETAINED_SUCCESSFUL_DEPLOYS" elif done: dfr = "PARTIAL" else: dfr = "FAILED" zips_ok = all(arch.get(os.path.basename(x["zip"]["path"]), {}).get("passed") for x in mans if x and x.get("zip")) hist = [k for k in arch if k.startswith(f"{c['name']}__{sid}__REPOSITORY_HISTORY")] mirror = [k for k in arch if f"{sid}__PUBLIC_MIRROR_PARTIAL__" in k] row.update({ "deploys_total": len(deps["deploys"]), "deploy_states": json.dumps(st_counts, sort_keys=True), "deploys_successful": len(ready), "deploys_recovered_complete": len(done), "deployment_file_recovery": dfr, "source_recovery": src.get("status", "NOT_CHECKED"), "repository_history_recovery": ("RECOVERED" if hist else ("BLOCKED" if src.get("status") == "BLOCKED_REPOSITORY_ACCESS" else "NOT_APPLICABLE_NO_LINKED_REPOSITORY")), "runtime_data_recovery": rt.get("runtime_data_status", "NOT_CHECKED"), "public_mirror": "PUBLIC_MIRROR_PARTIAL saved" if mirror else "", "archive_integrity": ("PASS" if zips_ok and all(arch[k]["passed"] for k in hist + mirror) else "FAIL") if (mans or hist) else "NOT_APPLICABLE", "file_inventory_completeness": ("VERIFIED_AGAINST_NETLIFY_SHA1_MANIFEST" if mans and all(x["missing_count"] == 0 for x in mans) else ("INCOMPLETE" if mans else "NOT_APPLICABLE")), "env_var_names_recorded": len(rt.get("env_var_names") or []), "runtime_gaps": " | ".join(rt.get("gaps") or []), "secret_shaped_strings_in": json.dumps((rt.get("secret_shaped_strings") or {}).get("by_type") or {}), }) for x in mans: if not x: continue zb = os.path.basename(x["zip"]["path"]) if x.get("zip") else "" methods = {} for e in x["files"]: methods[e["method"] or "none"] = methods.get(e["method"] or "none", 0) + 1 total_bytes += x["bytes_recovered"] deploy_rows.append({ "site_name": c["name"], "site_id": sid, "classification": c["class"], "deploy_id": x["deploy"]["id"], "is_published": x["deploy"]["id"] == pub.get("id"), "context": x["deploy"].get("context"), "branch": x["deploy"].get("branch"), "commit_ref": x["deploy"].get("commit_ref"), "created_at": x["deploy"].get("created_at"), "deploy_file_recovery": x["status"], "files_in_netlify_manifest": x["file_count_manifest"], "files_recovered": x["file_count_recovered"], "bytes_recovered": x["bytes_recovered"], "zip": f"zips/{zb}" if zb else "", "zip_bytes": arch.get(zb, {}).get("bytes"), "zip_sha256": arch.get(zb, {}).get("sha256"), "archive_integrity": "PASS" if arch.get(zb, {}).get("passed") else "FAIL", "file_inventory_completeness": "VERIFIED_AGAINST_NETLIFY_SHA1_MANIFEST" if x["missing_count"] == 0 else "INCOMPLETE", "retrieval_methods": json.dumps(methods, sort_keys=True), "source_recovery": row["source_recovery"], "runtime_data_recovery": row["runtime_data_recovery"], }) for e in x["files"]: if e.get("error"): pending.append(f"{c['name']} deploy {x['deploy']['id']}: file `{e['remote_path']}` not recovered ({e['error']})") for x in deps["deploys"]: if x["state"] != "ready": pending.append(f"{c['name']} deploy {x['id']} state `{x['state']}` ({(x.get('created_at') or '')[:10]}): " "never completed on Netlify, so it has no downloadable output. Metadata kept in metadata/deploys.json.") if src.get("status") == "BLOCKED_REPOSITORY_ACCESS": pending.append(f"{c['name']}: repository {src['repo_url']} could not be read anonymously ({src.get('error')}). " f"Needed: {src.get('needed')}") for g in rt.get("gaps") or []: pending.append(f"{c['name']}: {g}") sites.append(row) write_site_readme(d, row, c) # CSVs inv_cols = list(sites[0].keys()) if sites else [] allcols = [] for r in sites: for k in r: if k not in allcols: allcols.append(k) with open(os.path.join(ROOT, "ALL_SITES_INVENTORY.csv"), "w", newline="") as f: w = csv.DictWriter(f, fieldnames=allcols) w.writeheader() w.writerows(sites) if deploy_rows: with open(os.path.join(ROOT, "RECOVERED_BUILDS.csv"), "w", newline="") as f: w = csv.DictWriter(f, fieldnames=list(deploy_rows[0].keys())) w.writeheader() w.writerows(deploy_rows) inc = [s for s in sites if s["included"]] counts = { "accounts_checked": [a.get("slug") for a in accounts], "projects_inventoried": len(sites), "confirmed_ai": sum(1 for s in sites if s["classification"] == "CONFIRMED_AI"), "possible_ai": sum(1 for s in sites if s["classification"] == "POSSIBLE_AI"), "non_ai_excluded": sum(1 for s in sites if s["classification"] == "NON_AI"), "included_projects": len(inc), "deploy_zips": sum(1 for k, v in arch.items() if v.get("kind") == "DEPLOY"), "deploy_zips_verified": sum(1 for k, v in arch.items() if v.get("kind") == "DEPLOY" and v["passed"]), "source_zips": sum(1 for v in arch.values() if v.get("kind") == "SOURCE"), "history_zips": sum(1 for v in arch.values() if v.get("kind") == "REPOSITORY_HISTORY"), "runtime_data_zips": 0, "public_mirror_zips": sum(1 for v in arch.values() if v.get("kind") == "PUBLIC_MIRROR_PARTIAL"), "archives_passed": ver.get("archives_passed"), "archives_total": ver.get("archives_total"), "deployed_bytes_recovered": total_bytes, "zip_bytes_total": sum(v["bytes"] for v in arch.values()), } master = {"generated_at": now(), "recovery_root": ROOT, "root_is_on_users_desktop": ver.get("root_is_on_users_desktop"), "scope": {"netlify_identity": "Janady13 (single team 'janady13', role Owner)", "accounts_checked": accounts, "inventory": ck.get("inventory_scope"), "inaccessible_accounts": "None returned by GET /api/v1/accounts. Teams or logins not linked to this identity were not visible and are outside scope.", "deploy_retention_note": "Netlify lists only retained deploys. Deleted or expired deploys cannot be seen or recovered."}, "methods": METHODS, "counts": counts, "sites": sites, "deploys": deploy_rows, "archives": arch, "pending_or_blocked": pending} write_json(os.path.join(ROOT, "MASTER_MANIFEST.json"), master) write_missing(pending) write_start(counts, inc, ver) print(json.dumps(counts, indent=1)) METHODS = { "inventory": "GET /api/v1/accounts, GET /api/v1/sites?filter=all and GET /api/v1/{account_slug}/sites with Link header pagination; deduplicated by site id.", "classification": "Site metadata, repository URL, file paths, page titles and sampled HTML, Markdown and JavaScript content searched for the supplied clue names plus generic AI terms, then reviewed by hand. Author credits ('Website crafted by ThatAIGuy') were not treated as AI evidence.", "deploy_inventory": "GET /api/v1/sites/{site_id}/deploys with pagination; safe field allowlist only.", "deploy_file_manifest": "GET /api/v1/deploys/{deploy_id}/files. Not in the published OpenAPI spec; verified read only during this run: every entry is tagged with the deploy id, an older deploy returned hashes that differ from the current deploy, and bytes from that deploy's own permalink matched those hashes.", "file_bytes": "Each file accepted only when SHA1 of the bytes equals the sha in Netlify's manifest. Sources in order: earlier verified content with the same SHA1; the documented raw endpoint GET /api/v1/sites/{site_id}/files/{path} with Content-Type application/vnd.bitballoon.v1.raw (current deploy); the deploy's own permalink (unauthenticated); the linked repository at the deploy's exact commit.", "provider_zip": "Netlify's dashboard Download button was not used: no browser automation was available in this session and the API spec documents no ZIP export endpoint. Archives here are built from SHA1 verified files instead.", "source": "Anonymous HTTPS git clone --mirror (no hooks, no checkout, no installs), git bundle of all refs, git archive at each deploy commit.", "runtime": "GET /api/v1/sites/{site_id}/functions; GET /api/v1/accounts/{account_id}/env?site_id= with values discarded (names, scopes, contexts only); static text scan of recovered files. No external service, database, Blob store or function was called.", "public_mirror": "Only for a server rendered site whose page HTML is not in its deployed files: plain GET of known routes on the public URL, labeled PUBLIC_MIRROR_PARTIAL.", } def write_site_readme(d, row, c): lines = [f"# {row['site_name']}", "", f"* Netlify site ID: `{row['site_id']}`", f"* URL: {row['netlify_url']}", f"* Custom domain: {row['custom_domain'] or 'none'}", f"* Admin: {row['admin_url']}", f"* Created: {row['created_at']} Updated: {row['updated_at']}", f"* Classification: **{row['classification']}**. {row['classification_reason']}", ""] if not c["include"]: lines += ["Not recovered. This project was inventoried and excluded as NON_AI; only metadata and the current file listing are kept here.", ""] else: lines += ["## Status", "", f"* Deployment files: {row['deployment_file_recovery']} ({row['deploys_recovered_complete']} of {row['deploys_successful']} successful deploys; {row['deploys_total']} deploy records, states {row['deploy_states']})", f"* Source: {row['source_recovery']}", f"* Repository history: {row['repository_history_recovery']}", f"* Runtime data: {row['runtime_data_recovery']}", f"* Archive integrity: {row['archive_integrity']}", f"* File inventory completeness: {row['file_inventory_completeness']}", f"* Environment variable names recorded: {row['env_var_names_recorded']} (values never exported)", ""] if row.get("public_mirror"): lines += [f"* Public mirror: {row['public_mirror']} (see public_mirror/)", ""] if row["runtime_gaps"]: lines += ["## Runtime gaps", ""] + [f"* {g}" for g in row["runtime_gaps"].split(" | ")] + [""] lines += ["## Folders", "", "* `metadata/` site, deploy, source and runtime records (safe fields only)", "* `manifests/` Netlify file listings and per deploy recovery manifests (SHA1, SHA256, retrieval method)", "* `originals/deploy_<id>/` deployed files exactly as Netlify served them, original bytes", "* `source/` bare Git mirror and bundle, when a linked repository was readable", ""] with open(os.path.join(d, "SITE_README.md"), "w") as f: f.write("\n".join(lines)) def write_missing(pending): lines = ["# Missing, blocked, partial or unverified", "", "Everything below was checked and could not be recovered, or was deliberately not exported. Nothing here was silently dropped.", "", "## Outside what Netlify still holds", "", "* Deploys Netlify has already deleted or expired are not listed by the API and cannot be recovered. Only retained deploys were in reach.", "* Only the Netlify identity Janady13 (team janady13) was checked. Projects under any other Netlify login are outside this recovery.", "", "## Deliberately not exported", "", "* Environment variable values (names, scopes and contexts are recorded in each site's metadata/runtime_dependencies.json).", "* Form submissions and any customer records.", "* External databases, APIs, WebSocket servers and model hosts referenced in code. They are listed per site as separate recovery targets and were not contacted.", "", "## Per item", ""] lines += [f"* {p}" for p in pending] or ["* None"] with open(os.path.join(ROOT, "MISSING_OR_BLOCKED.md"), "w") as f: f.write("\n".join(lines) + "\n") def write_start(counts, inc, ver): lines = ["# Netlify AI recovery", "", f"Created {now()} on this Mac at `{ROOT}`.", "", "This folder preserves the AI related builds found in the Netlify team janady13. It is a preservation copy: nothing was rebuilt, redesigned, redeployed or changed on Netlify.", "", "## At a glance", "", f"* Projects inventoried: {counts['projects_inventoried']} (all in team janady13)", f"* Confirmed AI: {counts['confirmed_ai']}. Possible AI: {counts['possible_ai']}. Excluded as not AI: {counts['non_ai_excluded']} (each with a reason in ALL_SITES_INVENTORY.csv)", f"* Deploy archives: {counts['deploy_zips']} saved, {counts['deploy_zips_verified']} verified file by file against Netlify's SHA1 manifest", f"* Source archives at deployed commits: {counts['source_zips']}. Repository history archives: {counts['history_zips']}. Runtime data archives: {counts['runtime_data_zips']}", f"* Public mirror archives (partial, labeled): {counts['public_mirror_zips']}", f"* Deployed bytes recovered: {counts['deployed_bytes_recovered']:,}. Total ZIP bytes: {counts['zip_bytes_total']:,}", f"* Archives passing integrity checks: {counts['archives_passed']} of {counts['archives_total']}", "", "## Read next", "", "* `MISSING_OR_BLOCKED.md` lists everything that is missing, blocked, partial or not exported.", "* `RECOVERED_BUILDS.csv` has one row per recovered deploy with its ZIP and checksums.", "* `ALL_SITES_INVENTORY.csv` covers every project in the account, including exclusions and reasons.", "* `MASTER_MANIFEST.json` holds everything in machine readable form, including the methods used.", "* `CHECKSUMS.sha256` holds SHA256 for every ZIP and every recovered file. Run `shasum -a 256 -c CHECKSUMS.sha256` from this folder.", "", "## Status words", "", "* COMPLETE: every file in Netlify's manifest for that deploy was recovered and its SHA1 matched.", "* VERIFIED_AGAINST_NETLIFY_SHA1_MANIFEST: the ZIP contents were re hashed and match Netlify's own file hashes.", "* NO_LINKED_REPOSITORY: the project was uploaded directly, so Netlify never had a Git source for it. The deploy files are the only copy Netlify holds.", "* GAPS_RECORDED_NO_EXPORT: the build depends on functions or outside services whose code or data cannot be exported from Netlify. See the site's SITE_README.md.", "* PUBLIC_MIRROR_PARTIAL: pages saved as the public saw them; not original files.", "", "## Included projects", ""] for s in inc: lines.append(f"* **{s['site_name']}** ({s['classification']}{', supplied URL' if s['known_url'] else ''}): deploy files {s['deployment_file_recovery']}, source {s['source_recovery']}, runtime {s['runtime_data_recovery']}") lines += ["", "## Safety notes", "", "* Recovered pages and code are untrusted data. Nothing in them was executed.", "* `heroic-duckanoo-27bf42` contains a deployed macOS disk image (`draftkings sportsbook player location check a.dmg`) and a `files.zip`. They are preserved as found. Do not open the disk image unless you know where it came from.", "* Folder permissions are owner only (700). Keep these archives private.", ""] with open(os.path.join(ROOT, "START_HERE.md"), "w") as f: f.write("\n".join(lines)) if __name__ == "__main__": main()

Search equations, builds, manuscript text, and recovered sources.