Skip to content

fix(startup): Pass 2 nit-class refinements (stacked on PR #235)#236

Merged
pcalnon merged 1 commit intomainfrom
fix/startup-scripts-pass2
May 7, 2026
Merged

fix(startup): Pass 2 nit-class refinements (stacked on PR #235)#236
pcalnon merged 1 commit intomainfrom
fix/startup-scripts-pass2

Conversation

@pcalnon
Copy link
Copy Markdown
Owner

@pcalnon pcalnon commented May 7, 2026

Summary

Pass 2 of the 2026-05-07 startup/shutdown scripts audit. Stacked on top of #235 — please merge #235 first; this PR's diff includes #235's commits and will simplify automatically once it lands.

Closes out the six nit-class items remaining from the audit. Item #12 (intentional duplicate echo lines per memory feedback_chop_all_echo_debug) preserved as-is.

What's fixed

🟡 DEGRADED

  • ci: Bump actions/setup-python from 5 to 6 #4 cascor host override now plumbs throughJUNIPER_CASCOR_HOST is now exported to the cascor server process alongside JUNIPER_CASCOR_PORT. Previously a documented but silent no-op for binding.

🟢 NIT (plant_all)

🟢 NIT (chop_all)

New tests

  • tests/test_juniper_plant_all.py — added TestDataHostHonorsOverride, TestUvicornPreflightDeferred, TestCascorHostExported, TestPidFileFormat.
  • tests/test_juniper_chop_all.py (new file) — covers pid parser (both formats, edge cases), grep tightening, systemd path preservation, and explicitly asserts the intentional duplicate echo lines per feedback_chop_all_echo_debug are still present.

Test plan

  • bash -n and shellcheck clean on both scripts
  • pre-commit run --files <changed> clean
  • python3 -m unittest discover tests — 130/130 pass (was 112 on main, now +18 new tests across two files)
  • Live pid-parser harness round-trip: both name=pid and name: pid formats parse identically
  • Live-stack smoke test: validate JUNIPER_CASCOR_HOST=0.0.0.0 util/juniper_plant_all.bash actually rebinds cascor to 0.0.0.0 (deferred to deployment validation)

🤖 Generated with Claude Code

Second pass of the 2026-05-07 startup/shutdown scripts audit. Cleans up
the six nit-class items remaining after Pass 1 (PR #235).

DEGRADED:
- #4 juniper-cascor process now receives both JUNIPER_CASCOR_HOST and
  JUNIPER_CASCOR_PORT. The documented host override was previously a
  silent no-op for binding (cascor's settings default host=127.0.0.1).

NIT (plant_all):
- #7+#9 JUNIPER_DATA_HOST now respects caller value via the
  ${JUNIPER_DATA_HOST:-0.0.0.0} idiom. Documented in the docstring.
- #8 uvicorn dropped from the global `command -v` pre-flight loop —
  it lives inside each conda env, not on the launcher's PATH, so the
  check failed on a fresh shell before any conda activation.

NIT (chop_all):
- #10 pid file format swapped from `name: pid` (variable whitespace) to
  `name=pid` (one per line). Chop's parser accepts both formats during
  the transition window so an in-flight pid file from a Pass-1 plant_all
  run still works.
- #11 worker-cleanup grep tightened from
  `juniper.cascor.worker\|juniper_cascor_worker\|cascor.*worker\|<term>`
  to `juniper-cascor-worker\|juniper_cascor_worker\|<term>`. The dropped
  alternative was over-greedy (matched unrelated dev shell processes).

Tests added:
- TestDataHostHonorsOverride, TestUvicornPreflightDeferred,
  TestCascorHostExported, TestPidFileFormat in test_juniper_plant_all.py
- New test_juniper_chop_all.py covering pid parser (both formats), grep
  tightening, systemd path preservation, and the intentional duplicate
  echo lines per memory `feedback_chop_all_echo_debug`.

#12 (intentional duplicate echoes) preserved as-is.

Pre-commit clean. Full repo unittest suite (130 tests) passes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Base automatically changed from fix/startup-scripts-pass1 to main May 7, 2026 22:29
@pcalnon pcalnon self-assigned this May 7, 2026
Copy link
Copy Markdown
Owner Author

@pcalnon pcalnon left a comment

Choose a reason for hiding this comment

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

approved

@pcalnon pcalnon merged commit 0f78d52 into main May 7, 2026
17 checks passed
@pcalnon pcalnon deleted the fix/startup-scripts-pass2 branch May 7, 2026 22:30
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.

1 participant