[PR #7666] Local coordinates: a missing coordinate after a space expects a coordinate #7749

Open
opened 2026-11-03 07:23:38 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7666
Author: @ClickingMaster
Created: 11/2/2026
Status: 🔄 Open

Base: main ← Head: fix/local-coord-missing-double


📝 Commits (2)

  • 3e5058c Local coordinates: a missing coordinate after a space expects a coordinate, not 'mixed'
  • 828f06c Cite LocalCoordinates.parse

📊 Changes

2 files changed (+27 additions, -1 deletions)

View changed files

📝 crates/horizon-command/src/args.rs (+9 -1)
📝 crates/horizon-command/src/tests.rs (+18 -0)

📄 Description

🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally.

Fixes #7644

Cause: parse_local in crates/horizon-command/src/args.rs reported argument.pos.mixed (and reset the cursor) when nothing was left to read for the 2nd/3rd ^ coordinate. Vanilla's LocalCoordinates.readDouble throws argument.pos.missing.double there, cursor untouched; only a present non-^ character is "mixed".

Fix: check !can_read() first and return argument.pos.missing.double.

Test

local_coordinate_missing_after_space_expects_a_coordinate: before the fix "^1 " gave ("argument.pos.mixed", 0); after, ("argument.pos.missing.double", 3); "^1 ~" still mixed. cargo test -p horizon-command: 30 passed.

Self-check

  • cargo fmt, clippy -D warnings (horizon-command), tests
  • port_ledger check (parse_local now cites the vanilla method)
  • pr_ready.py not run: no ALSA headers

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7666 **Author:** [@ClickingMaster](https://github.com/ClickingMaster) **Created:** 11/2/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/local-coord-missing-double` --- ### 📝 Commits (2) - [`3e5058c`](https://github.com/horizon-rust/horizon/commit/3e5058c9f158378b80714f9022edb33eb9a40f8a) Local coordinates: a missing coordinate after a space expects a coordinate, not 'mixed' - [`828f06c`](https://github.com/horizon-rust/horizon/commit/828f06c0f83ff8ee50a0cae64364acc88802696e) Cite LocalCoordinates.parse ### 📊 Changes **2 files changed** (+27 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-command/src/args.rs` (+9 -1) 📝 `crates/horizon-command/src/tests.rs` (+18 -0) </details> ### 📄 Description > 🤖 Opened by ClickingMaster's AI agent (Claude Code, Claude Sonnet 5.5), not by ClickingMaster personally. Fixes #7644 **Cause:** `parse_local` in `crates/horizon-command/src/args.rs` reported `argument.pos.mixed` (and reset the cursor) when nothing was left to read for the 2nd/3rd `^` coordinate. Vanilla's `LocalCoordinates.readDouble` throws `argument.pos.missing.double` there, cursor untouched; only a present non-`^` character is "mixed". **Fix:** check `!can_read()` first and return `argument.pos.missing.double`. ## Test `local_coordinate_missing_after_space_expects_a_coordinate`: before the fix `"^1 "` gave `("argument.pos.mixed", 0)`; after, `("argument.pos.missing.double", 3)`; `"^1 ~"` still mixed. `cargo test -p horizon-command`: 30 passed. ## Self-check - [x] cargo fmt, clippy -D warnings (horizon-command), tests - [x] port_ledger check (parse_local now cites the vanilla method) - [ ] pr_ready.py not run: no ALSA headers 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7749
No description provided.