Skip to content

feat(ENG-4364): opt-in tier3 drop_shape_only_fields for whole-result reviews - #81

Merged
hiskudin merged 4 commits into
mainfrom
feat/eng-4364-tier3-shape-filter
Nov 18, 2026
Merged

hiskudin merged 4 commits into
mainfrom
feat/eng-4364-tier3-shape-filter

Conversation

@hiskudin

@hiskudin hiskudin commented Nov 18, 2026 •

Copy link
Copy Markdown
Collaborator

What

Port of StackOneHQ/defender#157: the opt-in Tier 3 option drop_shape_only_fields (also accepted as dropShapeOnlyFields), default False, for whole-result reviews.

With it on, the whole-result serializer leaves a path: value line out of the reviewer input when:

  • the key is a plain field path of short field names: each segment at most 32 characters and 3 words;
  • the whole value, trimmed, is null, a boolean, a number, a UUID or hex ID, an ISO date or a hex colour.

Multi-line values, text-like keys, empty values and top-level values always stay. Left-out strings count as covered, so filtering alone never flags oversize. Only the reviewer's input changes.

Regexes are ASCII-only and lengths are UTF-16, as in TS.

Tests

  • Conformance synced to the defender#157 branch: five new tier3-serialize cases.
  • Tests for the snake_case option, off by default, and UTF-16 accounting next to astral text.
  • uv run pytest: 795 passed. uv run ruff check: clean.

🤖 Generated with Claude Code


Summary by cubic

Adds an opt-in drop_shape_only_fields (dropShapeOnlyFields) option, default False, that trims whole-result reviewer input by leaving out path: value lines whose key is a plain path of short field names and whose whole value is null, a boolean, a number, a UUID or hex ID, an ISO date, or a hex colour. This reduces per-review input size for the Tier 3 judge, supporting the load-reduction work in ENG-4364. Only the reviewer's input changes; the returned result and Tier 1/2 behavior are unaffected.

  • Left-out lines count as covered, so filtering alone never flags oversize or degraded coverage.
  • Text-like keys, multi-line and empty values, top-level values, and array elements without an object key on their path always stay.
  • Matching is ASCII-only, including case folding (values like "falſe" are kept), key segments are capped at 32 characters and 3 words, and lengths are measured in UTF-16 to match the TypeScript reference.
  • Synced conformance suite with six new tier3-serialize cases, plus unit tests for the snake_case option, default-off behavior, UTF-16 accounting next to astral text, and ASCII-only case folding.

Written for commit d4013c3. Summary will update on new commits.

View guided diff Turn on auto-fix

…reviews

Port of StackOneHQ/defender#157. The whole-result serializer can leave
out `path: value` lines whose key is a plain path of short field names
and whose whole value is null, a boolean, a number, a UUID or hex ID, an
ISO date or a hex colour. Left-out strings count as covered. Off by
default; the returned result and Tier 1/2 are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hiskudin and others added 3 commits November 18, 2026 15:30
Python's IGNORECASE folded U+017F to s and U+0131 to i, so values like
"falſe" were left out in Python but kept in TS.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Port of the TypeScript fix: top-level array elements stay in the
reviewer input.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts:
#	tests/conformance/VERSION
@hiskudin
hiskudin merged commit f280861 into main Nov 18, 2026
14 of 15 checks passed
@hiskudin
hiskudin deleted the feat/eng-4364-tier3-shape-filter branch November 18, 2026 16:21
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