Commit Graph
4 Commits
Author SHA1 Message Date
Willie ebab63a670 feat(runbook): add build lifecycle hook, verify all 17 runbooks
Add a build hook that runs once before all runbooks, enabling
automatic binary rebuild. Lifecycle is now:
  build (once) → [per runbook: setup → steps → teardown]

Build hook uses os/exec directly (not session executor), outputs
to stderr, and aborts immediately on failure.

Fix all 17 runbooks to pass in devcontainer:
- Adapt to session executor's set -eo pipefail (use cmd || EXIT=$?
  pattern for expected non-zero exits)
- Replace embedded ```bash in heredocs with printf to avoid
  confusing the runbook parser
- Fix negated assertion gotchas (Not FAIL, No such file)
- Remove fragile verify code blocks (multi-block merge issues)
- Fix step number collision (7b → 8, renumber subsequent)
- Use -s flag for batch installs instead of repeated --force
- Add (?m) flag for multi-line regex assertions
2026-03-11 04:53:08 +08:00
Willie ba4f7c9c4d docs(runbook): migrate all 16 runbooks to typed assertion syntax
Convert Expected blocks from natural language descriptions to
matchable assertions: exit_code: N, regex: <pattern>, jq: <expr>,
Not <text>, and plain substring matches. All runbooks now parse
correctly with the assertion engine.
2026-03-11 04:53:08 +08:00
Willie b4c6c39437 fix(install): support subdir extraction for file:// URLs via // separator
file:// URLs with subdirectory paths (e.g., file:///repo/skills/alpha)
were passed whole to git clone, which fails because the full path isn't
a git repo. Add // separator support matching the existing SSH convention:
file:///path/to/repo//skills/alpha → CloneURL=file:///path/to/repo, Subdir=skills/alpha

Also updates E2E runbook Steps 10-11 to use the // syntax and improves
cli-e2e-test skill with cleanup prompt, cd /workspace note, and Go test template.
2026-02-25 07:02:54 +08:00
Willie 792d236485 feat: optimize tracked subdir installs and devcontainer isolation
Implement remaining Issue 46 optimizations and developer experience fixes.

Install and update optimization:
- optimize install --track for subdirectory sources by attempting sparse checkout first while preserving git metadata
- fallback to existing tracked clone strategy on sparse capability or sparse path errors
- clean sparse created destination before fallback clone to avoid destination already exists failures
- improve tracked install spinner wording for subdir sources
- add tracked subdir unit tests for sparse success and sparse to full clone fallback

Progress user experience:
- normalize git progress lines by stripping volatile transfer rate suffix
- dedupe and throttle spinner and tree spinner update frequency to reduce tty flicker
- add unit tests for spinner progress normalization and throttling behavior

GitHub API messaging:
- improve rate limit guidance to suggest setting token env vars or using gh auth login

Devcontainer isolation:
- make ssenv enter command mode run from isolated environment cwd
- fix setup global init detection to use skillshare status global mode
- add auto mode hint in devcontainer wrapper when workspace project config takes precedence

E2E and tests:
- expand Issue 46 runbook with install, install track, update, no token fallback, sparse paths, and isolation checks
- update compact warning output test expectations to match current grouped warning rendering

Verification:
- go test internal install package
- go test internal install sparse and tracked subdir tests
- go test internal ui package
- go test cmd skillshare package
- go build skillshare binary and run integration TestInstall_Subdir
- run tracked subdir tests inside devcontainer
2026-02-25 07:02:54 +08:00