You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: inferRepositoryConventions doesn't do anything #11917
Thanks for the report — triage agrees this is a real quality bug in the dedicated commit-message path, not a settings-UI no-op.
What the setting actually does
Repository conventions is the default (repo_conventions). The named flag inferRepositoryConventions is set on that policy and never read by the prompt builders, so the title is accurate for the flag. The mode itself is not empty: resolveStylePolicy in apps/server/src/git/GitManager.ts still:
reads root CLAUDE.md only when the writer is Claude
appends that blob as “Additional instructions”
It does not read README.md, nested AGENTS.md, or CONTRIBUTING.md. A root AGENTS.md over 20KB is dropped with no warning.
Why documented conventions can still lose
The commit prompt in TextGenerationPrompts.ts always requires an imperative, ≤72-character, no-trailing-period subject and an empty-or-bullet body. sanitizeCommitMessage then truncates the subject to 72 characters. Recent subjects are listed beforeAGENTS.md, so history can override the docs. That matches the workaround (agent commit works, because the agent gets AGENTS.md as first-class instructions).
Settings copy still says the mode “matches recent change descriptions and change request titles.” Docs say it uses “the project's instructions and recent commit subjects.” Both undersell / misstate the current behavior.
In GitManager + TextGenerationPrompts: use or drop the dead flag; when repo conventions are on, don’t let the hard 72-char/bullet rules override repo style; prefer commit-convention text from AGENTS.md over raw history; and decide explicitly whether README.md should be sampled (if not, say so in the UI).
Workaround: set the style to Custom instructions, or let the coding agent create the commit.
A single expected-vs-actual commit message (and whether the conventions live in root AGENTS.md vs README.md) would help, but is not required to start the fix.
I've did some research and looked into the codebase. From what I can see, the flag inferRepositoryConventions is set for Repository conventions but isn't really used anywhere in the codebase to provide the commit message model with further context.
Existing work: #21561 explicitly addresses this report and replaces the earlier contribution. It includes regression tests and a server runtime transcript. Its stated remaining gate is maintainer approval for changing the default Repository conventions formatting. Leaving this issue open; no duplicate implementation or PR started.
Rechecked the existing fix #21561: it remains open at 1afd963, with 32 successful checks and no failing or pending checks reported by GitCafe. Added the required bugfix label. Macroscope still records a human-approval requirement for the default formatting change. No duplicate issue found across 18 pages of open issues. No new implementation or app reproduction was run; the existing PR contains regression tests and a server runtime transcript. Leaving this issue open for that fix.
Activity
juliusmarminge commentedon Sep 15, 2026
Thanks for the report — triage agrees this is a real quality bug in the dedicated commit-message path, not a settings-UI no-op.
What the setting actually does
Repository conventionsis the default (repo_conventions). The named flaginferRepositoryConventionsis set on that policy and never read by the prompt builders, so the title is accurate for the flag. The mode itself is not empty:resolveStylePolicyinapps/server/src/git/GitManager.tsstill:AGENTS.md(already shipped in fix(git): follow repository instructions in generated source control text #8804; present on Desktop 0.0.40)CLAUDE.mdonly when the writer is ClaudeIt does not read
README.md, nestedAGENTS.md, orCONTRIBUTING.md. A rootAGENTS.mdover 20KB is dropped with no warning.Why documented conventions can still lose
The commit prompt in
TextGenerationPrompts.tsalways requires an imperative, ≤72-character, no-trailing-period subject and an empty-or-bullet body.sanitizeCommitMessagethen truncates the subject to 72 characters. Recent subjects are listed beforeAGENTS.md, so history can override the docs. That matches the workaround (agent commit works, because the agent getsAGENTS.mdas first-class instructions).Settings copy still says the mode “matches recent change descriptions and change request titles.” Docs say it uses “the project's instructions and recent commit subjects.” Both undersell / misstate the current behavior.
Not a duplicate / not closed by #7650
AGENTS.md/README.mdwin and should notClosesthis issue.Suggested fix
In
GitManager+TextGenerationPrompts: use or drop the dead flag; when repo conventions are on, don’t let the hard 72-char/bullet rules override repo style; prefer commit-convention text fromAGENTS.mdover raw history; and decide explicitly whetherREADME.mdshould be sampled (if not, say so in the UI).Workaround: set the style to Custom instructions, or let the coding agent create the commit.
A single expected-vs-actual commit message (and whether the conventions live in root
AGENTS.mdvsREADME.md) would help, but is not required to start the fix.niklasravnsborg commentedon Sep 15, 2026
I've did some research and looked into the codebase. From what I can see, the flag
inferRepositoryConventionsis set for Repository conventions but isn't really used anywhere in the codebase to provide the commit message model with further context.https://grep.app/search?f.repo=pingdotgg%2Ft3code&q=inferRepositoryConventions
niklasravnsborg commentedon Sep 15, 2026
Moving the conventions into the AGENTS.md now allows me to use the commit feature. An instruction like the following is not enough:
The code is still unclear because of the unused variable.
juliusmarminge commentedon Oct 22, 2026
Existing work: #21561 explicitly addresses this report and replaces the earlier contribution. It includes regression tests and a server runtime transcript. Its stated remaining gate is maintainer approval for changing the default Repository conventions formatting. Leaving this issue open; no duplicate implementation or PR started.
juliusmarminge commentedon Oct 22, 2026
Rechecked the existing fix #21561: it remains open at 1afd963, with 32 successful checks and no failing or pending checks reported by GitCafe. Added the required bugfix label. Macroscope still records a human-approval requirement for the default formatting change. No duplicate issue found across 18 pages of open issues. No new implementation or app reproduction was run; the existing PR contains regression tests and a server runtime transcript. Leaving this issue open for that fix.