Skip to content

version: pre-release suffixes are dropped, so a beta inherits the release's evidence-gated guidance #102

Closed

Description

@renezander030

Problem

versionTuple() (src/version.ts:90) parses by split(".") + parseInt, so a pre-release suffix is silently discarded:

8.4.0-beta6    tuple= [8,4,0]    atLeast("8.5.0")= false
8.5.0-beta1    tuple= [8,5,0]    atLeast("8.5.0")= true   <-- the problem
9.2.8-beta4    tuple= [9,2,8]    atLeast("8.5.0")= true

A pre-release therefore compares equal to its own release, when semver orders it strictly below (8.5.0-beta1 < 8.5.0).

Why it matters

atLeast() gates evidence-derived guidance, not cosmetics. NESTED_MIRROR_FROM_ROOT_SINCE = "8.5.0" (src/store.ts:314) is the boundary above which nestedTimelinesWriteWarning() and nestedTimelinesAction() stop cautioning and instead tell the user:

on this version the app is reported to regenerate Timelines/<id>/draft_info.json from the project-root file, so this root-mirror edit should survive the next open

That claim rests on one artifact: the byte-identical open/close round trip on CapCut 8.5.0 release in #68. A user on 8.5.0-beta1 currently receives it too, on evidence that never covered a beta channel — which is exactly the "reassure on evidence that doesn't cover the case" failure mode the boundary exists to prevent.

This is not hypothetical. Both recent reporters on #50 are running betas: 9.2.8-beta4 (k12ktv) and 8.4.0-beta6 (IrizaD). In #50 I asked k12ktv whether the build was public or beta because it changes how the registry ceiling should treat it — but as the code stands, a clear answer to that question cannot change any behaviour.

Suggested fix

Two parts, either useful alone:

  1. Order pre-releases below their release. Parse the suffix and treat X.Y.Z-beta<n> as strictly less than X.Y.Z. This is standard semver ordering and, for this codebase, also the safe direction: an unevidenced beta falls back to the cautious wording rather than inheriting a reassurance.
  2. Surface the marker. Have capcut version <project> print the pre-release tag when present, so bug reports carry the distinction instead of it being flattened before anyone sees it.

Worth a test fixing the ordering (8.5.0-beta1 < 8.5.0 < 8.5.1-beta1 < 8.5.1), since the current behaviour is invisible — it produces confident wrong prose, not an error.

Not in scope

This does not touch which file the CLI treats as canonical (#50 / #51), and does not move NESTED_MIRROR_FROM_ROOT_SINCE itself. It only stops builds the evidence never covered from landing on the reassuring side of that line.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions