Skip to content

Make vex init transactional #33

Closed
Closed

Description

@LunaStev

Motivation

vex init writes the source file, manifest, directories, and lockfile in sequence. A later failure can leave a partially initialized project.

A package manager should either create a complete project or leave existing contents untouched.

Proposed behavior

Validate the complete initialization plan before publishing files, stage generated content safely, and roll back artifacts created by the current invocation if publication fails.

Acceptance criteria

  • Perform package-name, destination, and planned-path validation before writing files.
  • Never overwrite an existing source file, manifest, or lockfile.
  • Do not leave partially generated files or temporary files after a failed initialization.
  • Roll back only artifacts created by the current invocation; never remove pre-existing user content.
  • Add fault-injection and existing-file integration tests on Linux, macOS, and Windows.
  • Preserve the current successful binary and library initialization behavior aside from the separately tracked scaffold improvements below.

Split follow-ups

The following independent scaffold improvements were split out so they can be completed as first contributions:

Activity

  1. added
    enhancement
    ui/ux
    stability
    on Sep 18, 2026
  2. changed the title [-]Make vex init transactional and generate a usable project scaffold[/-] [+]Make vex init transactional[/+] on Sep 18, 2026
  3. LunaStev commented on Oct 2, 2026

    @LunaStev
    MemberAuthor

    Verified completed against master 67797f6415f640e8c33f9a072879124b83934f84.

    Init validates before publication, protects existing files, and journals staged creation for rollback/restart recovery. Fault-injection tests verify rollback and preservation of subsequent user edits.

    Evidence: src/commands/init.rs, tests/cli_contract.rs.

    Master CI run 36963423149 passed all eight jobs, including native Windows, macOS, and Linux tests. Closing as completed.

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

    enhancementstabilityui/ux

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions