Files
gbrain/test
f23f964a5c fix(takes): persist think --take rows + review-first take proposals (#2556, #2411)
Takeover of two community PRs, rebased onto master and repaired:

PR #2618 (think --take, fixes #2556): runThink declared `take` but never
consumed it — `--take` silently wrote nothing ("Takes: 0"). Adds
persistThinkTake (anchor-page take append, refuses empty/no-LLM synthesis,
source-scope forwarded to getPage), explicit CLI error when no row is
written, REMOTE_PERSISTED_BLOCKED warning at the trust boundary. Rebased
onto master's thinkSourceScopeOpts (#2739) split.

PR #2418 (takes propose CLI + ops, fixes #2411): implements the documented
`gbrain takes propose list/accept/reject` promotion path (D17) plus
takes_propose_* MCP ops. Repairs from review:
- Source scoping now routes through sourceScopeOpts(ctx) (federated array >
  scalar > nothing, fail-closed) instead of the fail-open
  `ctx.remote ? ctx.sourceId : undefined`; listTakeProposals/accept/reject
  accept sourceIds[].
- takes_propose_accept is localOnly (writes source markdown under
  sync.repo_path — same class as sync; D17 operator-only promotion) and
  both write ops carry mutating: true.
- Rebased onto master's source-resolver-threaded takes dispatcher.

Also corrects the propose-takes.ts D17 doc comment to the shipped syntax
(`takes propose accept <proposal_id>`).

Co-authored-by: javieraldape <javieraldape@users.noreply.github.com>
Co-authored-by: Mr-B-1 <Mr-B-1@users.noreply.github.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 14:58:16 -07:00
..