Brook, I'm pleased to report that I believe everything is operating as intended. Though I see how the results you're seeing appear confusing.
The model you specified, in particular the priors for sigma, a_0, a_1, is:
MCMC_code <- nimbleCode({
sigma ~ dunif(0,20)
a_0 ~ dunif(-10,10)
a_1 ~ dunif(-10,10)
...
...
})
The priors used for each of sigma, a_0, and a_1 is a uniform distribution, each spanning an interval of width = 20. No matter what different values each of these nodes attain (so long as they remain within the specified intervals, [0,20] for sigma, and [-10, 10] for the a_0, a_1 terms), the logProb for any of these nodes will be constant, and equal to:
log(1/20) = -2.995732
which explains the value you're seeing. Using the list syntax, when you *sum* the LP for these three nodes, the value you're seeing is:
log(1/20) + log(1/20) + log(1/20) = -8.987197
When you specify ".all" to sum the LP over *all* stochastic model nodes, this now adds together the logProbs for sigma, a_0, a_1, and each of the 10 y[i] terms. The LP for each y[i] is a (log) normal density, the value of which depends on the current parameter values, which is why these LP values are changing. You could verify all the arithmetic, by also recording the LP's for the 10 y[i] terms, verifying those yourself by evaluating the (log) normal density using the different sets of sampled parameter values (in combination with the different x[i] and y[i] values), then finally adding together the 13 different logProb contributions to arrive at the final "_all_nodes_" LP value.
Does this resolve the mystery?
Cheers,
Daniel