Skip to content

update can report success while package checkout stays behind #121

Description

@quick-ricon

Problem

shiv update chat reported success/up-to-date while the installed chat package checkout stayed behind origin/main.

This happened immediately after tagging KnickKnackLabs/chat v0.1.0 at 9e92774.

Observed sequence:

$ shiv list | rg chat
│ chat │ - │ - │ main │ 5eaa709 │ 2 weeks ago │

$ shiv update chat
Updating chat...
  ✓ chat — 5eaa709 → 9e92774 (5 commits)

$ shiv list | rg chat
│ chat │ - │ - │ main │ v0.1.0 │ 10 minutes ago │

$ root=$(shiv which chat)
$ git -C "$root" status --short --branch
## main...origin/main
$ git -C "$root" log --oneline -1
0f20791 Merge pull request #35 from KnickKnackLabs/baby-joel/codebase-rollout

After an explicit fetch inside the installed package checkout:

$ git -C "$root" fetch --prune --tags origin
From https://github.com/KnickKnackLabs/chat
   0f20791..9e92774  main       -> origin/main
 * [new tag]         v0.1.0     -> v0.1.0

$ git -C "$root" status --short --branch
## main...origin/main [behind 8]

$ shiv update chat
Updating chat...
  ✓ chat — already up to date

So shiv update/shiv list believed the install was fresh, but the executable package checkout was still behind.

Manual workaround:

$ git -C "$(shiv which chat)" pull --ff-only
Updating 0f20791..9e92774
Fast-forward
...
$ git -C "$(shiv which chat)" log --oneline -1
9e92774 Merge pull request #39 from KnickKnackLabs/quick/default-channel

Installed smoke after manual fast-forward passed:

CHAT_DATA_DIR=/tmp/... CHAT_IDENTITY=quick chat send --force --chat global-smoke "hello"
CHAT_DATA_DIR=/tmp/... CHAT_IDENTITY=quick chat send --force "implicit hello"
# implicit send created channel `default`

Expected

For a tracked package (REF is -, branch main), shiv update chat should fetch and fast-forward the checkout that shiv which chat returns, or fail loudly if it cannot.

Notes

This is not the repo-local mise declaration issue in #108. I was updating the global tracked chat install, and shiv which chat pointed at:

/Users/rikonor/.local/share/mise/installs/shiv-chat/latest/packages/chat

shiv list also reported the global tracked row for chat as fresh even while that checkout was behind.

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