From caf626ad1a093a2a69bd01732678d49371114668 Mon Sep 17 00:00:00 2001 From: loggger101 Date: Tue, 1 Dec 2026 17:14:56 -0500 Subject: [PATCH 1/2] Keep the freshness tests off the catalog's release dates, and flag a footer belt the paper has moved past Two test_tools.py cases about missed weeks also ran check_catalog_counted, so every new AsteroidCatalog release turned CI red on the next unrelated push (the weekly bot commits the new manifest but runs no tests), as it did today. They now check only the dates; the catalog check keeps its own cases. The footer's and banner's belt is binned by hand from the release the paper pins, but nothing compared the two: a re-pinned paper would move the tile and the crossover chart and leave the belt on the old release. refresh_counts.py now keeps the pin from summary.json, and check.py --fresh flags a belt binned from another release. Co-Authored-By: Claude Opus 5.5 --- tools/README.md | 4 +++- tools/check.py | 22 ++++++++++++++++++++-- tools/refresh_counts.py | 11 ++++++++--- tools/test_tools.py | 20 ++++++++++++++++++-- 4 files changed, 49 insertions(+), 8 deletions(-) diff --git a/tools/README.md b/tools/README.md index 071f130..26b34ad 100644 --- a/tools/README.md +++ b/tools/README.md @@ -128,7 +128,9 @@ semimajor axes, so the Kirkwood gaps open at 2.50, 2.82, 2.95 and 3.27 au, over as bright as the belt is dense. Each point is gold or blue by the share of bright and dark bodies (p_V 0.10, as in asteroid-belt-gradient's `albedo.py`) with a measured albedo at its distance. `belt_profile.py` bins the release into `belt_profile.json`, which `footer.py` -reads, so CI can redraw the footer without the catalog. +reads, so CI can redraw the footer without the catalog. `refresh_counts.py` keeps the +release the paper's `summary.json` pins, and `check.py --fresh` turns red when it isn't the +one `belt_profile.json` was binned from, so a re-pinned paper can't leave the belt behind. `gallery.py` reads each project's images from the local clones under the `GitHub` folder this repo sits in and needs Pillow and numpy. The satellite, Mars and diff --git a/tools/check.py b/tools/check.py index a2e4c17..60b6b9e 100644 --- a/tools/check.py +++ b/tools/check.py @@ -369,8 +369,9 @@ def check_facts(fetch=readme_of): def check_fresh(today=None, readme=None): - """The flyby chart, the activity data and the badges are no older than FRESH_DAYS, and - no phrase in DATED has outlived its day.""" + """The flyby chart, the activity data and the badges are no older than FRESH_DAYS, no + phrase in DATED has outlived its day, and the two catalog counts made by hand (the + coverage chart's, the belt's) are of the releases they should be.""" import datetime as dt today = today or dt.datetime.now(dt.timezone.utc).date() readme = (ROOT / "README.md").read_text(encoding="utf-8") if readme is None else readme @@ -385,6 +386,23 @@ def check_fresh(today=None, readme=None): if age > FRESH_DAYS: problems.append(f"{what} was last refreshed on {day}, {age} days ago: is {step} failing in the weekly workflow?") check_catalog_counted(counts["catalog"]["release"]) + check_belt_pinned(counts["belt"].get("release")) + + +def check_belt_pinned(pinned, binned=None): + """The footer's and banner's belt (belt_profile.json, binned by hand) comes from the + release the paper pins. The weekly refresh reads that pin from the paper's summary.json, + so a re-pinned paper, whose numbers the tile and the crossover chart follow at once, + can't leave the belt drawn from the old release unnoticed.""" + if binned is None: + binned = json.loads((TOOLS / "belt_profile.json").read_text(encoding="utf-8"))["release"] + binned = binned.removeprefix("asteroid_catalog_") + if pinned is None: + problems.append("tools/counts.json doesn't say which catalog release the paper pins: rerun refresh_counts.py") + elif pinned != binned: + problems.append(f"asteroid-belt-gradient now pins {pinned}, but the footer's belt is binned from {binned}: " + "put that release's parquet in the paper's data/, set RELEASE in belt_profile.py and rerun it, " + "then banner.py and footer.py") def check_catalog_counted(latest, counted=None): diff --git a/tools/refresh_counts.py b/tools/refresh_counts.py index fb7f412..a37ec42 100644 --- a/tools/refresh_counts.py +++ b/tools/refresh_counts.py @@ -164,22 +164,27 @@ def research(registry): def crossovers(summary): - """The paper's sample and S/C crossover fits, in its order: {classified, snow_line_au, - crossover: [{sample, a50, lo, hi, width, n}]}, the raw count first.""" + """The paper's sample and S/C crossover fits, in its order: {classified, release, + snow_line_au, crossover: [{sample, a50, lo, hi, width, n}]}, the raw count first. release + is the AsteroidCatalog release the paper pins, which the footer's belt is binned from + (check.py --fresh compares them).""" try: data = json.loads(summary) fits = [{"sample": sample, "a50": f["a50"], "lo": f["a50_lo"], "hi": f["a50_hi"], "width": f["width_10_90"], "n": int(f["n"])} for sample, f in data["crossover"].items()] snow = float(data["snow_line_au"]) classified = int(data["catalog"]["taxonomy_tier"]) + release = data["catalog"]["release"] except (ValueError, KeyError, TypeError, AttributeError) as e: sys.exit(f"asteroid-belt-gradient's summary.json no longer has its crossover fits in the form expected: {e!r}") + if not (isinstance(release, str) and release.startswith("data-")): + sys.exit(f"asteroid-belt-gradient's summary.json pins {release!r}, not an AsteroidCatalog data- release") if len(fits) < 2 or fits[0]["sample"] != "raw" or not all(1.5 < f["lo"] <= f["a50"] <= f["hi"] < 4 and f["width"] > 0 for f in fits): sys.exit(f"asteroid-belt-gradient's crossover fits don't look right: {fits}") if classified < 10_000: sys.exit(f"asteroid-belt-gradient's summary.json says {classified} classified asteroids; refusing to publish that") - return {"classified": classified, "snow_line_au": snow, "crossover": fits} + return {"classified": classified, "release": release, "snow_line_au": snow, "crossover": fits} SPACEVALUE = "https://github.com/loggger101/spacevalue/releases/download" diff --git a/tools/test_tools.py b/tools/test_tools.py index d3f7572..92cf97b 100644 --- a/tools/test_tools.py +++ b/tools/test_tools.py @@ -139,12 +139,14 @@ def stops(name, f, *args): # The paper's crossover fits (refresh_counts.py) and what the chart says of them (crossover.py), # so a rerun that moves the turn past the snow line, or narrows it, can't leave the old words. FIT = lambda a50, width: {"a50": a50, "a50_lo": a50 - 0.02, "a50_hi": a50 + 0.02, "width_10_90": width, "n": 300.0} -SUMMARY = json.dumps({"catalog": {"taxonomy_tier": 161659}, "snow_line_au": 2.674, "crossover": {"raw": FIT(2.8407, 1.7168), "collapsed, D≥53 km": FIT(2.4724, 1.3763)}}) +SUMMARY = json.dumps({"catalog": {"taxonomy_tier": 161659, "release": "data-2026-09-29c"}, "snow_line_au": 2.674, "crossover": {"raw": FIT(2.8407, 1.7168), "collapsed, D≥53 km": FIT(2.4724, 1.3763)}}) eq("fits read", rc.crossovers(SUMMARY), - {"classified": 161659, "snow_line_au": 2.674, "crossover": [ + {"classified": 161659, "release": "data-2026-09-29c", "snow_line_au": 2.674, "crossover": [ {"sample": "raw", "a50": 2.8407, "lo": 2.8207, "hi": 2.8607, "width": 1.7168, "n": 300}, {"sample": "collapsed, D≥53 km", "a50": 2.4724, "lo": 2.4524, "hi": 2.4924, "width": 1.3763, "n": 300}]}) stops("fits gone", rc.crossovers, json.dumps({"snow_line_au": 2.674})) +stops("no pinned release", rc.crossovers, SUMMARY.replace(', "release": "data-2026-09-29c"', "")) +stops("pin not a data- release", rc.crossovers, SUMMARY.replace("data-2026-09-29c", "v1.8.1")) stops("raw not first", rc.crossovers, json.dumps({"snow_line_au": 2.674, "crossover": {"x": FIT(2.4, 1.4), "raw": FIT(2.8, 1.7)}})) stops("fit off the belt", rc.crossovers, json.dumps({"snow_line_au": 2.674, "crossover": {"raw": FIT(2.8, 1.7), "y": FIT(7.0, 1.4)}})) co = load("crossover") @@ -355,6 +357,10 @@ def badge(label): # Freshness (check.py --fresh): a missed week is flagged, a normal Monday isn't. data = json.loads((TOOLS / "counts.json").read_text(encoding="utf-8")) oldest = min(dt.date.fromisoformat(d) for d in (data["flybys"]["from"], data["activity"]["as_of"], data["badges"]["as_of"])) +# Only the dates here: whether the catalog counts made by hand are current depends on what has +# been released since, and has its own cases below, so a new catalog release can't turn these red. +hand_counted = ck.check_catalog_counted, ck.check_belt_pinned +ck.check_catalog_counted = ck.check_belt_pinned = lambda *a, **kw: None ck.problems.clear() ck.check_fresh(today=oldest + dt.timedelta(days=7), readme="") eq("a week on: fresh", ck.problems, []) @@ -362,6 +368,7 @@ def badge(label): ck.check_fresh(today=oldest + dt.timedelta(days=15), readme="") eq("two weeks on: all three flagged", len(ck.problems), 3) ck.problems.clear() +ck.check_catalog_counted, ck.check_belt_pinned = hand_counted # A dated phrase is fine through its last day and flagged the day after, unless it's gone. phrase, last = next(iter(ck.DATED.items())) last = dt.date.fromisoformat(last) @@ -380,6 +387,15 @@ def badge(label): ck.check_catalog_counted("data-2026-12-04", counted="data-2026-11-13") eq("a newer release flagged", ["data-2026-12-04" in p and "catalog_profile.py" in p for p in ck.problems], [True]) ck.problems.clear() +# The footer's belt, binned by hand, is flagged once the paper pins another release. +ck.check_belt_pinned("data-2026-09-29c", binned="asteroid_catalog_data-2026-09-29c") +eq("belt binned from the paper's release", ck.problems, []) +ck.check_belt_pinned("data-2026-12-01", binned="asteroid_catalog_data-2026-09-29c") +eq("a re-pinned paper flagged", ["data-2026-12-01" in p and "belt_profile.py" in p for p in ck.problems], [True]) +ck.problems.clear() +ck.check_belt_pinned(None, binned="asteroid_catalog_data-2026-09-29c") +eq("an unknown pin flagged", ["refresh_counts.py" in p for p in ck.problems], [True]) +ck.problems.clear() # Quoted figures (check.py FACTS): the README holds each phrase; a source that drops its # figure, or can't be read, is reported. From 052abc2ccdf6555fa02c3280580b154720ea6f52 Mon Sep 17 00:00:00 2001 From: loggger101 Date: Tue, 1 Dec 2026 17:14:56 -0500 Subject: [PATCH 2/2] Refresh the profile's counts, with General_Research's 2,059 sources Co-Authored-By: Claude Opus 5.5 --- README.md | 6 ++-- docs/sources-compact.svg | 54 ++++++++++++++--------------- docs/sources.svg | 62 +++++++++++++++++----------------- docs/stats/sources-compact.svg | 10 +++--- docs/stats/sources.svg | 18 +++++----- tools/counts.json | 17 +++++----- 6 files changed, 84 insertions(+), 83 deletions(-) diff --git a/README.md b/README.md index 9f0fb01..7cc2f26 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Outside of school I'm CTO of [AspireCURES](https://www.aspirecures.com), a compa

