Skip to content

Fix table_metadata.handle omitting address standardization - #52

Open
sausagee wants to merge 3 commits into
mainfrom
cursor/fix-table-metadata-handle-6eca
Open

Fix table_metadata.handle omitting address standardization#52
sausagee wants to merge 3 commits into
mainfrom
cursor/fix-table-metadata-handle-6eca

Conversation

@sausagee

@sausagee sausagee commented Sep 6, 2026

Copy link
Copy Markdown

Bug

table_metadatas.handle was stored as the raw proto table handle, while table_items.table_handle and current_table_items.table_handle always go through standardize_address.

Indexer stream handles are not always 64-hex-char padded (0xabc vs 0x000…abc). Both columns are VARCHAR(66) and are meant to be the same key, so joins / lookups on handle miss whenever the proto emits a short form.

Root cause

TableMetadata::from_write_table_item used table_item.handle.to_string() instead of the same standardize_address path as TableItem / CurrentTableItem. The in-batch map is already keyed by the standardized CurrentTableItem.table_handle, so the stored value could disagree with its own map key.

Fix

Standardize table_metadatas.handle the same way as sibling table-item tables. Unit test asserts an unpadded proto handle produces one matching 66-char value across all three models.

This is independent of open PRs #16#51.

Tests

  • cargo test -p processor --lib table_metadata_handle_matches_standardized_table_item_handle (pass)
  • cargo clippy -p processor --lib --tests -- -D warnings (pass)
Open in Web Open in Cursor 

cursoragent and others added 2 commits September 6, 2026 13:33
Proto table handles are not always 64-char padded. table_items and
current_table_items already run standardize_address; table_metadatas
stored the raw proto string, so joins on handle miss when the stream
emits a short form such as 0xabc.

Co-authored-by: Young Yang Liauw <sausagee@users.noreply.github.com>
Co-authored-by: Young Yang Liauw <sausagee@users.noreply.github.com>
@sausagee
sausagee marked this pull request as ready for review September 6, 2026 13:42
@sausagee
sausagee changed the base branch from main to fix/lint-stable-xclippy September 7, 2026 22:19
@sausagee
sausagee changed the base branch from fix/lint-stable-xclippy to main September 7, 2026 22:30
Stack the CI unblocker files from PR #70 (stable cargo xclippy, bookworm Dockerfiles with make) onto this bugfix branch so CI can go green while #70 awaits review. Merge target remains main; this does not merge #70.
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.

2 participants