Gamma City Blues – Arc 04 (Wires) – Report 03

Zai had to move quickly. Being in control of two partially transformed NMEs was certainly better than being in their gunsights, but that control came at a price.

“The NMEs are subjugated,” she said, speaking through the remains of the tourism bot’s sound systems. “We need to get leave immediately though.”

“Heartless?” Sidewalker asked, so stunned that he stopped moving to stare at the two motionless NMEs in disbelief. “You’re in them now?”

Before Zai could answer him a sniper round punched through the wall and counter he’d rolled behind. It was a clean head shot. Fortunately for Sidewalker, that was one of his better armored areas, and passing through the obstacles it encountered had slowed the bullet to a speed that was insufficient to be lethal to him.

It still hurt tremendously though from what Zai could see.

The larger of the two NMEs had developed its first ranged attack system, so Zai turned a rail cannon on the Gray League sniper’s position. Neither NME had developed multi-band optics in its transformation, so Zai couldn’t see directly through the wall, but she was still able to call on the city’s Eye Grid to calculate the firing coordinates she needed.

The sniper was carefully hidden from the cameras, but their muzzle flash had been visible from several locations and the trajectory of the bullet was simple to determine from the path it blasted through the wall and the counter.

The first shot from the rail cannon hit with the force of a semi-truck, blasting the edge of the rooftop across the street apart in a shower of brick and steel. The Gray League sniper didn’t seem to have expected to be in freefall but with his modifications even landing from terminal velocity wouldn’t have been problematic.

So Zai shot him again.

Combat bio-mods can heal a lot of damage. Even lost limbs are a manageable injury. The damage a hail of railgun powered flechettes inflicts however is well outside the operational parameters of anything short of direct divine intervention.

The mayhem came at a cost however.

As she brought them online, Zai saw the NME’s weapon systems being coopted by the distributed analysis nodes that were created to guide and monitor each of them.

She had control of the NME’s central core, but one of the many dangers of a NME unit was their massive redundancy when it came to automated systems to control their weapons. Normally those were slaved to the NME’s central core, and were only active when damage to the core was detected. That allowed the NME to carry on fighting while a new core was rebuilt and prevented them from having a single point of failure for their weapon systems.

Zai’s hack had given her control of the core, but it wasn’t perfect. Nothing as rushed as her effort had been could be perfect. She had the navigation and motor manipulation controls locked down but each weapon system she invoked polled her for the proper authorization sequence when she tried to shut it down, and as far as she could tell, that code didn’t exist.

Even as the remains of the sniper plummeted towards the street, the railguns were looking for another target. The nearest one, of course, was Sidewalker. Unconscious, bleeding, and defenseless Sidewalker. His head was armored enough to withstand a sniper round, but the rail cannons were packing at least an order of magnitude more force than that.

Zai abandoned trying to shut down the weapons, and frantically ripped away at the NME code to do an end run around the secondary processors.

Tython had fielded multiple NMEs before, and those units hadn’t destroyed each other. Latching onto that fact, Zai tore into the targeting routines and found the “Friend or Foe” section. It was a bloated, overcomplicated mess that looked like it was written by a pair of five year olds who were coding with one hand while trying to stab each other with crayons in their other.

So, typical multi-version code.

Zai tried bypassing the code with a basic branch that would loop around the decision making process and simply always return a result of “Friend”.

That didn’t work.

Everything came up as “Foe” for the two NMEs, including each other.

Double checking the routine she’d jumped over, she saw there was an event raised that some seemingly unrelated bit of the control code was listening for. This piece of code wanted to see a proper checksum on the “Friend or Foe” decision, precisely to ensure that friendly units were not misidentified as hostiles.

Zai stared at the code for dozens of nanoseconds longer than she felt comfortable with.

The monitor routine was supposed to treat a failure of the checksum as an invalid targeting solution, and return an absolute “Friend” result as a safeguard against ever shooting a non-hostile target.

There was even a comment by one of the later developers mentioning how this was being done according to the Mil-Spec standard for autonomous combat drones and that the targeting routine supported all of the published “secure interfaces”.

Looking at the code, it was impossible for the NMEs to be behaving as they were. Were Zai had an advantage over a human developer though was that, lacking a forehead to ram into a wall, she wasn’t quite as tempted to scream that what she was seeing couldn’t be happening.

The NMEs were happily charging up their railguns and would both be firing on Sidewalker in just over half a second. Then they would continue firing on everyone in range, which meant everyone outside the building to a two block radius, give or take a bit for multiple intervening walls. That would be a disaster (though not an unprecedented one). For a digital person like Zai however, a half second was a vast amount of time.

Straining to utilize the utmost of the 10% processing power she had sectioned off to deal with the world in general, Zai started looking for alternatives.

The worst case would be a rewrite of the “Friend or Foe” evaluation code she had skipped over. That would be time consuming, even for Zai, and she wouldn’t be guaranteed there wasn’t another pitfall waiting for her, or that a complete rewrite would yield the result she wanted, since the code was already written to do what she thought it was supposed to do.

The comment offered a clue though.