1.59M asteroids cataloged (AsteroidCatalog) 161,659 classified asteroids analyzed (asteroid-belt-gradient) - 1,930 research sources (General_Research) + 2,059 research sources (General_Research) 256 agent skills (Hermes_Skills)

@@ -98,10 +98,10 @@ The first five repos work together to estimate whether an uncrewed asteroid mini Where the asteroid-mining pipeline stands: no destination breaks even yet. Cost per dollar earned, best mission and median asteroid, from economicspace's latest full-catalog runs: Mars surface 1.09× (2015 DS (X)), median 2.02×; Lunar surface 2.94× (2005 QP87 (X)), median 8.25×; Mars orbit 4.59× (350751 (B)), median 13.9×; Cislunar 4.84× (2018 DT (M)), median 20.9×; GEO 6.86× (2016 GS2 (D)), median 93.0×; LEO 17.0× (2005 QP87 (X)), median 60.5×; Earth surface 6,154× (2018 DT (M)), median 24,301×.

-**What it rests on.** The 1,930 sources in General_Research, in 30 domains, one bar for each, split by authority: T1 peer-reviewed papers, T2 NASA, ESA and AIAA reports, T3 government data with a DOI, and T4 grey sources such as company documents, price pages and my own audit records of pinned code. 41% are T1 or T2. The biggest, launch economics with 358, is mostly grey sources (267). +**What it rests on.** The 2,059 sources in General_Research, in 30 domains, one bar for each, split by authority: T1 peer-reviewed papers, T2 NASA, ESA and AIAA reports, T3 government data with a DOI, and T4 grey sources such as company documents, price pages and my own audit records of pinned code. 41% are T1 or T2. The biggest, launch economics with 358, is mostly grey sources (267).

