[agent/codex:gpt-5.4-mini] Read ~/spec/code/core/go/i18n/RFC.md fully. Find ONE feature... #68

Merged
Virgil merged 1 commit from agent/read---spec-code-core-go-i18n-rfc-md-ful into dev 2026-04-02 00:47:44 +00:00
2 changed files with 21 additions and 0 deletions

View file

@ -132,6 +132,9 @@ func flattenWithGrammar(prefix string, data map[string]any, out map[string]Messa
if gerund, ok := v["gerund"].(string); ok {
forms.Gerund = gerund
}
if forms.Past == "" || forms.Gerund == "" {
continue
}
grammar.Verbs[core.Lower(verbName)] = forms
continue
}

View file

@ -132,6 +132,12 @@ func TestFlattenWithGrammar(t *testing.T) {
"past": "tested",
"gerund": "testing",
},
"partial_past": map[string]any{
"past": "partialed",
},
"partial_gerund": map[string]any{
"gerund": "partialing",
},
"publish_draft": map[string]any{
"base": "publish",
"past": "published",
@ -201,6 +207,18 @@ func TestFlattenWithGrammar(t *testing.T) {
if _, ok := grammar.Verbs["publish_draft"]; ok {
t.Error("verb should be stored under explicit base, not JSON key")
}
if _, ok := grammar.Verbs["partial_past"]; ok {
t.Error("incomplete verb entry with only past should be skipped")
}
if _, ok := grammar.Verbs["partial_gerund"]; ok {
t.Error("incomplete verb entry with only gerund should be skipped")
}
if _, ok := messages["gram.verb.partial_past"]; ok {
t.Error("gram.verb.partial_past should not be flattened into messages")
}
if _, ok := messages["gram.verb.partial_gerund"]; ok {
t.Error("gram.verb.partial_gerund should not be flattened into messages")
}
// Noun extracted
if n, ok := grammar.Nouns["widget"]; !ok {