Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ConfigKeyContextResolver misses config keys defined in ordinarily-named files

Aperta
#642 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Ambito
devtools

Direzione di ricerca

Start in ConfigKeyContextResolver, where the candidate set is built from application* resources and files whose stem ends in config/settings/properties/env with a limited extension list. Read the table of misses (main.go, main.py, main.rs, Main.java, app-config.service.ts, Program.cs) and see how the candidate filter rejects them. Done when the resolver also selects files that contain environment reads, and the config-doc gate in FindingVerifierPrompts and #641 still agree.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

ConfigKeyContextResolver cannot reach config keys in most non-Java repositories, so the "Config key
definitions from the repository" evidence section is usually empty.

What it matches

Candidates are application* resources plus source files whose stem ends in
config/settings/properties/env, with a java/kt/py/ts/js/go/rb/rs extension.

What that misses

Found while fixing #638. Across two corpus rounds, every PR that defines its config keys in an
ordinarily-named file produced no section at all:

PR file that defines the keys why it does not match
go #40 main.go stem is main
python #39 main.py stem is main
rust #42 main.rs stem is main
java #43 Main.java stem is main
angular #49 app-config.service.ts stem ends service, not config
csharp #47 Program.cs .cs is not among the supported extensions

A service that reads its environment in main.go or Program.cs is entirely ordinary, so this is
the common case rather than an edge.

Why it mattered

The review prompt's config-doc dimension was gated on that section being present, so for all of the
above it was told, in effect, to say nothing. #641 fixes the gate by accepting the diff's own parsing
line (strings.Split(raw, ","), .split(','), Duration.ofMillis) as the definition — which is
what the dimension's own self-check already permitted, so the prompt was internally inconsistent.

That makes this issue no longer a correctness blocker: the dimension works without the section. But
the section exists to give the model the definition rather than making it infer one from a parsing
call, so an empty section is still lost evidence quality on the majority of repositories.

Suggested direction
  • Broaden the candidate set: .cs and other common extensions; entry-point files (main.*,
    Program.cs, app.*, index.*); and files that merely contain environment reads rather than
    matching on filename stem.
  • Consider selecting by content — a file that calls os.Getenv, System.getenv,
    Environment.GetEnvironmentVariable, process.env, std::env::var is a config-definition site
    regardless of its name.
  • Any change here should be read together with FindingVerifierPrompts's config-doc clause and the
    gate #641 relaxed, so the three do not disagree again.
Note on dimension numbering

PrReviewPrompts numbers these dimensions 7 (config/IaC) and 10 (config-key documentation). The
dogfood corpus briefs and answer keys number the same two 6 and 9. Issues #638 and others use the
corpus numbering. Worth keeping in mind when cross-referencing.

Lingua principale
Java
Stelle
35
Fork
7
Merge medio
9h 23m
PR unite (30g)
154

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devops-thiago/ThrillhouseBot

Tutte le issue di devops-thiago/ThrillhouseBot

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.