Remove skipped tests and unreachable RPC methods (bd-212, bd-213)

bd-212: Delete 3 permanently skipped test functions (~150 LOC)
- TestImportDependencyUpdates (import_collision_test.go)
- TestImportChainDependencies (import_collision_test.go)
- TestUpdateDependencyReferences (collision_test.go)

bd-213: Remove 4 unreachable RPC methods (~80 LOC)
- Server.GetLastImportTime
- Server.SetLastImportTime
- Server.findJSONLPath
- Client.Import

All tests pass. Phase 1 dead code cleanup continues.
This commit is contained in:
Steve Yegge
2025-10-27 20:52:51 -07:00
parent d795dbe3d7
commit d47378cfbc
5 changed files with 2 additions and 421 deletions

View File

@@ -307,11 +307,6 @@ func (c *Client) Export(args *ExportArgs) (*Response, error) {
return c.Execute(OpExport, args)
}
// Import imports issues from JSONL format
func (c *Client) Import(args *ImportArgs) (*Response, error) {
return c.Execute(OpImport, args)
}
// EpicStatus gets epic completion status via the daemon
func (c *Client) EpicStatus(args *EpicStatusArgs) (*Response, error) {
return c.Execute(OpEpicStatus, args)

View File

@@ -2112,20 +2112,6 @@ func (s *Server) handleShutdown(_ *Request) Response {
}
}
// GetLastImportTime returns the last JSONL import timestamp
func (s *Server) GetLastImportTime() time.Time {
s.importMu.RLock()
defer s.importMu.RUnlock()
return s.lastImportTime
}
// SetLastImportTime updates the last JSONL import timestamp
func (s *Server) SetLastImportTime(t time.Time) {
s.importMu.Lock()
defer s.importMu.Unlock()
s.lastImportTime = t
}
// checkAndAutoImportIfStale checks if JSONL is newer than last import and triggers auto-import
// This fixes bd-132: daemon shows stale data after git pull
func (s *Server) checkAndAutoImportIfStale(req *Request) error {
@@ -2250,24 +2236,3 @@ func (s *Server) triggerExport(ctx context.Context, store storage.Storage, dbPat
return nil
}
// findJSONLPath finds the JSONL file path for the request's repository
func (s *Server) findJSONLPath(req *Request) string {
// Extract repo root from request's working directory
// For now, use a simple heuristic: look for .beads/ in request's cwd
beadsDir := filepath.Join(req.Cwd, ".beads")
// Try canonical filenames in order
candidates := []string{
filepath.Join(beadsDir, "beads.jsonl"),
filepath.Join(beadsDir, "issues.jsonl"),
}
for _, path := range candidates {
if _, err := os.Stat(path); err == nil {
return path
}
}
return ""
}