Is this electrical junction in my attic up to code or reasonable?
The junction is not to code because it would need to be made in a box. The wire is wrapped for a mechanical connection but I was taught 7 turns for a tap with old knob and tube, and without even counting we can see the insulation is burned. this happens when there is a poor connection. 

The best option would be to purchase two construction boxes boxes and blank covers and a couple of feet of the same gauge wire. And 6 wire nuts and last some electrical staples 5 will be needed (the wire looks like 14 gauge). If you cannot read the size get 12 gauge. Or take a chunk to the store to match the size--bigger is ok. 


With the power off, cut the cloth braid wire to the right of the splice in the photo route the cable into the box. You need 6” of wire and the covering needs to enter the box--1/4” beyond the clamp staple that cable to the wood you mounted the box on. 
Run your new piece of wire into the box same thing 6” minimum and the covering needs to extend 1/4” inside minimum staple that wire. 
Mount your second box to the left where the two original cables can enter with 6” just like the others. Staple each wire separately unless you got staples rated for two cables. 
Bring the new wire to the second box and staple within 8” (note on boxes that do not have screw clamps or clamps that lock the wire in place, 8” from the box is code; if the clamps hold the wire from moving the staple can be 12” from the box). 
Strip the wires and use wire nuts to combine the 2 whites, 2 blacks and the 2 grounds. Twist the wire nuts until the wire has 2 twists. Do the same for the 3 wires in the other box install the blank covers and you are done. 


This really should be done right away. (Is that burned spot on the wood from the bad splice on the white wire?)  You don’t want a fire and this would be the least expensive way to make a proper repair.