Skip to content

feat: pyauto-status shell function for cross-repo drift dashboard - #3

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/pyauto-status-shell
Apr 27, 2026
Merged

feat: pyauto-status shell function for cross-repo drift dashboard#3
Jammy2211 merged 1 commit into
mainfrom
feature/pyauto-status-shell

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Adds a cross-repo git sync dashboard (pyauto-status) to PyAutoPrompt — a sourceable shell function that prints behind/ahead/dirty/upstream state for every git repo under ~/Code/PyAutoLabs/ in under 5 seconds. Designed to be sourced from ~/.bashrc and called automatically after the PyAuto venv-activation aliases so the user always sees drift state before starting work. Closes #2.

API Changes

None — internal changes only. PyAutoPrompt has no public Python API; this PR only adds shell tooling.

Test Plan

  • source PyAutoPrompt/scripts/pyauto_status.sh && pyauto-status from a fresh shell completes in <10s.
  • All ~21 repos under ~/Code/PyAutoLabs/ appear in one screen.
  • A repo on a non-default branch is visible without auto-checkout.
  • A repo with no upstream is shown as NONE with a ! flag.
  • bash PyAutoPrompt/scripts/status.sh --repos prints the same dashboard via the existing status.sh entry point.
  • bash PyAutoPrompt/scripts/status.sh (no args) still prints the prompt-registry dashboard unchanged.
Implementation details

Files Added

  • scripts/pyauto_status.sh — new sourceable shell file defining pyauto-status().

Files Modified

  • scripts/status.sh — added --repos arg handling near the top that sources pyauto_status.sh and runs pyauto-status, then exits. Default and --full behaviour unchanged.

Out of scope (handled by other prompts in autoprompt/)

  • Auto-pulling drift — covered by prompt 05 (/sync slash command).
  • Pretty colors / TUI — explicitly excluded in the prompt.

Personal env (out of PR, applied separately to ~/.bashrc)

  • source line so the function is available in every shell.
  • pyauto-status call appended to the PyAuto, PyAutoGPU, PyAutoNoJAX venv-activation functions so the dashboard prints automatically after entering the workspace.

Naming-clash note

There is already a /pyauto-status slash command (PyAutoPrompt/skills/pyauto-status/) that prints the workflow-registry dashboard (planned / active / complete tasks). The shell function reuses the name in the terminal namespace for git drift. Different surfaces, no collision — but the docstring at the top of pyauto_status.sh calls this out for future-readers.

🤖 Generated with Claude Code

Add scripts/pyauto_status.sh defining a `pyauto-status` shell function
that prints a one-line-per-repo dashboard for every git repo under
~/Code/PyAutoLabs/: branch, upstream tracking ref, behind/ahead counts
vs @{u}, dirty file count, and a single-glyph flag column. Fetches run
in parallel — full sweep of ~21 repos completes in under 5s on cold
cache.

Handles the failure modes the 2026-04-27 audit surfaced:
- missing upstream  -> prints NONE and `!` flag (don't crash)
- non-default upstream -> uses @{u}, not hard-coded origin/main
- non-git directories -> skipped cleanly
- fetch failures -> marked `!`, sweep continues

Also extends scripts/status.sh with a `--repos` flag that delegates to
`pyauto-status` so existing users of status.sh have a one-stop entry
point.

Closes #2

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211
Jammy2211 merged commit 0e5dcf6 into main Apr 27, 2026
@Jammy2211
Jammy2211 deleted the feature/pyauto-status-shell branch April 27, 2026 20:22
Jammy2211 pushed a commit that referenced this pull request Jul 8, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 8, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 8, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 10, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 10, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 10, 2026
Jammy2211 pushed a commit that referenced this pull request Jul 17, 2026
…iterature corpus, all validation green

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Jammy2211 pushed a commit that referenced this pull request Jul 17, 2026
…egs 1-3 hold

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Jammy2211 pushed a commit that referenced this pull request Aug 23, 2026
)

The follow-up filed at the end of the stale-jax-pin ship bundled two different
jobs and sized too-large (score 11) against a declared medium. Split per hard
rule #3:

- active/run_smoke_per_script_timeout.md — bounded, now ISSUED as
  autogalaxy_workspace_test#108 and registered in active.md.
- draft/research/workspaces/intermittent_smoke_hang_jax_mge.md — re-homed from
  bug/ to research/ and re-sized large; the open-ended half, left in draft.

Investigating the timeout task changed it materially. It is not a new feature but
DRIFT: autolens_workspace_test's run_smoke.py already implements the per-script
timeout (PyAutoHands#226/#227) at 193 lines, while autogalaxy, autocti and autofit
still carry the un-capped 113-line copy. Those three are identical in code —
differing only in one docstring paragraph — so it is one diff applied three times.

That also explains the hang's asymmetry: autolens would have capped mge.py and
carried on; autogalaxy had nothing to stop it and ran 59 minutes silent.

Sizing overridden to low/direct against the Feature Agent's large/phased verdict,
which was formed on the pre-investigation draft. Recorded in the prompt with the
reason rather than silently ignored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KMknTjH347FBZUE82nNEby
Jammy2211 pushed a commit that referenced this pull request Aug 26, 2026
Follow-up to #337, which handled repo identity (PyAutoBuild/PyAutoConf) and
left the lowercase package name for its own pass because some sites are code
snippets whose correctness depends on the package as it is today.

Verified against PyAutoNerves main before editing: the package is `autonerves`,
there is NO `autoconf` back-compat shim, and both `autonerves/jax_wrapper.py`
and `autonerves/dictable.py` exist (`from_json` at dictable.py:352). So
`from autoconf.dictable import from_json` in read_through_issues.md was not
merely stale wording — it is broken code, and that line is example code a
reader would copy.

- graphical_scoping.md: `autoconf.jax_wrapper` -> `autonerves.jax_wrapper`;
  the autoconf-side helper -> autonerves-side.
- graphical_scoping.md also QUOTED PyAutoFit's guidance as "shared utilities go
  in autoconf". Checked the source: PyAutoFit's AGENTS.md:15 now reads "Shared
  utilities (e.g. `test_mode`, `jax_wrapper`) belong in autonerves", and its
  CLAUDE.md is a one-line @-import of AGENTS.md. Quote and file reference both
  corrected, so it is faithful to what the file actually says.
- ep_scoping.md: autoconf-shared -> autonerves-shared helper.
- rectangular_bilinear_rtu_mesh_split.md, config_key_mirror_drift.md: the
  yaml-key-lowercasing behaviour is autonerves'.

Left as historical, deliberately:

- slope_hierarchy_n25_scale_up.md:61 "(autoconf renamed; PRs #2/#3 landed
  2026-07-18)" — a correct note explaining the rename.
- nightly_release_blocked_eight_nights.md:156 "the retired **autoconf**" — a
  dated dependency-resolution record.

Consistent with complete/2026/07/rename-autobuild-to-autohands.md's guardrail
on preserving historical old-name references; nothing under complete/ or
issued/ is touched.

Dashboard unchanged (body-only edits, no header fields); lifecycle check OK.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01APqqbJS8zqLC5DYYGmv4d9
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.

feat: pyauto-status shell function for cross-repo drift dashboard

1 participant