Wednesday, 2 December 2026

Petclinic Through the Real Pipeline: What Held, What Changed, and What Did Not

In Phase 1, we ran all eight exploratory Petclinic datasets through the scripted pipeline (step03 to step07). Each dataset compares Spring and OfficeFloor solving the same problems under four agent strategies. Then we placed the new numbers beside our earlier scratch scripts in results/phase1/COMPARISON.md.

Phase 1 uses stricter definitions than the scratch scripts. Sinew now measures return to core members beyond chance (cores.py). H3 is tested within a class. Forced code ignores dependency injection because a field is a field. Handlers are removed. Following the study's rules, findings against OfficeFloor and against our hypotheses sit right beside the ones that support them.

1. The picture: same amount of code, very different places

Across all eight Petclinic datasets (results/model/<dataset>/REPORT.md), Spring and OfficeFloor wrote about the same amount of new code per problem. The Spring over OfficeFloor ratio of new code per problem (S1) ran from 0.73 in petclinic-just-solve-202608081920 to 1.02 in petclinic-impact_gated-202609010045.

Where that code landed stayed very different (results/phase1/COMPARISON.md and REPORT.md).

  • Top three class share (S1). Concentration in the top three classes was 1.46 to 3.23 times higher in Spring across the eight datasets. In petclinic-just-solve-202608100006, top three share was 0.80 in Spring and 0.25 in OfficeFloor. Effective classes were 4.12 in Spring and 26.04 in OfficeFloor.
  • The method level (D4). A fair critique of OfficeFloor is that a single function class in OfficeFloor looks like a method in Spring. If you count methods instead of classes, the gap shrinks a lot. OfficeFloor placed 90% to 97% of new lines into new methods, compared with 74% to 91% in Spring. Top three share over methods was 0.03 to 0.09 in OfficeFloor and 0.08 to 0.30 in Spring. The study tests encapsulation at the class level and reports method spread beside it as shape (PLAN.md §11 row 23).

2. Births (H1) and the simulation (H8)

The clearest and steadiest difference across all eight datasets is how often each form opens a new class.

  • H1 (odds of a new class, Spring vs. OfficeFloor). The odds ratio ran from 0.03 to 0.52 across all eight datasets (p = 0.005 in every one, passing Holm in all eight). In petclinic-just-solve-202608100006, OfficeFloor's birth rate was 0.64 (0.70 on additive units, 0.45 on mutative units). Spring's birth rate was 0.14 (0.15 additive, 0.10 mutative).
  • Swapping births in simulation (H8). In petclinic-just-solve-202608100006, giving Spring OfficeFloor's birth rate moves simulated effective classes from 5.93 (4.74 to 7.32) to 30.23 (21.37 to 38.17). Giving OfficeFloor Spring's birth rate drops it from 53.02 (42.73 to 60.99) to 9.41 (7.04 to 12.22).
  • Where the model falls short. The simulation makes both forms spread out too much compared with reality. It simulates 53.02 effective classes against 26.04 observed in OfficeFloor (2.04 times higher). In Spring it simulates 5.93 against 4.12 observed (1.44 times higher). Births and the four core forces miss how much the problem itself points new code back to the same classes. The extended fit confirms this, giving problem relevance a weight of 3.72 in OfficeFloor and 1.65 in Spring in just-solve-202608100006.

3. Size, sinew, the loop, and black holes

Here is what held across the eight runs, followed by where the numbers did not go our way.

  • Black holes by volume (H4). Spring minus OfficeFloor black hole volume share was 0.00 in the short 20 checkpoint 202608011310 run and 0.30 to 0.66 across the seven 60 checkpoint runs. It passed Holm in 5 of 8 datasets (p = 0.005 to 0.020). In petclinic-just-solve-202608100006, Spring's black hole volume share was 0.66 (with 0.55 in the single largest black hole) against 0.00 in OfficeFloor.
  • The loop (H7). In Spring, forced placements gained 0.41 to 0.93 more sinew than chosen ones (p = 0.005 to 0.020 in 7 of 8 runs). In OfficeFloor, the gap was -0.07 to 0.07 (p = 0.368 to 1.000, never passing) because OfficeFloor rarely built sinew over 60 checkpoints.
  • Size (H2) and direction (S3). Size pulled harder in Spring in 6 of 8 runs (0.06 to 0.84 weight difference). However, it went slightly the other way in impact_gated-202609010045 (-0.20) and cohesion-prompt-202609160027 (-0.22). Cross lagged S3 (forces leading shape minus shape leading forces) was positive (p = 0.005 to 0.015) in 7 of 8 OfficeFloor runs (0.11 to 0.19) and 6 of 8 Spring runs (0.05 to 0.09).
  • PMD God classes. In Spring, between 9% (impact_gated-202609010045) and 100% (just-solve-202608081920) of black holes were flagged PMD GodClass at the end. In just-solve-202608100006, 45% of Spring's black holes that were clean at the 60% split became God classes by the end. Only 8% of similar sized non black holes did (difference 0.37, p = 0.010).

Two big warnings: H3 within a class and S2 forecasts

