Skip to content

v1.91.293.0 fix(harness): error lines print again; register qm stops at QM's pack cap instead of claiming QM works (GSTA-135) - #3532

Merged
capy-ai[bot] merged 7 commits into
mainfrom
gsta-135/qm-fixes
Oct 28, 2026
Merged

capy-ai[bot] merged 7 commits into
mainfrom
gsta-135/qm-fixes

Conversation

@garrytan

@garrytan garrytan commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner
{
  "schema_version": 1,
  "pr": 3532,
  "head": "9bc6dd97105bd496d6b0e3eb6c497f046151629f",
  "version": "1.91.291.0",
  "base": "main",
  "gate": {
    "pregate.json/remote_gate": {
      "pass": 10408,
      "fail": 0,
      "skip": null
    }
  },
  "session_kind": "unattended",
  "pregate": "requires-remote cleared @e0bca36eabf0 (1 checks, current for 9bc6dd97105b)",
  "requires_remote": [
    "free-tests.yml/macos-named-regressions: https://github.com/garrytan/gstack/actions/runs/40652539859",
    "windows-free-tests.yml/windows-free-shard: https://github.com/garrytan/gstack/actions/runs/40652539998",
    "pregate.json/remote_gate: remote-gate tree=e0bca36eabf0 tests=10408"
  ],
  "issues": {
    "fixes": [],
    "refs": [],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/ (hosts, install, troubleshooting, OPENCLAW, ADDING_A_HOST, uninstall, capy-install), README.md: QM claims"
  },
  "review_loop": {
    "passes": 3,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 0,
    "fixed": 4,
    "scope": "frozen"
  }
}

What changed

gstack-harness register qm --yes: before, a TypeError hid the reason; after, it stops before sending anything and names QM's pack cap

Before, gstack-harness register qm --yes crashed in its own error printer. Now it stops before sending anything to QM, names QM's 32 MiB pack cap, and points to the paste-in route.

Before/after as text
--- Before · gstack-harness register qm --yes (v1.91.290.0)
+++ After
-TypeError: e.line is not a function. (In 'e.line()', 'e.line' is 61)
-      at <anonymous> (~/gstack/bin/gstack-harness:146:52)
+gstack-harness: gstack at 6a34617362e9 is 73.5 MiB in 4319 files; nothing was sent to QM. QM imports the whole repository and caps a pack at 32.0 MiB and 5000 files by default, so it cannot import gstack yet. Fix: QM registration is not available yet; give a QM agent gstack with gstack-harness register generic --print pasted into its instructions (HARNESS_QM_PACK_TOO_LARGE; docs/troubleshooting.md#harness-qm-pack-too-large)

Why

Harness Evals' preflight at v1.91.290.0 found two problems with #3526. Every refused gstack-harness command crashed with TypeError: e.line is not a function instead of printing its reason. And register qm could never work, because QM imports a skill pack by cloning the whole repository and stops at 32 MiB, while gstack is 73 MiB. Users now get the documented error line, and QM is described as not available yet instead of as working.

Blast radius

This touches every gstack-harness error path (the printer is renamed) and only the QM register path. OpenClaw, Hermes, dots and generic registration code is unchanged. What makes it safe: report() is the only caller-visible change and all three callers were updated. Grep found no other .line() caller, and the CLI test exercises the printer through the real binary. Rung reached: script ran, using the real bin/gstack-harness for both the old crash and the new output, against the real checkout.

Approvals

Date Asked Exact words Outcome Covers Still pending
2026-10-28 Fix the gstack-harness error printer and make QM messaging honest in one follow-up PR now; plan the real QM fix separately “Ship (1) and the honest QM messaging in one follow-up PR now, without waiting on (2)'s plan” (GStack Minder (captain)) approved this follow-up PR; the real QM route goes to a gate none

Source: gstack-approvals record for gsta-135/qm-fixes (display only; not an approval citation).

Summary

bin/gstack-harness prints gstack-harness: <reason>. Fix: <what to do> (<CODE>; docs/troubleshooting.md#<anchor>) again. Bun gives every thrown error its own numeric line property, which shadowed HarnessError.prototype.line(), so the printer is now report(). register qm sizes the repository at the installed commit with git ls-tree, skipping symlinks as QM does. Over QM's default cap it stops with the new HARNESS_QM_PACK_TOO_LARGE before any request, so no empty pack lands in the org. If a QM with other limits refuses the import, gstack reads the error QM recorded on the pack, maps it to the same code, and does not retry. docs/hosts.md lists QM as not available yet and points to the paste-in route.

Test Coverage

All new code paths have test coverage in test/harness-register.test.ts (21 tests, up from 19).
Regression proof: on v1.91.290.0, gstack-harness unregister nothing-here and register qm --yes both crash with the TypeError, and both print the coded line after the fix. The QM tests fail against the old module.
Tests ran: remote free tier at the frozen head (see receipt).

Pre-Landing Review

Pass 1 found three informational issues, all fixed. QM's real 500 body is generic, so the cap is now read from the pack's recorded lastImport.error. A non-git checkout now refuses instead of sizing to zero. Symlinks are no longer counted. Pass 2 flagged a stray a/SKILL.md that a scratch experiment on the shared machine had committed; it is removed. Pass 3 is clean.
REVIEW_LOOP: passes=3 blocking_found=1 deferred=0 noted=0 fixed=4 scope=frozen
Gate edits: 1 listed, 1 read, 0 findings. The existing QM reuse/retry test now runs against a small committed repository instead of the gstack checkout, because the real checkout is over QM's cap. The test still asserts one pack, one create, two imports, the ledger contents and archiving.
Outside review: native in-host passes only. This is a small non-numeric diff (rule 30a), and the Codex CLI did not run.

Review notes

The short QM /autoplan found that QM_PACK_CONFIG.skillGlobs ['*/SKILL.md'] matches nothing, because QM matches globs against skill directories (src/skills/ingest.ts:175). It needs ['*']. This doesn't affect behaviour while registration is refused, and it is part of the planned QM route.

Exploratory QA

The real CLI was run before and after, as shown above.

Design Review

No frontend files changed, so design review was skipped.

Eval Results

No prompt-related files changed, so evals were skipped.

Greptile Review

No Greptile comments.

Plan Completion

This is the captain's follow-up brief. Item 1 (error printer plus regression test) is done, and the honest QM messaging is done. The real QM route is at its gate with GStack Minder.

Verification Results

bun test test/harness-register.test.ts gave 21 pass and 0 fail. Typecheck is clean. The troubleshooting anchors test gave 259 pass and 0 fail.

TODOS

No TODO items completed in this PR.

Documentation

Status: updated: two one-line factual corrections so no doc still implies QM registration works.

Audited scope: base 6f27f0c..6a34617 (gsta-135/qm-fixes): HarnessError.report() printer fix and register qm stopping before QM's 32 MiB / 5,000-file pack cap (HARNESS_QM_PACK_TOO_LARGE). Searched every tracked doc for QM, register qm and GSTACK_QM claims.

Documentation health:
  docs/hosts.md           Current (QM row already says not available yet; changed by this PR)
  docs/troubleshooting.md Updated (HARNESS_QM_CREDENTIALS now notes that registration still stops at HARNESS_QM_PACK_TOO_LARGE)
  docs/install.md         Updated (line 56 pointer: 'why QM is not available yet' replaces 'QM and any other harness'; line 21 untouched)
  README.md               Current (docs index row lists QM as a hosts.md topic)
  docs/ADDING_A_HOST.md   Current (QM is still a TARGETS row)
  docs/OPENCLAW.md        Current (no QM mention)
  docs/uninstall.md       Current (no QM mention)
  docs/capy-install.md    Current (no QM mention)
  CHANGELOG.md            Not reviewed for voice (ship-owned; [Unreleased] entry already covers the docs)

Coverage: HARNESS_QM_PACK_TOO_LARGE has a reference in docs/troubleshooting.md, a how-to (the paste-in route) in docs/hosts.md, and its rationale in both. HarnessError.report() is internal and needs no docs. No coverage gaps.

Diagram drift: none; no diagram names the harness modules.

Test plan

  • bun test test/harness-register.test.ts: 21 pass, 0 fail
  • bun test test/troubleshooting-anchors.test.ts: 259 pass, 0 fail; bun run typecheck clean
  • Remote pregate (Ubicloud): see the receipt

🤖 Generated with Claude Code

…pack cap instead of claiming QM works

Bun gives every thrown Error an own numeric 'line' property, which shadowed
HarnessError.prototype.line(), so every refused gstack-harness command crashed
with 'e.line is not a function'. The printer is now report().

QM imports a skill pack by cloning the whole repository and refuses past
32 MiB / 5,000 files (Harness Evals preflight, HARN-5); gstack's repository is
73 MiB in 4,280 files. register qm now measures first and stops with
HARNESS_QM_PACK_TOO_LARGE before any request; QM's own cap refusal maps to the
same code. docs/hosts.md lists QM as not available yet.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@trunk-io

trunk-io Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 5 commits October 28, 2026 07:22
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…size a non-git checkout; skip symlinks like QM

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…3533)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot marked this pull request as ready for review October 28, 2026 08:04
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@github-actions github-actions Bot changed the title fix(harness): error lines print again; register qm stops at QM's pack cap instead of claiming QM works (GSTA-135) v1.91.293.0 fix(harness): error lines print again; register qm stops at QM's pack cap instead of claiming QM works (GSTA-135) Oct 28, 2026
@capy-ai
capy-ai Bot merged commit 9e3308f into main Oct 28, 2026
62 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