FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

refactor(stack): simplify internals and avoid redundant work by kitlangton · Pull Request #51 · kitlangton/stack · GitHub

refactor(stack): simplify internals and avoid redundant work - #51

Merged
kitlangton merged 1 commit into
mainfrom
refactor/simplify-codebase
Aug 28, 2026
Merged

refactor(stack): simplify internals and avoid redundant work#51
kitlangton merged 1 commit into
mainfrom
refactor/simplify-codebase

Conversation

Copy link
Copy Markdown
Owner

Why

The codebase repeats model projections, test setup, and private repair state that can be derived from existing values. Branch-specific Git operations also inspect unrelated worktree contents, and the packaging smoke command builds the same CLI twice.

The whole-codebase simplification pass keeps the existing service boundaries and safety checks while removing that duplication and unnecessary work.

What Changes

Area Change
Model mapping Reuse GitLab list fields for details and use existing model constructors with field overrides
Repair bookkeeping Remove unused private options, a duplicate preflight set, and unreachable replacement-request bookkeeping
Git worktrees Filter by the requested branch before reading worktree contents; retain full preflight inspection and dirty-owner refusal
State reads Read directly; use empty-state fallback only for missing files, not permission or decode errors
Local status Read four independent local inputs concurrently, without changing host concurrency
stack skill Print instructions outside a Git repository using the existing documentation layer
Packaging Let prepack build once instead of building both explicitly and through the lifecycle hook
Tests Reuse existing real-Git and service fixtures, and replace positional fixture switches with named options

Recovery Invariants

Replacement requests still checkpoint before creation and again after recording the created request number. Branch backups, per-remote leases, journal versions, cumulative keep-going recovery, and read-only retry policy are unchanged. No Git observations are cached across mutations.

Scope

Small local simplifications across the codebase, not an architectural rewrite. Public service interfaces and persisted schemas are unchanged. Includes a patch changeset for the skill fix and reduced local work; it does not change the release already published as 0.4.5.

Verification

GIT_CONFIG_GLOBAL=/dev/null GIT_CONFIG_SYSTEM=/dev/null bun run test
bun run typecheck
bun run format:check
bun run lint
bun run package:smoke
bun run changeset:status --since origin/main
bun src/cli.ts --help
bun src/cli.ts skill --help
git diff --check

211 tests pass on both Apple Git 2.50.1 and a locally built Git 2.39.5. Existing test assertions are retained, including real squash-merge and leased-undo coverage. Eleven new regressions cover outside-repository skill output, owner-only worktree inspection, dirty-owner refusal, full inspection, and missing/valid/corrupt/permission-denied state reads.

Inspected the packed tarball, installed it into a clean consumer, and ran its installed stack skill outside Git plus stack --version. The smoke command now invokes one build through prepack.

Reuse model fields and existing test fixtures, remove dead private repair state, and preserve checkpoint and undo behavior.

Limit branch-specific worktree inspection to owners, read state files directly, and let static skill output run outside Git. Rely on prepack for a single packaging build.
kitlangton merged commit ac7f9ce into main Aug 28, 2026
1 check passed
kitlangton deleted the refactor/simplify-codebase branch August 28, 2026 03:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL