Skip to content

fix: separate workspace freshness from compatibility floor #202

Closed

Description

@Jammy2211

Overview

fix: separate workspace freshness from compatibility floor

Part of the four linked HowToFit teaching tasks authorized on 2026-10-17. Human said "Go" after the scope discussion; EP includes the missing regression likelihood. No merge or release is authorized.

Plan

Keep minimum_library_version compatibility precedence. Compare freshness using workspace_version or legacy version.txt, never the minimum floor; skip freshness where neither stamp exists. Add regression coverage for floor-only, fresh and stale release stamps, legacy stamps and below-floor errors; run the Nerves suite.

Tier: glance — merge mode: human /prm (stop at review).

Detailed implementation plan

Primary repository: PyAutoNerves. Branch: feature/workspace-freshness-stamp.
Local clone: /workspace/scratch/a05dd794807b/PyAutoNerves, main clean and fetched before work. Mind has no conflicting claim in these repositories. The two HowToFit changes are coordinated sequentially in this authorized batch on separate branches; no separate bundle backlog.

Keep minimum_library_version compatibility precedence. Compare freshness using workspace_version or legacy version.txt, never the minimum floor; skip freshness where neither stamp exists. Add regression coverage for floor-only, fresh and stale release stamps, legacy stamps and below-floor errors; run the Nerves suite.

Heart door: STALE, release stale and monitoring red; not a release-readiness claim. Recheck authoritative readiness before shipping. Use Python 3.12 local runtime.

Original Prompt

Starting prompt

The workspace staleness warning keys off a value documented never to move

Type: maintenance
Target: PyAutoNerves
Repos:

  • PyAutoNerves
  • HowToFit
    Themes:
  • version-handshake
  • tutorials
    Difficulty: small
    Autonomy: supervised
    Priority: normal
    Status: formalised
    Consequence: glance
    Review-minutes: 3
    Unattended: ready
    Witness: a fresh clone of a release-tagged workspace with the matching released library emits no workspace-version UserWarning.
    Filed: 2026-09-15
    Revised: 2026-09-15 — the first version of this prompt proposed bumping HowToFit's floor. That is wrong; see below.

What a reader sees

On HowToFit main with a current autofit, the first import prints:

UserWarning: The workspace at .../HowToFit records library version
2026.7.9.1, but the installed library is 2026.8.17.1 — more than 30 days
newer. The workspace examples and configs may lag the installed API.
Pull the latest workspace:
    cd .../HowToFit && git pull origin main

The advice is not actionable for the reader it reaches — they are already on
main, or on the release tag. It is the first thing a workshop attendee sees.

Why "just bump the floor" is the wrong fix

autonerves/workspace.py:check_version resolves the floor from
config/general.yaml: version.minimum_library_version first, and that key's
own comment in HowToFit reads:

Bump DELIBERATELY — only when a script starts needing new API — never per
release. Must always name an INSTALLABLE (non-yanked) release.

So the value is a compatibility floor, correctly old. The staleness
warning then reuses that same floor as a freshness signal
(_STALENESS_WINDOW_DAYS = 30, workspace.py:18), which guarantees the
warning fires for every workspace whose scripts have not needed new API for a
month — i.e. every healthy workspace. Bumping the floor to silence it would
misuse the key and lose the floor's real meaning.

The actual options

  1. Warn on a freshness stamp, not the floor: only run the staleness comparison
    against version.workspace_version (the release stamp) where one exists,
    and skip it entirely when only minimum_library_version is set. A floor is
    not evidence about how old the clone is.
  2. Or drop the staleness warning and keep only the hard "installed library is
    older than the floor" error, which is the check that carries information.
  3. Or, if the warning is wanted for tag clones, have the release stamp
    workspace_version at tag time so there is a real freshness value to
    compare.

Whichever is chosen, the same drift is sitting in the sibling teaching repos
(HowToGalaxy, HowToLens) and the workspaces, so fix it in autonerves rather
than per repo.

Activity

  1. Jammy2211 commented on Oct 17, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped in #203, merged on 2026-10-17 by explicit human Prm authorization. Merge: f116f70. Every CI job passed (including Python 3.12, 3.13 and no-JAX); no changes requested or unresolved review threads. Mind completion record follows in complete/2026/10/. This is a development merge, not a package release.

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