Repository navigation
factory: every job's PR carries its own file list; Brief words stay plain - #2515
Merged
santoshkumarradha merged 3 commits intoNov 8, 2026
Merged
Conversation
…lain A followed pull request now carries pr.files (path, status, line counts, previous_path for a rename), pr.files_total and pr.files_head, read from GitHub once per head and bounded at 300 files, for every job with a PR, AgentField/SWE-AF runs included. A list is only ever about its own head. The Brief writer is told not to use auditor, verdict, verified, verification, unverified or refuted, and every drafted heading and text goes through a deterministic plain-words filter before it is kept, so "What the verification found" reads "What the checks found".
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.
What
1. Every job's pull request carries its own file list.
pr.fileson the job wire: each file'spath,status(added/modified/removed/renamed, GitHub's other words as GitHub spells them; mode-onlychangedreadsmodified),added/removedline counts, andprevious_pathfor a rename or copy. Beside itpr.files_total(the whole change's file count, from the PR'schanged_files) andpr.files_head(the commit the list was read on).FactoryChangedFile(apps/desktop/src/lib/factoryJobsWire.ts), somergeChangesOfcan take{ files: pr.files, stat: { files: pr.files_total } }directly.pr.files_head === pr.head_sha; otherwise it is unknown (MERGE_CHANGE_WORDS.unknown). The engine also never carries a list onto a different head.followPRthrough the same GitHub client as follow/merge (newPullFileListoninternal/praf/github, paged 100 at a time), for every followed job, including AgentField/SWE-AF (RunDeliveredPR) jobs.factory.PRFilesMost= 300 files, in GitHub's order.problemsentry and never blocks Merge.2. Brief words stay plain. Both Brief prompts now carry
BriefPlainWordsRule. After the check, every drafted heading and text goes through a deterministic filter,BriefPlainWords, before the version is kept. The filter rewrites the verdict, bullets, flow, table, spots, questions, options and shot labels. It runs before the heading dedupe, so "What the verification found" becomesWhat the checks found, verified → checked, verdict → outcome, auditor → reviewer, refuted → disproved, unverified → unchecked. Proof commands, paths, step names, evidence refs and mermaid are left as written.Manual: two new sections in
internal/manual/chat/factory.md, one on the PR file list and one on plain Brief words.Out of scope / not touched
internal/factory/serve/workers.go,lease.go, cellstore, keys and the quit path (another lane). The desk side, which readspr.fileskeyed tohead_sha, is codeaf-desk's.Briefs kept before this change keep their old headings until the next write.
Proof
internal/factory/github/pr_files_test.go, against a fake GitHub on the real client:followOpened, and a merged PR that keeps its list with no readinternal/factory/brief_words_test.go:/pulls/7/files.🤖 Generated with Claude Code