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)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
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
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
ghitself works; - a
gh auth tokenthat 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.
doctorhas 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from iceboundrock/AutoForge
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
iceboundrock/AutoForge#304 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
iceboundrock/AutoForge#333 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
iceboundrock/AutoForge#332 ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 1/100
iceboundrock/AutoForge#331 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 3/5 1-2 days Newbie friendliness 75/100
iceboundrock/AutoForge#328 · 1 comment ·
Maintainers usually reply within 1 day
All issues in iceboundrock/AutoForge
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 85/100
521xueweihan/HelloGitHub#4115 ·
-
get_lldp_neighbors_detail: query asks for 'max-address' (typo for 'mac-address'), so remote_chassis_id is always emptyPossibly taken @Jah-yee claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
lesson-submission pending-review
Difficulty 1/5 Under an hour Newbie friendliness 74/100
Ikalus1988/MisakaNet#3899 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
aws-samples/sample-per-model-bedrock#549 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100