Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Exact read: one deadline for the whole reply, the classification of a 404 and credential failures in K7, and a doctor row (follow-up to #327)

Open
#329 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
github, python
Domain
backend, cli

Research direction

Start from src/autoforge/github.py (https_get, GitHubClient._exact_object) and src/autoforge/engine.py (_complete_replan). Add one monotonic deadline covering headers and body in https_get with a slow-header loopback test. Decide and document in docs/agent-guides/github-safety.md whether a 404 on a just-listed object is retried, and add a doctor row running gh auth token and github.https_get to rate_limit with tests.

Written by the indexing model from the issue text.

Description

enhancement

Artifact: follow-up issue from #327, covering points an independent review of #327's exact read raised that the change deliberately left as they were. Code references are to #327's src/autoforge/github.py (https_get, GitHubClient._exact_object) and to src/autoforge/engine.py on main f4fd5ef.

Summary

#327 added GitHubClient.get_pr_exact, get_issue_exact and get_comment_exact: one read-only REST GET under https://api.github.com/, used when gh's sanitized print cannot prove a create's text. Three things around it are open.

1. The response-header phase has no overall deadline

https_get passes the client's timeout_seconds to the connection, which bounds connecting and each socket operation. _read_bounded also bounds the reading of the whole body against one deadline. The status line and the headers are read by http.client before the body, under the per-operation timeout only, so a server that trickles header bytes is bounded per read, not as a whole. The host is fixed (api.github.com, TLS verified), so the exposure is small, but the documentation claims a bound on the whole reply only for the body.

Direction: run the request under one monotonic deadline that covers headers and body (for example, shrink the socket timeout to the time remaining before each read, or read the headers on a socket whose timeout tracks the deadline). Add a loopback test with a server that sends headers slowly.

2. A conclusive exact-read failure ends a replan transaction for good

In _complete_replan (engine.py:15799, the except GitHubError around drive at :15862) every conclusive GitHubError raised while reconciling K7 becomes _reject_replan, which is terminal for the transaction. That was already so for gh's own failures. #327 adds new conclusive classes on that path:

  • a 404 from the exact read of a PR the complete listing returned a moment earlier;
  • a 401 or 403 on the REST path while gh itself works;
  • a gh auth token that fails or prints something unexpected;
  • an unexpected content type.

A 404 there is most plausibly replica lag between GitHub's listing and REST reads, not an absent object.

Direction: decide, and document in docs/agent-guides/github-safety.md, whether a 404 on an object the same read-back just listed should be GitHubUnavailableError (retried within bounds, nothing persisted) rather than conclusive. Decide also whether a credential failure of the exact read should block the phase (operator fixes gh auth, then unblock) rather than reject a replan.

3. doctor does not check that the exact read can work

The exact read needs gh auth token --hostname github.com to print one token, and api.github.com must be reachable over HTTPS from the operator's machine (proxy variables apply). A host where gh works through an enterprise proxy setup but this direct GET does not only finds out when a read-back needs it, and the phase then blocks.

Direction: add a read-only doctor row that runs gh auth token --hostname github.com, without printing the token, and makes one GET https://api.github.com/rate_limit through github.https_get. It reports OK, or the classified failure with its remedy.

Acceptance criteria

  • One deadline bounds the whole exact-read reply (status line, headers, body), with a loopback test.
  • The classification of a 404 and of credential failures of the exact read in K7 (and in the other create read-backs) is decided, implemented and documented, with tests.
  • doctor has an exact-read row, with tests, that never prints the token or the reply.
Dominant language
Python
Stars
0
Forks
0
Avg merge
5h 57m
Merged PRs (30d)
71

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from iceboundrock/AutoForge

All issues in iceboundrock/AutoForge

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.