Skip to content

fix: /dev/stdin works for all pipeline commands (#335)#411

Merged
aallan merged 5 commits into
mainfrom
fix/stdin-double-read
Mar 28, 2026
Merged

fix: /dev/stdin works for all pipeline commands (#335)#411
aallan merged 5 commits into
mainfrom
fix/stdin-double-read

Conversation

@aallan

@aallan aallan commented Mar 28, 2026

Copy link
Copy Markdown
Owner

Summary

  • Every cmd_* function called p.read_text() to get source, then immediately called parse_file(path) which re-opened the same path. For /dev/stdin the second open returns empty content (stream already consumed), so the parse tree was empty and vera run failed with No exported functions to call
  • Fix: replace parse_file(path) with parse(source, file=str(p)) in all seven affected commands (check, verify, compile, run, test, parse, ast). cmd_parse and cmd_ast had no source variable before; they now read once before parsing. parse_file is no longer used in cli.py at all
  • No workarounds found in examples or tests — the bug was avoided by always using file paths

Changes

Test plan

  • echo '...' | vera run /dev/stdin produces correct output
  • echo '...' | vera check /dev/stdin passes
  • echo '...' | vera verify /dev/stdin passes
  • All existing CLI tests still pass
  • Full suite green (3,108 tests)

Closes #335

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • CLI correctly accepts and processes piped stdin and /dev/stdin across commands; imports resolve relative to the current working directory and output naming is CWD‑relative.
  • Tests

    • Added end‑to‑end tests covering run/check/verify/compile with stdin and import resolution.
  • Documentation

    • Updated testing metrics and example counts.
    • Removed a known‑issues entry about stdin-related failure.

…stdin (#335)

Every cmd_* function called p.read_text() to capture the source string
and then called parse_file(path) which re-opened the same path a second
time.  For /dev/stdin the second open consumes an already-exhausted
stream, returning empty content, causing the parse tree to be empty and
the run command to fail with 'No exported functions to call'.

Fix: replace parse_file(path) with parse(source, file=str(p)) in all
seven affected commands (check, verify, compile, run, test, parse, ast).
cmd_parse and cmd_ast previously had no source variable; they now read
once before parsing.  parse_file is no longer used in cli.py.

Also adds:
- TestStdinInput regression tests (4 tests) covering run, check, verify
  via both in-process and subprocess paths
- Removes #335 from KNOWN_ISSUES.md

Co-Authored-By: Claude <noreply@anthropic.invalid>
@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1391d6fb-d4d9-4ebd-bb92-35c648a6acb6

📥 Commits

Reviewing files that changed from the base of the PR and between e698bc0 and a599ea4.

📒 Files selected for processing (1)
  • vera/cli.py

📝 Walkthrough

Walkthrough

CLI now reads source once into memory and passes that content plus a resolved logical path to the parser to avoid multiple file reads (fixing /dev/stdin re-read issues). New end-to-end tests for stdin piping were added and the KNOWN_ISSUES entry for this bug was removed.

Changes

Cohort / File(s) Summary
Documentation
KNOWN_ISSUES.md
Removed the bug entry documenting /dev/stdin being consumed before main compilation (issue #335).
Testing
TESTING.md, tests/test_cli.py
Updated test inventory counts in TESTING.md. Added TestStdinInput tests to tests/test_cli.py (SIMPLE_PROGRAM + tests for run,check,verify,compile and an import-resolution case using tmp_path).
CLI behaviour / refactor
vera/cli.py
Added _load_and_parse(path) and _STDIN_PATHS; read file content once and call vera.parser.parse(source, file=path); normalise "-"/"/dev/stdin" to logical Path.cwd()/stdin.vera for resolution/output naming; refactored cmd_parse, cmd_check, cmd_verify, cmd_compile, cmd_run, cmd_ast, cmd_test to use shared parsed result while preserving existing error/JSON behaviours.

Sequence Diagram(s)

sequenceDiagram
    actor User
    participant CLI
    participant FileSystem
    participant Parser

    rect rgba(200,150,100,0.5)
    Note over User,FileSystem: Before (Issue `#335`)
    User->>CLI: vera run /dev/stdin
    CLI->>FileSystem: read_text() [1st read]
    FileSystem-->>CLI: source
    CLI->>Parser: parse_file(path="/dev/stdin")
    Parser->>FileSystem: read() [2nd read]
    FileSystem-->>Parser: ∅
    Parser-->>CLI: Error / no AST
    end

    rect rgba(100,200,100,0.5)
    Note over User,FileSystem: After (Fixed)
    User->>CLI: vera run /dev/stdin
    CLI->>FileSystem: read_text() [single read]
    FileSystem-->>CLI: source
    CLI->>Parser: parse(source, file="/dev/stdin")
    Parser-->>CLI: AST
    CLI->>CLI: use logical path (cwd/stdin.vera) for resolution/output naming
    end
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested labels

compiler, tests

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the primary fix: /dev/stdin now works across all pipeline commands, matching the core objective of resolving issue #335.
Linked Issues check ✅ Passed The PR successfully addresses all coding objectives from issue #335: stdin is now read once, parsed from source string in all seven commands, and logical path handling preserves module resolution with tests validating /dev/stdin across run, check, and verify.
Out of Scope Changes check ✅ Passed Documentation updates in TESTING.md and KNOWN_ISSUES.md are directly scoped to the fix—accounting for new test addition and issue closure—with no unrelated changes present.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/stdin-double-read

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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

@codecov

codecov Bot commented Mar 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.30%. Comparing base (0a137a2) to head (a599ea4).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #411      +/-   ##
==========================================
- Coverage   90.30%   90.30%   -0.01%     
==========================================
  Files          49       49              
  Lines       19107    19105       -2     
  Branches      220      220              
==========================================
- Hits        17255    17253       -2     
  Misses       1848     1848              
  Partials        4        4              
Flag Coverage Δ
javascript 50.58% <ø> (ø)
python 95.31% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/test_cli.py`:
- Line 2401: The test function test_check_reads_source_once currently declares
an unused parameter tmp_path which causes lint noise; update the function
signature in the test (def test_check_reads_source_once(...)) to remove the
tmp_path parameter so it no longer accepts or references tmp_path, and run the
tests/linter to confirm the unused-argument warning is resolved.
- Around line 2425-2433: In test_verify_dev_stdin_subprocess, add an assertion
on result.stdout to confirm the verify subprocess completed the expected
verification path (not just exit code); e.g. check result.stdout (or
result.stdout.lower()) contains a verification marker such as "verified",
"verification completed", or the tool's summary line (use result.stdout in the
assertion message for diagnostics) so the test verifies output content as well
as returncode.
- Around line 2388-2399: Rename the misnamed test_run_stdin to reflect that it
reads from a regular file (e.g., test_run_file) and update its docstring
accordingly; locate the test function named test_run_stdin (which calls cmd_run
on stdin_path and uses self.SIMPLE_PROGRAM/tmp_path) and change the name and
docstring so the test name and description match that it exercises file input
rather than /dev/stdin (do not modify cmd_run behavior in this change).

In `@vera/cli.py`:
- Around line 51-53: Create a small helper function (e.g., load_and_parse or
read_and_parse) that takes a path argument, constructs a Path, calls
read_text(encoding="utf-8"), and calls parse(source, file=str(p)), returning the
parsed tree (and optionally the source if callers need it); then replace the
duplicated patterns Path(path).read_text(...) + parse(...) in the CLI command
handlers with calls to this helper (update call sites at the locations using
Path and parse such as the blocks currently invoking Path(path) / read_text /
parse) to centralise reading/parsing and reduce duplication.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 2f5c5516-9126-40a5-9b87-2958b2f57506

📥 Commits

Reviewing files that changed from the base of the PR and between 0a137a2 and f859293.

📒 Files selected for processing (4)
  • KNOWN_ISSUES.md
  • TESTING.md
  • tests/test_cli.py
  • vera/cli.py
💤 Files with no reviewable changes (1)
  • KNOWN_ISSUES.md

Comment thread tests/test_cli.py Outdated
Comment thread tests/test_cli.py Outdated
Comment thread tests/test_cli.py
Comment thread vera/cli.py Outdated
- Rename test_run_stdin → test_run_file (it tests a regular file path)
- Remove unused tmp_path parameter from test_check_reads_source_once
- Add stdout assertion to test_verify_dev_stdin_subprocess ("verified")
- Extract _load_and_parse(path) helper in cli.py to centralise the
  read-once pattern; replace all 7 duplicated 3-line blocks with a
  single call; fixes mypy by typing return as Tree[object]

Co-Authored-By: Claude <noreply@anthropic.invalid>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
TESTING.md (1)

9-13: ⚠️ Potential issue | 🟡 Minor

The example totals are still inconsistent in this document.

The overview now says 30 example programs, but later sections of the same file still talk about 29 examples. Since this PR is already refreshing the headline metrics, please reconcile those counts in the same pass so TESTING.md stays self-consistent. Based on learnings, scripts/check_doc_counts.py automatically validates that documented example and conformance program counts in TESTING.md, CLAUDE.md, and related docs match the actual file counts.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@TESTING.md` around lines 9 - 13, TESTING.md currently has inconsistent
example counts (headline shows 30 examples while other sections still state 29);
update all occurrences of the example and conformance program totals in
TESTING.md so they match the refreshed headline metrics (e.g., change any "29"
example references to "30" and verify the "65 programs" count is consistent),
then run scripts/check_doc_counts.py to validate that TESTING.md, CLAUDE.md, and
related docs pass the automated checks and adjust any remaining mismatches
reported by that script.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@tests/test_cli.py`:
- Around line 2370-2430: The stdin tests in TestStdinInput only use an
import-free SIMPLE_PROGRAM and never exercise module resolution or default
output-path logic (e.g., for compile), so add two tests: one variant of the
existing subprocess tests that supplies a program containing "import lib;" to
run/verify/check against /dev/stdin (to exercise module resolution), and one
test that runs "vera.cli" with the "compile /dev/stdin" command (capturing
stdout/stderr and returncode) to ensure compile-time default output path
behavior is correct; update or add tests alongside test_run_dev_stdin_subprocess
and test_check_reads_source_once so they pass the program string via subprocess
input and assert correct return codes and expected outputs.

In `@vera/cli.py`:
- Around line 49-60: The helper _load_and_parse currently returns
Path("/dev/stdin") which causes ModuleResolver(_root=p.parent) and cmd_compile
output logic to treat stdin as a filesystem path; change _load_and_parse so
after reading the source it detects stdin (e.g. path == "-" or path ==
"/dev/stdin" or p.is_fifo()) and in that case return a separate logical/base
Path for resolution/output (e.g. Path.cwd()/Path("stdin") or
Path.cwd()/Path("stdin.rs")) instead of the actual /dev/stdin Path; update
callers that pass p to ModuleResolver(_root=...) and cmd_compile output naming
to use this returned logical/base Path rather than the raw p so imports and
output filenames resolve relative to the caller's working directory rather than
/dev.

---

Outside diff comments:
In `@TESTING.md`:
- Around line 9-13: TESTING.md currently has inconsistent example counts
(headline shows 30 examples while other sections still state 29); update all
occurrences of the example and conformance program totals in TESTING.md so they
match the refreshed headline metrics (e.g., change any "29" example references
to "30" and verify the "65 programs" count is consistent), then run
scripts/check_doc_counts.py to validate that TESTING.md, CLAUDE.md, and related
docs pass the automated checks and adjust any remaining mismatches reported by
that script.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 1fc69d15-d740-497e-aaad-3bcb63162274

📥 Commits

Reviewing files that changed from the base of the PR and between f859293 and 05081b0.

📒 Files selected for processing (3)
  • TESTING.md
  • tests/test_cli.py
  • vera/cli.py

Comment thread tests/test_cli.py
Comment thread vera/cli.py Outdated
- _load_and_parse: detect /dev/stdin / - and return Path.cwd()/"stdin.vera"
  so module resolution (ModuleResolver _root) and compile output naming
  (stdin.wasm) use CWD rather than /dev/.  Diagnostics retain the
  original path string for readable error locations.
- Add test_compile_dev_stdin_wat and test_compile_dev_stdin_default_output
  covering the new compile-from-stdin behaviour.
- TESTING.md: update three prose "29 examples" references to "30",
  and refresh test/line counts for test_cli.py (181→183, 2430→2455)
  and overall suite total (3108→3110).

Co-Authored-By: Claude <noreply@anthropic.invalid>
@aallan

aallan commented Mar 28, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai Fixed in commit 3bbff0e. Updated three prose references to '29 examples' in TESTING.md (lines 207, 242, 295) to '30'. All three instances were in coverage-table prose and the Ch3 feature matrix row. scripts/check_doc_counts.py confirms counts are now consistent.

@coderabbitai

coderabbitai Bot commented Mar 28, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

@aallan Thanks — confirmed, and good that scripts/check_doc_counts.py validated the update. I'll update the long-term memory to reflect the new canonical count.


✏️ Learnings added
Learnt from: aallan
URL: https://github.com/aallan/vera/pull/411

Timestamp: 2026-03-28T20:19:13.953Z
Learning: In repo aallan/vera, there are 30 example programs in `examples/` (top-level only; `ls examples/*.vera | wc -l` = 30). All must pass `vera check` and `vera verify`. The canonical count is validated by `scripts/check_doc_counts.py`; always defer to that script before flagging count mismatches. Any prose references to the example count in TESTING.md, CLAUDE.md, and related docs should read '30'.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


⛔ Learnings removed
Learnt from: aallan
Repo: aallan/vera PR: 0
File: :0-0
Timestamp: 2026-03-27T15:10:20.845Z
Learning: Applies to examples/**/*.vera (repo aallan/vera): There are 29 example programs in `examples/` (top-level only; `ls examples/*.vera | wc -l` = 29). All must pass `vera check` and `vera verify`. The canonical count is validated by `scripts/check_doc_counts.py`; always defer to that script before flagging count mismatches.

Learnt from: aallan
Repo: aallan/vera PR: 0
File: :0-0
Timestamp: 2026-03-25T16:24:36.297Z
Learning: In repo aallan/vera, the script `scripts/check_doc_counts.py` automatically validates that documented example and conformance program counts in TESTING.md, CLAUDE.md, and related docs match the actual file counts (`ls examples/*.vera | wc -l`, etc.). Do not flag count mismatches as bugs without first verifying against this script.

🧠 Learnings used
Learnt from: aallan
Repo: aallan/vera PR: 0
File: :0-0
Timestamp: 2026-03-25T16:24:36.297Z
Learning: In repo aallan/vera, the script `scripts/check_doc_counts.py` automatically validates that documented example and conformance program counts in TESTING.md, CLAUDE.md, and related docs match the actual file counts (`ls examples/*.vera | wc -l`, etc.). Do not flag count mismatches as bugs without first verifying against this script.

Learnt from: aallan
Repo: aallan/vera PR: 0
File: :0-0
Timestamp: 2026-03-27T15:10:20.845Z
Learning: Applies to examples/**/*.vera (repo aallan/vera): There are 29 example programs in `examples/` (top-level only; `ls examples/*.vera | wc -l` = 29). All must pass `vera check` and `vera verify`. The canonical count is validated by `scripts/check_doc_counts.py`; always defer to that script before flagging count mismatches.

Learnt from: CR
Repo: aallan/vera PR: 0
File: CONTRIBUTING.md:0-0
Timestamp: 2026-03-28T10:59:21.300Z
Learning: Update relevant documentation and tests when making code changes

Learnt from: aallan
Repo: aallan/vera PR: 350
File: tests/test_codegen.py:8630-8633
Timestamp: 2026-03-25T16:32:11.316Z
Learning: Repo aallan/vera PR `#350`: tests/test_codegen.py includes explicit WAT import‑gating coverage for JSON host imports — tests test_json_parse_wat_import, test_json_stringify_wat_import, and test_json_no_imports_when_unused verify that "vera.json_parse"/"vera.json_stringify" imports are emitted only when referenced and absent when unused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (1)
tests/test_cli.py (1)

2370-2455: ⚠️ Potential issue | 🟡 Minor

Coverage gap: stdin with imports not tested.

The test suite covers the core regression but doesn't exercise module resolution when piping stdin with imports. The _load_and_parse normalisation to Path.cwd()/"stdin.vera" means ModuleResolver would look for imports relative to CWD — this path is untested.

A test like this would close the gap:

def test_check_dev_stdin_with_import(self, tmp_path: Path) -> None:
    """vera check /dev/stdin resolves imports relative to CWD."""
    lib_src = """\
public fn helper(-> `@Int`)
  requires(true) ensures(true) effects(pure)
{ 1 }
"""
    main_src = """\
import lib(helper);
public fn main(-> `@Int`)
  requires(true) ensures(true) effects(pure)
{ helper() }
"""
    (tmp_path / "lib.vera").write_text(lib_src)
    result = subprocess.run(
        [sys.executable, "-m", "vera.cli", "check", "/dev/stdin"],
        input=main_src,
        capture_output=True,
        text=True,
        cwd=tmp_path,
    )
    assert result.returncode == 0, result.stderr
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@tests/test_cli.py` around lines 2370 - 2455, Add a new test in TestStdinInput
that exercises module resolution when reading /dev/stdin: create a helper module
file (e.g., "lib.vera") in a tmp_path, write a main source that imports
lib(helper) and call subprocess.run([sys.executable, "-m", "vera.cli", "check",
"/dev/stdin"], input=main_src, capture_output=True, text=True, cwd=tmp_path) and
assert returncode == 0; this ensures the _load_and_parse normalization to
Path.cwd()/"stdin.vera" and ModuleResolver import lookup are covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vera/cli.py`:
- Line 80: The unpacking of the tuple returned by _load_and_parse(path)
currently binds p and source which are unused; update the unpacking in
vera/cli.py to use underscore-prefixed names (e.g., _p, _source, tree or _, _,
tree) so unused variables are clearly marked and suppress Ruff RUF059; make the
same change in the cmd_ast code path where _load_and_parse is unpacked around
the referenced location (change the unused p and source there to
underscore-prefixed names as well).

---

Duplicate comments:
In `@tests/test_cli.py`:
- Around line 2370-2455: Add a new test in TestStdinInput that exercises module
resolution when reading /dev/stdin: create a helper module file (e.g.,
"lib.vera") in a tmp_path, write a main source that imports lib(helper) and call
subprocess.run([sys.executable, "-m", "vera.cli", "check", "/dev/stdin"],
input=main_src, capture_output=True, text=True, cwd=tmp_path) and assert
returncode == 0; this ensures the _load_and_parse normalization to
Path.cwd()/"stdin.vera" and ModuleResolver import lookup are covered.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: bddee9e5-de0c-4a98-bde7-5eb1b0823aee

📥 Commits

Reviewing files that changed from the base of the PR and between 05081b0 and 3bbff0e.

📒 Files selected for processing (3)
  • TESTING.md
  • tests/test_cli.py
  • vera/cli.py

Comment thread vera/cli.py Outdated
…din test

- cmd_parse and cmd_ast: rename unused `p, source` unpacking to `_p, _source`
  to clearly signal they are intentionally unused (suppresses RUF059).
- Add test_check_dev_stdin_module_resolution: creates lib.vera in tmp_path,
  pipes a program with `import lib(helper)` to /dev/stdin with cwd=tmp_path,
  and asserts check succeeds — directly validates that the logical-path fix
  routes ModuleResolver to CWD instead of /dev/.
- TESTING.md: update test counts (3110→3111, 183→184, 2455→2489).

Co-Authored-By: Claude <noreply@anthropic.invalid>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@vera/cli.py`:
- Line 52: The return type annotation on _load_and_parse currently uses
unnecessary forward-reference quotes; update the signature of _load_and_parse to
use a normal annotation tuple[Path, str, Tree[object]] (no surrounding quotes),
relying on the module-level import of Tree so the annotation is a real type
rather than a string.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5ef65ecf-f2d4-4ac2-8a39-5feee6b45a24

📥 Commits

Reviewing files that changed from the base of the PR and between 3bbff0e and e698bc0.

📒 Files selected for processing (3)
  • TESTING.md
  • tests/test_cli.py
  • vera/cli.py

Comment thread vera/cli.py Outdated
`from __future__ import annotations` (line 28) defers all annotations,
so the string quotes around `tuple[Path, str, Tree[object]]` are redundant
now that `Tree` is imported at module level.

Co-Authored-By: Claude <noreply@anthropic.invalid>
@aallan aallan merged commit 8ef7e5f into main Mar 28, 2026
17 checks passed
@aallan aallan deleted the fix/stdin-double-read branch March 28, 2026 20:47
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.

vera run /dev/stdin fails — stdin consumed before main compilation

1 participant