Skip to content

ci: record test-count floors (data only, no gate) - #234

Open
iceteaSA wants to merge 1 commit into
cortexkit:mainfrom
iceteaSA:ci/test-count-floors-data
Open

iceteaSA wants to merge 1 commit into
cortexkit:mainfrom
iceteaSA:ci/test-count-floors-data

Conversation

@iceteaSA

@iceteaSA iceteaSA commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

First of two. This adds only the floors data file — no workflow change, so nothing new runs in CI.

Why this is split from the gate

The gate PR that follows compares a branch's floors against the merge target's floors. On its own PR the merge base would have no floors file, so the ratchet would necessarily take its UNCHECKED arm and block the merge.

The obvious fix is a one-time bootstrap exemption. I declined it: "base resolves but floor file absent" is not actually a one-time condition — it also occurs when someone deletes the floors file, which is exactly the bypass the ratchet exists to prevent. An exemption would be a permanent code path and a permanent reviewer-trust surface to solve a condition that happens once.

Landing the data first means that condition never arises, and "base has no floor file" stays a pure UNCHECKED forever.

The numbers

Measured on a clean tree at f9c867d1, git status --porcelain empty:

core 199 · opencode 1885 · pi 114

The file records the HEAD and dirty-path count at measurement time. A floor carrying an unexpected HEAD or a non-zero dirty count is self-refuting on inspection; a bare number is not.

That stamp is not decorative. An earlier measurement in this work returned 202 twice for core — two agreeing runs, which was the discipline I had asked for — and both were wrong, because the tree had been switched underneath the measurement. Agreement between two runs proves they shared a subject, not that the subject was right. The stamp would have shown it.

Evidence classes

The file states, per package, how each floor was established: core is backed by two agreeing runs and an independent git-derived delta against another ref; opencode and pi rest on double measurement alone. A reader deciding whether to trust a floor deserves to know which kind of evidence backs each number, and where to look first when one of them is wrong.

The note also records why a derivation is not an oracle: it is independent of the run but not of the framework's counting convention, and this repo has 16 test.each sites where declaration-counting and runner-counting disagree.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Adds .ci/test-count-floors.json with baseline test counts for core (199), opencode (1894), and pi (114) so the follow-up gate PR has floors to compare against on main. This PR is data only — no workflow changes, nothing new runs in CI.

  • The file records the HEAD and dirty-path count at measurement time, so a contaminated measurement is self-refuting.
  • Evidence per floor says how each number was established: core was double-measured plus an independent git-derived delta, opencode double-measured plus a per-file decomposition, and pi double-measured only.
  • Landing the data first keeps the gate PR’s merge target from having no floors file, avoiding a bootstrap exemption that would also forgive deleting the floors file.

Written for commit 3d8a1d1. Summary will update on new commits.

Review in cubic

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

You’re at about 94% of the monthly reviewed-line limit. You may want to disable incremental reviews to conserve quota. Reviews will continue until that limit is exceeded. If you need help avoiding interruptions, please contact contact@cubic.dev.

Architecture diagram
sequenceDiagram
    participant Dev as Developer / CI
    participant Runner as Test Suite
    participant File as .ci/test-count-floors.json
    participant Base as Merge Target (main)
    participant Gate as Ratchet Gate (follow-up PR)

    Note over Dev,Base: Measurement (this PR - data only)
    Dev->>Runner: Run suite on clean tree at f9c867d1
    Runner-->>Dev: core 199 / opencode 1885 / pi 114
    Dev->>Dev: Verify with two agreeing runs and git-derived delta for core
    Dev->>File: Record floors + HEAD + dirtyPaths + evidence per package
    Note over File: HEAD + dirtyPaths stamp makes contaminated measurements self-refuting on inspection
    Dev->>Base: Land floors file on main (bootstrap baseline)

    Note over Base,Gate: Gate run (follow-up PR - implied)
    Gate->>Base: Fetch merge-target floors file
    alt Base floors file exists
        Base-->>Gate: floors + measurement stamp + evidence
        Gate->>Gate: Compare branch floors vs merge-target floors
        Gate-->>Gate: Ratchet CHECKED (enforced)
    else Base floors file missing (deleted or never bootstrapped)
        Base-->>Gate: no floors file
        Gate->>Gate: Ratchet takes UNCHECKED arm
        Note over Gate: Blocks merge on its own PR and would permanently forgive file deletion
    end
Loading

Re-trigger cubic

@iceteaSA
iceteaSA force-pushed the ci/test-count-floors-data branch from 1b0f741 to 3d8a1d1 Compare September 18, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant