Repository navigation
fix(parser): reject a fact with more than four elements, PRS-108 (#649) [v2.x backport] - #656
Merged
Merged
Conversation
Backport of #654 from v3. parse_transact read a fact's 4th element as its optional valid-time map and ignored everything after it, so [[:alice :person/age 1 {} 99 :junk]] stored [:alice :person/age 1] and dropped the rest without an error. A fact of more than four elements now fails with the new PRS-108 (numbered as in v3.0.0) and the transaction writes nothing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This was referenced Oct 20, 2026
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.
Backport of #654 (v3) to
mainfor a v2.0.x patch. Part of #649 (data-integrity; stays open until the patch is released).Problem
parse_transactnever checked a fact's upper arity.(transact [[:alice :person/age 1 {} 99 :junk]])succeeded and stored only[:alice :person/age 1]. Present since v0.4.0.Change
PRS-108, numbered as in v3.0.0 (same precedent asSTG-045in v2.0.5); the transaction writes nothing. A 5+-element fact whose 4th is not a map now getsPRS-108instead ofPRS-047.src/error.rs, documented indocs/ERROR_REFERENCE.md.tests/error_codes_prs_test.rs, +2): 5- and 6-element facts fail withPRS-108; a transaction holding one stores nothing.[Unreleased]→ Fixed, TEST_COVERAGE, CLAUDE.md and README test counts (1313 total, 1304 passing).main, so noKNOWN_DRIFTchange here.Verification
cargo test: 1304 passed, 0 failed, 9 ignored.cargo clippy -- -D warnings,cargo fmt --checkclean (pre-push hook).🤖 Generated with Claude Code
https://claude.ai/code/session_01PtCdzbJMSS1V8qEPaJ4jXz