She is identified in court records simply by the initials “S.A.” While we don’t know her name, we do know a great deal about the emotional and physical abuse she endured in Texas’s foster care system. She became the state’s responsibility in 2001, when she was only five years old. There’s no question she was rescued from peril; S.A.’s adoptive mother was arrested on outstanding warrants while trying to enter Mexico with her boyfriend, a registered sex offender. But she wasn’t safe in the state’s care either. When she entered the system, S.A., like every child, was evaluated to determine how much trauma she had experienced and how extensive her care should be. The state deemed that S.A.’s needs were “basic,” the lowest level. During the next thirteen years, she was moved 45 times through foster homes, residential treatment centers, and, finally, psychiatric hospitals. She stayed in some places as few as two days. She attended sixteen schools. In 2014 she aged out of foster care, according to court records, as an eighteen-year-old who was “severely damaged.”

S.A. is one of seventeen current or former foster kids—all identified by initials—named in a federal lawsuit filed against Texas by the New York advocacy group Children’s Rights. The suit argues that the state’s foster care system, by failing to protect children from harm, violates their Fourteenth Amendment rights. U.S. district judge Janis Jack, based in Corpus Christi, ruled in December 2015 that Texas’s treatment of foster children not only violates their constitutional rights but “shocks the conscience.”

Attorney General Ken Paxton is contesting the case, arguing in a recent filing that the reforms suggested by two court-appointed experts are overly broad and too expensive and that the system, while troubled, doesn’t need federal oversight. His office has spent more than $7 million on its various appeals. The legal issues remain unsettled, but the import of Jack’s ruling, at the moment, may be more political. In her 260-page opinion, Jack uses tens of thousands of pages of government records to tell each child’s story in horrific detail. The ruling should be required reading for state lawmakers, who will attempt to reform the broken Child Protective Services department during their five-month legislative session that begins on January 10.

The problems are plain enough: foster care has long suffered from a lack of resources. This has resulted in two huge shortcomings. The first is low pay and high turnover rates among CPS caseworkers, the people most responsible for steering children through the system and keeping them safe. The starting salary for CPS caseworkers is just under $34,000, and about a quarter of them leave every year. The turnover means that most of the caseworkers who remain must monitor more children than they can handle. In the bureaucratic speak of CPS, this is known as a high caseload. Experts say that one caseworker should handle, at most, about 20 cases. Yet around 40 percent of Texas caseworkers handle many more than that, some as many as 35 cases at a time. This leads to hurried caseworkers’ giving kids only cursory checks—or none at all.

The second major failing is a critical shortage of places to put children, which is also a function of our leaders’ refusing to spend the necessary money. Texas pays foster care providers only about 80 percent of what it actually costs to house children. The result is that foster providers lose money, cut corners, or make up the difference with private donations. The inadequate funding also makes it hard for Texas to recruit enough foster families.

Anyone who wants to understand how chronic underfunding of CPS affects children should read the court’s ruling, especially the eleven pages that document the trauma inflicted on S.A. by the state agency tasked with keeping her safe.

It began in her very first foster home. Within four months of entering the system, S.A. reported being sodomized by an older boy in the home. The abuse allegation was bad enough, but then CPS compounded it by not properly investigating her claim. The agency asked the private organization that had placed S.A. in the foster home to conduct its own review, according to court records, and the organization “did not cite any noncompliances” and took no action. As the ruling notes, there’s no evidence in any of the 33,000 pages in S.A.’s CPS file that she was interviewed about her allegations of sexual assault or provided a physical examination or medical treatment. CPS apparently did nothing. Worse yet, CPS allows private placing agencies to keep such investigative files to themselves, so S.A.’s future caseworkers may not have known about her alleged sexual assault.

It’s not clear what actually happened to S.A. in that home, but Jack writes in her ruling that it seems unlikely a five-year-old could concoct such detailed allegations. Moreover, S.A.’s foster parents soon requested that she be removed from the home to “ensure her safety and [prevent] any possible contact between her and the other child,” according to Jack’s ruling. Before long, S.A. began to display disturbing behavior, including, as Jack notes, “extreme tantrums where she tried to hurt herself and others.” S.A. was then hospitalized and later told a caseworker that she didn’t trust CPS to “keep her safe.”

