I now read some literature and summary texts about what researchers have analysed out from the El Cid legends.
If I understand the gist correctly, there was in early decades of 12th century, controlling effort to write history as if
* Castilian monarchy was old and legitimate
* El Cid was the great hero
Just some decades (or a century) earlier, the old kingdom of Leon had got supplanted by Castile. Though the dynasty descended from both, its patriline was from Castilian side....
El Cid became suddenly a royal ancestor - when his descendants ascended the stem throne of Navarre, and his descendants started to marry to Castilian and other royal dynasties as queens....
At this time, old castilian stuff about some judges, got a new life: two judges, Nuno rasura and Lain calvo, were brought fore.
* Nuno rasura was made originator of long line of rulers. His son-in-law, Fernando Gonzalves niger was turned to be his son..... and sequence of counts of castile was tightened and one dynasty was reconstrued and brought to forefront. everything which could make their history as independent rulers, by grace of god and no one else, was emphasized, improved and so forth
* Lain calvo, El Cid's mythical agnatic ancestor, was made as the one of the two judges.... the military judge particularly.
(I have no doubt that magnates who governed Castilian lands in those days, were acting as judges too.)
To this development, it seems, the 842 as origin of Castile's state, was rearranged. However, everything in chronology misfits.
It's known that it was only king Ordono I whose reign started the repopulation of those wasted lands. Not 842, but in 860 or so. Then, before the judges' legendary epoch commenced, there were years of other arrangements.
Nuno rasura's governorship would rather fit to around 880.
Nuno rasura's maternal grandson Gonzalvo Fernandez was born in 880 at earliest, in normal spans. His birth may well have coincided with his maternal grandfather being at highest peak of his career, being the elderly man chosen to be popular justice.
Also Fernan niger's life fits better to a scheme where he were born in around 850 or tad later, married in 870s or 800s, and had that son in one of those years. Then his later reign as count would be at reasonable stage of his lifespan.
There's also the tradition that judges were set up in time of 'king' Froila. Well, there was, in around 870, Froila Ordonez, younger brother of Alfonso Ii, and that froila revolted, fled to lands of Castile, and before geting subjugated, held some sway.
Why then everything in the appointment of judges being in legendary stuff assigned to the year 842, death of Alfonso II ???
well, because Alfonso II's death was desired to be presented as break of legitimate line, on behalf of 12th c castilianist history writing.
alfonso was a long time king, holy, and did not leave sons. The castilianist history twisters wanted to say that their country got its independence at that spot of time. That the Leonese successor were somehow illegitimate to succeed.
In the time of Alfonso II's death, Castile was still pretty empty. The repopulation epoch had not started.
It's meaningless to try to put castilian history events to that time. Except, Alfonso II's death was better fodder for justification of independence, than the lost cause of infante Froila in 870s against Alfonso III
------
I also suspect that this tendency to make the Leonese line as less justified, would be a reason why dominant, castilian, tradition has delegated Ramiro I's kinship with Alfonso I to be remoter than it really was.
The late brother's direct male descendant is arguably the lawful successor of the childless great-uncle.
Whereas a son of a remoter cadet branch, and descendant of some usurper, is arguably in weaker position.
Grains of truth of the closer kinship have been preserved in some ambiguous pieces of older literature - but newer tradition has made Ramiro I as some sort of second cousin to Alfonso II, and got rid of the Pelayo root.
-------------------------
I would like to write the history of Vardulia (old Castile) in a way that in 860s or so, they had a period of intense repopulation;
in about 870s, they chose local magnates to continue the separatism of infante Froila, king to their tradition,
and members of said administrators' families were fiefed counts of that region then in around 900s,
and then consisently onwards from 930 or so.