fix(config): promote hashline_edit to top-level flag

Move hashline_edit out of experimental so it is a stable top-level config with default-on runtime behavior and explicit disable support. Add migration and tests to preserve existing experimental.hashline_edit users without breaking configs.
This commit is contained in:
YeonGyu-Kim
2026-02-20 11:12:33 +09:00
parent dc32c38a51
commit f30c656ebf
8 changed files with 117 additions and 60 deletions
+49 -52
View File
@@ -644,6 +644,55 @@ describe("OhMyOpenCodeConfigSchema - browser_automation_engine", () => {
})
})
describe("OhMyOpenCodeConfigSchema - hashline_edit", () => {
test("accepts hashline_edit as true", () => {
//#given
const input = { hashline_edit: true }
//#when
const result = OhMyOpenCodeConfigSchema.safeParse(input)
//#then
expect(result.success).toBe(true)
expect(result.data?.hashline_edit).toBe(true)
})
test("accepts hashline_edit as false", () => {
//#given
const input = { hashline_edit: false }
//#when
const result = OhMyOpenCodeConfigSchema.safeParse(input)
//#then
expect(result.success).toBe(true)
expect(result.data?.hashline_edit).toBe(false)
})
test("hashline_edit is optional", () => {
//#given
const input = { auto_update: true }
//#when
const result = OhMyOpenCodeConfigSchema.safeParse(input)
//#then
expect(result.success).toBe(true)
expect(result.data?.hashline_edit).toBeUndefined()
})
test("rejects non-boolean hashline_edit", () => {
//#given
const input = { hashline_edit: "true" }
//#when
const result = OhMyOpenCodeConfigSchema.safeParse(input)
//#then
expect(result.success).toBe(false)
})
})
describe("ExperimentalConfigSchema feature flags", () => {
test("accepts plugin_load_timeout_ms as number", () => {
//#given
@@ -699,48 +748,6 @@ describe("ExperimentalConfigSchema feature flags", () => {
}
})
test("accepts hashline_edit as true", () => {
//#given
const config = { hashline_edit: true }
//#when
const result = ExperimentalConfigSchema.safeParse(config)
//#then
expect(result.success).toBe(true)
if (result.success) {
expect(result.data.hashline_edit).toBe(true)
}
})
test("accepts hashline_edit as false", () => {
//#given
const config = { hashline_edit: false }
//#when
const result = ExperimentalConfigSchema.safeParse(config)
//#then
expect(result.success).toBe(true)
if (result.success) {
expect(result.data.hashline_edit).toBe(false)
}
})
test("hashline_edit is optional", () => {
//#given
const config = { safe_hook_creation: true }
//#when
const result = ExperimentalConfigSchema.safeParse(config)
//#then
expect(result.success).toBe(true)
if (result.success) {
expect(result.data.hashline_edit).toBeUndefined()
}
})
test("accepts disable_omo_env as true", () => {
//#given
const config = { disable_omo_env: true }
@@ -794,16 +801,6 @@ describe("ExperimentalConfigSchema feature flags", () => {
expect(result.success).toBe(false)
})
test("rejects non-boolean hashline_edit", () => {
//#given
const config = { hashline_edit: "true" }
//#when
const result = ExperimentalConfigSchema.safeParse(config)
//#then
expect(result.success).toBe(false)
})
})
describe("GitMasterConfigSchema", () => {