Skip to content

Fix structure formatting to include link indexes#48

Merged
konard merged 5 commits intomainfrom
issue-19-9de6817b
May 8, 2026
Merged

Fix structure formatting to include link indexes#48
konard merged 5 commits intomainfrom
issue-19-9de6817b

Conversation

@konard
Copy link
Copy Markdown
Member

@konard konard commented Sep 10, 2025

Summary

  • Merged the latest main into issue-19-9de6817b and resolved the stale root-level C# conflict.
  • Fixed --structure formatting so expanded structure output keeps link indexes and renders zero/non-expanded references explicitly.
  • Kept structure expansion on the left/source branch while rendering the right/target side as a reference, matching the expected shape like (4: (3: (2: (1: 0 0) 1) 1) 2).
  • Applied the same behavior to the C# CLI and Rust implementation.

Fixes #19

Reproduction Covered

The previous C# formatter produced output like:

(4:(3:(2:(1: ) 1) 1) 2)

Rust expanded both sides and omitted link indexes. New tests cover the expected indexed output, including the 0 0 leaf case and repeated source/target references.

Tests

  • dotnet restore, dotnet build --no-restore --configuration Release, dotnet test --no-build --configuration Release --verbosity normal from csharp/
  • cargo fmt --all -- --check, RUSTFLAGS=-Dwarnings cargo clippy --all-targets --all-features, cargo test --all-features --verbose, cargo test --doc --verbose from rust/
  • npm run test:wasm
  • npm run build

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #19
@konard konard self-assigned this Sep 10, 2025
konard and others added 2 commits September 10, 2025 17:07
The --structure option was showing link IDs in the formatted output like '(4:(2:(1: ) 1) 2)'
instead of the expected simplified format like '((( ) 1) 2)'.

Fixed by changing the FormatStructure call parameters from (true, true) to (false, false)
to disable showing link IDs in the structure representation.

Fixes #19

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] Looks like a bug with formatting of structure Fix structure formatting to hide link IDs in output Sep 10, 2025
@konard konard marked this pull request as ready for review September 10, 2025 14:20
@konard
Copy link
Copy Markdown
Member Author

konard commented May 8, 2026

Previous solution is wrong. We also need to get latest changes from default branch and resolve conflicts.

What I expect to see in that case is like:

(4: (3: (2: (1: 0 0) 1) 1) 2)

And that should be covered extensively with tests in both C# and Rust implementation.

@konard konard marked this pull request as draft May 8, 2026 06:08
@konard
Copy link
Copy Markdown
Member Author

konard commented May 8, 2026

🤖 AI Work Session Started

Starting automated work session at 2026-05-08T06:08:00.057Z

The PR has been converted to draft mode while work is in progress.

This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback.

@konard konard changed the title Fix structure formatting to hide link IDs in output Fix structure formatting to include link indexes May 8, 2026
@konard konard marked this pull request as ready for review May 8, 2026 06:29
@konard
Copy link
Copy Markdown
Member Author

konard commented May 8, 2026

Working session summary

Implemented and finalized PR 48: #48

Resolved the main merge conflict, replaced the incorrect structure formatting, and added C# plus Rust coverage. --structure now preserves link indexes and explicit references, e.g. (4: (3: (2: (1: 0 0) 1) 1) 2).

Verification completed:

  • C# restore/build/test passed
  • Rust fmt/clippy/test/doc-test passed
  • npm run test:wasm passed
  • npm run build passed
  • Fresh GitHub CI for head 00d4b6c passed for C#, Rust, and WebAssembly
  • PR is marked ready for review and merge status is CLEAN
  • Local worktree is clean

This summary was automatically extracted from the AI working session output.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 8, 2026

🤖 Solution Draft Log

This log file contains the complete execution trace of the AI solution draft process.

💰 Cost estimation:

  • Model: GPT-5.5
  • Provider: OpenAI
  • Public pricing estimate: $15.164255

📊 Context and tokens usage:

  • 400.4K / 1.1M (38%) input tokens, 34.9K / 128K (27%) output tokens

Total: (400.4K + 9.6M cached) input tokens, 34.9K output tokens, $15.164255 cost

🤖 Models used:

  • Tool: OpenAI Codex
  • Requested: gpt-5.5
  • Model: GPT-5.5 (gpt-5.5)

📎 Log file uploaded as Repository (40748KB)


Now working session is ended, feel free to review and add any feedback on the solution draft.

@konard
Copy link
Copy Markdown
Member Author

konard commented May 8, 2026

✅ Ready to merge

This pull request is now ready to be merged:

  • All CI checks have passed
  • No merge conflicts
  • No pending changes

Monitored by hive-mind with --auto-restart-until-mergeable flag

@konard konard merged commit 0f54b1d into main May 8, 2026
22 checks passed
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.

Looks like a bug with formatting of structure

1 participant