Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
Merge remote-tracking branch 'origin/capy/6712-pr4b' into capy/6712-pr4b-gate-e
garrytan38d188ff4871
diff --cc src/core/persistence/sync-fault-class.tsindex a826b8099f,545784afe8..b797db2d5c--- a/src/core/persistence/sync-fault-class.ts+++ b/src/core/persistence/sync-fault-class.ts@@@ -78,9 -78,12 +78,15 @@@ export const SYNC_FAULT_TABLE: Readonly// #6712 PR 4b (design v3.2 §3.1): a live pass settled the path three passes in a row and it never classified settled; a gbrain bug or an environment fault, never a loop.{ code: 'settle_mismatch', class: 'page', safe_actions: ['none'], needs_human: true, escalate: 'always: the pass cannot tell why the path does not settle',human_reason: 'Sync settled this file three passes in a row but it never read settled afterwards; read gbrain doctor --json and gbrain sources writer status <source> (read-only), fix what they name, then run gbrain sources retry-held <source> to re-test it.' },+ // GBRA-130 A-6: one path's write failed the same unclassifiable way on repeated attempts; held so the rest of the source moves.+ { code: 'page_write_failed', class: 'page', safe_actions: ['upgrade'], needs_human: true, escalate: 'always: the writer cannot place the failure',+ human_reason: 'The write of this file keeps failing with an error gbrain cannot classify (an owner exception or an unplaced refusal); read its receipt (gbrain write-request <request_id>), report it with the gbrain version or fix the file when the error names its content, then run gbrain sources retry-held <source>.' },+ // #6948: several live pages record the file as their origin; the sync-time heal resolves verified duplicates, a person decides the rest.+ { code: 'origin_conflict', class: 'page', safe_actions: ['repair'], needs_human: false, escalate: 'the hold carries a reason (the pages differ, ids conflict or none is the page the path names), or the heal is off',+ human_reason: 'Several live pages record this file as their origin and sync cannot prove they are one document; a person keeps the page that is the file\'s and soft-deletes the others (gbrain repair origin-twins --source <source> lists them with the commands), then syncs.' },+ // #6948: an `origin_conflict` hold whose verdict carries a reason (sync-status.ts holdVerdict): nothing resolves it without a person.+ { code: 'origin_conflict_decision', class: 'page', safe_actions: ['none'], needs_human: true, escalate: 'always: the pages differ, their ids conflict or none is the page the path names',+ human_reason: 'Several live pages record this file as their origin and sync cannot prove they are one document; a person keeps the page that is the file\'s and soft-deletes the others (gbrain repair origin-twins --source <source> lists them with the commands), then syncs.' },// Older releases recorded these as run failures; a rerun on this release holds the page instead.{ code: 'revision_conflict', class: 'page', safe_actions: ['retry'], needs_human: false, escalate: 'the same path fails again after a rerun' },{ code: 'page_identity_changed', class: 'page', safe_actions: ['retry'], needs_human: false, escalate: 'the same path fails again after a rerun' },diff --cc src/core/persistence/sync-holds.tsindex 57aeb2011f,2553baab48..7891fa2df1--- a/src/core/persistence/sync-holds.ts+++ b/src/core/persistence/sync-holds.ts@@@ -69,13 -70,9 +70,13 @@@ export const GIT_HOLD_ESCALATE_MIN_SCREtype Exec = Pick<BrainEngine, 'executeRaw'>;export type GitHoldCode = ContentRefusal['code'] | 'rename_held' | 'parser_regression' | 'managed_image_sync_unsupported' | 'concurrent_write' | 'preparation_stalled' | 'worktree_dirty' | 'file_drift'- | 'legacy_slug_conflict'+ | 'legacy_slug_conflict' | 'origin_conflict'/** #6712 PR 4b (design v3.2 §3.1): a path a live pass settled in three consecutive passes at one level that never classified settled. */- | 'settle_mismatch';+ | 'settle_mismatch'+ /** GBRA-130 A-6: the path's write failed the same unclassifiable way (an owner exception, an unplaced refusal) on repeated attempts. */+ | 'page_write_failed';+/** GBRA-130 A-6: the fault a `page_write_failed` hold stands for (identifiers and classes only, never content). */+export interface PageWriteFailureMeta { code: string; origin: string | null; error_class: string | null; errno: string | null; request_id: string; attempts: number; gbrain_version: string }/** #6278: what the owner recorded about a preparation it gave up on (step names and vocabulary only, never content). */export interface PreparationStallMeta {request_id: string;