Skip to content

feat: absorb worktree, watch-pr, ship-pr, and T3 improvements - #63

Merged
3metaJun merged 1 commit into
mainfrom
feat/absorb-pstack-claude-and-t3-pstack
Nov 22, 2026
Merged

3metaJun merged 1 commit into
mainfrom
feat/absorb-pstack-claude-and-t3-pstack

Conversation

@3metaJun

Copy link
Copy Markdown
Owner

Summary

Absorbs reliability, data-safety, tooling, and T3 Code integration improvements from michael-denyer/pstack-claude and chhoumann/t3-pstack while preserving mstack's single canonical, harness-neutral skills/ tree and strict skills/*/references/hosts/ isolation.

Highlights

  • Worktree audit & cleanup safety (tools/meta-mode/worktree-audit.mjs, skills/meta-mode/playbooks/worktree-cleanup.md):
    • Read-only by default (--fetch refreshes any configured remote base, with refs/remotes/ anti-shadowing and longest-prefix remote matching); global GIT_OPTIONAL_LOCKS=0; early empty return when no linked worktrees exist.
    • Leaf-only DISPOSABLE ignored filtering (never drops ignored secrets inside tracked build/ / dist/ dirs); initialized + <worktree-gitdir>/modules submodule hold gates (hold-submodule, persisting even after git submodule deinit); submodule ignored files; worktree-only HEAD/reflog orphan counting (hold-reflog); locked / prunable / hold-scratch (immune to status.showUntrackedFiles=no).
    • @{upstream}-aware --left-right --count remote status (behindN, aheadA,behindB), ancestor symlink pathSpellings, RFC-8878 .jsonl.zst Zstd decoding, Copilot session-state, Pi pstack/mstack, and T3 custom Claude/Codex home transcript scanning (skipping shadow/secret homes), with fail-closed PR & transcript error handling.
    • Playbook updated to match Git's validate_no_submodules & status.showUntrackedFiles=no behavior and --all --reflog --not --remotes --oneline submodule commit auditing while strictly forbidding --force / rm -rf / git clean -fdx.
  • require-bun.mjs, bootstrap.ts, watch-pr, and ship-pr (tools/meta-mode/):
    • Pure-ESM Node 18+ require-bun.mjs guard loaded before dynamic await import("../bootstrap.ts") in watch-pr and ship-pr.
    • Lockfile-keyed external dependency cache under ${XDG_CACHE_HOME:-~/.cache}/mstack/meta-mode-tools/<sha256>/ via NODE_PATH (preserving Codex 0.164+ plugin hook trust hashes).
    • Hardened watch-pr (deadline, landing, check-suites, head-checks, GraphQL refusal/cursor/error fail-closed checks) + opt-in bounded --settle (settle.ts, running before factsAfterChecks).
    • Ported ship-pr (inspect / cancel-pending) for auto-merge disabling, merge-queue dequeuing, and readback verification.
  • T3 Code home discovery & catalog validation (scripts/t3-homes.mjs, scripts/model-config-lib.mjs, scripts/model-config.mjs):
    • Added npm run check-t3 (scripts/t3-homes.mjs) distinguishing installed / missing / unknown (redacted secret homes warn without causing unfixable --check failures; optional --strict), supporting direct & plugin install layouts and shell-safe hints.
    • Added modelFamily(), --catalog validation (with BOM/UTF-16 decodeText and effort-option filtering), advisory t3CatalogWarnings, and updated T3 host references & docs/t3code.md.
  • Small tool fixes, policy upgrades & structural invariants:
    • Leading quote neutralization in show-me-your-work/scripts/log.mjs, streamed CR handling in statechart/scripts/frontends/messages.ts, MSTACK_SESSION_HOOK=off override in scripts/session-hook.mjs, 3-marker LF/CRLF conflict check in scripts/validate.mjs, comment-reviewer HOLD policy, playbook hardening, new test suites (invariants, skill-references, readme-facts, test-discovery, t3-homes, bootstrap, shipping-cli), and THIRD_PARTY_NOTICES.md attribution.

Verification (Local CI/CD)

  • npm test (validate.mjs 61 skills + skill-baseline.mjs --check + Node test suite): 796 pass / 0 fail (2 Windows symlink skips)
  • tools/meta-mode: bun install --frozen-lockfile, bun test (265 pass / 0 fail, 14 Windows-only POSIX shebang skips), bun run typecheck (exit 0)
  • skills/statechart/scripts: npm run test:portable (146/146 pass)
  • node scripts/check-upstream.mjs --source <pstack> --strict & skill-baseline.mjs --check: 0 drift / 0 problems
  • npm run check-package: 699 files, 0 excluded files
  • Council 9 review: Gemini-4-Neon(High) 9.3/10, Opus-5.5(High) 9.3/10

Absorb reliability, safety, and T3 Code integration improvements from
michael-denyer/pstack-claude and chhoumann/t3-pstack while preserving
mstack's canonical harness-neutral skills tree and host-reference boundary:

- Worktree audit & cleanup safety: read-only default with -b/--base and
  --fetch, refs/remotes/ anti-shadowing, GIT_OPTIONAL_LOCKS=0, leaf-only
  DISPOSABLE filtering, submodule & <gitdir>/modules hold gates, reflog
  orphan detection, pathSpellings, .jsonl.zst decoding, Copilot/Pi/T3
  custom home transcript discovery, and fail-closed PR/transcript checks.
- Meta-mode tooling: pure-ESM Node 18+ require-bun.mjs guard, lockfile-
  keyed external cache in bootstrap.ts, hardened watch-pr with optional
  --settle window, and ship-pr inspect/cancel-pending for auto-merge and
  merge-queue cancellation.
- T3 Code tooling & docs: read-only T3 provider home inspector
  (scripts/t3-homes.mjs / npm run check-t3), --catalog validation with
  modelFamily() and advisory panel warnings, and updated T3 host refs.
- Tooling, playbooks & invariants: quote neutralization in log.mjs,
  streamed CR handling in statechart, MSTACK_SESSION_HOOK=off override,
  comment-reviewer HOLD policy, playbook hardening, conflict-marker and
  reference/invariant test suites, and THIRD_PARTY_NOTICES attribution.
@3metaJun
3metaJun merged commit 0f15dd7 into main Nov 22, 2026
0 of 11 checks passed
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