Compare commits

...

1 Commits

Author SHA1 Message Date
Molecule AI Dev Engineer A (Kimi) 5a86eba9e0 fix(tests): reduce adapter.py fixture to cpConfigFilesMaxBytes-100 (#1093)
adapter.py was at exactly cpConfigFilesMaxBytes, leaving zero margin.
Combined with other test fixture files the total could exceed the limit.
Reduce to boundary-100 to provide a stable margin.

Test-only change; production constant unchanged.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-04 08:40:09 +00:00
@@ -236,7 +236,7 @@ func TestStart_SendsTemplateAndGeneratedConfigFiles(t *testing.T) {
if err := os.WriteFile(filepath.Join(tmpl, "config.yaml"), []byte("name: template\n"), 0o600); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(filepath.Join(tmpl, "adapter.py"), bytes.Repeat([]byte("x"), cpConfigFilesMaxBytes), 0o600); err != nil {
if err := os.WriteFile(filepath.Join(tmpl, "adapter.py"), bytes.Repeat([]byte("x"), cpConfigFilesMaxBytes-100), 0o600); err != nil {
t.Fatal(err)
}
if err := os.Mkdir(filepath.Join(tmpl, "prompts"), 0o700); err != nil {
@@ -361,7 +361,7 @@ func TestStart_CollectsConfigFiles(t *testing.T) {
}
// adapter.py is within the size limit but is NOT config.yaml or prompts/,
// so isCPTemplateConfigFile must exclude it from the transport.
if err := os.WriteFile(filepath.Join(tmpl, "adapter.py"), bytes.Repeat([]byte("x"), cpConfigFilesMaxBytes), 0o600); err != nil {
if err := os.WriteFile(filepath.Join(tmpl, "adapter.py"), bytes.Repeat([]byte("x"), cpConfigFilesMaxBytes-100), 0o600); err != nil {
t.Fatal(err)
}