Skip to content

fix: report private/unreadable repos as excluded, not unavailable #33

Closed

Description

@Jammy2211

Overview

The Ears snapshot reports the two private repos in the body map (Jammy2211/euclid_assistant, PyAutoLabs/ECLIPSE_lens_catalogue) as unavailable, which reads as a collection failure. The Pages workflow collects with github.token, scoped to PyAutoEars, so the metadata read for a private repo returns 404 and GitHub.get raises a generic ReadError before collect() reaches its existing private -> excluded branch. A 404 should be classified as "not visible publicly" and reported as excluded.

Plan

  • Classify a 404 / Not Found from gh api as a distinct NotFound read error.
  • Report a repo whose metadata read is NotFound as excluded, with a gap saying it is not visible publicly (private or missing).
  • Keep rate limits, 5xx and timeouts as unavailable.
  • Add tests and a one-line REFERENCE.md note.
Detailed implementation plan

Affected Repositories

  • PyAutoEars (primary)

Branch Survey

Repository Current Branch Dirty?
./PyAutoEars main clean

Suggested branch: feature/ears-private-repo-excluded

Implementation Steps

  1. ears/collect.py: add class NotFound(ReadError). In GitHub.get, when gh api exits non-zero and stderr indicates HTTP 404 / Not Found, raise NotFound("source not found or not visible publicly") (bounded text, never the payload).
  2. ears/collect.py collect(): catch NotFound on the repos/{repo} metadata read -> status = "excluded", gaps ["source is not visible publicly (private or missing)"], continue to the next repo. Other ReadErrors stay unavailable.
  3. tests/test_ears.py: fake API raising collect.NotFound for repos/x/lib -> receipt excluded, public_verified False, no listing call; plain ReadError still -> unavailable; unit test of GitHub.get 404 classification with a stub gh binary.
  4. REFERENCE.md: in the receipt status list, note that excluded also covers sources the collector cannot see (private or missing).

Trade-off accepted: a deleted or mistyped repo also shows as excluded (still listed with its gap). Brain's adapter (agents/conductors/community/_ears_feed.py) only degrades partial/unavailable receipts, so no Brain change is needed.

Key Files

  • ears/collect.py — GitHub.get, collect()
  • tests/test_ears.py — collection receipt tests
  • REFERENCE.md — receipt status contract

Original Prompt

Click to expand starting prompt

The Ears community snapshot shows Jammy2211/euclid_assistant and PyAutoLabs/ECLIPSE_lens_catalogue (both private) as unavailable, which reads as a collection failure. They should be reported as excluded, the status the collector already uses for sources that are not public. (Mind prompt: active/ears_private_repo_excluded_not_unavailable.md.)

Activity

  1. Jammy2211 commented on Nov 17, 2026

    @Jammy2211
    ContributorAuthor

    Shipped

    • PR: fix: report private/unreadable repos as excluded, not unavailable #34 (merged, 1173f1d)
    • GitHub.get raises NotFound (a ReadError) when gh api reports HTTP 404; collect() reports that metadata read as excluded with the gap "source is not visible publicly (private or missing)". Rate limits, 5xx and timeouts stay unavailable.
    • Tests: 153 passed (5 new). Generated state.json with an excluded receipt validates against Brain's board/_state.py.
    • Tier notify: auto-merged on green CI (3/3 checks).

    The two private repos (euclid_assistant, ECLIPSE_lens_catalogue) will show as excluded from the next Pages collection run.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions