Skip to content

Thanos and preflight: three Low observations from the #795 review (NUL in parse_answer text, selector-matcher tests, "keeps N days" wording) #804

Backlog

Description

@ephico2real2

Part of #26. Found by reviewers 1 and 2 on PR #795; proposed code in review-795/r2-report.md §3 (coordinator's workbench).

  1. NUL in Thanos error text. capacity/thanos.py parse_answer passes an upstream error string with U+0000 on; PostgreSQL refuses it in JSONB ("the jsonb type also rejects \u0000", postgresql.org/docs/16/datatype-json.html). The preflight step, sweep.py:89 and usage.py:247 all store it. On head a NUL makes the step's row fail to commit; the worker gives up after 5 attempts. Fix in parse_answer, once.
  2. Tests. No test fails if one matcher of the retention selector (namespace, job) is removed, and the replica-minimum test always puts the minimum last.
  3. Wording. The preflight output says "keeps N days" for a time-retention limit, not for data actually held.

How to prove each: a failing test per item, as in the report. Research mandate: quote the source for each fix.

Activity

  1. added
    bug
    sev:low
    Backlog
    on Dec 1, 2026
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

    Backlogbugsev:low

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions