Skip to content

fix(verify): real-boundary fixes — CRLF patch, tree-sitter Tree/bytes, stderr - #11

Merged
ManSio merged 1 commit into
mainfrom
feat/lsp-thin-client
Aug 25, 2026
Merged

ManSio merged 1 commit into
mainfrom
feat/lsp-thin-client

Conversation

@ManSio

@ManSio ManSio commented Aug 25, 2026

Copy link
Copy Markdown
Owner

Три реальных бага, вскрытых ЖИВОЙ верификацией (fake/unit-тесты были зелёными):

  1. CRLF: Path.write_text на Windows транслирует LF->CRLF в патч-файле -> git apply --check падает (ручной bash-repro с LF-патчем проходил). Файкс: newline="
    ".
  2. Дерево: реальный tree-sitter отдаёт TREE (дети в .root_node) — fake-тесты не моделировали -> реальный парс молча возвращал []. Файкс: унификация через root_node + регрессия.
  3. Байты: node.text у tree-sitter — bytes (b'ast'); + шум имён из import_list. Файкс: decode + skip import_list/aliased_import.

Плюс: _run теперь показывает stderr при провале (было DEVNULL — пустая диагностика).

Guard: 16 тестов (12 language_imports + 4 change_preview); live-точность против ground-truth: ast/re/pathlib/typing верны, future miss + символы-шум — задокументированные best-effort границы.

…, stderr

- change_preview._run: surface stderr on failure (was DEVNULL -> empty diagnostics; 'patch --check failed:' had no message).
- change_preview: write patch with newline='\n' — Path.write_text CRLF-translated the patch on Windows, git apply --check failed (bash-repro with LF patch passed).
- language_imports._iter_nodes: real tree-sitter returns a TREE (.root_node holds children) — fake-tree tests missed it, real parse silently returned [].
- language_imports: decode bytes node.text (tree-sitter gives bytes -> 'b\'ast\''); skip import_list/aliased_import subtrees (names of imports are not modules).
- Guard: test_real_treesitter_tree_shape (Tree-shape regression). Live accuracy vs ground truth: ast/re/pathlib/typing correct; __future__ miss + import-symbol noise documented as best-effort limits.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0b9fd63a-4ae5-4762-aa58-29702660fb43


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ManSio
ManSio merged commit 1cfa992 into main Aug 25, 2026
13 checks passed
ManSio pushed a commit that referenced this pull request Sep 26, 2026
…production)

Blind mapper via opencode (longcat-2.0 x5, qwen3.7-plus x3, deepseek-v4.1-flash x3), isolated dir, MCP off, --pure, tools denied. Valid 5/11; in all valid runs #16 -> NONE (arrival symptom unreachable); the only failure is the same known false positive (#11 Safari/CSS -> a-generated-document-is-unverified), concentrated in deepseek (0/3 valid). Qualitative reproduction of E7 confirmed; numeric rate NOT reproduced (5/11 vs ~10/11) because --variant was not pinned. Raw runs and manifest under results/recovered_e7/.
ManSio pushed a commit that referenced this pull request Sep 26, 2026
Explicit per-run check: #11 (must-NONE) = NONE in 10/11 runs; the only non-NONE is exactly the run classified INVALID (longcat run5), so #11 passed in every valid run and is model-independent (~9% FP, the catalogue's neighbour-domain boundary, same class as the published arrival_fp). Fresh held-out candidates for F4b drafted by a context-free subagent from our ledgers (8 items, sources recorded); frozen_overlap_check.py -> OVERLAP: PASS.
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