Skip to content

Conversation

@jwise
Copy link

@jwise jwise commented Dec 29, 2025

Adds support for naming revisions from the CLI. Partially f.ixes #73 (but not fully; web UI not modified to create named revisions).

@yusufm
Copy link
Owner

yusufm commented Dec 30, 2025

Spec in (SPECIFICATION.md) says revision directories are immutable “once released” (and “treat as read-only once created (and especially once released)”). This PR formalizes: released = immutable, draft = can be replaced. That’s arguably consistent with “especially once released”, but it does weaken “immutable snapshots” if you interpret that as “immutable once created”.

The new behavior is fine, but could you add a note like below to the SPECIFICATION.md, to clarify the nuance:

  • draft snapshots may be re-cut/overwritten (or deleted) until released
  • released snapshots must never be overwritten

ent_rev_bump.add_argument("--notes", default=None, help="Optional notes for revision metadata (applied to snapshot and release)")
ent_rev_bump.add_argument("--released-at", dest="released_at", default=None, help="ISO datetime for release (default now)")

ent_rev_new = rev_sub.add_parser("new", help="Create a new draft release")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should likely say "... draft revision"

if snap_dir.exists():
raise FileExistsError(f"Revision '{label}' already exists for {sfid}")
# Ok, it exists. But maybe it's a draft, and we can blow it away.
meta = _read_meta(snap_dir / "meta.yml")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

meta["status"] should likely be meta.get("status") to avoid KeyError on malformed/old meta.

<tr class="odd:bg-gray-50">
<td class="px-3 py-1.5 font-mono text-blue-700">${id}</td>
<td class="px-3 py-1.5 text-gray-800">${st}</td>
<td class="px-3 py-1.5"><span class="px-2 py-0.5 rounded-full text-xs bg-${st_color}-100 text-${st_color}-800">${st}</span></td>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

consider avoiding bg-${color}-100 style in case we adopt compiled Tailwind later (use fixed class set or mapping).

@jwise jwise force-pushed the jwise/revision-names branch from b003c10 to c999e27 Compare December 31, 2025 07:50
@jwise
Copy link
Author

jwise commented Dec 31, 2025

Agreed on all counts. How about now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants