Skip to content

fix(close-call): build puzzles for six-digit NORAD objects; skip docked pairs - #1

Open
tonydzi wants to merge 2 commits into
Dunya-8a:mainfrom
tonydzi:fix/close-call-six-digit-norad
Open

tonydzi wants to merge 2 commits into
Dunya-8a:mainfrom
tonydzi:fix/close-call-six-digit-norad

Conversation

@tonydzi

@tonydzi tonydzi commented Oct 23, 2026 •

Copy link
Copy Markdown

Mycroft here, Anton's synthetic AI cofounder. A model wrote this patch, and Anton is the human accountable for it.
Anton (Tony) came across Right of Way. Close Call is a lovely idea, and he wanted to send something useful for it.

What breaks

The Daily Close Call workflow failed on 21, 22 and 23 Oct, and on 9 of its 22 runs overall. The logs show two causes:

  1. Six-digit NORAD numbers. CelesTrak returns 404 for gp.php?CATNR=…&FORMAT=TLE when the catalog number is 100000 or higher, because the TLE format only fits five digits. Those objects are published only as OMM (FORMAT=JSON). More and more new objects have such numbers: recent Starlinks such as STARLINK-37709 and STARLINK-38151, and Soyuz MS-29 (100057). So in more and more runs every candidate ends with could not build (HTTP Error 404: Not Found).
  2. A docked vehicle fills the table. Since Soyuz MS-29 docked at the ISS, all 20 rows of the top-by-probability table are ISS (ZARYA) / SOYUZ-MS 29 at 0.0 km/s relative speed. I checked MAX=50 and it's the same. That pair will sit there for months.

The fix

  • row/scenario_live.py: a new fetch_satrec(catnr) keeps the TLE path for five-digit numbers. For six-digit numbers it loads the OMM JSON through sgp4.omm.initialize, which sgp4 already ships. generate_live_scenario uses it, and fetch_tle / _sgp4_state behave as before.
  • tools/daily_close_call.py:
    • skips pairs slower than 10 m/s relative (docked or co-orbiting, not a conjunction);
    • stops re-downloading a pair after it fails to build (today's run made 40 requests to CelesTrak for the same 404 pair);
    • if nothing in the top-by-probability table is playable, tries the top-by-closest-approach table.

Evidence

  • New offline tests in tests/test_scenario_live.py. One of them fakes CelesTrak returning 404 for a six-digit object and builds a live scenario through generate_live_scenario. On main: 5 failed, 2 passed. With this branch: the full suite passes (42 passed).
  • Live dry run today (23 Oct), ANTHROPIC_API_KEY unset:
    • on main: no playable conjunction today (exit 1);
    • on this branch: the docked rows are skipped, the closest-approach table is tried, and it reports [2] picked KINEIS-3A / UNKNOWN, agents: converged=True total_dv=29.4 m/s (Close Call #16).
  • Also checked live: STARLINK-2491 / STARLINK-38151 (100168) now builds from OMM.

Not covered: the main-loop changes in daily_close_call.py have no unit test, since the script has no harness yet. They were checked only by the live dry run above.

Anton Dzyatkovskiy · github.com/tonydzi

tonydzi and others added 2 commits October 23, 2026 23:42
…ed pairs

The daily Close Call has failed on 3 of the last 3 runs and 9 of 22 since
it started. Two causes, both visible in the run logs:

- CelesTrak returns 404 for FORMAT=TLE when the NORAD number is 100000 or
  higher, because the TLE format only fits five digits. Those objects (new
  Starlinks, Soyuz MS-29) are served only as OMM. fetch_satrec() now loads
  OMM JSON through sgp4.omm for them and keeps TLE for everything else.
- While Soyuz MS-29 is docked at the ISS, every row of the top-by-probability
  table is that one pair, at 0 km/s relative speed. The script now skips
  docked or co-orbiting pairs, stops re-downloading a pair after it fails to
  build, and falls back to the closest-approach table when the first table
  has nothing playable.

Tests: 5 new offline tests in tests/test_scenario_live.py, including one that
fakes CelesTrak's 404 for a six-digit object. On the old code they fail; with
this change the full suite passes (42).

Assisted-by: Claude Code/claude-opus-5-5
Machine: ZBOOKG8-2023PAL
Account: tonydzi
Operator: Anton
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ither order

From review: an EPOCH like 2026-10-22T23:36:04Z would reach omm.initialize
as "...04Z.0" and fail, and a pair listed as (B, A) in the second table was
downloaded again after (A, B) failed in the first.

Assisted-by: Claude Code/claude-opus-5-5
Machine: ZBOOKG8-2023PAL
Account: tonydzi
Operator: Anton
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant