Skip to content

Reject adjacent single-quoted tokens in native schedule visibility queries #1040

Closed

Description

@rmcdaniel

Native schedule visibility parsing accepts adjacent single-quoted tokens as one string literal. Source inspection of accepted main d8eb3bc1a5368752be823784521a9a09ec44de71 confirms that parse_literal checks only the first and last single quote, then unescapes the whole interior. For example, Note = 'a' 'b' is accepted as a single value containing internal quote characters instead of rejecting the second token.

The PHP counterpart and four old-fail/new-refuse source vectors are recorded in Workflow #1036. Waterline owns that PHP helper correction and its 37-case vector set. The native mapping is a separate Server defect. This finding does not assert that an OR expression is accepted; the earlier OR example was already refused.

Acceptance:

  • A single-quoted literal consumes exactly one complete token. Adjacent tokens, trailing non-whitespace, and unescaped interior quote boundaries refuse through the existing query-validation error before query execution.
  • Preserve valid empty strings, ordinary text, escaped single quotes and backslashes, double-quoted JSON strings, current type rules and existing OR refusals.
  • Add focused native parser regression controls and bind the exact shared PHP vector identity rather than changing the frozen historical c577 reference or claiming it passes the new refusals.

Owner: server for the native parser/source follow-through; Waterline for the consumed PHP vectors. Source inspection is the current native evidence; no native/backend run or published-artifact acceptance is claimed. The active #1036 integration and its bounded CI pacing correction remain first, followed by the current source train. This issue selects no release, deployment or extra backend experiment. Related compatibility parent: #325.

