Skip to content

Cover a proper-prefix miss in OpenCode session lookup - #174

Draft
MoonCaves wants to merge 2 commits into
mainfrom
test/opencode-proper-prefix-20261121
Draft

MoonCaves wants to merge 2 commits into
mainfrom
test/opencode-proper-prefix-20261121

Conversation

@MoonCaves

Copy link
Copy Markdown
Owner

PR #166 made OpenCode lookups require a full session ID. The existing SQLite fixture contains ses_root1. Its test checked the full ID and an unrelated ID, so the pre-#166 implementation still passed.

This adds one assertion to the same fixture. Looking up ses_root must return no match while ses_root1 exists. The case covers the singular session schema and records the upstream test for this relationship. It addresses the proper-prefix case from #164. Pinned upstream tests

On the pre-#166 adapter at c05f283, the original test passed and the added assertion failed with lookupSessionInDB succeeded for proper prefix ses_root. With the adapter on main at 2e391b6, the extended test passed under the race detector. The static build, vet, lint and pre-push provenance check passed locally.

Add proper-prefix negative assertion to TestLookup ensuring lookup 'ses_root'
yields false while 'ses_root1' exists. Keep existing exact positive and
unrelated negative controls. Register bounded keon/algorithms pattern in
decision references.

Prior-Art: keon/algorithms tests/test_data_structures.py L91-L100 (MIT) @9d9d822875f938d921032f220f7721ce653e0e20 -> internal/source/opencode/opencode_test.go
Prior-Art: keon/algorithms tests/test_data_structures.py L91-L100 (MIT) @9d9d822875f938d921032f220f7721ce653e0e20 -> docs/design/decision-references.md
Pin the stored rows and the existing control separately. The upstream
positive and negative cases each start from a fresh single-key trie.

Prior-Art: keon/algorithms tests/test_data_structures.py L91-L100 (MIT) @9d9d822875f938d921032f220f7721ce653e0e20 -> internal/source/opencode/opencode_test.go
Prior-Art: MoonCaves/rawclaw internal/source/opencode/opencode_test.go L80-L92 (MIT) @2e391b6af9901fb2e260a7552f05b68621437719 -> internal/source/opencode/opencode_test.go
Prior-Art: MoonCaves/rawclaw internal/source/opencode/opencode_test.go L208-L222 (MIT) @2e391b6af9901fb2e260a7552f05b68621437719 -> internal/source/opencode/opencode_test.go
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.

1 participant