- What the asteroid-mining pipeline's numbers rest on: 1,930 sources in General_Research, in 30 domains, by tier (T1 journal papers, T2 agency reports, T3 government data, T4 grey sources): Launch economics 358 (7 T1, 48 T2, 36 T3, 267 T4); Δv and propulsion 227 (19 T1, 84 T2, 10 T3, 114 T4); Composition and value 222 (89 T1, 14 T2, 14 T3, 105 T4); Density and population 140 (84 T1, 3 T2, 15 T3, 38 T4); In-space demand 93 (12 T1, 24 T2, 6 T3, 51 T4); Excavation, beneficiation 92 (21 T1, 25 T2, 1 T3, 45 T4); Destination environments 82 (25 T1, 9 T2, 21 T3, 27 T4); Commodity prices 78 (3 T1, 5 T2, 26 T3, 44 T4); Propellant prices 78 (5 T1, 11 T2, 14 T3, 48 T4); Storage and energy 71 (3 T1, 38 T2, 30 T4); Reliability, service life 70 (12 T1, 27 T2, 2 T3, 29 T4); Mass and cost estimates 61 (2 T1, 23 T2, 3 T3, 33 T4); In-space operations 40 (4 T1, 17 T2, 3 T3, 16 T4); Electric propulsion 40 (1 T1, 20 T2, 4 T3, 15 T4); Astrodynamics software 38 (1 T2, 5 T3, 32 T4); Volatiles and chemicals 30 (2 T1, 20 T2, 8 T4); Launch vehicles, engines 23 (4 T1, 17 T2, 2 T4); Aerocapture, aerobraking 23 (1 T1, 18 T2, 1 T3, 3 T4); Orbital debris 19 (2 T1, 16 T2, 1 T3); Capital and insurance 18 (2 T1, 3 T2, 6 T3, 7 T4); Operations and comms 17 (1 T1, 10 T2, 6 T4); Radiation shielding 17 (16 T2, 1 T4); Licensing and space law 15 (1 T1, 2 T2, 10 T3, 2 T4); In-space manufacturing 14 (2 T1, 5 T2, 1 T3, 6 T4); Delivery and EDL survival 13 (8 T2, 1 T3, 4 T4); Refining terms 12 (2 T1, 3 T2, 6 T3, 1 T4); Mission and program costs 11 (5 T2, 2 T3, 4 T4); Cost indices 11 (7 T3, 4 T4); Earlier economic studies 9 (3 T1, 6 T2); NEA accessibility 8 (1 T1, 5 T2, 2 T3). + What the asteroid-mining pipeline's numbers rest on: 2,059 sources in General_Research, in 30 domains, by tier (T1 journal papers, T2 agency reports, T3 government data, T4 grey sources): Launch economics 358 (7 T1, 48 T2, 36 T3, 267 T4); Composition and value 244 (98 T1, 15 T2, 14 T3, 117 T4); Δv and propulsion 227 (19 T1, 84 T2, 10 T3, 114 T4); In-space demand 200 (32 T1, 43 T2, 14 T3, 111 T4); Density and population 140 (84 T1, 3 T2, 15 T3, 38 T4); Excavation, beneficiation 92 (21 T1, 25 T2, 1 T3, 45 T4); Destination environments 82 (25 T1, 9 T2, 21 T3, 27 T4); Commodity prices 78 (3 T1, 5 T2, 26 T3, 44 T4); Propellant prices 78 (5 T1, 11 T2, 14 T3, 48 T4); Storage and energy 71 (3 T1, 38 T2, 30 T4); Reliability, service life 70 (12 T1, 27 T2, 2 T3, 29 T4); Mass and cost estimates 61 (2 T1, 23 T2, 3 T3, 33 T4); In-space operations 40 (4 T1, 17 T2, 3 T3, 16 T4); Electric propulsion 40 (1 T1, 20 T2, 4 T3, 15 T4); Astrodynamics software 38 (1 T2, 5 T3, 32 T4); Volatiles and chemicals 30 (2 T1, 20 T2, 8 T4); Launch vehicles, engines 23 (4 T1, 17 T2, 2 T4); Aerocapture, aerobraking 23 (1 T1, 18 T2, 1 T3, 3 T4); Orbital debris 19 (2 T1, 16 T2, 1 T3); Capital and insurance 18 (2 T1, 3 T2, 6 T3, 7 T4); Operations and comms 17 (1 T1, 10 T2, 6 T4); Radiation shielding 17 (16 T2, 1 T4); Licensing and space law 15 (1 T1, 2 T2, 10 T3, 2 T4); In-space manufacturing 14 (2 T1, 5 T2, 1 T3, 6 T4); Delivery and EDL survival 13 (8 T2, 1 T3, 4 T4); Refining terms 12 (2 T1, 3 T2, 6 T3, 1 T4); Mission and program costs 11 (5 T2, 2 T3, 4 T4); Cost indices 11 (7 T3, 4 T4); Earlier economic studies 9 (3 T1, 6 T2); NEA accessibility 8 (1 T1, 5 T2, 2 T3).