The code was written to conform to a Mil-Spec – specifically a specification published by the Central African Prosperity Sphere. The CAPS had risen as one of the technological heavy weights in the wake of the robot apocalypse, thanks to the work of a coalition of scientists from across the continent who pioneered some of the earliest successful broadcast shutdown tech. Their work had, in a very real sense, saved the world since it allowed for rampaging robots to be shut down across a wide area. It had also allowed several central African nations a head start on rebuilding that they’d parlayed into a unified front that launched them to a position where they could vye for the title of “technological crown of the world”.

One result of their status was that it wasn’t uncommon for other militaries to look to the CAPS standards for guidance in how to implement safe, reliable, and (most importantly) secure algorithms.

It also wasn’t uncommon for people in less-than-ethical “military adjacent” technology companies to attempt to implement CAPS compliant algorithms without investing the time to fully test and verify their work.

It took several milliseconds for Zai to retrieve a copy of the CAPS standards for targeting systems, and several more to dig back to the antiquated version of the algorithm that the code in the NMEs claimed to support.

Multiple milliseconds was more time than Zai wanted to burn. At half a second before the railguns began to fire, she had roughly five hundred milliseconds to work with and each one ticking away was a resource she could never reclaim. Also, debugging someone else’s code was the last thing in the world she wanted to do but since the alternative was likely to be a massacre of biblical proportions, she gritted her virtual teeth and dug into it.

With the proper behavior of the algorithm laid out before her, Zai began pulling apart each of the individual components of the code and running them in their own virtualized sandboxes.

It wasn’t a perfect approach. Their behavior independently wasn’t going to be identical to their behavior when they were acting together in real time. With the constraints she was under though, Zai didn’t have time to craft perfect test environments. The virtual sandboxes were a first pass test to verify that the components at least handled the inputs that they were supposed to be given and produce the outputs that were expected.

Of course, that didn’t turn out to be the case.

After her first round of sandbox testing was complete, Zai looked at the NME targeting code and could no longer understand how it had ever functioned properly at all.

There were bugs in it. So many bugs in it.

It was less like turning over a rock and discovering a swarm of creepy crawlies beneath it and more like discovering that the rock itself was a mass of creepy crawlies, as was the ground, and the air, and everything else.

The option to rewrite the code from scratch looked terribly appealing the more errors that Zai found but experience reassured her that it wasn’t yet time to give up hope.

The targeting code did work.

She’d shot a sniper with indirect coordinate data and placed the spread pattern to within a millimeter of the target boundaries that had been defined as “Foe”.

It had worked but “how” was a mystery.

So Zai checked the original CAPS spec again.

Then she checked the comments.

There weren’t many. There were never many comments in code, and even fewer of them were worthwhile. Most tended to simply restate what the code was doing without offering any insight into why it was doing that.

Every once in a great while though a developer will give a priceless gift to the future and explain both what they’re doing and what their intent in crafting the code to do that was.

One such comment revealed the heart of the problem.

It was the simplest of mistakes as it turned out.

Someone translated the original CAPS spec incorrectly.

Zai could see that because, in a comment for a bug fix, the developer responsible had copied in the relevant section from the CAPS spec into the comment block above the code. From the tone of the comment it sounded like they were probably angry at being blamed for a bit of buggy behavior and they wanted to cover themselves in case another question arose as to why they’d implemented the code as they had.

To their credit, they’d implemented the “Friend or Foe” verification routine just as their spec had stated it should be set up. However where their spec said “if the value is incorrect, then clear it”, the actual spec said “then do not clear it”.

The incorrect target recognition data was meant to flow through the system and be tested again to see if it could be partially salvaged. Instead, by clearing it, the routine was ensuring that the data went along a different, unintended path, bubbling up to a counter-cloaking algorithm which had many other safety checks on it and could therefore afford to be far more aggressive in declaring something to be a “Foe”. The bad data bypassed those safety checks because of a combination of several other bugs that were in play, any one of the which would have been insufficient to cause a catastrophe but together made for a perfectly lethal combination.

With roughly one hundred and nineteen milliseconds to spare, Zai implemented the code fixes that were required, copying in the corrected CAPS spec and left a note for herself with what she’d found. Future Zai might never need that note, in all likelihood it were a waste of precious milliseconds, but as investments in the future went, Ai had always insisted that good comments were more than worth their cost, and Zai had never had reason to doubt her.

With Sidewalker safely marked as a “Friend”, Zai scooped him up and headed towards the basement.

She sent the unladen NME in first, to detonate the mines that had been left for them. The restaurant was a ruined shambles afterwards, which was something she could deal with in due time. Pulling open the door to the stairs, and calling up a map for the connections to the subway repair tunnels, Zai had more important priorities queued up though.

First she had to find a safe spot for Sidewalker. Then a place to hide the NMEs. Then verification that they weren’t being followed with the possible eliminate any pursuers from the Gray League as required.

Then it would finally be time to start playing hardball.

William Harcroft was the closest thing Tython had to a public face who was associated with the illicit NME Cure project. If Tython was going to start taking pieces of their opposition off the board, it was about time they started losing some of their own.

Leave a Reply