aidevops 3.14.11 → 3.14.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -49,6 +49,7 @@ The result: an AI operations platform that manages projects across every busines
49
49
 
50
50
  <!-- Build & Quality Status -->
51
51
  [![GitHub Actions](https://github.com/marcusquinn/aidevops/workflows/Code%20Quality%20Analysis/badge.svg)](https://github.com/marcusquinn/aidevops/actions)
52
+ [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=marcusquinn_aidevops&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=marcusquinn_aidevops)
52
53
  [![CodeFactor](https://www.codefactor.io/repository/github/marcusquinn/aidevops/badge)](https://www.codefactor.io/repository/github/marcusquinn/aidevops)
53
54
  [![Maintainability](https://qlty.sh/gh/marcusquinn/projects/aidevops/maintainability.svg)](https://qlty.sh/gh/marcusquinn/projects/aidevops)
54
55
  [![Codacy Badge](https://app.codacy.com/project/badge/Grade/2b1adbd66c454dae92234341e801b984)](https://app.codacy.com/gh/marcusquinn/aidevops/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
package/VERSION CHANGED
@@ -1 +1 @@
1
- 3.14.11
1
+ 3.14.12
package/aidevops.sh CHANGED
@@ -5,7 +5,7 @@
5
5
  # AI DevOps Framework CLI
6
6
  # Usage: aidevops <command> [options]
7
7
  #
8
- # Version: 3.14.11
8
+ # Version: 3.14.12
9
9
 
10
10
  set -euo pipefail
11
11
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aidevops",
3
- "version": "3.14.11",
3
+ "version": "3.14.12",
4
4
  "description": "AI DevOps Framework - AI-assisted development workflows, code quality, and deployment automation",
5
5
  "type": "module",
6
6
  "bin": {
package/setup.sh CHANGED
@@ -12,7 +12,7 @@ shopt -s inherit_errexit 2>/dev/null || true
12
12
  # AI Assistant Server Access Framework Setup Script
13
13
  # Helps developers set up the framework for their infrastructure
14
14
  #
15
- # Version: 3.14.11
15
+ # Version: 3.14.12
16
16
  #
17
17
  # Quick Install:
18
18
  # npm install -g aidevops && aidevops update (recommended)
@@ -807,18 +807,25 @@ _setup_noninteractive_signal_exit() {
807
807
  exit "$exit_code"
808
808
  }
809
809
 
810
- # Compute how many seconds the lock owner PID has been running.
811
- # Uses started_at_epoch (most accurate) falling back to ps etimes.
810
+ # Compute how many seconds the live lock owner has held the setup lock.
811
+ # Uses started_at_epoch when it agrees with the owner PID runtime; falls back to
812
+ # the PID runtime when an old lock timestamp points at a newer live setup owner.
812
813
  # Prints the age in seconds on stdout; prints 0 when unknown.
813
814
  _setup_lock_owner_age() {
814
815
  local lock_dir="$1"
815
816
  local owner_pid="$2"
816
- local _start_epoch="" _now_epoch="" _age_tmp=""
817
+ local _start_epoch="" _now_epoch="" _age_tmp="" _pid_age=""
817
818
  if [[ -r "$lock_dir/started_at_epoch" ]]; then
818
819
  _start_epoch=$(tr -d '[:space:]' <"$lock_dir/started_at_epoch" 2>/dev/null || true)
819
820
  _now_epoch=$(date +%s 2>/dev/null || printf '0')
820
821
  if [[ "$_start_epoch" =~ ^[0-9]+$ && "$_now_epoch" =~ ^[0-9]+$ && "$_now_epoch" -ge "$_start_epoch" ]]; then
821
- printf '%s' "$((_now_epoch - _start_epoch))"
822
+ _age_tmp="$((_now_epoch - _start_epoch))"
823
+ _pid_age=$(_setup_pid_elapsed_seconds "$owner_pid" 2>/dev/null || true)
824
+ if [[ "$_pid_age" =~ ^[0-9]+$ && "$_age_tmp" -gt $((_pid_age + 300)) ]]; then
825
+ printf '%s' "$_pid_age"
826
+ return 0
827
+ fi
828
+ printf '%s' "$_age_tmp"
822
829
  return 0
823
830
  fi
824
831
  fi
@@ -905,17 +912,6 @@ _setup_acquire_noninteractive_setup_lock() {
905
912
  continue
906
913
  fi
907
914
 
908
- local _owner_started_age=""
909
- local _owner_pid_age=""
910
- _owner_started_age=$(_setup_lock_started_age_seconds "$lock_dir" 2>/dev/null || true)
911
- _owner_pid_age=$(_setup_pid_elapsed_seconds "$owner_pid" 2>/dev/null || true)
912
- if [[ "$_owner_started_age" =~ ^[0-9]+$ && "$_owner_pid_age" =~ ^[0-9]+$ && "$_owner_started_age" -gt 300 && "$_owner_started_age" -gt $((_owner_pid_age + 300)) ]]; then
913
- print_warning "Removing stale setup.sh --non-interactive lock at ${lock_dir}; lock age ${_owner_started_age}s is older than owner pid ${owner_pid} runtime ${_owner_pid_age}s"
914
- rm -rf "$lock_dir" 2>/dev/null || true
915
- reclaim_attempts=$((reclaim_attempts + 1))
916
- continue
917
- fi
918
-
919
915
  # Owner is alive — compute age and read current setup stage.
920
916
  owner_age=$(_setup_lock_owner_age "$lock_dir" "$owner_pid")
921
917
  owner_cmd=""