Repository navigation
Own red CI never handed off; every agent reads the whole installation #973
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9a5e70e
Own red CI never handed off; every agent reads the whole installation
nambok 17f1854
Name the own-modes case xq: xo is another open case's id
nambok b91b70a
Merge remote-tracking branch 'origin/main' into fix/own-modes-and-cro…
nambok deed81f
Register the new tools, keep the diagnosis ahead of the gap read, upd…
nambok 6c34948
Hold only first-person blindness claims, never edit code or data, bou…
nambok 5610dee
Merge remote-tracking branch 'origin/main' into fix/own-modes-and-cro…
nambok 210441c
Keep private repository content out of replies posted in public repos…
nambok fa4c97a
Merge remote-tracking branch 'origin/main' into fix/own-modes-and-cro…
nambok 622d197
Merge main into fix/own-modes-and-cross-repo-reads
coderhelm[bot] 1b9f07b
Merge the branch's update from main
nambok File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| # xp. `xp_answers_read_the_other_repo` | ||
|
|
||
| **What happened:** A person asked on an API repository's pull request why a card read "Ages 1 - 4 years" when the data said 3 months to 4 years. CoderHelm's reply named the website's age formatter as the cause and said it couldn't open that formatter from this repository, so it hadn't confirmed the rounding. The website was another repository of the same team, and CoderHelm's GitHub app could read it. | ||
|
|
||
| **Why:** The round that answered had only the tools of the repository it worked in. Nothing told the model the installation's other repositories were readable, and nothing checked an answer that said it couldn't see something it never tried to read. | ||
|
|
||
| **The guarantee (invariants, enforced in code):** | ||
|
|
||
| - Every worker model loop that is offered tools (the coder, every fix round, the reviewer, ticket replies, triage, skills) is also offered `list_repos`, `read_repo_file` and `search_repo`, read only, over every repository of the team's GitHub installation. They are added in the one place every worker loop starts, and a source scan fails on a worker loop that goes around it. Chat and team agents read the same repositories through their code tools. | ||
| - Every such system prompt says the team's whole installation is readable, and to look before answering. | ||
| - Text a person reads in which CoderHelm says, in the first person, that it can't see, open, access, read or confirm something is rejected before it is posted, unless a tool call in that same turn returned a refusal; then the line must name the repository or path and the refusal. Sentences about the code or the product are never read as such a claim. A loop's answer that fails is sent back once to look with the tools; a retry that fails or runs out of time never replaces the answer, and what still fails is taken out of the prose only. Code, data and structured output are never edited. The person-text check and the reply composer hold the same rule. | ||
| - A source scan fails on any prompt that tells the model it is limited to one repository. | ||
| - Content from a private repository never appears in text posted where people outside the installation can read it: a public repository's pull request, issue or comment. Reading stays allowed everywhere, so answers stay right. Repository visibility comes from the installation's repository list, and one it doesn't name as public counts as private. When a reply goes to a public repository, every read of a private repository in that turn is kept, and the reply is checked before it is sent: no line or code from those reads verbatim, and no private repository's name or path. A reply that trips the check is asked to state its conclusion in plain words; what still trips it is taken out, in prose and in structured replies alike. It never turns into "I can't see it". A reply in a private repository may quote what it read, and so may a reply in a public repository quoting another public one; a comment asking to paste a private file gets the conclusion only. | ||
|
|
||
| **Where it's enforced:** `common::repo_reach::{defs, call, prompt_for, claim, allowed, strip, look_first, refusal_in, leak, redact, conclusion_only}`, `common::repo_read::GitHubHost::{installation_repos, installation_listing}`, `common::rendered::person_text`, `common::reply_compose::finish`, the worker's `agent::reach::{offer, prompt, Exec, access, kept_answer, public_answer, is_public}` in `agent::provider::converse_as`, Chat's `brain::system_prompt` and `chat_agent::run`, and `tool_registry::BUILTIN`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| # xq. `xq_own_modes_never_red_ci` | ||
|
|
||
| **What happened:** A front-end fix's pull request also listed three shell scripts of the repository's CI as files it changed: a cleanup script, a stub command its tests put on the path, and the test that runs it. Merging the base into the branch had dropped their executable bit (before `xl`). The pull request's script tests failed while the base stayed green on them. The fix rounds ran `chmod +x` in the sandbox, called `restore_file` on the scripts several times, and deleted and wrote them again in a batch write. None of it reached the mode. After five rounds the run ended failed on red CI and was handed to a person, for a cause CoderHelm made itself. | ||
|
|
||
| **Why:** `restore_file` took the bytes from the ref and the mode from the branch, which had already lost it. No tool set a mode. Nothing compared the pull request's modes with the base when its checks were red and the base's green. The repair sweep of `xl` compared each CoderHelm commit with its parent only, where a delete followed by a write shows no drop. It took its runs from the description catch-up's picks, which skip runs in flight and every run whose description was already rebuilt, and it never set a failed run going again. | ||
|
|
||
| **The guarantee:** A check red on the pull request and green on the base first gets the mode diagnosis. Every file the pull request changes is compared with the merge base, and an executable, symbolic link or submodule that CoderHelm's commits turned into a plain file is put back in one commit, with no model round, and CI decides again. A mode CoderHelm dropped that it can't put back yet is its own problem: an internal alert, the run page's line, and a retry while the tries make progress. After three tries in a row that put nothing more back it stops retrying, records why once, and the run waits on CI. It is never `failed` on red CI and never a person's to-do. A sweep whose branch moved during the repair gives its claim back, so the pull request is read again. A path a person's commit changed is theirs and is left. `restore_file` restores the mode from the same ref as the bytes. `set_mode` sets a file's executable bit as a commit, or puts back the base's mode, and refuses symbolic links and submodules. A `chmod` in the sandbox says it never reaches the commit and names `set_mode`. The repair sweep compares each pull request with its base too, reads runs of every status a pull request can still be open under (failed runs first, runs in flight included), and resumes a run that ended on red CI once its modes are back. | ||
|
|
||
| **Where it's enforced:** `clients::git_mode::{mode_move, against_base}`, `GitHubClient::{set_mode, merge_base_and_files}`, `mode_repair::{stuck_step, base_plan, against_base, on_red, write_restore, picks, reads, set_mode_tool, set_mode_call, restore_mode, sweep, repair_one}`, `resume::{mode_cause, hand_off_red_ci, resume_after_mode_repair}`, the `restore_file` and `set_mode` arms of the coder's and the feedback round's executors, and `common::coder_shell::CHMOD`. |
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.