Skip to content

Decide How a Carried .python-version Unit Is Declared in spec/files.json #4471

Done

Description

@ptr727

Raised by the group working #4187. That issue's plan asks for two things at once. It wants .python-version declared in spec/files.json at intent fidelity for python repositories. It also wants the whole value repository-owned. The audit engine cannot express both. So the carried unit was left out of the pull request for #4187, and that part of #4187 waits on this decision.

The question

How is the carried .python-version unit declared in spec/files.json?

Options

(a) Presence fidelity with a reference (recommended)

Declare { "path": ".python-version", "reference": "catalog/snippets/configs/.python-version", "appliesTo": ["python"] } with no fidelity, which defaults to presence. catalog/snippets/configs/.python-version holds 3.14. Add .python-version to the Python type's requiredFiles and a line to spec/validate.py CARRIED_PATH_PINS.

Why it is recommended: the whole file is the repository's value, and presence is the one fidelity the engine has that never judges content or dates. A unit with a reference is still carried from the snippet on stand-up, as Docker/README.md is today. It needs no engine change.

What it gives up: the literal "intent fidelity" in #4187's plan. Intent's only extra over presence is the date advisory, and for this file that advisory can only be false, per (c) below.

(b) An engine flag making a whole non-JSON file repository-owned

Add a field such as a whole-file form of repoOwnedKeys to spec/files.schema.json and spec/validate.py. Make spec/audit.py's intent_trail treat a copy of such a unit as current whatever it holds. Document it in spec/fidelity-model.md, and give RESYNC.md step 6 a keep-the-value instruction like the one it has for global.json.

It keeps both halves of the plan's wording. It is an engine design change across five files and a test. spec/audit.py is at 2988 of its 3000-line ceiling, so the fix has about 12 lines of room there.

(c) Intent fidelity with a reference, as the plan wrote it

The audit dates an intent unit by its reference. In spec/audit.py, intent_trail clears a copy only where its hash equals the reference's. fleet_owned_differences reads repoOwnedKeys only from a JSON reference. So every copy naming a line other than the snippet's reads as possibly trailing whenever it was last committed before the snippet changed. That is every copy on another line when the unit lands, and every carrier not yet moved after each baseline bump. That contradicts CODESTYLE.md "Toolchain Versions", which says a resync never changes the line a repository selects.

The resync-overwrite risk: RESYNC.md step 6's intent handling has a keep-the-line instruction for global.json's repoOwnedKeys and none for this unit. So a resync acting on the advisory re-vendors the snippet's line over the repository's own. That changes the interpreter its CI runs and its requires-python agreement. Under this option each such copy needs a driftNote naming (files.intent) after every hub bump to stay quiet.

What each option does to the parked work

The pull request for #4187 lands everything except the carried unit. That is the python-version action, the validate and release wiring, the hub-root .python-version of 3.13, and the rule text. A repository opts in by adding its own .python-version, and with none CI falls back to 3.14 with a warning. The python.version.consistent letter check applies only where the file is present. Each option above then adds the carried unit and the snippet in a follow-up change. (b) also adds the engine work.

Blocks: #4187, the carried-unit part of its plan step 1.

Activity

  1. added
    decision
    on Nov 26, 2026
  2. ptr727 commented on Nov 26, 2026

    @ptr727
    OwnerAuthor

    The part of #4187 that needs no decision is in #4472. That pull request does not wait on this decision. The carried unit follows in a change of its own once this is answered.

  3. ptr727 commented on Nov 26, 2026

    @ptr727
    OwnerAuthor

    Triage question, 2026-11-26.

    #4187's plan asks for a carried .python-version unit in spec/files.json for python repositories, declared at intent fidelity, with the whole value owned by each repository. The audit engine cannot express both. An intent unit is dated against its reference and cleared only where its hash matches, so every repository on a line other than the snippet's would read as possibly trailing. That contradicts CODESTYLE.md "Toolchain Versions", which says a resync never changes the line a repository selects. So the committed rule already rules out intent fidelity as written. The rest of #4187 is on main through #4472 and promotion #4485. What remains is how the carried unit is declared, which is a spec design choice for you.

    Options:

    1. Presence fidelity with a reference (recommended). Declare { "path": ".python-version", "reference": "catalog/snippets/configs/.python-version", "appliesTo": ["python"] } with no fidelity, add a snippet holding 3.14, add the path to the Python type's requiredFiles, and add a line to spec/validate.py CARRIED_PATH_PINS. Presence never judges content, so each repository keeps its own line, and stand-up still carries the snippet, as Docker/README.md is today. No engine change. It gives up only the literal "intent" wording in Carry a Fleet Default Python Line in .python-version and Let CI Read Each Repository's Own #4187's plan, whose one extra over presence is a date advisory that can only be false here.
    2. An engine flag making a whole non-JSON file repository-owned. A whole-file form of repoOwnedKeys in spec/files.schema.json and spec/validate.py, honored by intent_trail in spec/audit.py, documented in spec/fidelity-model.md, with a keep-the-value step in RESYNC.md step 6. It keeps both halves of the plan's wording. It is a design change across five files and a test, and spec/audit.py is at 2988 of its 3000-line ceiling.
    3. Intent fidelity with a reference, as the plan wrote it. It contradicts CODESTYLE.md "Toolchain Versions". A resync acting on the advisory would re-vendor the snippet's line over a repository's own, changing the interpreter its CI runs. Every such copy would need a (files.intent) driftNote after each hub bump.

    Whichever is chosen lands as its own change, carrying the unit and the snippet. Nothing in flight waits on it.

    Evidence: #4187 (plan step 1), #4472 (on main through #4485), main:CODESTYLE.md "Toolchain Versions" ("A resync never changes the line a repository selects"), main:spec/files.json (no .python-version unit yet, Docker/README.md as the presence-with-reference precedent), main:spec/audit.py (2988 lines), main:.python-version (3.13).

  4. ptr727 commented on Nov 26, 2026

    @ptr727
    OwnerAuthor

    Maintainer's answer, 2026-11-26 triage: option 1. The carried .python-version unit is declared with presence fidelity and a reference snippet, following the Docker/README.md precedent. No engine change, and each repository keeps its own line. #4187's carried-unit part can proceed.

  5. removed
    decision
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions