Skip to content

/sync-gbrain reports failed pushes and imports instead of OK, and one bad queued path no longer blocks artifacts sync - #4455

Merged
capy-ai[bot] merged 4 commits into
mainfrom
sync-gbrain-reports-failures
Nov 17, 2026
Merged

capy-ai[bot] merged 4 commits into
mainfrom
sync-gbrain-reports-failures

Conversation

@garrytan

@garrytan garrytan commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

/sync-gbrain now says when an artifacts push failed or memory pages failed to import, instead of printing OK and "pushed", and one malformed queued path (from a skill started where the project slug was empty) no longer stops artifacts sync for every project.
Why: people trusted those rows and lost track of unsynced work; fixes #4445, #4418 and #4417.
Nothing to do after upgrading: a stuck projects//timeline.jsonl record is dropped and reported on the next sync.

Thanks to @exGeni for all three reports and their hermetic reproductions.

What changed
Tests

Each new test failed on main e0c4136 before the fix and passes after:

  • test/brain-sync.test.ts: enqueue refuses malformed paths; a malformed queued record is dropped and reported while the clean record syncs (main: whole batch refused); push_failed survives a drain of an unchanged queued file and of a file gone from disk (main: idle).
  • test/gstack-gbrain-sync.test.ts: end to end with a real artifacts repo, the brain-sync row says pushed after a push and ERR artifacts not pushed (push_failed: ...) after a rejected push and on the run after it (main: OK "pushed"). The A5 page-count test now expects the "nothing was pushed" lead, since sync is off in that fixture.
  • test/gstack-gbrain-sync-transcript-mode.test.ts: a fake gbrain refuses every import; the memory row is ERR 0 imported, N failed with gbrain's cause (main: OK), and OK again once imports succeed.

Issues

Refs #4417
Refs #4418
Refs #4445

Open in Capy

Agent notes

Thread GSTA-585, issue GST-2996.

Plan: exempt: bug fix with failing-first tests (R65)

Review: gate class, full panel on pass 1 (testing/security/state-machines specialist, red team, coverage audit): 5 below-floor findings, all fixed in 1791d1a (unparseable transcripts no longer turn the memory row ERR; malformed-path drop note written only after finalize; drain freshness compares mtime and content; 9 unit tests and 1 integration test added). Fix-check at 1791d1a (grant a-924ef19e46ce): 3 notes. Step 11: native adversarial 5 Low notes; second-model review (gpt-6.1-sol) 1 finding ruled a note; targeted reader: no findings.

Ruled note: bin/gstack-gbrain-sync.ts:338:outside-voice at 1791d1a ruled by Captain GStack Minder (GSTA-36) at 2026-11-17T18:12:39.036Z: missing or unreadable ingest counts read as zero failures: below the floor, matches main; WARN change is a Captain follow-up (approval a-10c5371b47a6)

{
  "schema_version": 1,
  "pr": 4455,
  "head": "bfc6e99ec4798f500c0d7224ea926fd5aaf3b917",
  "version": "1.100.0.0",
  "base": "main",
  "calls": 50,
  "session_kind": "unattended",
  "head_tree": "82d77f6de1839663275dcbbb2cbc2584fc754356",
  "product_patch_id": "0eb95cccf16936c7f845a15629e98e32bdb107c8",
  "gstack_version": "1.100.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 226,
    "rules": "66e5174161eecc2c",
    "base": "88da124dbc68ad886f4aef467d4b09375041ad86",
    "registry": "88da124dbc68ad886f4aef467d4b09375041ad86",
    "gate_scan": {
      "tagged": 2,
      "head": "bfc6e99ec4798f500c0d7224ea926fd5aaf3b917"
    },
    "reasons": [
      "gate-class",
      "risk:security",
      "runtime=226"
    ],
    "risk": [
      "security"
    ],
    "mode": "panel"
  },
  "issues": {
    "fixes": [],
    "refs": [
      4417,
      4418,
      4445
    ],
    "flakes": []
  },
  "docs": {
    "status": "updated",
    "scope": "docs/ and README.md, plus sync-gbrain/SKILL.md.tmpl and the changelog fragment"
  },
  "review_loop": {
    "passes": 1,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 3,
    "fixed": 5,
    "scope": "frozen",
    "fix_checks": 1,
    "rounds": 2,
    "unrecorded": 1,
    "ledgers_read": 4,
    "unbound": 2,
    "dispatches": {
      "specialist": 3,
      "red-team": 1
    }
  },
  "ruled_notes": [
    {
      "finding": "bin/gstack-gbrain-sync.ts:338:outside-voice",
      "head": "1791d1a9d07bb3fb640c9f18416923bc55edf743",
      "by": "Captain GStack Minder (GSTA-36)",
      "reason": "missing or unreadable ingest counts read as zero failures: below the floor, matches main; WARN change is a Captain follow-up",
      "at": "2026-11-17T18:12:39.036Z",
      "approval": "a-10c5371b47a6"
    }
  ],
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "gate"
    ],
    "rules": "8811fd300bf305f0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "0eb95cccf16936c7f845a15629e98e32bdb107c8",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  }
}
{"head":"1791d1a9d07bb3fb640c9f18416923bc55edf743","run":"ship-4455","status":"started","review_loop":{"passes":1,"blocking_found":0,"deferred":0,"noted":0,"fixed":5,"scope":"frozen","rounds":1,"dispatches":{"specialist":3,"red-team":1}}}

