Skip to content

Add backward-compat test for HASH label table binding - #464

Merged
em3s merged 5 commits into
mainfrom
test/hash-label-table-binding-compat
Jul 24, 2026
Merged

em3s merged 5 commits into
mainfrom
test/hash-label-table-binding-compat

Conversation

@em3s

@em3s em3s commented Jul 24, 2026 •

Copy link
Copy Markdown
Contributor

Summary

#459 shipped without a test that would have caught it: no unit test covered a HASH label on datastore storage reaching the V3 table binding. This adds a backward-compatibility guard for the two intertwined transitions on HASH labels — Storage metadata removal in favor of datastore:// URIs (#410) and HashLabel removal in favor of IndexedLabel (#296 for HBase, #459 for datastore).

Per resolution path (bare-name Storage metadata, unregistered datastore:// URI), the test verifies: create resolves, the label materializes as an IndexedLabel (not the old HashLabel), and both production paths round-trip within themselves on separate keys — V3 write/read through MutationService/QueryService (the path the original incident hit) and V2 write/read through graph.mutate/label.get. A third case writes rows through an HBaseHashLabel writer (the shape of the removed DatastoreHashLabel) and verifies the current read path serves them and new writes extend the same table — backing the no-data-migration claim of #459. Reverting the #459 fix locally makes exactly the datastore case fail, so the test reproduces the original bug.

Changes

  • Add HashLabelTableBindingTest (JUnit 5 + @ObjectSource): storage_metadata/datastore_uri parameterized V3+V2 round-trips, plus legacy-written-rows compatibility case
  • Use named arguments at Label.get call sites in DatastoreHashLabelSpec and LabelSpec — get(100, 1000, ...) reads as (source, limit) but the second argument is the target

How to Test

./gradlew :engine:test --tests "com.kakao.actionbase.v2.engine.v3.HashLabelTableBindingTest"

Full :engine:test passes locally.

AI Assistance

  • This PR was written largely with AI assistance.
    • Tool / model: Claude Code (Fable 5)

Cover the backward-compatibility seam of the two intertwined transitions
on HASH labels: Storage metadata removal in favor of datastore:// URIs
(#410) and HashLabel removal in favor of IndexedLabel (#296, #459).
Verified to fail on the pre-#459 code with exactly the datastore case.

Co-Authored-By: Claude Fable 5 <[email protected]>
@dosubot dosubot Bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Jul 24, 2026
em3s and others added 4 commits July 24, 2026 15:51
Mutate/query now go through MutationService/QueryService — the path the
original incident hit — instead of calling getTableBinding directly and
using the V2 graph.mutate. Add a legacy-data case: rows written through
an HBaseHashLabel writer (the removed DatastoreHashLabel shape) stay
readable through the V3 API, and V3 writes coexist on the same table,
backing the no-migration claim of #459.

Co-Authored-By: Claude Fable 5 <[email protected]>
Production runs V3 write/read and V2 write/read as separate closed
paths, so cover each within itself on separate keys instead of
cross-path assertions.

Co-Authored-By: Claude Fable 5 <[email protected]>
get(100, 1000, ...) reads as (source, limit) but the second argument is
the target — name the arguments so the point-get shape is explicit.

Co-Authored-By: Claude Fable 5 <[email protected]>
@em3s
em3s merged commit f3ff6f3 into main Jul 24, 2026
2 checks passed
@em3s
em3s deleted the test/hash-label-table-binding-compat branch July 24, 2026 08:29
@em3s em3s self-assigned this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant