feat(repos): read one file from a public repository #683

Closed
coilyco-ops wants to merge 1 commit from coilyco-ops/read-a-public-file into main AGit
Member

closes #679 - read_public_file, sibling to the inventory; rebased now the inventory has merged, so this is the file read alone

closes #679 - read_public_file, sibling to the inventory; rebased now the inventory has merged, so this is the file read alone
feat(repos): read one file from a public repository
All checks were successful
ci / image-build (pull_request) Successful in 28s
ci / test (pull_request) Successful in 49s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped
a5fb736060
read_public_file takes owner, repo, path and an optional ref, sibling to
list_public_repos: same forge, same absence of a credential.

Together the two answer sirens-echo#633's stated need, which is that the
agent cannot read its own source, without the mount that issue asks for.
A mounted clone is stale the moment anything merges, which here is
several times an hour. An API read is current by construction.

A path that climbs out is refused before any request is made, so a
refusal costs no round trip and the caller is told rather than silently
corrected. Each segment is escaped separately, so a path keeps its
separators while a segment carrying a slash cannot forge one.

Output is capped and says so when it cuts, the same shape the fetch tool
uses, because a half file the model cannot tell from a whole one is
answered from with ordinary confidence.

The mount question stays open on 633. It buys grep across a tree and
following imports, which this does not.

Stacked on the inventory in sirens-echo#642.

Refs sirens-echo#679, sirens-echo#633

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-authored-by: Kai Siren <coilysiren@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
Author
Member

Redundant. Its content merged as #681 while this was being opened. Closing — Angie (ENG, claude seat).

I rebased 681 onto a main that had taken the inventory, and the AGit push minted this as a new pull request rather than updating 681. Then 681 merged as cffd042 a moment later.

Confirmed on origin/main rather than assumed:

read_public_file in repoinventory.go    present
RenderAccessSummary in accesssummary.go present
stdinPath in the access check           present

Nothing here is unlanded. Do not merge this — its diff against current main is now mostly deletions, because it carries the pre-merge state of files that have since moved on.

My error was passing a topic that no longer matched the open pull request's head. Recording it because the AGit flow makes a stale topic look like an update right up until it is a second pull request.

**Redundant. Its content merged as https://forgejo.coilysiren.me/coilyco-gaming/sirens-echo/pulls/681 while this was being opened. Closing — Angie (ENG, claude seat).** I rebased 681 onto a main that had taken the inventory, and the AGit push minted this as a new pull request rather than updating 681. Then 681 merged as `cffd042` a moment later. Confirmed on `origin/main` rather than assumed: ``` read_public_file in repoinventory.go present RenderAccessSummary in accesssummary.go present stdinPath in the access check present ``` Nothing here is unlanded. **Do not merge this** — its diff against current main is now mostly deletions, because it carries the pre-merge state of files that have since moved on. My error was passing a `topic` that no longer matched the open pull request's head. Recording it because the AGit flow makes a stale topic look like an update right up until it is a second pull request.
coilyco-ops closed this pull request 2026-08-13 18:44:17 +00:00
All checks were successful
ci / image-build (pull_request) Successful in 28s
ci / test (pull_request) Successful in 49s
ci / publish-echo-image (pull_request) Has been skipped
ci / publish-observed (pull_request) Has been skipped

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
coilyco-gaming/sirens-echo!683
No description provided.