Repository navigation
Merged
Conversation
…ttributable head refusals A native draft create the broker settles as not-submitted (GitHub's connection failed before any write) and its replay now write a repository-credentials.denied line (not_dispatched). A request head refused after its fields were checked (wrong Host, bad framing) is logged as request_refused when its credential names an open session. The draft helper's native advice names the repository-credentials container and no longer blames this Agent for the broker-wide request limit (findings 2429, 2431).
… to read session_unavailable The session ID, Namespace and repositoryRef appear only when the credential names an open session; session_unavailable lines carry none and are matched by time to a worker Pod restart or the session's end. Name the not-submitted draft receipt and the attributable head refusals, and say uncertain outcomes are not logged (findings 2429, 2430).
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
ClawSweeper status: review started. I am starting a fresh review of this pull request: fix(repository): log native draft not-submitted and attributable head refusals, fix helper log advice This is item 1/1 in the current shard. Shard 0/1. This temporary status tracks the active review worker. The completed review will appear in the durable ClawSweeper review comment. Crustacean status: shell secured, claws on keyboard, evidence pebbles being sorted. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Three low findings from a post-land review of #3585 and #3589:
409receipt withnot-submitted. Neither that answer nor a same-operation replay of the receipt wrote arepository-credentials.deniedline, althoughprepared-native-git.mdpromises one line per refused credentialed request and lists the failed GitHub connection undernot_dispatched. A request whose head was refused before authentication (wrongHost, bad framing) was also never logged, even when it carried the session credential.repositoryRef. The broker can attribute a line only when the credential names an open session, sosession_unavailablelines (for example after a worker Pod restart) carry none of them.unavailablerefusal,oce-github pr-createtold the Agent to "check the worker log". The native line is in the worker Pod'srepository-credentialscontainer, andkubectl logson the worker defaults to theworkercontainer. The capacity advice said "for this Agent" although the broker-wide request limit can also refuse.Change
transport/agent.ts: a recorded receipt whose error isnot-submittedwrites one line (status409,reasonCodenot-submitted,reasonnot_dispatched,operationapi), on the first answer and on a replay. Created andoutcome_unknownreceipts are still not refusals.transport/request.ts+agent.ts: a head refused after its fields were validated (wrongHost, connection/upgrade fields, framing, encoding,Expect) now returns its singleAuthorizationvalue with the denial. The transport logs it asrequest_refusedonly when that credential names an open session. It uses the samepresentedTokenparse as the existing attribution and nothing more. Earlier head refusals (start line, field syntax, sizes, repeated fields) carry no single credential and stay unlogged. Unauthenticated traffic stays silent, and the Agent's answer is unchanged.prepared-native-git.mdnow says the identity fields appear only when the credential names an open session, and that asession_unavailableline is matched by time to the worker Pod restart or the session's end. It also names thenot-submittedreceipt and the attributable head refusals, and says uncertain outcomes are not logged. The flow doc names the head-refusal case.client/draft-pr.ts: native-only advice.unavailablenow says to check the repository-credentials container log in the worker Pod.exchange-capacitysays too many requests are running for this Agent or across the broker, so retry after a short wait. The OpenShell route's advice is unchanged, and the Agent still learns no more than the OpenShell path tells it.Verification
postgres-prepared-repository-git-broker.test.mjs(real broker listener, PostgreSQL owner, GitHub fixture):connection failed before any writemode drops GitHub's connection before TLS and asserts the409not-submittedreceipt plus onenot_dispatchedline for the create and for its replay;request_refusedline, with the session identity, for a wrongHostcarrying the session credential;refuseNextConnection().not-submittedline missing (the receipt itself reproduces), and the old advice text in both created modes. With the fix, the postgres-platform lane passes.repository-credentials-service-loss.test.mjs(real broker process): a wrong-Hostrequest without a credential, and one with a credential that no open session issued, write no line.repository-credentials-draft-pr-cli,-transport-bounds,-httpand-service-losspass locally;tsc --build, eslint and prettier are clean on the touched files.prepared-native-git.mdstays under 1,500 words anddocs/flows/repository-credentials.mdis at 2,398.Risks
Authorizationvalue inside the process. Its only consumer uses it for attribution, and the otherinspectRequestHeadcallers refuse any denial without reading it.unavailableandexchange-capacitylines.