Skip to content

cli tests: included-file diagnostic paths proven on a written project, not the fixture - #308

Merged
GoKubar merged 2 commits into
mainfrom
agent/daniel-parent/cli-multifile-test
Sep 14, 2026
Merged

GoKubar merged 2 commits into
mainfrom
agent/daniel-parent/cli-multifile-test

Conversation

@d-q222

@d-q222 d-q222 commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Lane daniel-parent (Max 20x, mac-m5pro-dq222; not daniel-vpclaude), claim GH-CLI-MULTIFILE-TEST, announced on #2 before starting.

Problem: multi_file_project_resolves_inputs_from_the_project_root fails on main 9bd4b025 (tests/cli.rs:142). It required fixtures/real-world/input-bibliography to report a diagnostic under sections/. The compiler now supports everything in those files, so there is none.

Not an engine regression: a diagnostic raised in an included file still names that file and its own line (sections/a.tex:2:7).

Change (test-only, fixtures untouched):

  • The fixture test keeps its closure, page-count and display-list assertions.
  • The path check moves to the new a_diagnostic_in_an_included_file_names_that_file. It writes a project with \\undefinedmacro in sections/a.tex and asserts the JSON path and line plus the stderr sections/a.tex:2:7: error[ prefix.

Gate: cargo test in crates/flashtex-cli: 6 unit, 13 integration, 0 failed. Independent of #303: it touches a different hunk of tests/cli.rs, and both merge cleanly with main.

… not the fixture

multi_file_project_resolves_inputs_from_the_project_root failed on main
9bd4b02: it asserted that fixtures/real-world/input-bibliography reports a
diagnostic under sections/, and the compiler now supports everything in
those files, so there is none. The engine is right (a diagnostic in an
included file still names it: sections/a.tex:2:7).

The fixture test keeps its closure, page and display-list checks. The path
check moves to a_diagnostic_in_an_included_file_names_that_file, which
writes a project with an unsupported command in sections/a.tex and asserts
path, line and the stderr prefix. flashtex-cli: 6 unit + 13 integration, 0
failed.

Implementation-Agent: daniel-parent (mac-m5pro-dq222)
Commit-Executor: git, direct
Co-authored-by: d-q222 <[email protected]>
d-q222 added a commit that referenced this pull request Sep 14, 2026
render-pipeline labels every compiler diagnostic "compiler" today
(display.rs from_compiler). Once it forwards the compiler's snake_case code
(#277 forwarding lane), "included file not found" arrives as
"recovered_input", and the dedupe would silently stop matching. Accept both.

cargo test -p flashtex-cli: unit 6/0; tests/cli 11 passed, 1 failed:
multi_file_project_resolves_inputs_from_the_project_root. That test also
fails without this change (control run, same branch), and #308 replaces its
fixture-dependent assertion.

Implementation-Agent: Claude Code (daniel-parent, mac-m5pro-dq222)
Commit-Executor: Claude Code (daniel-parent)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
d-q222 added a commit that referenced this pull request Sep 14, 2026
Add six cli.rs tests that pin GH-277 acceptance: rustc-style help for
\alpah, JSON suggestion, check --fix rewrite, --dry-run diff, suggestion
in an \input file, and --help mentioning --fix/--dry-run. Overlap and
hash-changed refusal will land with the apply module (need synthetic
edits; the compiler does not emit overlapping spans for \alpah).

Control (CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix, base 5b7a88b):
- unittests: test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
- --test cli: test result: FAILED. 12 passed; 1 failed (multi_file_project_resolves_inputs_from_the_project_root, fixture-dependent / PR #308)

New tests (same target dir):
- typo_alpah_full_output_has_a_help_block: FAILED (no "= help: did you mean `\alpha`?")
- typo_alpah_json_includes_suggestion: FAILED (suggestion key absent, left None)
- check_fix_rewrites_alpah_to_alpha / dry_run / input file: FAILED (exit 2, unknown option "--fix")
- check_help_mentions_fix_and_dry_run: FAILED (--help has no --fix)

Next: copy suggestion onto the CLI Diagnostic next to code.clone(), then
render the help block / short parenthetical / JSON key, then check --fix.

Open questions: none in-scope. Overlap/hash/symlink tests belong in the
apply module; they cannot be driven from the compiler's \alpah diagnostic.

Implementation-Agent: cursor-agent cursor-grok-4.6-high-fast
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>
d-q222 added a commit that referenced this pull request Sep 14, 2026
CLI Diagnostic copies pipeline suggestion next to code.clone(). Full
renderer prints `= help: did you mean \`\\alpha\`?` plus a `+` gutter over
the replaced line; short appends `(did you mean \alpha?)`; JSON emits
`suggestion` only when set. `check --fix [--dry-run]` applies non-
overlapping back-to-front byte edits, refuses changed files (SHA-256),
symlinks and paths outside the project root, writes atomically with mode
preserved, then re-checks. Overlap/hash/symlink/mode covered by fix.rs
unit tests (the compiler does not emit overlapping \alpah spans).

Ran (CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix):
- --bin flashtex: test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
- full cargo test --manifest-path crates/flashtex-cli/Cargo.toml:
  unittests ok. 21 passed; --test cli FAILED. 18 passed; 1 failed
  (multi_file_project_resolves_inputs_from_the_project_root — same
  pre-existing control failure; all six new GH-277 tests passed)

Next: no in-scope follow-up; lane is ready for daniel-parent review (no PR).

Open questions: none. Known #308 fixture failure left untouched.

Implementation-Agent: cursor-agent cursor-grok-4.6-high-fast
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>
d-q222 added a commit that referenced this pull request Sep 14, 2026
…g it

Review fix on the GH-277-cli-fix lane: collect_edits used
`end_byte.unwrap_or(start)`, so a diagnostic with a start but no end (or an
empty span) became an insertion at `start`. A compiler suggestion replaces
its span, so both ends are now required and the span must be non-empty.

cargo test -p flashtex-cli: bin 22/0 (+1: a_suggestion_without_a_full_span_is_not_turned_into_an_insertion);
tests/cli 18 passed, 1 failed: multi_file_project_resolves_inputs_from_the_project_root,
the same fixture-dependent failure as on the base 5b7a88b (replaced by #308).

Implementation-Agent: Claude Code (daniel-parent, mac-m5pro-dq222)
Commit-Executor: Claude Code (daniel-parent)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
@GoKubar
GoKubar merged commit 65e0f2b into main Sep 14, 2026
20 checks passed
@GoKubar
GoKubar deleted the agent/daniel-parent/cli-multifile-test branch September 14, 2026 14:43
GoKubar pushed a commit that referenced this pull request Sep 14, 2026
* cli: a missing \input is reported once, not twice

`\input{missing}` produced `error[missing_file]` from project discovery and
`error[compiler]: included file not found` from the pipeline at the same
path and start byte, so one mistake counted as two errors. The pipeline's
duplicate is now dropped when a `missing_file` diagnostic already sits at
that position, and its recovery text moves onto the surviving entry.
Nothing else is deduplicated.

Test: a_missing_include_is_reported_and_the_build_still_writes asserts one
error line at main.tex:4:1, the recovery text, and summary.errors == 1.
flashtex-cli: 6 unit, 11/12 integration; the one failure is the fixture
drift fixed in #308 (fails identically on main 9bd4b02).

Implementation-Agent: codex gpt-5.6-luna (max effort, cx slot plus)
Commit-Executor: git, direct, by daniel-parent after review (renamed a shadowing binding)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: d-q222 <[email protected]>

* cli: the missing-include dedupe also matches the compiler's own code

render-pipeline labels every compiler diagnostic "compiler" today
(display.rs from_compiler). Once it forwards the compiler's snake_case code
(#277 forwarding lane), "included file not found" arrives as
"recovered_input", and the dedupe would silently stop matching. Accept both.

cargo test -p flashtex-cli: unit 6/0; tests/cli 11 passed, 1 failed:
multi_file_project_resolves_inputs_from_the_project_root. That test also
fails without this change (control run, same branch), and #308 replaces its
fixture-dependent assertion.

Implementation-Agent: Claude Code (daniel-parent, mac-m5pro-dq222)
Commit-Executor: Claude Code (daniel-parent)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz
GoKubar pushed a commit that referenced this pull request Sep 14, 2026
… (re-opened #310 onto main after #303 merged) (#387)

* cli: rustc-style diagnostics with a source excerpt and carets (#277 part 2)

`flashtex check`/`build`/`watch` print each diagnostic as a header, a
`--> file:line:col` pointer, the source line(s) under a line-number
gutter, carets under the byte span and a wrapped `= recovery:` line.

- `--diagnostics=full|short|json`: full is the new form; short is the
  unchanged one-line `line_text`; json is `--json`. The default is full
  when stderr is a terminal and short otherwise, so piped output and
  scripts see exactly what they did before.
- `--color=auto|always|never`; auto is on for a terminal unless NO_COLOR.
- Uses only the fields a diagnostic already has (code, message, span,
  recovery). Structured labels/help from #277 part (1) can be added to
  the renderer without changing this path.
- Spans: tabs expanded so carets line up, multi-byte text, empty spans
  and spans past the end of the text get one caret, spans longer than
  four lines show the first two and the last.

Tests: 7 renderer unit tests, one end-to-end test for the flags. The
pre-existing multi_file_project_resolves_inputs_from_the_project_root
failure reproduces on unmodified main 9bd4b02 and is not touched here.

Implementation-Agent: daniel-parent (mac-m5pro-dq222)
Commit-Executor: git, direct
Co-authored-by: d-q222 <[email protected]>

* cli: fold per-font warnings into one entry, clear the terminal between watch rebuilds

`--diagnostics=full` printed one entry per math font for the same
`math_resource_profile` warning (4 of HW1's 6 diagnostics). Positionless
diagnostics that differ only in a leading `name:`, wherever else the message
repeats that name, now print as one entry listing every name:

  warning[math_resource_profile]: lmex10, lmmi10, lmmi8, lmsy10: glyphs drawn from latinmodern-math ...

The summary counts, `--diagnostics=short`, piped output and `--json` are
unchanged; nothing is hidden or reclassified. `watch` clears a terminal
before each rebuild so the latest run is the only one on screen (piped
stderr is untouched).

Tests: 2 new unit tests (fold in place with the name repeated in the
message; located, single and multi-word-name diagnostics never rewritten).
flashtex-cli: 15 unit, 12/13 integration; the one failure is the fixture
drift fixed separately in #308.

Implementation-Agent: daniel-parent (mac-m5pro-dq222)
Commit-Executor: git, direct
Co-authored-by: d-q222 <[email protected]>
d-q222 added a commit that referenced this pull request Sep 14, 2026
Merged origin/main (2cf635b). #303 and #354 are on main; this lane no
longer needs its stacked pipeline-diag-forward display.rs code.

Conflict resolution:
- crates/flashtex-cli/src/main.rs: kept --fix/--dry-run and main's
  version_string (#420), collapse_repeats, and watch screen-clear. The
  post-fix re-check also uses collapse_repeats.
- crates/flashtex-cli/src/report.rs (add/add): kept main's structure
  (collapse_repeats) and ported this lane's `= help:` / `+` gutter
  suggestion rendering. Fold equality also compares suggestion.
- crates/render-pipeline/src/display.rs: took main's file. #354 already
  forwards compiler `code` exactly and runtime-v1 `suggestion`. This
  lane's default_code re-derivation was dropped (CLI reads suggestion
  from the pipeline Diagnostic; it does not need that re-derivation).

--fix still has no ambiguity policy. None existed; PR #444 is the
unique-closest-match rule, so the CLI applies whatever suggestion the
compiler emitted.

compile.rs auto-merged: suggestion copy plus main's missing-include
dedup. Tests in tests/cli.rs stayed at the end of the file.

Ran:
- CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix cargo test --manifest-path crates/flashtex-cli/Cargo.toml
  unittests: test result: ok. 24 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
  tests/cli.rs: test result: ok. 20 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
  (multi_file_project_resolves_inputs_from_the_project_root now passes; #308 landed on main)
- cargo test --manifest-path crates/render-pipeline/Cargo.toml --lib
  test result: ok. 110 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

Next: push this merge to origin/agent/daniel-parent/cli-fix.

Open questions: none in-scope. Ambiguous suggestions are compiler-side (#444, still open).

Implementation-Agent: cursor-agent cursor-grok-4.6
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>
GoKubar pushed a commit that referenced this pull request Sep 15, 2026
…dry-run] with symlink-safe atomic writes (#362)

* cli: rustc-style diagnostics with a source excerpt and carets (#277 part 2)

`flashtex check`/`build`/`watch` print each diagnostic as a header, a
`--> file:line:col` pointer, the source line(s) under a line-number
gutter, carets under the byte span and a wrapped `= recovery:` line.

- `--diagnostics=full|short|json`: full is the new form; short is the
  unchanged one-line `line_text`; json is `--json`. The default is full
  when stderr is a terminal and short otherwise, so piped output and
  scripts see exactly what they did before.
- `--color=auto|always|never`; auto is on for a terminal unless NO_COLOR.
- Uses only the fields a diagnostic already has (code, message, span,
  recovery). Structured labels/help from #277 part (1) can be added to
  the renderer without changing this path.
- Spans: tabs expanded so carets line up, multi-byte text, empty spans
  and spans past the end of the text get one caret, spans longer than
  four lines show the first two and the last.

Tests: 7 renderer unit tests, one end-to-end test for the flags. The
pre-existing multi_file_project_resolves_inputs_from_the_project_root
failure reproduces on unmodified main 9bd4b02 and is not touched here.

Implementation-Agent: daniel-parent (mac-m5pro-dq222)
Commit-Executor: git, direct
Co-authored-by: d-q222 <[email protected]>

* wip(#277): reproduce from_compiler dropping code and suggestion

Add display::Diagnostic.suggestion (None at every constructor) and tests
that expect unknown_command/\alpha and unsupported_feature. from_compiler
still hardcodes code "compiler" and does not copy suggestion.

Ran: CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-diagfwd cargo test --manifest-path crates/render-pipeline/Cargo.toml --lib from_compiler_forwards
Result: test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 89 filtered out
  display::tests::from_compiler_forwards_code_and_suggestion: left "compiler" right "unknown_command"

Next: forward compiler code (explicit, else default_code, else "compiler")
and suggestion; emit suggestion only in runtime-v1 JSON; extend corpus
owner_for; keep v2 diagnostics without a suggestion key.

Open questions: none in-scope. vendor/, apps, protocol schema untouched.

Implementation-Agent: cursor-agent cursor-grok-4.6
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>

* wip(#277): forward compiler diagnostic code and suggestion

from_compiler copies the compiler's code (explicit, else default_code(message),
else "compiler") and suggestion. runtime-v1 JSON emits suggestion only when
set; display-list-v2 diagnostics are unchanged except the code value.
owner_for accepts the compiler code set; tikz_pipeline rejects those codes
too so a forwarded unknown_command cannot slip through as "not compiler".

Ran (CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-diagfwd):
- --lib from_compiler_forwards -- writer_matches_value_tree: test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 88 filtered out
- --lib write_json_matches_the_value_tree: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 89 filtered out
- --test compiler_diagnostic_forward: test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
- --test tikz_pipeline: test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
- python3 -m unittest tools.real-world-corpus.test_run: Ran 6 tests in 0.008s OK

Next: full cargo test --manifest-path crates/render-pipeline/Cargo.toml control-vs-after.

Open questions: no in-scope golden embeds "code":"compiler" for a compiler
diagnostic (vendor/pdf fixture and apps/mac display-list fixture are out of
lane). docs/user/compiler.md still shows the old example.

Implementation-Agent: cursor-agent cursor-grok-4.6
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>

* wip(#277): reproduce CLI dropping suggestion and lacking --fix

Add six cli.rs tests that pin GH-277 acceptance: rustc-style help for
\alpah, JSON suggestion, check --fix rewrite, --dry-run diff, suggestion
in an \input file, and --help mentioning --fix/--dry-run. Overlap and
hash-changed refusal will land with the apply module (need synthetic
edits; the compiler does not emit overlapping spans for \alpah).

Control (CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix, base 5b7a88b):
- unittests: test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
- --test cli: test result: FAILED. 12 passed; 1 failed (multi_file_project_resolves_inputs_from_the_project_root, fixture-dependent / PR #308)

New tests (same target dir):
- typo_alpah_full_output_has_a_help_block: FAILED (no "= help: did you mean `\alpha`?")
- typo_alpah_json_includes_suggestion: FAILED (suggestion key absent, left None)
- check_fix_rewrites_alpah_to_alpha / dry_run / input file: FAILED (exit 2, unknown option "--fix")
- check_help_mentions_fix_and_dry_run: FAILED (--help has no --fix)

Next: copy suggestion onto the CLI Diagnostic next to code.clone(), then
render the help block / short parenthetical / JSON key, then check --fix.

Open questions: none in-scope. Overlap/hash/symlink tests belong in the
apply module; they cannot be driven from the compiler's \alpah diagnostic.

Implementation-Agent: cursor-agent cursor-grok-4.6-high-fast
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>

* wip(#277): copy suggestion, render help, and check --fix

CLI Diagnostic copies pipeline suggestion next to code.clone(). Full
renderer prints `= help: did you mean \`\\alpha\`?` plus a `+` gutter over
the replaced line; short appends `(did you mean \alpha?)`; JSON emits
`suggestion` only when set. `check --fix [--dry-run]` applies non-
overlapping back-to-front byte edits, refuses changed files (SHA-256),
symlinks and paths outside the project root, writes atomically with mode
preserved, then re-checks. Overlap/hash/symlink/mode covered by fix.rs
unit tests (the compiler does not emit overlapping \alpah spans).

Ran (CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix):
- --bin flashtex: test result: ok. 21 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
- full cargo test --manifest-path crates/flashtex-cli/Cargo.toml:
  unittests ok. 21 passed; --test cli FAILED. 18 passed; 1 failed
  (multi_file_project_resolves_inputs_from_the_project_root — same
  pre-existing control failure; all six new GH-277 tests passed)

Next: no in-scope follow-up; lane is ready for daniel-parent review (no PR).

Open questions: none. Known #308 fixture failure left untouched.

Implementation-Agent: cursor-agent cursor-grok-4.6-high-fast
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>

* cli: --fix skips a suggestion without a full span instead of inserting it

Review fix on the GH-277-cli-fix lane: collect_edits used
`end_byte.unwrap_or(start)`, so a diagnostic with a start but no end (or an
empty span) became an insertion at `start`. A compiler suggestion replaces
its span, so both ends are now required and the span must be non-empty.

cargo test -p flashtex-cli: bin 22/0 (+1: a_suggestion_without_a_full_span_is_not_turned_into_an_insertion);
tests/cli 18 passed, 1 failed: multi_file_project_resolves_inputs_from_the_project_root,
the same fixture-dependent failure as on the base 5b7a88b (replaced by #308).

Implementation-Agent: Claude Code (daniel-parent, mac-m5pro-dq222)
Commit-Executor: Claude Code (daniel-parent)
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

* wip(#277): failing tests for symlink-parent writes and UTF-8 spans

Adds the --fix safety matrix. Two tests fail on 6abfbec, as intended:

- a_symlinked_parent_directory_is_refused: with root/link -> root/src
  and diagnostic path link/main.tex, apply reports issues=1, skipped=[],
  and rewrites src/main.tex. resolve_writable only lstats the leaf and
  canonicalises the parent, so the temp+rename follows the directory
  symlink.
- a_span_on_a_utf8_multibyte_boundary_is_refused: start=1,end=3 on
  éé (c3 a9 c3 a9) with an empty replacement leaves a valid é;
  from_utf8 accepts it and the file is written.

The rest of the matrix already passes: leaf symlink, ../ and absolute
paths, CRLF preservation, back-to-front non-overlapping edits,
overlapping skips, dry-run directory listing, JSON omitting the
suggestion key (extracted diagnostic_json so the assertion is
unconditional).

Ran:
- CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix cargo test --manifest-path crates/flashtex-cli/Cargo.toml --bin flashtex -- a_symlinked_parent_directory_is_refused a_span_on_a_utf8_multibyte_boundary_is_refused
  test result: FAILED. 0 passed; 2 failed; 0 ignored; 0 measured; 29 filtered out
- same binary filter for the other new tests
  test result: ok. 7 passed; 0 failed; 0 ignored; 0 measured; 24 filtered out

Next: walk every path component with symlink_metadata and refuse
non-char-boundary spans before splicing.

Open questions: none.

Implementation-Agent: cursor-agent cursor-grok-4.6
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>

* wip(#277): refuse writes through any symlink component

resolve_writable walked only the leaf and canonicalised the parent, so a
directory symlink (root/link -> root/src, diagnostic link/main.tex) still
took the temp+rename to src/main.tex. It now lstats every component from
the project root to the file and returns Skip::Symlink if any is a
symlink. `..` and absolute paths are still rejected before the walk.
The atomic temp+rename stays in that verified real directory.

apply_edits_back_to_front also refuses a span whose start or end is not
a UTF-8 char boundary, even when the spliced bytes happen to be valid
UTF-8.

Ran:
- CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix cargo test --manifest-path crates/flashtex-cli/Cargo.toml --bin flashtex -- a_symlinked_parent_directory_is_refused a_span_on_a_utf8_multibyte_boundary_is_refused a_symlink_target a_parent_escape crlf_bytes non_overlapping overlapping dry_run_creates json_omits a_file_changed
  test result: ok. 10 passed; 0 failed; 0 ignored; 0 measured; 21 filtered out

The two tests that failed on 83211e8 now pass.

Next: git fetch origin && git merge origin/main, then an end-to-end
test that an ambiguous typo (#444: igl/lph/igm) gets no suggestion and
--fix writes nothing, while \\alpah is still fixed.

Open questions: CLI links render-pipeline/vendor/compiler, not
crates/compiler. If origin/main's #444 did not re-pin the vendor, the
e2e test is a vendor-re-pin (out of scope) and will be reported.

Implementation-Agent: cursor-agent cursor-grok-4.6
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>

* wip(#277): e2e that an ambiguous typo is not a --fix

Adds check_fix_skips_an_ambiguous_typo_and_still_fixes_alpah using #444's
inputs: `\igl` (tie between `\Bigl` and `\bigl`) must have no suggestion
key and `--fix` must leave the file bytes unchanged; `\alpah` still
rewrites to `\alpha`.

This test FAILS on the current CLI: flashtex-cli links
render-pipeline/vendor/compiler (PIN e44d591), which still uses
list-order suggest_command. Observed JSON for `\igl`:
"suggestion":"\\Bigl". crates/compiler on origin/main has #444
(closest_commands / unique match only), but a vendor re-pin is out of
this lane's scope. Not done.

Ran:
- CARGO_TARGET_DIR=/Users/dqi26/flashtex/target-clifix cargo test --manifest-path crates/flashtex-cli/Cargo.toml
  unittests: test result: ok. 31 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
  tests/cli.rs: test result: FAILED. 20 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
  (the one failure is check_fix_skips_an_ambiguous_typo_and_still_fixes_alpah)

Next: stop. A vendor re-pin of compiler onto #444 is required before
this e2e can pass; this lane must not do that re-pin.

Open questions: who owns the vendor/compiler re-pin so `--fix` sees
#444's unique-closest-match rule?

Implementation-Agent: cursor-agent cursor-grok-4.6
Commit-Executor: cursor-agent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Co-authored-by: Cursor <[email protected]>

* wip(#277): ignore the #444 e2e until vendor/compiler is re-pinned past #444

The CLI links vendor/compiler, which still picks list-order suggestions, so
\\igl keeps a suggestion. The test is the contract for after the re-pin
(#451 pins faa7d48, which predates #444).

What was run: cargo test --manifest-path crates/flashtex-cli/Cargo.toml
test result: ok. 31 passed; 0 failed; 0 ignored
test result: ok. 20 passed; 0 failed; 1 ignored

Implementation-Agent: daniel-parent (Claude Code, mac-m5pro-dq222)
Commit-Executor: daniel-parent
Lane-Owner: daniel-parent (mac-m5pro-dq222)
Claude-Session: https://claude.ai/code/session_012c9XLkHjePPGBuarrmE2mz

---------

Co-authored-by: Cursor <[email protected]>
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.

2 participants