Two findings cut against a clean story. Both shape what happens next.

  1. H3 within a class mostly failed to pass on 60 checkpoints.
    In the old scratch scripts, the pooled sinew slope looked strong in Spring (0.38 to 1.46 here too). Once we tested within a class instead (PLAN.md §11 row 10), the picture changed.
    • In Spring, the within class sinew slope ran from -0.24 to 0.42. Seven of eight intervals crossed zero. Only cohesion-prompt-202609160027 passed on its own (0.29, p = 0.015), and not after Holm. Among changes that also edit a class's own lines, the slope was noisy or negative (-0.85 to 98.92).
    • In OfficeFloor, too few classes had sinew. The slope was not estimable in 3 runs, strongly negative in just-solve-202608100006 (-15.00), flat or negative in 3 runs (-0.33, -0.10, 0.28), and positive in impact_gated-202609031757 (1.13, p = 0.008).
    • What this triggers in Gate 2 (PLAN.md §8.5). Sixty checkpoints of Petclinic are too short to settle H3 within a class. By the pre written Gate 2 rules, H3 now depends on whether the long open source histories in Phase 2 (open-source-explore) show a clear positive slope.
  2. S2 held out forecasts lost to single metrics in OfficeFloor, and often in Spring.
    • On H9, shape added almost nothing over the forces (-0.44 to 0.02 of the forces' gain over guessing, p = 0.005 to 0.015 in all 8 runs and both arms).
    • On S2 (where held out code goes), the best single metric beat the forces model in all 8 OfficeFloor runs. Forces minus the best metric was -0.10 to -0.29 log probability per choice, reversed in 7 of 8 runs. In Spring it was negative or near zero in 5 of 8 runs (-0.79 to 0.10). In just-solve-202608100006, metrics (-3.601 OfficeFloor, -1.518 Spring) and mass alone (-3.622 OfficeFloor, -1.821 Spring) outscored the full forces model (-3.682 OfficeFloor, -1.873 Spring). Adding sinew to change count helped Spring's forecast in 6 of 8 runs (+0.06 to +0.43, p = 0.005), while adding 0.00 in OfficeFloor (p = 1.000).

4. What changed from the exploration and why

Putting exploration/petclinic/ beside the real pipeline (results/phase1/COMPARISON.md) showed two clear patterns.

  • Physical outcomes held closely. In just-solve-202608100006, Spring's top three share was 0.80 vs 0.80, and OfficeFloor's was 0.24 vs 0.25. Effective classes were 4.00 vs 4.12 in Spring and 27.20 vs 26.04 in OfficeFloor. Births were 0.13 vs 0.13 in Spring and 0.61 vs 0.64 in OfficeFloor.
  • Model weights shifted where bugs and definitions changed. Fixing the set likelihood bias and dropping the single endpoint handler term raised choice weights sharply. In just-solve-202608100006, choice home rose from 0.29 to 1.15 in Spring and from 0.50 to 4.29 in OfficeFloor. OfficeFloor's choice volume flipped from -3.70 to 0.52 once shape stand ins left the core fit. Redefining sinew shrunk Spring's event horizon from 9.20 to 4.48 and moved OfficeFloor's forcing sinew from 1.07 to -14.30 because almost no OfficeFloor classes built a core.

5. Sinew from change alone: gas clouds, single cores, and several cores

Gate 5 in PLAN.md §8.5 asked a sharp question. Is our new definition of sinew (cores.py) just mass in disguise?

Phase 1 gave a clear answer.

  • The shuffle test is clean. We kept each class's exact mass and shuffled which members each change bound at random. Sinew collapsed to 0.00 to 0.02 across all eight datasets in both forms. Compare that with real Spring sinew of 0.14 to 0.55 among classes with enough changes to tell. Returning to core members is real structure, not raw change count.
  • Mass explains less than half of sinew in most runs. R² of log sinew on log mass in Spring was 0.25 to 0.53. Seven of eight runs sat below Gate 5's 0.5 cutoff, with cohesion-prompt-202609160027 at 0.53. In OfficeFloor it was 0.07 to 0.36.
  • Class kinds at the end. In OfficeFloor, 77% to 100% of evolving classes were gas clouds (no core), 0% to 4% were single core, and 0% had several cores. In Spring, 43% to 74% were gas clouds, 12% to 52% were single core, and 0% to 3% had several cores. In just-solve-202608100006, 94% of Spring's black holes had a single core (6% had several cores and 0% were gas).

What this means next

Phase 1 confirmed the birth gap (H1), the dispersion gap (S1), the black hole volume gap in 60 checkpoint runs (H4), and that sinew captures genuine core re use rather than mass. At the same time, it left two big open questions before any freeze. H3's within class slope was too weak or noisy over 60 checkpoints to confirm, and S2's placement forecast lost to simple metrics and mass in OfficeFloor and most Spring runs.

Next is Phase 2 (open-source-explore). We are now measuring 283 real open source Java repositories with long commit histories to see whether within class forcing and the forces' forecast edge appear over real timelines.

No comments:

Post a Comment