Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
chore(wave18b): lane 3 release notes and shared-file manifest
garrytanc0f169d8ea65
diff --git a/.wave18b/lane3-manifest.md b/.wave18b/lane3-manifest.mdnew file mode 100644index 0000000000..c59abccef5--- /dev/null+++ b/.wave18b/lane3-manifest.md@@ -0,0 +1,33 @@+# Wave 18b lane 3: shared-file manifest++Branch `capy/w18b-lane3`. These are the edits to files other lanes may also touch. The integrator merges these entries into the shared registries and regenerates the generated docs once after merging.++## Registries and generated files++- `src/core/error-registry.ts`: three new codes:+ - `embedding_identity_unqualified` (class `consent`, docs `troubleshooting.md#embedding-identity-unqualified`), 3.4+ - `patterns_min_interval` (class `consent`, fix `gbrain dream --phase patterns` with paid consent, docs `dream-patterns.md#cadence`), 3.2+ - `read_budget_exhausted` (class `caller`, docs `dream-patterns.md#child-read-budget`), 3.2+ - 3.3 reuses the existing `preview_changed` and `invalid_params`.+- `docs/guides/error-codes.md`: regenerated (`bun run build:error-codes`) with the three codes above. The integrator regenerates again after merging.+- `src/commands/doctor/registry.ts`: `embeddingIdentityEntry` registered right after `embeddingEnvOverrideEntry`.+- `src/core/doctor-categories.ts`: category for `embedding_identity_unqualified`.+- Doctor goldens: `test/fixtures/goldens/doctor/json-pglite-degraded.json`, `json-pglite-fresh.json`, `registry-build-checks.json` gain the new check (`GBRAIN_TEST_UPDATE_GOLDENS=1 bun test test/doctor-registry-golden.test.ts test/doctor-json-golden.test.ts`).+- `test/fixtures/goldens/trust/help.txt`: the `--repair-unknown-markers` usage block.+- `scripts/serial-files.tsv`: three R2 rows (mock.module): `test/cycle-patterns-timeline-appends.serial.test.ts`, `test/cycle-patterns-cadence.serial.test.ts`, `test/cycle-patterns-read-budget.serial.test.ts`.+- `src/core/config.ts`: known config keys gain `dream.patterns.min_interval_hours` and `dream.patterns.child_read_budget_kb` (one line).+- `scripts/module-size-limits.tsv`: ceiling bumps for `src/core/config.ts` (+1) and `src/core/cycle.ts` (+2).+- `TODOS.md`: the #6113 P2 free-relabel line now says the doctor check ships and the relabel stays parked.++## Docs edits that may collide++- `docs/architecture/key-files/core-cycle-continued.md` (patterns.ts entry), `core-minions-2.md` (brain-allowlist entry + new read-budget.ts entry), `security.md` (new marker-repair.ts entry), `commands-2-continued.md` (embedding-identity check entry).+- `docs/guides/troubleshooting.md` (`#embedding-identity-unqualified`), `docs/guides/memory-trust.md` (`## Repair unknown markers`), `docs/guides/dream-patterns.md` (settings rows, `## Cadence`, `## Child read budget`, `## Timeline appends`, changelog bullets), `docs/guides/facts-relink.md` (CJK section), `docs/mcp/TOOL_REFERENCE.md` (`appended_unverified` deprecation note).++## Existing-test change++- `test/cycle-patterns-evidence-gate.serial.test.ts`: `beforeEach` sets `dream.patterns.min_interval_hours` to `0`, so the evidence-watermark tests keep testing only the watermark and the new 6 h cadence doesn't mask it. No assertion changed.++## Related TODO the integrator may update++- `TODOS.md` P3 "Transcript budget for dream patterns children (#6236)": 3.2 builds the per-job `get_page` read budget in the subagent tool wrapper (`src/core/minions/tools/read-budget.ts`). A whole-transcript budget is still not built, so lane 3 left the entry open.diff --git a/.wave18b/lane3-release-notes.md b/.wave18b/lane3-release-notes.mdnew file mode 100644index 0000000000..1c314885e8--- /dev/null+++ b/.wave18b/lane3-release-notes.md@@ -0,0 +1,18 @@+# Wave 18b lane 3: release-note material for the integrator++Lane 3 does not touch VERSION, CHANGELOG headers or `BEHAVIOR_CHANGES` `since:` values. The integrator folds these into the wave's CHANGELOG entry and `BEHAVIOR_CHANGES` rows (stamped with the wave's release).++## CHANGELOG bullets (Itemized changes)++- **Dream patterns: timeline appends are quote-verified and counted (#6302).** A patterns child mostly updates existing pattern pages with `add_timeline_entry`. The phase now selects the entries it newly published by write receipt (a committed `persistence_requests` row with outcome `ok`, deduplicated by request id and entry, so replays and skipped re-appends don't count again). It quote-verifies only those entries against this run's reflections. A failing entry moves to `unverified_claims` and its timeline row is removed; earlier verified content on the page is left alone. Those pages get provenance stamps and count in `patterns_written`. New result fields: `details.timeline_appends` and `quote_verify.timeline_appends`. `appended_unverified` is kept as a deprecated alias (TOOL_REFERENCE note) and removed two releases later. Files: `src/core/cycle/patterns.ts`, `test/cycle-patterns-timeline-appends.serial.test.ts`, `docs/guides/dream-patterns.md#timeline-appends`.+- **Dream patterns: in-cycle cadence and a child read budget (#6297).** An in-cycle patterns run (autopilot, bare `gbrain dream`) now waits `dream.patterns.min_interval_hours` (default 6, `0` off) after the partition's last completed run. It skips with `patterns_min_interval` and reports `next_eligible_at`. A direct `gbrain dream --phase patterns` and `--once` aren't held to it. The stamp is per source incarnation, and the external-reflections partition has its own. The patterns child's `get_page` results are now budgeted at `dream.patterns.child_read_budget_kb` (default 200 KB, `0` off). Bytes are counted from the job's own tool-execution ledger, and past the budget a read returns a summary (`truncated: true`, `code: read_budget_exhausted`). Files: `src/core/cycle/patterns-plan.ts`, `src/core/cycle/phase-config-values.ts`, `src/core/minions/tools/read-budget.ts`, `src/core/minions/tools/brain-allowlist.ts`, `src/core/minions/handlers/subagent.ts`, `src/core/cycle.ts`, `src/commands/dream.ts`, `docs/guides/dream-patterns.md#cadence`, `#child-read-budget`.+- **`gbrain trust backfill --repair-unknown-markers` (#6550).** This is a local-CLI repair for pages that an agent edit before v0.60.249.0 stamped with `trust_tier: unknown`, and that a later backfill classified higher. By default it previews: the slug, current marker, stored tier, proposed marker and tier, and the evidence (the first saved version that shows the marker, compared with when the fixed release first ran, and whether the first import had the marker). Pages are split into "consistent with #6550" and "ambiguous", and the preview ends with `Apply with: <exact command>` naming only the consistent pages. Apply needs `--slug` (repeatable) plus `--expect <preview hash>`, and rewrites only the named pages at their previewed revisions: the marker becomes the stored tier (none at owner tiers) and the tier stays. `gbrain trust review` adds a `repair` command to `lower_page` items that an unknown marker caused. Files: `src/core/trust/marker-repair.ts`, `src/core/trust/page-handlers.ts` (`trust_owner_page` mode `repair_marker`, refused for remote requests), `src/core/trust/review.ts`, `src/cli/commands/trust.ts`, `docs/guides/memory-trust.md#repair-unknown-markers`.+- **Doctor `embedding_identity_unqualified` (#6113).** A new check warns when the brain's `embedding_model` config row has no provider prefix, which is a row from an older install that stops managed fact extraction. It prints a copy-paste `gbrain migrate embeddings --to <provider:model> --dry-run`, filled from the configured model (an `inputs` entry only when none is configured), and calls out a model switch when the configured model differs. The free relabel stays parked (TODOS P2). Files: `src/commands/doctor/checks/embedding-identity.ts`, `docs/guides/troubleshooting.md#embedding-identity-unqualified`.+- **Docs: CJK fact subjects (#6620).** The facts guide now says that CJK fact subjects need a literal slug or a delimiter, and that inferring unspaced natural names isn't supported. The brief named `docs/guides/facts.md`, which doesn't exist, so the section is in `docs/guides/facts-relink.md`. A probe in `test/facts-subject-infer.test.ts` pins the documented behavior.++## BEHAVIOR_CHANGES rows (text only; the integrator stamps `since:`)++- 3.1: `Dream patterns now quote-verify the timeline entries a patterns child appends with add_timeline_entry: an entry quoting text that is not in this run's reflections moves to the page's unverified_claims, and appended pages count in patterns_written (new details.timeline_appends). appended_unverified stays as a deprecated alias.`+- 3.2: `In-cycle dream patterns runs (autopilot, bare gbrain dream) now wait dream.patterns.min_interval_hours (default 6) after the last completed run and skip with patterns_min_interval and next_eligible_at; gbrain dream --phase patterns and --once still run at once. A patterns child's get_page results past dream.patterns.child_read_budget_kb (default 200 KB) come back as a short summary (truncated: true, read_budget_exhausted). Set either to 0 to turn it off.`+- 3.3: `New: gbrain trust backfill --repair-unknown-markers previews pages whose trust_tier: unknown marker sits below their stored tier (stamped by agent edits before v0.60.249.0) with the evidence for each, and repairs only the pages you name with --slug and the preview hash (--expect). gbrain trust review shows a repair command on lower_page items that marker caused.`+- 3.4: `gbrain doctor has a new embedding_identity_unqualified check: a brain whose embedding_model row has no provider prefix now warns and names the gbrain migrate embeddings --to <provider:model> --dry-run preview (applying it re-embeds facts and is paid).`