Skip to content

[ENHANCEMENT] Keep fallback decisions with each parser result #41

Open

Description

@simurg79

Type

Enhancement — maintainability follow-up

Problem / Value

The parser tells its caller whether fallback processing is needed through shared mutable state rather than through the result of that parse. This relies on requests staying serial and makes later maintenance more error-prone.

Context

Deferred finding 🟢10 from PR #34: #34, which addresses #23. Source reviewed: 8c38f1c.

Each parse resets and may change a shared fallback flag. The worker reads the flag after awaiting the parse. Current serial dispatch avoids cross-request overlap; this is a design-hardening suggestion, not a demonstrated race or corruption bug.

Acceptance criteria

  • Return the fallback decision together with the corresponding parse result instead of reading it from shared mutable state.
  • Preserve current fallback behavior and worker replies.
  • Cover consecutive parses with different fallback outcomes so one request cannot inherit another's decision.
  • Keep the change local; do not introduce concurrency or general-purpose request machinery.

Constraints/Preferences

No user-visible behavior change is intended. Use the existing serial-worker contract.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions