Repository navigation
Correct self-referencing binary notation specification - #52
Merged
Merged
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #51
konard
marked this pull request as ready for review
October 7, 2026 02:30
Member
Author
Working session summaryPR #52 is ready for review. Corrected the specification to All local tests and CI checks pass. Changes are committed and pushed; the working tree is clean. This summary was automatically extracted from the AI working session output. |
Member
Author
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost estimation:
📊 Context and tokens usage:
Total: (197.1K + 6.6M cached) input tokens, 35.1K output tokens, $2.633185 cost 🤖 Models used:
📎 Log file uploaded as Gist (3395KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
Member
Author
🎉 Auto-mergedThis pull request has been automatically merged by hive-mind.
Auto-merged by hive-mind with --auto-merge flag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The specification described
(5: 5 5)as the two-byte body0F 05, while both codecs encode0F 05 05. Correct the example to 3 binary bytes versus 8 text bytes (62.5% reduction) and clarify the field order:HAS_IDadds an explicit ID;SELF_REFomits the target while retaining the source.This takes the documentation-correction option in #51. A link such as
(7: 5 5)still needs both the explicit ID and shared reference, so the version 1.0 wire format remains unchanged. The specification revision is 1.0.1. JavaScript and Rust release fragments prepare patch releases.The first CI run also exposed existing Clippy failures on the current stable toolchain (Rust 1.99). A separate follow-up commit replaces equivalent helper expressions, makes binary magic detection const, and documents two lint exceptions. Async methods retain deferred execution, and emptiness assertions remain usable for collections whose elements do not implement
PartialEq.Reproduce the original discrepancy from the repository root:
node --input-type=module -e "import { BinaryNotation, HEADER_SIZE } from './js/src/protocol/binary-notation.js'; console.log(Buffer.from(BinaryNotation.encode({ id: 5, source: 5, target: 5 }).slice(HEADER_SIZE + 1)).toString('hex'));"This prints
0f0505. New tests read the specification's example and compare its bytes to each codec. Before the correction, these fail with actual[15, 5, 5]versus documented[15, 5]; JavaScript also catches the incorrect text and body sizes. After the correction, they pass. Exact wire vectors cover equal and differing IDs, multi-byte IDs, and no explicit ID, checking encoding, decoding, and size calculation.Validation:
npm test: 915 passed.npm run check: ESLint, Prettier, and duplication checks passed.bun test: 914 passed.deno test --allow-read --allow-net --allow-env --allow-write: 518 passed, 579 steps.RUSTFLAGS=-Dwarnings cargo test --all-features --verbose: 466 unit/integration tests and 47 doc tests passed.RUSTFLAGS=-Dwarnings cargo test --doc --verbose: 47 passed.cargo fmt --all -- --checkand the Rust file size check passed.RUSTFLAGS=-Dwarnings cargo +1.99.0 clippy --all-targets --all-features: passed without command-line lint exceptions.cargo +1.99.0 package --listpassed with a clean tree.main(bdc7631). The first CI lint job used Rust 1.99 and reported 35 errors, including eightassert_is_emptydiagnostics. Preserved log evidence: lines 837 (binary_notation.rs:904,missing_const_for_fn), 892 (memory_backend.rs:199,unused_async_trait_impl), and 1472 (link_cli_notation.rs:551,assert_is_empty). The follow-up addresses these failures while keeping queue behavior and wire bytes the same.GitHub CI passes on the final commit
12366b45c3b4105592e16df85791176eb6b2e02e: JavaScript pipeline and Rust pipeline. This includes all runtime/OS tests, lint and release checks, the Rust release package build, and benchmark compilation and execution.Fixes #51
Changes
docs/BINARY-NOTATION-SPEC.mdjs/.changeset/self-referencing-binary-spec.mdjs/tests/binary-notation-spec.test.jsrust/Cargo.tomlrust/changelog.d/20261007_022500_self_referencing_binary_spec.mdrust/src/backends/binary_notation.rsrust/src/backends/binary_notation_tests.rsrust/src/backends/link_cli.rsrust/src/backends/memory_backend.rsrust/src/client/connection.rsrust/src/cluster/node.rsrust/src/queue/manager.rsrust/tests/link_cli_integration.rs