…ne malformed queued path no longer stops artifacts sync (#4445, #4418, #4417)

An empty project slug queued projects//timeline.jsonl and the refused batch blocked every later record; enqueue now refuses such paths and the drain drops and reports them. A failed push stays push_failed until a push succeeds, and the brain-sync row reads the drain's status instead of its exit code. The memory row reads the ingest's failure counts instead of its exit code.

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

trunk-io Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 3 commits November 17, 2026 16:57
…, and report malformed-path drops only once they are dropped

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=testing
Review-Finding: p1/specialist-batched#2 reader=testing
Review-Finding: p1/specialist-batched#3 reader=testing
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…th drops in the sync error guide

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
@capy-ai
capy-ai Bot merged commit bc64f5e into main Nov 17, 2026
77 checks passed
This was referenced Nov 18, 2026
capy-ai Bot added a commit that referenced this pull request Nov 18, 2026
- A test, or a scratch repository in the temp directory, can no longer write approval rows into your real Capy Drive (GST-3027). (#4466)
- An unattended /autoplan run on Claude Code no longer says the publication guard is off while it is on. (#4481)
- A phase report written only in reasoning now gets a denial that says so and names the fix. (#4481)
- `gstack-autoplan revise` no longer refuses a plan that the first `next` accepted. (#4470)
- `revise --plan` with a different file now says the run follows that file. (#4470)
- A second-model plan review in `/autoplan` is no longer reported as unavailable when it actually ran (GST-3051). (#4471)
- The /ship conductor trial plan now lets case reverts that conflict with later code be resolved by hand in docs, tests and the planted file, so large pull requests can be cases (GST-3003). (#4460)
- A locked plan for a trial of /ship without its separate conductor subagent (GST-3003). (#4456)
- A driven /ship now runs each phase as one command, counts its calls, and stops itself at 100 minutes. (#4451)
- /ship stops asking owners to clear two kinds of bookkeeping noise: base-side merge text and a reviewer's confirmation prose. (#4458)
- A base merge that only touched base-side text no longer stops `/ship` finish for an owner's grant. (#4458)
- A reviewer's confirmation prose no longer becomes a Critical finding that only an owner can clear. (#4458)
- A CI run that passed only after its failed jobs were re-run is now marked wherever gstack reuses it. (#4473)
- /ship reuses CI's passing test run when merging the base changed no file, and stops instead of quietly starting hour-long test runs or reviewing an empty diff (GST-3019). (#4461)
- /ship on Codex no longer stops at the test coverage audit. (#4489)
- A cold first-use check before an app build reaches its owner (GST-3025). (#4465)
- `skill_prefix=true` now survives updates when gbrain is installed. (#4454)
- The OpenClaw docs no longer send you to ClawHub, which held only April 2026 builds of office-hours, ceo-review and retro and no longer has gstack skills (the docs also said four skills while listing three). (#4454)
- `gstack-issue-links` no longer reads other repositories' issues as gstack's. (#4454)
- /ship's pre-gate finds the tests of a monorepo app that imports through its own `@/` alias. (#4464)
- /office-hours explains why it recommends a mode. (#4450)
- /office-hours keeps its 34 founder videos and essays out of the skill file. (#4463)
- Two `gstack-owner-answers add` runs for the same answer no longer collide. (#4490)
- A Captain can check an ask against the owner's earlier answers before sending it. (#4467)
- `gstack-post` stops reading /ship's own receipt identifiers as phone numbers, so posting a /ship PR body no longer needs a confirm. (#4488)
- GitHub release notes now list every change in plain words, with a link to its pull request. (#4390)
- gstack's router no longer gives bug reports a special rule, so the model fixes a bug the way it would without gstack. (#4442)
- /ship's review plan now sorts Swift and Xcode files by risk instead of sending every iOS PR to the full review panel (GST-3041). (#4469)
- /ship's review plan now sends Swift code that touches private user data to the full review panel (GST-3052). (#4472)
- A round grant at /ship's review round cap now buys the fix round it names, in the same run or the next (GST-2968). (#4479)
- The secrets check stops flagging three kinds of ordinary code as a secret, and catches two misses. (#4457)
- A security finding's location and reason no longer go into a PR body. (#4486)
- The token-capped /ship child on Claude Code now starts its prompt with the typed `/ship` command, so the skill actually loads. (#4487)
- A /ship receipt now counts the second-model review's blocking findings, and refuses to be written while one is still open. (#4485)
- A `/ship` with a token cap on Claude Code no longer stops at its first handoff. (#4452)
- /ship's push step now always ends with one line that says whether it pushed (GST-3053). (#4474)
- A PR's review-round count can no longer be overwritten by the body `/ship` posts. (#4440)
- One queued record with a malformed path no longer stops artifacts sync for every project. (#4455)
- A failed artifacts push stays reported until a push succeeds. (#4455)
- The /sync-gbrain memory row no longer says OK when pages failed to import. (#4455)
- ### Tests (#4495)
- A policy-floor test no longer fails once gstack's own version reaches the minor after the newest policy key; it now checks a floor above both, so the v1.101.0.0 release can pass CI. (#4495)
- CI now uploads free-suite test results to Trunk with analytics-uploader v2.1.8 and analytics-cli 0.17.0, up from v2.1.6 and 0.16.2. (#4453)
- Packing a checkout for a Ubicloud run no longer fails when git beside it is rewriting a ref. (#4447)
- The /plan-ceo-review HOLD SCOPE eval no longer fails a review because its follow-up question didn't repeat the mode name. (#4447)
- Unattended /autoplan now records the owner's relayed gate reply instead of refusing it. (#4484)
- Unattended /autoplan now runs the second-model review you turned on, and waits for it instead of ending the session. (#4459)
- Two /autoplan runs started in the same second no longer share a run id. (#4459)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant