Skip to content

Preserve fields after escaped brace sequences#572

Draft
claell wants to merge 1 commit into
sciunto-org:mainfrom
claell:fix/452-preserve-fields-after-escaped-braces
Draft

Preserve fields after escaped brace sequences#572
claell wants to merge 1 commit into
sciunto-org:mainfrom
claell:fix/452-preserve-fields-after-escaped-braces

Conversation

@claell

@claell claell commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Keep field brace-depth accounting stable when an opening brace is escaped.
  • Preserve every field following the escaped-brace sequence.
  • Add a public parse/write/reparse regression so a shallow successful parse
    cannot conceal later-field loss.

Follow-up to #452. The earlier report was closed after discussion of enclosing
middleware, but a stricter reproduction shows that current main silently
drops all fields following the reported abstract sequence.

Validation

  • Complete enclosing regression matrix under warnings-as-errors: 917 passed, 10
    skipped.
  • Complete upstream suite: 2,577 passed, 12 skipped, with the four existing
    deprecation warnings in tests/test_entrypoint.py.
  • git diff --check: passed.
  • The project pre-commit executable was not available in the isolated local
    environment; GitHub CI should independently run the configured hooks.

Review note

This change was developed and validated in a concentrated session rather than
exercised over a long period in production. Because the splitter previously
returned a normal entry while losing later fields, careful human review of the
brace-state change and regression fixture is requested.

AI assistance

This pull request was prepared with ChatGPT Codex using GPT-5.6 Sol with high
reasoning effort. Codex assisted with analysis, implementation, branch
isolation, and test execution. Automated validation is not a substitute for
maintainer review.

* Keep brace-depth accounting stable for escaped opening braces.
* Verify later fields survive parse-write-parse round trips.
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