Skip to content

Fix three nightly flakes and five small bugs, three from outside reports (GBRA-633) - #9710

Merged
capy-ai[bot] merged 37 commits into
masterfrom
capy/gbra-633-small-fix-wave
Nov 18, 2026
Merged

capy-ai[bot] merged 37 commits into
masterfrom
capy/gbra-633-small-fix-wave

Conversation

@garrytan

@garrytan garrytan commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Fixes three tests that turned the nightly red on busy runners (#6040) and five small bugs, three of them from outside reports, each rebuilt on master with a test that fails first.
Why: a green nightly, and outside reports with a real repro fixed quickly.
Nothing to do: no settings, defaults, migrations, CLI flags or MCP fields change.

What changed

Details

Nightly flakes (#6040)

  • The stdio boot-deadline tests in test/serve-stdio-lifecycle.test.ts drive a manual clock through a new optional bootClock in serve's options, so a stalled runner can't push a phase past its window. Failed 2/2 with an 80 ms stall before, passes after.
  • test/pathological/s-notifier-residents.test.ts gives the first owner a 60 s heartbeat where it checks ownership, so one late renewal no longer hands the lease to the second resident. Failed with a 700 ms renewal delay before, passes after.
  • A held fact move's planning reads now stop at the move's deadline while they wait for a pool connection, too. With the pool held by queued config reads the plan took 5015 ms against a 4000 ms limit, the same as the nightly's 5012 ms; it now ends inside the bound, and the test's bound is unchanged.

Our fixes

  • bun run regen:all now rewrites the doctor hot-checks golden, and a test checks that every golden only a Postgres E2E file writes is listed.
  • gbrain auth rescope shows the hint about --read-shared on only when shared reads were off before and after and the key still reads a source.

Outside reports, rebuilt from the report text

Supersedes #9697
Supersedes #9685
Supersedes #9639

Why

Details

The nightly (#6040) failed on timing, not on product bugs: two tests measured wall-clock time and one bound raced a saturated pool. Each fix was proven with a forced probe that fails before and passes after. The outside fixes are small, have a repro on master, and change no defaults.

Blast radius

Details
Fix Outside PR Read as What it touches Network, secrets, spawn, CI, deps Verdict
#9696 #9697 text only, rebuilt error classification of a 4xx body none safe
#9683 #9685 text only, rebuilt one read-only SQL query (indexable @>), CLI wording none safe
#9636 #9639 text only, rebuilt one read-only SQL guard before a decision insert none safe

Runtime code: serve.ts (test-only clock seam, default unchanged), held-fact-move.ts (planning read bound), synopsis-sweep.ts, reindex-synopsis.ts, ai/errors.ts, chronicle/ledger.ts, auth-read-shared.ts. No migration, no config key, no new error code.

Documentation

Status: current, no documentation edits needed.

Scope: 20 selected files (19 committed, 1 staged changelog fragment) on capy/gbra-633-small-fix-wave against master a37d6f7. Changes covered: the synopsis reindex honoring trusted page frontmatter (#9683), Ollama connection-refused errors now retryable (#9696), add_link Chronicle decisions only when an automatic extraction is pending (#9636), the auth rescope shared-read hint, the held-move planning deadline covering the wait for a pool connection, regen:all regenerating the doctor hot-checks golden, and test-only clock seams.

Documentation health:

  • test/fixtures/goldens/README.md: Current (it already documents the doctor hot-checks Postgres golden).
  • docs/TESTING.md: Current (the regen:all row is still accurate).
  • docs/ENGINES.md: Current (the serve boot timeout behavior is unchanged).
  • docs/operations/backfill-pacing.md: Current.
  • docs/architecture/key-files/core-persistence-facts.md: Current.
  • skills/migrations/v0.40.3.0.md: Current (the reindex --synopsis flow is unchanged).
  • CONTRIBUTING.md: Current.

Coverage debt: the per-page contextual_retrieval: per_chunk_synopsis frontmatter override has no dedicated user doc. This gap existed before this change. Diagram drift: none.

Dropped
Agent notes

Refs #9636
Refs #9639
Refs #9681
Refs #9683
Refs #9685
Refs #9692
Refs #9693
Refs #9696
Refs #9697

Thread GBRA-633. /ship review: pass 1 full panel (specialists, red team) found 1 blocking issue (#9692, dropped) and 3 informational ones (2 fixed: indexable frontmatter predicate, one deadline signal per held-move view; 1 noted: doctor's synopsis_tier_coverage still ignores the frontmatter-only tier). Pass 2 on the fix range, then the voices (native adversarial, second-model review, targeted money/auth): no blocking findings. The second-model review flagged the #9692 revert as removing managed restores; that is master's behaviour, so it is not a regression. Documentation audit: current.
The full Test and E2E runs passed at 582bb58 (tree 7f73e585, the same tree as this head). The /ship lanes and the remote gate carry from them; macOS validation run 44289986913 passed at this head.

Agent notes
{
  "schema_version": 1,
  "pr": 9710,
  "head": "fe53f950e0f0e1399c8308f6f3a1a9d1183a4d98",
  "version": "0.60.740.0",
  "base": "master",
  "gate": {
    "unit": {
      "pass": 5663,
      "fail": 0,
      "skip": 0
    },
    "serial": {
      "pass": 477,
      "fail": 0,
      "skip": 0
    },
    "slow": {
      "pass": 62,
      "fail": 0,
      "skip": 0
    },
    "e2e": {
      "pass": 946,
      "fail": 0,
      "skip": 0
    }
  },
  "ci_carried": [
    {
      "lane": "unit",
      "run": 44285446325,
      "attempt": 1,
      "tree": "7f73e585167a526b3db7200597e7df0c73c727ae"
    },
    {
      "lane": "serial",
      "run": 44285446325,
      "attempt": 1,
      "tree": "7f73e585167a526b3db7200597e7df0c73c727ae"
    },
    {
      "lane": "slow",
      "run": 44285446325,
      "attempt": 1,
      "tree": "7f73e585167a526b3db7200597e7df0c73c727ae"
    },
    {
      "lane": "e2e",
      "run": 44285446325,
      "attempt": 1,
      "tree": "7f73e585167a526b3db7200597e7df0c73c727ae"
    },
    {
      "lane": "e2e",
      "run": 44285451438,
      "attempt": 1,
      "tree": "7f73e585167a526b3db7200597e7df0c73c727ae"
    }
  ],
  "calls": 52,
  "session_kind": "unattended",
  "run": "ship633",
  "head_tree": "7f73e585167a526b3db7200597e7df0c73c727ae",
  "product_patch_id": "4e583fae72b4539c97f40d5d46951bc72ff4a453",
  "gstack_version": "1.100.0.0",
  "review_depth": {
    "depth": "full",
    "class": "gate",
    "runtime_lines": 80,
    "rules": "1afa38a4be3b5eef",
    "base": "4b5505ee637e1b68b97d435a8e9bca07cc3e00bf",
    "registry": "4b5505ee637e1b68b97d435a8e9bca07cc3e00bf",
    "gate_scan": {
      "tagged": 0,
      "head": "fe53f950e0f0e1399c8308f6f3a1a9d1183a4d98"
    },
    "reasons": [
      "gate-class",
      "risk:money",
      "risk:auth",
      "runtime=80"
    ],
    "risk": [
      "money",
      "auth"
    ],
    "mode": "panel"
  },
  "pregate": "requires-remote cleared @7f73e585167a (8 checks, current for fe53f950e0f0)",
  "requires_remote": [
    "macos-validation.yml/macos-26: run tree=7f73e585167a tests=2 runs=44289986913/1 profiles=macos-validation.yml/macos-26 heads=fe53f950e0f0 verified=2026-11-18T11:08:45.225Z",
    "native-locks.yml/native: run tree=7f73e585167a tests=72595 runs=44285446325/1 profiles=native-locks.yml/native heads=582bb58f4c24 verified=2026-11-18T10:56:55.211Z",
    "pregate.json/remote_gate: remote-gate tree=7f73e585167a tests=81451 receipt=/home/user/.capy/work/ship633/gate2.log sha256=d29d654e4051"
  ],
  "issues": {
    "fixes": [],
    "refs": [
      9636,
      9639,
      9681,
      9683,
      9685,
      9692,
      9693,
      9696,
      9697
    ],
    "flakes": []
  },
  "docs": {
    "status": "current",
    "scope": "docs/, skills/, README.md, AGENTS.md, CLAUDE.md against master a37d6f74"
  },
  "review_loop": {
    "passes": 2,
    "blocking_found": 1,
    "deferred": 0,
    "noted": 2,
    "fixed": 3,
    "scope": "frozen",
    "rounds": 2,
    "dispatches": {
      "specialist": 6,
      "red-team": 2
    }
  },
  "gate_dispositions": [],
  "review_targeted": {
    "classes": [
      "money",
      "auth"
    ],
    "rules": "23eb808423669ba0",
    "brief_sha": "7f92a0d0a8319c3c0e076fb3b1a4689c45120b2be2c14dfc7d4cb03aafa9d6a5",
    "product_patch_id": "4e583fae72b4539c97f40d5d46951bc72ff4a453",
    "status": "done",
    "findings": 0,
    "raised_by": "targeted"
  },
  "review_exclude": {
    "source": "origin/master@4b5505ee637e",
    "patterns": [
      "docs/**",
      "test/fixtures/goldens/**"
    ],
    "applied": [],
    "excluded": 0,
    "excluded_bytes": 0,
    "kept": 0,
    "gate_tagged": [],
    "patterns_sha256": "19818beb6b21b5c9a857948db2c3d8bbc2aa719704441fc5d045f98f4573f354",
    "list_sha256": "58d496709dc81f0053419b834fdb12657262a221009af9f9eb2e379a525acadb",
    "digest": "e4528569cad65af4f1115097fe9a56f2e5f9f0c2dd57ae22dc3ab553cf5aa184"
  }
}

garrytan and others added 29 commits November 17, 2026 23:19
…e proposal (GST-2904)

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

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

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…d the stress gate's shard-limit error names its own reason

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
An already-removed full-ci label (HTTP 404) no longer turns the dispatch job red after both full runs were dispatched; any other removal error still fails it.

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/adversarial-native#1 reader=adversarial-native
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>
… written (#9681)

A managed connector save of the sync position is staged with the page writes it covers and publishes once they commit, so a sweep that outlives its wait budget keeps its progress. Reported by @PropFunderBrett (#9681).

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…lled-walk test wait for batch two

A Gmail backfill that banks a later position no longer drops the freshness an earlier, superseded save carried, so the source stops looking stale once its writes are durable. The killed-walk test now ends batch three only after batch two's page writes commit, so a slow runner cannot leave the floor at batch one.

Review-Finding: p1/red-team#3 reader=red-team
Review-Finding: p1/specialist-batched#1 reader=specialist-batched
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ing held in flight

When a run reaches the same position as a still-pending save that an earlier, killed run admitted, it no longer adopts that save as its own. Its later page writes would carry the old cursor and be refused once the other run's save published. The run stops as it did before #9681, and the next run resumes once that save commits.

Review-Finding: p1/red-team#1 reader=red-team
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A run now lists the unfinished page writes it inherited from an earlier run beside its own when it stages a cursor save. If one of those writes fails, the cursor stays behind it instead of moving past content that never landed.

Review-Finding: p1/outside-voice#1 reader=outside-voice
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…ss (#9681)

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The manifest takes each job at its newest attempt, marks files that passed only on the re-run, and tree.json lists every file with rerun_files; a re-run pass never clears a failure.

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>
…quest ids (#9681)

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>
The stdio boot-deadline tests measured real wall time, so a stalled CI runner could push a phase past its window and fail them. serve now takes an optional boot clock in its options (default: Date.now and unref'd timers), and the three window tests drive it by hand. Fails 2/2 with an 80 ms stall before, passes after.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The owner's lease was two 200 ms heartbeats, so one late renewal on a busy runner handed it to the second resident and the test saw the wrong owner. The test that checks ownership now gives the first owner a 60 s heartbeat. Fails with a 700 ms renewal delay before, passes after.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A held move's planning reads waited without a bound for a pool connection, so reads queued on the same config lock could hold it past its deadline (5015 ms against a 4000 ms limit, as in the nightly). The reads now carry an abort signal for the remaining time and a timeout maps to the existing preparation-deadline error. The test saturates the pool before timing; its bound is unchanged.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
test/e2e/doctor-hot-checks-golden.test.ts writes a golden that regen:all never regenerated, so it went stale silently. It is now in the Postgres goldens list, and a test checks that every golden only a Postgres E2E file writes is listed.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
The hint about turning shared-source reads back on printed for every narrowing, including one that set --read-shared off on purpose. It now shows only when shared reads were off before and after and the token still reads some source.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
On a managed brain, `gbrain repair generations --kind consolidation --mode restore` refused every cluster, because the adapter asked for the managed page-write path although a consolidation restore only touches database rows. The adapter is now database-only and locks the entity page each cluster belongs to.

Reported by @lloydsilvertwo; first fixed by @Masashi-Ono0611 in #9693.

Co-Authored-By: Masashi-Ono0611 <98894508+Masashi-Ono0611@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Ollama answers 4xx with "connection refused" when its model runner is down, and gbrain treated that as a permanent error. That body is now a transient error, so callers retry.

Reported by @benswinney; first fixed by @Masashi-Ono0611 in #9697.

Co-Authored-By: Masashi-Ono0611 <98894508+Masashi-Ono0611@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
A trusted page with `contextual_retrieval: per_chunk_synopsis` in its frontmatter is on the synopsis tier, but the sweep only counted the global tier and source rows, so it said "Nothing to do". The sweep now counts such pages, and the reindex output names page frontmatter as the tier's source.

Reported and first fixed by @Masashi-Ono0611 in #9685.

Co-Authored-By: Masashi-Ono0611 <98894508+Masashi-Ono0611@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
…uto row (#9636)

On a managed brain, add_link recorded a Chronicle decision even when no automatic extraction was pending for the page. It now records one only when a pending automatic row for the current extractor exists.

Reported by @frxiaobei; first fixed by @Masashi-Ono0611 in #9639.

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

trunk-io Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

😎 This pull request was merged.

garrytan and others added 4 commits November 18, 2026 09:10
Drop the #9692 consolidation restore from this wave: on a managed brain a consolidate closes fenced members in the entity page's facts fence, and a database-only restore would reopen them in the database while the page still holds them closed. Managed restores keep refusing, as before. The synopsis frontmatter check uses the indexable containment form, and a held move's planning reads share one deadline signal.

Review-Finding: p1/red-team#1 reader=red-team
Review-Finding: p1/red-team#2 reader=red-team
Review-Finding: p1/red-team#3 reader=red-team
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>
@capy-ai capy-ai Bot changed the title Fix three nightly flakes and six small bugs, four from outside reports (GBRA-633) Fix three nightly flakes and five small bugs, three from outside reports (GBRA-633) Nov 18, 2026
@capy-ai capy-ai Bot mentioned this pull request Nov 18, 2026
@capy-ai
capy-ai Bot marked this pull request as ready for review November 18, 2026 10:25
@capy-ai capy-ai Bot added the full-ci Maintainer-only: run the full Test and E2E suite on this PR head label Nov 18, 2026
@github-actions github-actions Bot removed the full-ci Maintainer-only: run the full Test and E2E suite on this PR head label Nov 18, 2026
garrytan added a commit that referenced this pull request Nov 18, 2026
@capy-ai
capy-ai Bot merged commit 4fb1613 into master Nov 18, 2026
56 checks passed
garrytan added a commit that referenced this pull request Nov 18, 2026
garrytan pushed a commit that referenced this pull request Nov 18, 2026
…9707, small-fix wave #9710) into rust-store

The three new BrainEngine members (listIdentityDecisions, listRestrictedIdentityMembers,
applyIdentityDecisions) are classified 'pages' in the Rust member table and refuse with a
typed engine_capability_missing; the pages capability was already unreported. Goldens,
coverage table and module-size ceilings re-summed at the merge.
capy-ai Bot added a commit that referenced this pull request Nov 19, 2026
Publishes gbrain v0.60.741.0 from master e50f391, folding the 12 changelog fragments landed since v0.60.740.0.
In it: embedding_disabled stops every route that still sent text to the embedding provider, including reindex work already queued or running (#9723, #9754); the Mac helper can send a one-to-one iMessage for the owner's agent, with nothing installed by upgrading and sending off until the owner turns it on (#9729); duplicate people and companies can be confirmed or rejected (#9701, #9732); the owner's remote credential reads what the local CLI reads (#9707); calls imported before attendee scoping can be fixed with a preview (#9679); the Rust storage engine ships as a library that nothing selects yet (#9688, #9731); plus two small-fix waves (#9710, #9724).
This commit changes only version files, CHANGELOG.md, the upgrade-notice rows and their generated table, and removes the folded fragments.

Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: garrytan <garrytan@gmail.com>
@capy-ai
capy-ai Bot deleted the capy/gbra-633-small-fix-wave branch November 21, 2026 17:14
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