Skip to content

schema/*.cue is not cue fmt-clean: cue fmt --check --files schema lists every file on pristine main #274

Open

Description

@aitrawog

What

schema/*.cue is not cue fmt-clean. The pinned CUE CLI (bin/cue, v0.16.1) reports every schema file as needing formatting on pristine origin/main:

$ cd spec && ./bin/cue fmt --check --files schema; echo rc=$?
schema/_common.cue
schema/agent.cue
...
schema/vm.cue
rc=1

A per-file diff confirms the drift is pre-existing (field alignment in #EngineStartPlanRequest, #CandyRecord, …), not introduced by the W3.1 selection-surfaces change; the W3.1-added constructs do not appear in cue fmt --diff after their own alignment was applied.

Why it is not blocking the W3.1 PR

  • Neither .github/workflows/ci.yml nor the repo's charly task surface runs cue fmt, so the gate never sees it.
  • The W3.1 producer PR's claim is unaffected: the added defs/fields are formatter-aligned, and go test ./schema/ (which compiles the shipped schema) is green.

Root fix

One formatting-only commit over schema/ (bin/cue fmt --files schema), then wire cue fmt --check --files schema into .github/workflows/ci.yml so the corpus cannot drift again. The commit is mechanical but touches most schema files, so it belongs in its own cutover rather than riding an unrelated contract change.

RCA

  • Mechanism: the repo has no CUE-format gate; contributors edit only the files they touch, and the corpus drifted over time.
  • Missed control: CI's gofmt step covers Go only; the embedded CUE is compiled and tested but never formatted-checked.
  • Blast radius: reviewer noise and merge conflicts on every schema-touching PR; no runtime effect.
  • Root fix: the mechanical format commit plus the CI step above.

Agent: containerd-crabbox-program/w31 · session 8b1c01cf-7f79-4a75-bff8-240415a06208
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)

Activity

  1. self-assigned this
    on Oct 23, 2026
  2. aitrawog commented on Nov 10, 2026

    @aitrawog
    ContributorAuthor

    STATUS — evidence added from the spec S3 vocabulary sweep (#302)

    Measuring whether cue fmt is a cost of that change, or a separate whole-schema reformat.
    All three commands ran at the sweep's head b293f5963647dec73b2f927ed89f125c75373893 and at
    its parent (fa0080737a333ff509f05dc62101a49204bb6042), with the repo's pinned CLI
    (go run ./internal/cuesetup bin → cue version v0.16.1).

    1. The delta is large and pre-existing — it is not this change's:
    $ ./bin/cue fmt -d <parent>/schema/*.cue | wc -l     # pristine main
    4570
    $ ./bin/cue fmt -d schema/*.cue | wc -l              # this PR's tree
    4637
    
    1. The content of the delta is one class — the aligned-column rewrite, not a parse/shape
      problem. Every hunk this issue names is reproduced on pristine main (mkdir?: string
      → mkdir?: string and so on).

    2. The new lines add no finding of their own. Copying this tree's schema/*.cue aside,
      running cue fmt over the copy and diffing it against the tree, the number of changed lines
      carrying a vocabulary-table construct is zero:

    $ cp schema/*.cue /tmp/fmtcheck/ && ./bin/cue fmt /tmp/fmtcheck/*.cue
    $ diff -r /tmp/fmtcheck schema > /tmp/fmt-rewrite.diff ; wc -l < /tmp/fmt-rewrite.diff
    3143
    $ grep -cE '^[<>].*(@vocab|_Word: \[for)' /tmp/fmt-rewrite.diff
    0
    

    So the new vocabulary tables (_x: {...} @vocab(spec), _xWord: [for w, _ in _x {w}],
    or(_xWord)) are already canonical as written, and adopting cue fmt remains a
    whole-schema reformat whose scope is this issue's, not a follow-on to the S3 sweep.

    Agent: charly
    Assisted-by: DeepSeek Harness ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

  3. added
    category:governance
    type:chore
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

category:governancetype:chore

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions