Compare commits

...

4 Commits

Author SHA1 Message Date
ethernet
2b4062f964 fix(ci): upload artifacts for lint-reports 2026-05-06 17:13:38 -04:00
ethernet
1dba69095d fix(ci): diff typecheck fixes against PR branch-off point 2026-05-06 17:05:00 -04:00
ethernet
c96eb06dc4 fix: TerminalMenu returntype is int when multiselect is false 2026-05-06 17:05:00 -04:00
ethernet
f6cfff4ac6 fix: bad import of DEFAULT_GATEWAY_RESTART_DRAIN_TIMEOUT 2026-05-06 17:05:00 -04:00
3 changed files with 15 additions and 8 deletions

View File

@@ -48,12 +48,16 @@ jobs:
- name: Determine base ref
id: base
env:
PR_BASE_SHA: ${{ github.event.pull_request.base.sha }}
run: |
# For PRs, diff against the merge base with the target branch.
# For PRs, diff against the PR's pinned parent commit
# (github.event.pull_request.base.sha — snapshot at PR open time,
# so later pushes to main don't leak into the diff).
# For pushes to main, diff against the previous commit on main.
if [ "${{ github.event_name }}" = "pull_request" ]; then
BASE_SHA=$(git merge-base "origin/${{ github.base_ref }}" HEAD)
BASE_REF="origin/${{ github.base_ref }}"
BASE_SHA="${PR_BASE_SHA}"
BASE_REF="PR base (${BASE_SHA:0:7})"
else
BASE_SHA=$(git rev-parse HEAD~1 2>/dev/null || git rev-parse HEAD)
BASE_REF="HEAD~1"
@@ -117,6 +121,9 @@ jobs:
name: lint-reports
path: .lint-reports/
retention-days: 14
# .lint-reports/ is a dotfile-prefixed directory, and upload-artifact@v4
# skips hidden files by default (breaking change from v3). Opt back in.
include-hidden-files: true
- name: Post / update PR comment
if: github.event_name == 'pull_request'

View File

@@ -4216,7 +4216,7 @@ def _prompt_model_selection(
clear_screen=False,
title=effective_title,
)
idx = menu.show()
idx: int | None = menu.show() # ty:ignore[invalid-assignment] - TerminalMenu.show() is always `int | None` when multi_select is False / not provided.
from hermes_cli.curses_ui import flush_stdin
flush_stdin()
if idx is None:

View File

@@ -3534,7 +3534,7 @@ def _remove_custom_provider(config):
clear_screen=False,
title="Select provider to remove:",
)
idx = menu.show()
idx: int | None = menu.show() # ty:ignore[invalid-assignment] - TerminalMenu.show() is always `int | None` when multi_select is False / not provided.
from hermes_cli.curses_ui import flush_stdin
flush_stdin()
@@ -3620,7 +3620,7 @@ def _model_flow_named_custom(config, provider_info):
clear_screen=False,
title=f"Select model from {name}:",
)
idx = menu.show()
idx: int | None = menu.show() # ty:ignore[invalid-assignment] - TerminalMenu.show() is always `int | None` when multi_select is False / not provided.
from hermes_cli.curses_ui import flush_stdin
flush_stdin()
@@ -3796,7 +3796,7 @@ def _prompt_reasoning_effort_selection(efforts, current_effort=""):
clear_screen=False,
title="Select reasoning effort:",
)
idx = menu.show()
idx: int | None = menu.show() # ty:ignore[invalid-assignment] - TerminalMenu.show() is always `int | None` when multi_select is False / not provided.
from hermes_cli.curses_ui import flush_stdin
flush_stdin()
@@ -7582,7 +7582,7 @@ def _cmd_update_impl(args, gateway_mode: bool):
# systemd units without SIGUSR1 wiring this wait just times out
# and we fall back to ``systemctl restart`` (the old behaviour).
try:
from hermes_constants import (
from gateway.restart import (
DEFAULT_GATEWAY_RESTART_DRAIN_TIMEOUT as _DEFAULT_DRAIN,
)
except Exception: