Skip to content

chore(version-pins): concurrent fetches with a live in-place TUI - #563

Open
lroolle wants to merge 1 commit into
mainfrom
chore/version-pins-concurrent
Open

chore(version-pins): concurrent fetches with a live in-place TUI#563
lroolle wants to merge 1 commit into
mainfrom
chore/version-pins-concurrent

Conversation

@lroolle

@lroolle lroolle commented Aug 14, 2026

Copy link
Copy Markdown
Member

Why

versions-up fetched 17 registries one at a time; the sweep crawled.

What

  • Pins moved to a declarative table (GROUP|NAME|VAR|TYPE|ARGS); order is display and merge order.
  • Dispatcher runs up to 8 background fetch jobs, each writing per-tool files under a scratch dir (done-marker written last so a partial .val is never read).
  • TTY: the whole grouped block redraws in place with per-tool pending/checking/done states. Non-TTY (CI): finished lines print in table order, no escapes; NO_COLOR honored.
  • Deterministic merge: counters, UPDATED_VARS, and pin variables apply in table order after all jobs land — versions.env output is byte-stable regardless of completion order.
  • Soft-fail contract unchanged: a dead registry degrades to a warning and keeps the old pin. Cleanup trap kills stragglers, removes the scratch dir, restores the cursor.

Verify

  • bash scripts/update-version-pins.sh --dry-run (non-TTY): correct grouped output, 2 bumps detected, 1 soft-fail (cursor.com unreachable from the test container — environmental), versions.env round-trip intact including entries not in the pin table (TMUX/RUST/PYTHON).
  • shellcheck clean (no new findings).
  • tests/test_release_utils.sh 73/73, tests/version-upgrade.sh green.

🤖 Generated with Claude Code

Sequential fetches made versions-up crawl one registry at a time.
Pins now live in a declarative table; a dispatcher runs up to 8
background fetch jobs writing per-tool files (done-marker last),
and the TUI redraws the whole grouped block in place. Non-TTY (CI)
prints finished lines in table order; NO_COLOR honored. Counters,
UPDATED_VARS, and pin variables merge deterministically in table
order after all jobs land, so versions.env output is byte-stable
regardless of completion order. Soft-fail contract unchanged: a
dead registry degrades to a warning and keeps the old pin.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 14, 2026 11:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 019d3e7863

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

head1:*|head2:*)
local corner="├─" group=${item#head?:} dashes
[[ $item == head1:* ]] && corner="┌─"
dashes=${DASH_RULE:0:48 - ${#group}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid byte-slicing the UTF-8 rule

When the script runs with LC_ALL=C or LC_ALL=POSIX, Bash applies this substring length in bytes rather than characters. Since each rule glyph occupies three bytes and the calculated lengths are not multiples of three, every heading ends with a truncated UTF-8 sequence, producing malformed non-TTY/CI output. Generate the rule without slicing a multibyte string, or force character-aware handling.

Useful? React with 👍 / 👎.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors scripts/update-version-pins.sh to fetch version pins concurrently (with a capped number of background jobs) while providing a live in-place TUI for TTY runs and deterministic, ordered output/merge behavior for non-TTY runs.

Changes:

  • Introduces a declarative PIN_TABLE to define pin sources and preserve stable display/merge order.
  • Adds a concurrent dispatcher that runs up to 8 background fetch jobs writing results into a scratch directory with done-markers.
  • Implements TTY in-place redraw rendering and a non-TTY ordered “flush as complete” output mode, followed by a deterministic merge/tally phase.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +206 to +210
local corner="├─" group=${item#head?:} dashes
[[ $item == head1:* ]] && corner="┌─"
dashes=${DASH_RULE:0:48 - ${#group}}
echo -e " ${CYAN}${corner}${BOLD} ${group} ${RESET}${CYAN}${dashes}${RESET}${eol}"
;;
Comment on lines +173 to 178
local old_disp=$old new_disp=$new
if [[ ${T_TYPE[$i]} == "git-commit" ]]; then
old_disp="${old:0:7}"
new_disp="${new:0:7}"
fi

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