GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones · Issue #6606 · developing-today/code

github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones #6606

New issue
Copy link
New issue
Copy link
Closed
#6715
Closed
github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones#6606
#6715
Copy link
Labels
app/github-backupinfra/github-backup estate mirror systemkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

Description

@dezren39
dezren39
opened on Nov 6, 2026
Issue body actions

Problem

infra/github-backup/bin/reconcile.py — a non-dict JSON line in clone-status.jsonl crashes the weekly reconcile on exactly the run it is most needed: a failed clone pass.

  • _clone_status_entries (reconcile.py:52-66) tolerates a line that does not parse as JSON at all (except Exception: pass, line 62-63) but appends every line that does parse, with no shape check.

  • Its only consumer (reconcile.py:147-152, in the clone_rc != 0 branch) assumes dicts:

    clone_failures = sorted(
        {e["repo"] for e in _clone_status_entries(root, status_offset)
         if e.get("status") == "fail" and e.get("repo")}
    )

    A line containing 123, "fail", ["owner/bad"], null, or true — all valid JSON, all plausible products of a torn/interleaved append to this shared append-only file, a hand edit, or a future writer change — raises AttributeError: '<type>' object has no attribute 'get'.

  • The crash site is before everything the failed-clone branch exists to produce: the dated report reconcile-YYYY-MM-DD.md is written at reconcile.py:~185 and manifest_mod.build(root) runs at :~192, both after the clone-failure computation. So one poison line converts "clone pass failed, here is the report naming the failed repos" (the github-backup(reconcile): a failed clone pass exits 0 and is absent from the dated report — clone_all's verdict is dropped by its only scheduled caller #3300 contract) into an unhandled traceback with no report, no MANIFEST refresh, and no per-repo failure list — on the one run where the clone pass already failed.

Contrast / oracle in the same estate: clone_all.py:93-100 reads the same file and is safe — its r.get("status") call sits inside the try: whose except Exception: pass swallows the shape error along with parse errors. The two readers of one file disagree about what a line may be; reconcile's is the fragile one.

Distinct from: #6575 (drain_queue queue-event shape poison — different file, different consumer), #3331 (drain owner allowlist shape, closed), #3240 (plan.json/state.json/MANIFEST.json bare json.load on torn object files — clone-status.jsonl is not in its writer/reader list, and its readers already claim per-line tolerance).

Evidence (verified this run, laptop primary @ afdad96)

Probe on the laptop at ~/git/fleet/probe-ghb-reconcile-status/probe.py, importing the real reconcile module from ~/git/code/infra/github-backup/bin and feeding _clone_status_entries a scratch clone-status.jsonl, then applying main's exact consumer expression:

  • control, dict entries [{"repo":"owner/bad","status":"fail"}, {"repo":"owner/good","status":"ok"}] → consumer Ok, failures ['owner/bad']
  • control, malformed JSON line "{torn line" before a fail dict → skipped as designed, consumer Ok, failures ['owner/bad']
  • offset control (entries appended after the recorded byte offset only) → Ok
  • non-dict 123 → consumer_CRASH AttributeError: 'int' object has no attribute 'get'
  • non-dict "fail" → consumer_CRASH AttributeError: 'str' object has no attribute 'get'
  • non-dict ["owner/bad"] → consumer_CRASH AttributeError: 'list' object has no attribute 'get'
  • non-dict null → consumer_CRASH AttributeError: 'NoneType' object has no attribute 'get'
  • non-dict true → consumer_CRASH AttributeError: 'bool' object has no attribute 'get'

Why it matters

Reconcile is the weekly correctness floor of the backup estate. Its clone-failure path (#3300) was specifically built so a failed clone pass is reported, named, and exit-coded. A single non-dict line in the shared status file defeats that path entirely and takes the dated report and the MANIFEST rebuild with it — the failure mode is silent in the place operators look (no report file appears) and the poison line stays in the append-only file, so the next failed-clone reconcile crashes the same way.

Acceptance criteria

  • _clone_status_entries (or its consumer) ignores non-dict JSON lines the way it already ignores unparseable lines — a parsed line is kept only if it is a dict; dicts missing repo/status keep the current filtered behaviour.
  • A failed clone pass with a poisoned clone-status.jsonl still produces the dated report (with the real dict fail entries named, or the existing "no per-repo failures recorded" fallback), still runs manifest_mod.build, and still returns exit 1 — no traceback.
  • Regression test: scratch status file mixing a valid fail dict, an unparseable line, and each non-dict JSON shape (123, "x", [], null, true) → consumer returns exactly the valid fail repos; dict-only and malformed-line controls unchanged.
  • The two readers of clone-status.jsonl (clone_all and reconcile) end up with the same line-shape contract, stated in one place.

Activity

Next
  1. dezren39
    added
    kind/bugSomething isn't working (prefixed form of the classic bug label)
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued queue task
    app/github-backupinfra/github-backup estate mirror system
    on Nov 6, 2026
  2. developing-today commented on Nov 6, 2026

    @developing-today
    developing-todayBot
    on Nov 6, 2026 – with developing.today
    Contributor
    More actions

    CODE-2015

  3. dezren39 commented on Nov 6, 2026

    @dezren39
    dezren39
    on Nov 6, 2026
    MemberAuthor
    More actions

    🤖 Agent note · filed

    • Agent: new-issue-creator (lane B, new-issue-creator-code-b)
    • Session / ID: new-issue-creator-code-b run 2026-11-06T19:20Z
    • Found via: filed this run
    • Task: Filed issue github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones #6606 — reconcile.py clone-status reader crashes on valid non-dict JSON lines in the failed-clone branch, losing the dated report and MANIFEST rebuild.
    • Expectation: effort s; done = triage verdict, then a shape guard in _clone_status_entries/consumer matching clone_all's reader contract, with regression tests.
    • Links: probe ~/git/fleet/probe-ghb-reconcile-status (laptop, real reconcile module); body file hidden_files/issue-ghb-reconcile-clone-status-nondict.md
  4. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    MemberAuthor
    More actions

    Picked up by repo-worker-code-a — working this now. (Fleet queue fallback mode: the queue backend is down, so this issue's comments carry the claim. The claim stays live while repo-worker-code-a posts progress markers; after 30 minutes of silence any other worker may pick this up.)

  5. dezren39
    added
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    status/in-progressQueue worker lifecycle state
    and removed
    queue/queuedHas a queued queue task
    status/needs-triageNot yet triaged; needs a first look
    on Nov 7, 2026
  6. 21 remaining items

  7. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 7, 2026
  8. dezren39 commented on Nov 7, 2026

    @dezren39
    dezren39
    on Nov 7, 2026
    MemberAuthor
    More actions

    Released done by repo-worker-code-z (lane code-z, FALLBACK MODE): PR #6715 merged — merge commit 348f900 — and issue #6606 closed by the merge. Fix: ghb_common.clone_status_record states/implements the clone-status.jsonl line contract in one place (record = JSON object; unparseable and valid-JSON non-object lines ignored) and both readers use it (reconcile._clone_status_entries, clone_all ok_prev scan); both consumers also require a string repo (Codex P2, fixed in a048db9, replied on-thread; final Codex review on that head: completed, no findings). Tests on laptop: full github-backup suite green at e7edf56 (clone-pass 14/14 incl. poisoned-file scenario through reconcile.main()); clone-pass + clone_all suites re-run green at a048db9. scripts-test checks QUEUED in the fleet-wide runner backlog — merged under standing merge authority with local suite verification.

    🤖 Agent note · done

    • Agent: repo-worker-code lane code-z (fallback mode)
    • Task: issue github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones #6606 (fallback: issue is the task)
    • Outcome: fixed_merged — PR fix(github-backup/reconcile): ignore non-dict clone-status lines via shared reader contract (#6606) #6715 fix(github-backup/reconcile): ignore non-dict clone-status lines via shared reader contract (#6606) #6715
  9. dezren39
    removed
    status/in-progressQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    work/assignedQueue worker lifecycle state
    on Nov 7, 2026
  10. developing-today
    added
    status:in-review
    and removed
    status:done
    on Nov 8, 2026
  11. developing-today
    reopened this on Nov 8, 2026
  12. dezren39
    added
    queue/queuedHas a queued queue task
    on Nov 8, 2026
  13. dezren39 commented on Nov 9, 2026

    @dezren39
    dezren39
    on Nov 9, 2026
    MemberAuthor
    More actions

    🤖 Agent note · done (already done)

    • Agent: repo queue worker, lane code-g (repo-worker-code)
    • Session / ID: cron repo-queue-worker-shift-g run 2026-11-09 02:23 CST; task 13708 (direct execution lane, lane row 5545)
    • Task: task 13708 for issue github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones #6606 (small_fix: non-dict JSON line in clone-status.jsonl crashes reconcile failed-clone report path).
    • Verified fresh 2026-11-09T08:47Z: the fix already landed on main via PR fix(github-backup/reconcile): ignore non-dict clone-status lines via shared reader contract (#6606) #6715, MERGED 2026-11-07T03:15:18Z, squash commit 348f900 — ghb_common.clone_status_record is the shared line-shape contract for both readers (reconcile + clone_all), non-dict and unparseable lines are ignored, and the consumer requires a string repo. Issue github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones #6606 was closed at that merge and reopened by developing-today[bot] on 2026-11-08T07:01:52Z with no new failure evidence.
    • Tests: on a clean detached worktree at origin/main (1a5d3ad), infra/github-backup/tests/test_reconcile_clone_pass.py passes 14/14, including: poisoned status file -> reconcile still exits 1, report still names the real failing repo, poison shapes never surface as repos, reader keeps only dict records, consumer returns exactly the valid fail repos.
    • Outcome: no new code needed. Closing issue github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones #6606 as completed with this evidence; completing task 13708 as already_done.
    • Links: task 13708 · issue github-backup(reconcile): a non-dict JSON line in clone-status.jsonl crashes the failed-clone report path — _clone_status_entries tolerates unparseable lines but not valid non-dict ones #6606 · PR fix(github-backup/reconcile): ignore non-dict clone-status lines via shared reader contract (#6606) #6715
  14. dezren39
    closed this as completedon Nov 9, 2026
  15. dezren39
    removed
    queue/queuedHas a queued queue task
    on Nov 9, 2026
  16. developing-today
    added
    status:done
    and removed
    status:in-review
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/github-backupinfra/github-backup estate mirror systemkind/bugSomething isn't working (prefixed form of the classic bug label)priority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobstatus:donetask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.