Skip to content

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

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/ears-private-repo-excluded
Nov 17, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/ears-private-repo-excluded

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The Pages workflow collects with github.token, scoped to PyAutoEars, so GET repos/<private repo> answers 404 and the two private repos in the body map (Jammy2211/euclid_assistant, PyAutoLabs/ECLIPSE_lens_catalogue) showed as unavailable, which reads as a collection failure. GitHub.get now raises NotFound (a ReadError subclass) when gh api reports HTTP 404, and 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. REFERENCE.md notes the rule.

Accepted trade-off: a deleted or mistyped repo also shows as excluded (still listed with its gap). Brain's Community adapter only degrades partial/unavailable receipts, so no Brain change.

Closes #33

API Changes

Added ears.collect.NotFound(ReadError); a 404 metadata read now yields receipt status excluded instead of unavailable. No snapshot schema change (excluded was already a valid status).
See full details below.

Test Plan

  • python -m pytest -q: 153 passed, up from 148 (5 new: collect excluded-vs-unavailable, GitHub.get classification for 404 / 403 / 502 / no stderr, payload never echoed)
  • Generated state.json with a complete + a NotFound (excluded) receipt validates against Brain's board/_state.py and stays green
  • Confirmed live gh api prints gh: Not Found (HTTP 404) on stderr for an unreadable repo
  • Heart dev-ship gate scoped to PyAutoEars: GREEN (pass). Organism-wide shown reasons (library checkouts behind origin, manifest drift, no release rehearsal) are unrelated to PyAutoEars.
Full API Changes (for automation & release notes)

Added

  • ears.collect.NotFound — ReadError subclass raised by GitHub.get on a 404 ("source not found or not visible publicly")

Changed Behaviour

  • ears.collect.collect — a NotFound on the repos/{repo} metadata read gives receipt status: excluded, public_verified: false, gap source is not visible publicly (private or missing); other ReadErrors remain unavailable

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

The Pages workflow collects with github.token, scoped to PyAutoEars, so the
metadata read for a private repo answers 404 and was reported as a generic
"unavailable" read failure. GitHub.get now raises NotFound (a ReadError) on
gh's "HTTP 404", and collect() reports that metadata read as "excluded" with
a "not visible publicly (private or missing)" gap. Rate limits, 5xx and
timeouts stay "unavailable".

Closes #33

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 1173f1d into main Nov 17, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/ears-private-repo-excluded branch November 17, 2026 14:13
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.

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

1 participant