Season 2 Episode 6

Debugging the Caravan

Key scene illustration
Key scene illustration

In which our protagonist teaches his apprentice to fail beautifully, and Seraphina learns to trust.


The pathfinding optimization took two days.

Kenji sat with Seraphina, Tomas, and one of Orven's senior wagon-masters, a grizzled woman named Petra who knew the southern roads the way Sera knew the mines. They drew maps. They argued about water sources. They cross-referenced the cult's known locations with the road network. They defined inputs and outputs and edge cases, and at the end of day one, they had a working theory.

At the end of day two, they had a route.

It ran east from the southern markets, into the hill country, around the cult's known strongholds, through a series of small villages where the road was good and the water was reliable, and then north into Oakhaven. It was three days longer than the standard route, but it avoided every cult-occupied area, and it had two fallback positions if anything went wrong.

"It's not perfect," Kenji said, when they had it written down. "The hill country is harder on the oxen. The villages are smaller, so the food and water are less reliable. But the cult is not there. And right now, that is the variable that matters."

Seraphina looked at the map for a long time. Then she said: "It will work."

"It should work."

"You are not certain."

"I am never certain. I am a software engineer. We are paid to be specific about uncertainty."

She laughed, a real laugh, the kind that came from being surprised and a little delighted. "You are the strangest person I have ever met."

"So I have been told."

She rolled up the map, tucked it into her belt, and said: "I will use this route. My drivers will use this route. My oxen will complain, but they will use this route. And if it works, I will be back. With a very large trade contract for you and your town."

"I do not need a trade contract."

"You will get one anyway. I pay my debts. And you have just saved my caravan, my drivers, and possibly my life. That is a debt I will spend the next ten years repaying."

She left to brief her drivers. Kenji watched her go, and Pip pulsed, amused.

But the day was not done.

In the afternoon, Lian came to him with the question she had been working up to all week. It was, he could tell, the question of a student who has been watching the master for a long time and is finally ready to try something herself.

"I want to test a spell," she said.

"What spell?"

"A firewall. I read about them in the academy. They are defensive spells. They create a barrier that hostile magic cannot pass. I want to define one and see if it works."

"A firewall is a serious spell. It requires precise parameters. If the stability is off, it will collapse under the first attack. If the parameters are wrong, it will block friendlies as well as hostiles. Have you thought about all of that?"

"Yes."

"Have you thought about what happens if it fails in front of the mayor and the council?"

Lian hesitated. Then, with the careful honesty of a person who is determined to do the right thing, she said: "I am going to fail in front of them anyway. I would rather fail at something hard than succeed at something easy."

Kenji looked at her. Seventeen years old, three months into her apprenticeship, already talking like a mage who has been doing this for years. He thought about his own first big failure, a database migration that had crashed a production system at 3 AM, and how his mentor had been there to help him through it.

"Okay," he said. "We do this carefully. We define the spell. We test it in private. We test it in public. We do not, under any circumstances, let the mayor see it until we are certain."

The private test was the next morning, in a clearing outside the walls. Kenji stood at one end. Lian stood at the other. She took a breath. She raised her hands.

"Function create(name='firewall', inputs={radius, stability, duration}, outputs={magical_barrier}, cost=medium, side_effects=blocks_all_mana)!"

The spell took shape. It shimmered into existence between them, a thin wall of pale blue light, humming with stability. Kenji walked up to it. He could feel the mana inside it, organized, structured, beautiful. He raised his hand and tried to push a small light spell through it. The light stopped at the wall and dissipated. He tried harder. The wall held.

"Good," he said. "Now increase the radius by two meters."

Lian adjusted. The wall grew. Then she adjusted the duration. The wall held. She adjusted the stability. The wall flickered, then held. She was, Kenji realized, doing exactly what he would have done. Defining, testing, refining. Iterating.

"Increase the radius by another two meters," he said.

Lian did. The wall grew. The mana cost climbed. She was sweating now, the concentration of the spell taxing her. Kenji watched, ready to intervene if it failed, ready to step in if it collapsed.

It did not collapse. It held. It expanded. It shimmered. And then, with a soft pop, it disappeared. Lian staggered. Kenji caught her.

"Mana cost too high," she gasped. "I ran out."

"You held it for forty seconds at maximum radius. That is twice what I expected. You did well."

"I failed."

"You failed at the last step. You succeeded at every step before it. That is not failure. That is iteration."

He helped her sit down. Pip flew to her shoulder and pulsed, gently. The pulse felt like: "Well done."

Lian, who had been bracing for disappointment, started to cry. It was the first time she had cried in front of him, and it was the cry of a person who has just realized that they are capable of more than they thought.

"I did it," she said, in a small voice.

"You did it," Kenji said. "And tomorrow, we do it again. And the day after. And the day after that. Until you can hold it for an hour at maximum radius, in front of anyone."

She nodded, fiercely, and Pip pulsed again, and the pulse felt like: "She is going to be magnificent."

Kenji sent back: "Yeah. She is."

# WORLD.md (updated)

## Status
- Trade route: optimized, Seraphina using it
- Lian: first firewall spell, mostly successful, learning iteration
- Seraphina: forming alliance with Kenji, debt acknowledged
- New spell: firewall (defensive, medium cost, blocks all mana)

## Lessons
- Failing at the last step is not failure. It is iteration.
- The best teachers are the ones who let the apprentice try.
- Lian's first real spell test was not a victory. It was a beginning.