PPrevernal
AI coding workspace

Prerelease identifier precedence

Version labels do not always sort as plain text. Prevernal gives comparison logic and prerelease examples a Windows project context, with a connected model and code changes you can inspect.

● ● ●Prevernal●
A concrete starting point · Prerelease identifier precedence ×
import re
IDENT = re.compile(r"[0-9A-Za-z-]+")
def prerelease_cmp(left, right):
    for item in (*left, *right):
        if not isinstance(item, str) or not IDENT.fullmatch(item):
            raise ValueError("identifier")
        if item.isascii() and item.isdigit() and len(item) > 1 and item[0] == "0":
            raise ValueError("leading zero")
    if not left or not right:
        return (not left) - (not right)
    for a, b in zip(left, right):
        if a == b: continue
        an, bn = a.isdigit(), b.isdigit()
        if an != bn: return -1 if an else 1
        if an and len(a) != len(b): return (len(a) > len(b)) - (len(a) < len(b))
        return (a > b) - (a < b)
    return (len(left) > len(right)) - (len(left) < len(right))
✳Compare already-separated prerelease identifiers with numeric identifiers below text identifiers.
✓ ChangesReview before applying ↗
Illustrative workspace
Project
Check multi-digit numbers, shared prefixes and stable-release empty tuples, rejecting leading-zero numbers and invalid identifiers.
Review before applying
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
Connection
Base URL, credentials and a reachable server.
Workflows

Prerelease identifier precedence

Workflows ↗
A concrete starting point
import re
IDENT = re.compile(r"[0-9A-Za-z-]+")
def prerelease_cmp(left, right):
    for item in (*left, *right):
        if not isinstance(item, str) or not IDENT.fullmatch(item):
            raise ValueError("identifier")
        if item.isascii() and item.isdigit() and len(item) > 1 and item[0] == "0":
            raise ValueError("leading zero")
    if not left or not right:
        return (not left) - (not right)
    for a, b in zip(left, right):
        if a == b: continue
        an, bn = a.isdigit(), b.isdigit()
        if an != bn: return -1 if an else 1
        if an and len(a) != len(b): return (len(a) > len(b)) - (len(a) < len(b))
        return (a > b) - (a < b)
    return (len(left) > len(right)) - (len(left) < len(right))
AI coding workspace

Make release decisions traceable to the code

Version handling connects small comparison functions to consequential application decisions. Prevernal is a Windows AI coding workspace where you can discuss that connection with the relevant project files nearby. Start with the decision that appears wrong, such as which candidate release is selected, and ask the connected model to inspect the path that produces it.

A concrete request might compare prerelease identifiers used by your update logic. Provide representative labels and the ordering your project requires. Ask for a proposal that separates invalid labels from valid but lower-priority versions, and inspect how that distinction reaches the caller. This keeps the task focused on application behavior instead of turning the conversation into a general comparison lesson.

Review the resulting patch with release fixtures that exercise different identifier types, equal prefixes and a final release. Check whether the caller expects a comparison result or an exception, then run the relevant project tests. If the proposal changes accepted syntax, treat that as a compatibility decision rather than an incidental improvement.

Prevernal supports connections to OpenAI-compatible or Anthropic endpoints. Where offered, an abliterated AI model can be selected for this coding work; provider restrictions, context limits and available tools still depend on the configured service. The model supplies assistance, while the project’s release policy supplies the acceptance criteria.

Reviewing a change to release ordering

What should accompany a report about the wrong update candidate?

Provide the candidate labels, expected winner and the code that chooses it. Include the project’s ordering policy. That evidence helps distinguish a comparison defect from filtering or selection logic elsewhere in the update path.

Should invalid identifiers sort below valid ones?

Only if your contract says so. Rejection and ordering are separate decisions, and silently ranking invalid input can hide upstream errors. Ask how the caller handles each case before accepting a change to validation.

How can a syntax correction affect existing users?

A stricter parser may reject labels that previously passed through the application. Identify where those labels originate and include representative stored or incoming values. Review compatibility separately from whether the new comparison logic looks cleaner.

Does Prevernal publish or install software releases?

This task uses a coding workspace to inspect your release-related implementation. Publication and installation belong to your project’s own processes. Verify the proposed code with your checks before using it in a release decision.

Get the Windows app ↗

Prevernal · Updated 2026-10-25