### Planetary science diff --git a/docs/sources-compact.svg b/docs/sources-compact.svg index 6e18b3e..0c23ca4 100644 --- a/docs/sources-compact.svg +++ b/docs/sources-compact.svg @@ -1,4 +1,4 @@ - + - + -1,930 +2,059 sources behind the pipeline The ten largest of its 30 domains. @@ -33,38 +33,38 @@ 358 -Δv and propulsion +Composition and value - - - - + + + + -227 -Composition and value +244 +Δv and propulsion - - - - + + + + -222 -Density and population +227 +In-space demand - - - - + + + + -140 -In-space demand +200 +Density and population - - - - + + + + -93 +140 Excavation, beneficiation diff --git a/docs/sources.svg b/docs/sources.svg index 688b55f..428997b 100644 --- a/docs/sources.svg +++ b/docs/sources.svg @@ -1,4 +1,4 @@ - + - + -1,930 +2,059 sources behind the pipeline, by what they back and how authoritative they are General_Research's registry: one bar for each of its 30 domains, the most sources first. @@ -33,38 +33,38 @@ 358 -Δv and propulsion +Composition and value - - - - + + + + -227 -Composition and value +244 +Δv and propulsion - - - - + + + + -222 -Density and population +227 +In-space demand - - - - + + + + -140 -In-space demand +200 +Density and population - - - - + + + + -93 +140 Excavation, beneficiation @@ -250,10 +250,10 @@ 8 - - - - + + + + 41% T1 or T2 diff --git a/docs/stats/sources-compact.svg b/docs/stats/sources-compact.svg index d876e3c..29abc2a 100644 --- a/docs/stats/sources-compact.svg +++ b/docs/stats/sources-compact.svg @@ -1,4 +1,4 @@ - +