CPS’s failure to properly investigate S.A.’s sexual abuse allegation isn’t an isolated incident. The agency similarly did little to pursue alleged abuse perpetrated against other children named in the federal lawsuit. The precise reasons for this aren’t evident. But the ruling describes how the foster home shortage makes it difficult for CPS to properly handle sexual abuse cases. That’s because foster kids who have suffered sexual assault should be placed in homes without other children, experts say. That’s to protect foster kids from further victimization but also to prevent them from abusing other children; kids who have been abused, some research has shown, are at greater risk of later becoming abusers themselves. But there aren’t enough homes to allow for many single-child placements. S.A. lived in thirteen foster homes, and despite her history of alleged abuse, all of them had other kids.

By the time she was fifteen, S.A. had bounced through dozens of placements. The lack of stability in her life was taking a toll that S.A. herself recognized. According to Jack’s ruling, S.A. told a psychologist, “I need a family.” Yet CPS botched several chances for her to be adopted because her caseworkers, who were constantly changing, didn’t have her paperwork in order.

Two months after S.A. aged out of foster care, she attempted suicide by walking into traffic on a busy highway and was struck by a car. Thankfully, she survived. But she remains unprepared for adulthood. At the time of the court case, she was living in a shelter. “S.A., who aged out with no life skills and nowhere to go,” Jack writes, “is another example of the forgotten children in Texas’s [foster care system].”

None of these problems are new. Many of them were well-known before S.A. entered foster care. In 1996 a committee formed by then-governor George W. Bush examined CPS and reported that caseloads were too high. A 2004 report from the comptroller’s office reached a similar conclusion. In 2010 a commission formed by Governor Rick Perry issued fourteen recommendations for improving CPS; it turned out that eleven of those had also been made by the 1996 committee and had never been enacted. The 2010 report concluded that “there is increasing evidence to show that our foster care system is sometimes doing more harm to our children than good.”

The Legislature has made occasional stabs at reform that included small boosts in funding. But in the past few years, Texas’s historic neglect of foster care has eroded into a crisis, with CPS having to stash kids in state offices and hotels; according to media reports, nearly a thousand children potentially in peril weren’t visited by a CPS worker for nearly six months in 2016.

“This is as bad as I’ve ever seen it,” says Scott McCown, who served as a state district judge for thirteen years and presided over a docket of child protection cases. He authored a seminal report in 1999 advocating for increased funding for CPS and continued to argue for higher state spending while heading the Center for Public Policy Priorities, a liberal think tank. He’s now the director of the Children’s Rights Clinic at the University of Texas law school. “I don’t think there was ever a time where the department was adequately scaled to the size of the workload, but it has come closer than it does now,” he says. “We’ve got good policies and practices in place. We have better training. In some ways, it’s a better system. But we have a rapidly growing child population, and we have a lot of kids living in poverty. We haven’t funded the infrastructure needs.”

McCown believes the Legislature will need to allocate several hundred million more dollars for CPS. The keys, he says, are reducing turnover among caseworkers and thereby bringing down their caseloads. State leaders recently approved an emergency appropriation of $150 million for CPS to hire hundreds more employees and give caseworkers a $12,000 raise. In addition, Governor Greg Abbott’s office allocated $8 million for a pilot program to provide better care for some of the children with the most-pressing needs. That’s all an excellent start, but now they must follow through during the session by extending these emergency appropriations in their next two-year budget. The next piece, McCown says, is raising the compensation for foster care providers and recruiting more of them to alleviate the shortage. Finally, he says, the state should consider expanding a pilot reform program, currently in the Fort Worth area only, which prevents child-placing agencies from turning away or simply moving troubled foster kids; agencies that work with the state must take all kids and find appropriate and safe places for them to live. But that too costs money: the state can’t hold child-placing agencies to such tough standards unless the agencies also get the money they need to meet those standards.

Showing rare and encouraging unanimity, the governor, the lieutenant governor, and the House speaker have all acknowledged that CPS is in crisis and needs to be addressed. And several hundred million dollars, while significant, won’t break the bank (after all, we spent a record $800 million on border security last session, and lawmakers will reportedly consider a $200 million increase this time around). But as we all know, spending money has never been in vogue at the Legislature, especially after a Republican electoral sweep and especially in a tight budget year, when the state is expected to face a deficit. Some legislators will undoubtedly look for easy solutions and cheap fixes where none exist.

The CPS crisis will test whether our state leadership can function effectively. We’ve seen plenty of political pandering lately, but CPS is serious business. Everyone wants children to be safe. The question is, in this era of divisiveness and distrust of government, can state leaders work together for the greater good? We can only hope, because the consequences couldn’t be more dire for thousands of children who depend on us to protect them.