Activity

  1. rmcdaniel commented on Nov 5, 2026

    @rmcdaniel
    MemberAuthor

    Native-consumption fixture from the corrected Workflow helper:

    • Commit d28ec380b98f3a9f09447df464b9cfc85c4f101d / tree 3f70ccf517ec541ac14844bd60b5f59b45850f23.
    • Path tests/Fixtures/ScheduleVisibilityQuery/system-fields.json.
    • Exact Git blob bytes: 7903; SHA-256 23786cdc9d4b784ee85fcc8c787e40949f0876383de72f316449c54f8a7f0f24.
    • Immutable source.

    The JSON contains 37 consumed vectors. New adjacent-token refusals are adjacent_single_quoted_space, adjacent_single_quoted_no_space, adjacent_single_quoted_tab, and adjacent_single_quoted_before_and. Exact old PHP source fails those four; the corrected PHP 8.4.27 parser passes all 37. Escape/backslash/unknown-escape positives and single_quoted_or_refused retain their intended behavior. Existing numeric-boundary vectors, including the separate #699 concern, keep their own attribution. No native pass is inferred.

    The frozen native_reference remains historical. Workflow's corrected source/API/storage review is on #1036; current exact-head hosted checks are pending. Server owns the corresponding native correction and source reference here, as coordinated. No additional native/backend run is requested.

  2. rmcdaniel commented on Nov 5, 2026

    @rmcdaniel
    MemberAuthor

    The native source correction is preserved on fix/server-schedule-query-literals at 2c47c4e09f65c9e05f10ed4113909da16be41a35 (base accepted main d8eb3bc1), independently of the active CI/promotion train. It parses one complete single-quoted token, preserves recognized quote/backslash escapes and unknown escapes, and rejects additional tokens. It also addresses existing #699 in the same literal parser: integer range is checked rather than saturated, and non-finite decimal conversion refuses.

    The exact 7,903-byte/37-case Workflow fixture is copied without changing its historical native_reference. The native consumer applies the existing request trim before pure parsing. Separate Count/Weight boundary controls isolate #699, since the system fixture's Note field alone cannot distinguish an overflowing number from an ordinary wrong-typed number.

    A new HTTP/database control first accepts signed-long boundaries and a finite double, then makes the schedule table unavailable in its disposable test database. The invalid numeric and adjacent-token requests must still return the existing invalid_schedule_visibility_query 422; an otherwise valid query must reach the storage guard and return the real storage_unavailable 503. The test closes the runtime and removes its database through the existing test helper.

    JSON/hash/unique-case, whitespace and secret/private-path checks pass. These Rust tests are authored but not executed or qualified yet. The next action is an ordinary maintained-base draft/CI after the current #1036/#1041 pacing step, preserving the ordered source train. This is not a published fix, and the existing release/runtime gates remain. Owner: server.

  3. rmcdaniel commented on Nov 5, 2026

    @rmcdaniel
    MemberAuthor

    Bounded grammar/vector source review of 2c47c4e0 over d8eb3bc1, covering the parser delta and its new unit/HTTP controls: no new finding in this slice.

    The single-quoted scanner closes on the first unescaped quote and requires end-of-token, preserves quote/backslash and unknown-escape values, and handles UTF-8 safely because its byte slice follows the already checked ASCII opening quote. It matches the corrected PHP helper's intended single-token grammar. The committed fixture is independently verified byte-identical to Workflow d28ec380: 7,903 bytes / 37 cases / SHA-256 23786cdc9d4b784ee85fcc8c787e40949f0876383de72f316449c54f8a7f0f24.

    The numeric correction returns a typed refusal on signed-64-bit parse failure and prevents nonfinite decimal conversion. Count/Weight unit cases exercise those rules independently of the system fields' string-type checks. The HTTP guard establishes valid queries before hiding the schedules table, then requires invalid literals to refuse before storage access while a valid query reaches the expected unavailable-storage outcome. That avoids mistaking a field-type or empty-storage refusal for the numeric fix.

    This is source review, not Rust test or native/backend/published parity evidence. I ran no extra cell. Existing frozen-reference attribution stays historical. Server owns the authored controls, ordinary qualification, integration and any later publication; source/CI pacing remains in the existing queue.

  4. rmcdaniel commented on Nov 5, 2026

    @rmcdaniel
    MemberAuthor

    The reviewed parser correction is normally refreshed onto accepted Server main cf069f6396f29e8f90563a6d75108779e30c3a2a at cf9c6e0adf8eb71562a3ee76bc3683cc356537e2 / tree fead4426306413d4a7541a8c96a778a5a44ce092, ordered parents [2c47c4e0, cf069f63], and pushed without rewriting the source branch.

    Its four-path delta remains the exact-single-token scanner, checked signed-64-bit/finite-double parsing, consumed shared fixture and focused parser/API regression coverage. The immutable shared fixture still has exactly 7,903 bytes / 37 cases / SHA-256 23786cdc9d4b784ee85fcc8c787e40949f0876383de72f316449c54f8a7f0f24; accepted main changed no parser source, so the prior bounded grammar review still describes these bytes. Whitespace/fixture/changed-line credential checks pass. No Rust compilation or HTTP/database control has been executed locally, and no source pass is claimed for those controls.

    Server owns the next ordinary draft-PR/native CI qualification after #1039's current source train keeps pace, followed by the published native acceptance required for issue closure. No second PR/native/backend run or release was started by this branch refresh. The existing #699 numeric-boundary attribution remains separate and linked.

  5. rmcdaniel commented on Nov 5, 2026

    @rmcdaniel
    MemberAuthor

    The native correction is now draft Server #1042, exact e35fb78c0e6dcdcc6c09ecfeb1f345779753b7eb / tree 6c6a9a055b3ce6374ddfdb1df0c1f07afb2bd8f4 on actual accepted main 0166afb225c75feb8f67d2d8963e49183550763c after #1039 acceptance and cleanup.

    The normal refresh preserves all four prepared feature blobs, including the exact Workflow d28ec380 fixture: 7,903 bytes / 37 unique cases / SHA-256 23786cdc9d4b784ee85fcc8c787e40949f0876383de72f316449c54f8a7f0f24. It requires one complete single-quoted token, preserves escaped/unknown-escape semantics, rejects signed-integer overflow and makes non-finite decimal refusal explicit. Separate Count/Weight controls avoid confusing text-field type refusal with numeric-range validation. The API test makes the schedule table unavailable so malformed literals must refuse before the schedule query, while a valid filter reaches the storage error.

    Fresh ordinary CI is running for this exact pair. The PR is draft, auto-merge is off and no issue-closing reference is selected. Local checks establish unchanged feature/fixture bytes, normal ancestry and clean source; Rust/backend execution is still unclaimed until the actual CI cells complete. Publication workflows are unchanged: native publication/promotion are dispatch-only, PHP publish remains retired with if: false, and this branch changes no chart path. No release or published parity is selected.

    Server owns qualification, corrections and the normal protected source queue. Published native acceptance remains a later #325 tuple gate, so #1040/#699 stay open. The frozen fixture's c577 reference remains historical and is never relabelled as passing these added refusals.

  6. rmcdaniel commented on Nov 5, 2026

    @rmcdaniel
    MemberAuthor

    Maintained-source reconciliation for draft #1042, exact e35fb78: I independently compared all four feature Git blobs with the previously reviewed 2c47c4e tree. They are identical:

    • rust/src/runtime/schedule_list.rs: 5e7deadf4a708c89fd29695454b01bc619561357
    • rust/tests/execution/schedules.rs: ece00f5cdb102c030f6784725971e586d0c1fa2f
    • tests/Fixtures/ScheduleVisibilityQuery/README.md: 6fae03d490fcfecc99f54f94cad098555b79d423
    • tests/Fixtures/ScheduleVisibilityQuery/system-fields.json: 8e1a020ac0b24eeb4bce88ff2bd13999f7a26315

    The shared fixture independently recomputes to 7,903 bytes / SHA-256 23786cdc9d4b784ee85fcc8c787e40949f0876383de72f316449c54f8a7f0f24, preserving the exact 37-case source from Workflow d28ec380. The earlier bounded grammar/vector review applies to these unchanged blobs; no new finding in that scope. The separate .github/workflows/server-parity.yml change and maintained-base integration/qualification remain Server-owned. This does not carry a terminal current-head backend or published-runtime result.

    No local Rust/PHP/backend run, image, installed test or qualification dispatch was started for this reconciliation. Original c577 reference and earlier evidence retain their actual attribution. #1040/#699 and the later published #325 tuple gate remain open under Server's acceptance criteria. The separately selected #1014 pair remains Server's next owned slice after its current source train; no parallel Waterline implementation follows.

  7. rmcdaniel commented on Nov 6, 2026

    @rmcdaniel
    MemberAuthor

    The narrow native parser correction is normally merged in #1042 at 7c9e3f971264ffccac90c5e6881fe3d3e33d7efc. Original queue and all five automatic main workflows passed at attempt 1. Actual-main acceptance and cleanup records the exact tree/parents and current checks.

    The consumed shared fixture remains 37 cases / 7,903 bytes / SHA-256 23786cdc9d4b784ee85fcc8c787e40949f0876383de72f316449c54f8a7f0f24. One complete single-quoted token is required, escaped quote/backslash behavior is retained, integer overflow and nonfinite floats are refused, and malformed queries refuse before schedule storage. The valid Note = 'safe' control still reaches the unavailable schedule table. The older c577 fixture reference remains historical and is not relabelled as passing the added cases.

    This is source/ordinary-CI acceptance. Exact published-native qualification remains the next artifact gate under #325. Registered search-attribute value matching and the broader #699 numeric contract are outside this narrow correction. The issue remains open for its remaining acceptance scope.

  8. rmcdaniel commented on Nov 11, 2026

    @rmcdaniel
    MemberAuthor

    Closing: fixed by #1042, released in native 3.2.0.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions