mirror of
https://github.com/tufanbarisyildirim/gonginx.git
synced 2026-04-27 00:35:51 +03:00
[PR #74] [MERGED] Improve parser/dumper safety, determinism, and API hardening #74
Labels
No labels
bug
enhancement
good first issue
pull-request
question
v2
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/gonginx#74
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/tufanbarisyildirim/gonginx/pull/74
Author: @tufanbarisyildirim
Created: 2/19/2026
Status: ✅ Merged
Merged: 2/20/2026
Merged by: @tufanbarisyildirim
Base:
master← Head:codex/enhancement-plan-implementation📝 Commits (3)
947d273harden parser and config error handling0aaba8bmake dumper deterministic and Lua-safe0c5b6badocument behavior changes and completed enhancement plan📊 Changes
18 files changed (+1221 additions, -68 deletions)
View changed files
📝
CONTRIBUTING.md(+4 -1)📝
GUIDE.md(+37 -0)📝
README.md(+16 -0)📝
config/config.go(+37 -2)➕
config/constructor_validation_test.go(+109 -0)📝
config/include.go(+13 -6)📝
config/location.go(+1 -1)📝
config/upstream.go(+4 -0)📝
dumper/dumper.go(+7 -5)📝
dumper/dumper_test.go(+54 -0)📝
dumper/lua.go(+280 -24)➕
dumper/lua_test.go(+71 -0)➕
parser/fuzz_test.go(+31 -0)📝
parser/lexer.go(+19 -2)📝
parser/lexer_test.go(+7 -8)📝
parser/parser.go(+86 -17)📝
parser/parser_test.go(+268 -2)➕
todo/enhancement-plan.md(+177 -0)📄 Description
Summary
This PR implements the completed enhancement plan to improve reliability and maintainability across parser, config, and dumper components.
It removes panic-prone runtime paths, makes include handling safe under cycles, hardens extension-point type assertions, preserves dumper determinism, and documents behavior/migration changes.
Commit Structure
harden parser and config error handling
WithIncludeCycleErr().FindUpstreamsStrict).make dumper deterministic and Lua-safe
DumpBlockby sorting a copied slice.#/--corruption:document behavior changes and completed enhancement plan
README.mdandGUIDE.mdwith behavior notes and migration guidance.CONTRIBUTING.mdwith race/fuzz guidance for parser/dumper safety changes.todo/enhancement-plan.mdwith completed checklist.Key Behavior Changes
WithIncludeCycleErr(),nil(no self-parent cycle).FindUpstreams()is permissive;FindUpstreamsStrict()provides typed strict errors.Validation
go test ./...✅go vet ./...✅🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.