Skip to content

test(conformance): twelve cases from upstream bug reports - #29

Merged
lejmr merged 1 commit into
mainfrom
conformance/upstream-pearls
Oct 24, 2026
Merged

lejmr merged 1 commit into
mainfrom
conformance/upstream-pearls

Conversation

@lejmr

@lejmr lejmr commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Stacked on #28 (case numbers and reports follow it); retarget to main once #28 is in.

A read through the issues and PRs of lightbend/config and ekrich/sconfig for bugs the spec decides and the suite had no case for. zig-hocon passes all twelve; the point is the other implementations and the record.

case input spec Java 1.4.9 pyhocon
array-and-object-concatenation/020 b = ${a} { c = 1, c = ${?missing} } twice b.c = 2 BugOrBroken (#647, #725, #754) null
array-and-object-concatenation/021 b = ${a} { c = reset, c = ${t} } b.c = {x: 1} BugOrBroken (#356) ✓
array-and-object-concatenation/022 front = [ { foo = 1, foo = ${?bar} } ] ${tail} [{foo: 1}, 2] BugOrBroken (#751) ✓
unchanged-from-json/028 a = 9223372036854775808 a number a string (#801, sconfig#631) ✓
unchanged-from-json/029 a = "\u+041" error "A" (#884, sconfig#623) keeps it
unchanged-from-json/030 a = "\u٠٠٤١" error "A"
string-value-concatenation/023 a = 1e5, b = ${a}" x" "1e5 x" ✓ "100000.0 x" (#886)
include-merging/016 += in an included file, then in the file [1, 2, 99, 100] ✓ 100 (#426)
self-referential-examples/034 foo = "", foo { bar = ${override-me} }, foo { bar = "bar" } bar = "bar" ✓ WrongType (#599)
include-substitution/020 a : { nested : { include "foo.conf" } } ${x} fixed up to a.nested.x ✓ unresolved (#136)
plus-equals-field-separator/013 c = ${d}, c { x += 1, x += 2 } [1, 2] ✓ 2 (#177)
substitutions/041 section.foo = ${?UNSET} section = {} ✓ ✓ (#615)

Scores against the spec: zig-hocon 469/469, typesafe/config 410, pyhocon 324.

Left out: an include inside a list element whose file has a substitution (#160); every implementation fails it, zig-hocon too, and the answer rests on one sentence, so it gets its own look. Four places where the spec is genuinely ambiguous (#652, #886, #125, #594) are being looked at separately.

🤖 Generated with Claude Code

https://claude.ai/code/session_01CbBo1aotFTDLY2gery7qYD

Bug reports in lightbend/config and ekrich/sconfig where the spec decides and no case was:

- array-and-object-concatenation/020–022: typesafe/config's internal error (BugOrBroken) inside `${a} { ... }` and before a list substitution (#647, #725, #754, #356, #751)
- unchanged-from-json/028: an integer past 2^63 is a number, typesafe/config makes it a string (#801, sconfig#631)
- unchanged-from-json/029–030: a \u escape with a sign or non-ASCII digits is an error, typesafe/config reads A (#884, sconfig#623)
- string-value-concatenation/023, include-merging/016, self-referential-examples/034, include-substitution/020, plus-equals-field-separator/013, substitutions/041: where pyhocon slips (#886, #426, #599, #136, #177, #615)

zig-hocon passes all 469, typesafe/config 410 against the spec, pyhocon 324.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01CbBo1aotFTDLY2gery7qYD
@lejmr
lejmr force-pushed the conformance/upstream-pearls branch from 1fdb9b4 to 95c1622 Compare October 24, 2026 21:18
@lejmr
lejmr changed the base branch from conformance/concatenation-is-a-merge to main October 24, 2026 21:18
@lejmr lejmr closed this Oct 24, 2026
@lejmr lejmr reopened this Oct 24, 2026
@lejmr
lejmr merged commit a638258 into main Oct 24, 2026
42 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant