@qvac/harness 0.2.8 → 0.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/harness.bundle +65 -12
- package/dist/prebuilds-manifest.json +8 -0
- package/dist-lib/index.d.ts +2 -1
- package/dist-lib/index.js +2 -1
- package/dist-lib/lib/capabilities/completion.d.ts +35 -2
- package/dist-lib/lib/capabilities/completion.js +84 -18
- package/dist-lib/lib/connect.js +1 -0
- package/dist-lib/lib/contract-types.d.ts +1 -0
- package/dist-lib/lib/serve.js +1 -0
- package/dist-lib/lib/wire.js +28 -0
- package/dist-lib/schema/harness.js +5 -2
- package/dist-lib/spec/hrpc/messages.js +22 -7
- package/dist-lib/spec/hyperschema/index.js +22 -7
- package/dist-lib/spec/hyperschema/schema.json +14 -1
- package/dist-lib/spec/hyperschema/types.d.ts +3 -2
- package/package.json +6 -6
- package/.claude/skills/asana/SKILL.md +0 -86
- package/.claude/skills/gh-stack/SKILL.md +0 -181
- package/.claude/skills/gh-stack/references/commands.md +0 -177
- package/.claude/skills/gh-stack/references/stack-design.md +0 -97
- package/.claude/skills/gh-stack/references/troubleshooting.md +0 -159
- package/.claude/skills/js-house-style/SKILL.md +0 -671
- package/.claude/skills/kvcache/SKILL.md +0 -171
- package/.claude/skills/pr-create/SKILL.md +0 -180
- package/.claude/skills/pr-review/SKILL.md +0 -414
- package/CLAUDE.md +0 -39
- package/docs/decisions/2026-05-29-kvcache-tool-turns.md +0 -75
- package/docs/decisions/2026-06-02-kvcache-tool-turns-reenabled.md +0 -127
- package/docs/decisions/2026-06-23-android-cpu-llm-defaults.md +0 -126
- package/docs/decisions/2026-07-29-assistant-owned-storage-layout.md +0 -88
- package/docs/decisions/2026-08-04-sidecar-orphan-reaping.md +0 -79
- package/docs/decisions/2026-08-11-pyodide-worker-thread.md +0 -68
- package/docs/decisions/2026-08-17-harness-hook-pipeline.md +0 -84
- package/docs/decisions/2026-08-17-harness-outbound-egress-guard.md +0 -176
- package/docs/decisions/2026-08-20-chat-prompt-prefix-is-stable.md +0 -95
- package/docs/decisions/2026-08-20-kvcache-static-placement.md +0 -109
- package/docs/decisions/2026-08-21-vendored-python-wheels.md +0 -85
- package/docs/decisions/2026-08-26-exec-is-not-gated-by-skills.md +0 -64
- package/docs/decisions/2026-08-27-writable-skills-overlay.md +0 -56
- package/docs/decisions/2026-09-01-skill-operation-manifests.md +0 -53
- package/docs/decisions/2026-09-01-usage-breakdown-is-measured.md +0 -78
- package/docs/decisions/2026-09-03-usage-breakdown-reported-by-the-harness.md +0 -136
- package/docs/decisions/2026-09-10-skill-wording-is-measured-offline.md +0 -63
- package/docs/decisions/2026-09-16-a-lookup-reports-the-place-it-resolved.md +0 -70
- package/docs/decisions/INDEX.md +0 -40
- package/docs/decisions/TEMPLATE.md +0 -32
- package/docs/kvcache-reference.md +0 -655
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
# Troubleshooting and recovery
|
|
2
|
-
|
|
3
|
-
## Contents
|
|
4
|
-
|
|
5
|
-
- [Rebase conflicts (exit 3)](#rebase-conflicts-exit-3)
|
|
6
|
-
- [After a squash merge](#after-a-squash-merge)
|
|
7
|
-
- [Local and remote stacks have diverged](#local-and-remote-stacks-have-diverged)
|
|
8
|
-
- [Restructuring a stack](#restructuring-a-stack)
|
|
9
|
-
- [Branch belongs to several stacks (exit 6)](#branch-belongs-to-several-stacks-exit-6)
|
|
10
|
-
- [Driving stacks from another tool or worktree](#driving-stacks-from-another-tool-or-worktree)
|
|
11
|
-
- [Stack file is locked (exit 8)](#stack-file-is-locked-exit-8)
|
|
12
|
-
- [An interrupted modify session (exit 10)](#an-interrupted-modify-session-exit-10)
|
|
13
|
-
|
|
14
|
-
## Rebase conflicts (exit 3)
|
|
15
|
-
|
|
16
|
-
`rebase` and `sync` both exit 3 on conflict. `sync` restores every branch to its pre-rebase state
|
|
17
|
-
first, so a failed `sync` leaves nothing half-applied; a failed `rebase` stops mid-flight and waits.
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
gh stack rebase
|
|
21
|
-
# exit 3 — conflicted paths are listed on stderr
|
|
22
|
-
git add <resolved paths>
|
|
23
|
-
gh stack rebase --continue # repeat if the next branch also conflicts
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
`gh stack rebase --abort` restores every branch in the stack, not just the current one.
|
|
27
|
-
|
|
28
|
-
Because `init` enables `git rerere`, a conflict you resolve once is replayed automatically the next
|
|
29
|
-
time the same conflict appears — which is common, since a change low in the stack is rebased through
|
|
30
|
-
every branch above it. Without `rerere`, repeated conflicts may need manual resolution on each
|
|
31
|
-
affected layer.
|
|
32
|
-
|
|
33
|
-
## After a squash merge
|
|
34
|
-
|
|
35
|
-
A squash merge replaces the branch's commits with one new commit, so the originals no longer exist
|
|
36
|
-
in the trunk's history and an ordinary rebase would try to replay them again.
|
|
37
|
-
|
|
38
|
-
`gh stack sync` detects this and rebases with `--onto` against the correct target, skipping the
|
|
39
|
-
merged branch:
|
|
40
|
-
|
|
41
|
-
```bash
|
|
42
|
-
gh stack sync
|
|
43
|
-
gh stack view --json # merged branch reports "isMerged": true, "state": "MERGED"
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
No manual action is needed. If the replay conflicts, `sync` restores all branches and exits 3.
|
|
47
|
-
Run `gh stack rebase` to rerun the rebase, which will stop at the conflict and allow you to resolve
|
|
48
|
-
and then `--continue` until complete. Use `gh stack sync --prune` to also delete local branches for
|
|
49
|
-
merged PRs.
|
|
50
|
-
|
|
51
|
-
## Local and remote stacks have diverged
|
|
52
|
-
|
|
53
|
-
Divergence means the local stack and the stack on GitHub changed in different ways — for example
|
|
54
|
-
branches were added locally while a PR was added to the stack on github.com.
|
|
55
|
-
|
|
56
|
-
When non-interactive, `sync` prints both chains, changes nothing, and exits **0** with
|
|
57
|
-
`Sync aborted`. Success here does not mean the sync happened; check for that message, or re-run
|
|
58
|
-
`gh stack view --json` and compare.
|
|
59
|
-
|
|
60
|
-
Two resolution paths:
|
|
61
|
-
|
|
62
|
-
- **Keep the remote version.** Drop local tracking and pull the stack back down.
|
|
63
|
-
|
|
64
|
-
```bash
|
|
65
|
-
gh stack unstack --local # keeps the stack on GitHub
|
|
66
|
-
gh stack checkout <stack-number> # or a PR number
|
|
67
|
-
```
|
|
68
|
-
|
|
69
|
-
- **Keep the local version.** Remove the grouping on GitHub, then recreate it from local state.
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
gh stack unstack # removes the grouping; PRs and branches survive
|
|
73
|
-
gh stack submit --auto
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
Neither path deletes pull requests or branches.
|
|
77
|
-
Remote unstacking leaves PRs that are merging (auto-merge enabled) or are queued (in a merge queue)
|
|
78
|
-
stacked. If needed, clear that state before retrying.
|
|
79
|
-
|
|
80
|
-
## Restructuring a stack
|
|
81
|
-
|
|
82
|
-
There is no non-interactive reorder, rename, or removal. `add` run from the wrong branch suggests
|
|
83
|
-
`gh stack modify`, but that is TUI-only. Tear the stack down and rebuild it instead:
|
|
84
|
-
|
|
85
|
-
```bash
|
|
86
|
-
gh stack unstack # removes local tracking and the GitHub grouping
|
|
87
|
-
# Rename or drop branches, and rewrite ancestry as needed.
|
|
88
|
-
gh stack init --base main branch-1 branch-2 branch-3
|
|
89
|
-
gh stack submit --auto # re-link on GitHub
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
`init` adopts branches that already exist, so the rebuild reuses them rather than creating new ones.
|
|
93
|
-
Existing PRs survive. Once Git ancestry is correct, `submit` updates their base branches and
|
|
94
|
-
re-links the stack on GitHub.
|
|
95
|
-
|
|
96
|
-
Changing metadata does **not** change Git ancestry. Reorder commits first, then rebuild the stack.
|
|
97
|
-
For example, to change `main <- models <- migration <- ui` into
|
|
98
|
-
`main <- migration <- models <- ui`:
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
old_models=$(git rev-parse models)
|
|
102
|
-
old_migration=$(git rev-parse migration)
|
|
103
|
-
git rebase --onto main "$old_models" migration
|
|
104
|
-
git rebase --onto migration main models
|
|
105
|
-
git rebase --onto models "$old_migration" ui
|
|
106
|
-
gh stack unstack
|
|
107
|
-
gh stack init --base main migration models ui
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
The first rebase moves migration-only commits onto trunk, the second replays model commits above
|
|
111
|
-
them, and the third replays UI-only commits above models. Preserve the old boundary SHAs before
|
|
112
|
-
moving any branch. For a different reorder, identify each layer's range with
|
|
113
|
-
`git log <old-parent>..<branch>`, then replay the ranges bottom to top.
|
|
114
|
-
|
|
115
|
-
## Branch belongs to several stacks (exit 6)
|
|
116
|
-
|
|
117
|
-
Commands exit 6 when the current branch cannot identify a single stack — typically because it is the
|
|
118
|
-
trunk of more than one stack. There is no flag to disambiguate.
|
|
119
|
-
|
|
120
|
-
```bash
|
|
121
|
-
gh stack checkout <a-branch-unique-to-the-intended-stack>
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Then rerun. Commands that take an explicit stack number (`merge 7`, `unstack 7`) sidestep the
|
|
125
|
-
problem entirely, since they do not infer the stack from the current branch.
|
|
126
|
-
|
|
127
|
-
## Driving stacks from another tool or worktree
|
|
128
|
-
|
|
129
|
-
`gh stack link` creates and updates stacks purely through the API, with no local tracking state.
|
|
130
|
-
Use it when branches are managed by jj, Sapling, git-town, a separate worktree, or any workflow
|
|
131
|
-
where the local `.git/gh-stack` file would be wrong or absent.
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
gh stack link branch-a branch-b branch-c # bottom to top
|
|
135
|
-
gh stack link --base develop --open a b c # non-default trunk, ready for review
|
|
136
|
-
gh stack link 10 20 30 # by PR number
|
|
137
|
-
gh stack link 7 feature-d # append to existing stack #7
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Because `link` writes no local state, the local navigation commands (`up`, `down`, `top`, `bottom`)
|
|
141
|
-
will not work on the result. Use `gh stack checkout <stack-number>` if you later want local tracking.
|
|
142
|
-
|
|
143
|
-
## Stack file is locked (exit 8)
|
|
144
|
-
|
|
145
|
-
Another `gh stack` process holds the exclusive lock on `.git/gh-stack.lock`. The lock times out
|
|
146
|
-
after about five seconds, so wait and retry. A persistent exit 8 means another process still holds
|
|
147
|
-
the lock; identify and stop that process before retrying.
|
|
148
|
-
|
|
149
|
-
## An interrupted modify session (exit 10)
|
|
150
|
-
|
|
151
|
-
`gh stack modify` is TUI-only and should never be invoked by an agent. If a repository is left in
|
|
152
|
-
this state by someone else, restore it:
|
|
153
|
-
|
|
154
|
-
```bash
|
|
155
|
-
gh stack modify --abort
|
|
156
|
-
```
|
|
157
|
-
|
|
158
|
-
Related: `submit` also detects a pending modify state, and under a TTY asks before overwriting the
|
|
159
|
-
stack on GitHub with local state.
|