When a excavator boom or stick cracks, it's common practice to weld the crack right on the machine to avoid the cost and downtime of removing the entire boom assembly. However, if the mechanic doesn't take proper precautions, that welding current will destroy the hydraulic control valve in seconds.
The control valve is usually bolted directly to the boom or stick, or connected to it by heavy steel brackets. If the welder attaches their ground clamp to the bucket teeth and strikes an arc on the stick, the high-amperage DC welding current will seek the path of least resistance back to the ground clamp. Often, that path is through the control valve body and its mounting brackets.
Inside the valve body are precision-ground steel spools sitting in honed bores with only microns of clearance. When thousands of amps of welding current arc through the valve body, it will jump across the microscopic oil film between the spool and the bore. This electrical arc instantly spot-welds the spool to the bore. When the spool tries to shift, it shears the hard chrome off the spool, creating deep grooves. The valve is instantly ruined, leaking internally, and requiring a multi-thousand-dollar replacement. If you must weld on a boom, always disconnect the control valve's mounting brackets so it is electrically isolated, and clamp your welding ground as close to the weld zone as physically possible to keep the current out of the hydraulics.