Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(trust): keep the signal-guarded dream provenance stamp literal (cycle-abort guard); enrichment fallback test breaks only the import transaction

garrytan7f78e1d551eb
diff --git a/scripts/function-size-baseline.tsv b/scripts/function-size-baseline.tsv
index 811781917d..416e052d4a 100644
--- a/scripts/function-size-baseline.tsv
+++ b/scripts/function-size-baseline.tsv
@@ -36,7 +36,7 @@ src/core/cycle/extract-facts.ts runExtractFacts 381 seed: W5 baseline, refactor
src/core/cycle/grade-takes.ts GradeTakesPhase.process 402 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)
src/core/cycle/propose-takes.ts ProposeTakesPhase.process 429 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +2 #5958 (issue #5874): call_timeout_ms read and its per-page bound (phaseBoundedCallTimeout)
src/core/cycle/synthesize-concepts.ts runPhaseSynthesizeConcepts 490 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +4 #5490 review: a narrative a chat_fallback_chain model wrote is hashed under that model so the next cycle re-synthesizes it; +13 fix wave 9 lane P (D-N3): fence-stripped member hash with legacy-hash grandfathering, and the classic write moved to publishClassicConcept (concept-publication.ts); +3 (#5041): opt-in concept write-through hook and the import callback publishClassicConcept runs under the page lock; +6 #4907 (issue #4906): configured budget read, budget-capped counter, summary clause and details.warnings (message text in budgetWarnings); +4 fix wave 11 #6161: concept redirects in grouping and the skipped_deleted pre-check (logic in cycle/concept-redirects.ts); +13 fix wave 12 #6260: a narrative stopped before the end is a counted failure, and the per-member-hash retry bound (state in cycle/concept-retry-bound.ts)
-src/core/cycle/synthesize.ts runPhaseSynthesizeInner 1047 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +3 #5854: publish_pending from postprocess, a pending summary publish deferred instead of failing the phase; +1 fix wave 11 #6160: oneshot_task_prefixes on the child job data
+src/core/cycle/synthesize.ts runPhaseSynthesizeInner 1048 +1 #5575 I2: output refs take their transcript taint before the provenance stamp (the stamp line stays the signal-guarded literal cycle-abort pins); seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +3 #5854: publish_pending from postprocess, a pending summary publish deferred instead of failing the phase; +1 fix wave 11 #6160: oneshot_task_prefixes on the child job data
src/core/facts/backstop.ts runPipelineBodyInner 358 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1)
src/core/import-file.ts importFromContent 666 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +2 wave 8 lane D1 #5158: key-order fallback equality and legacy-hash ordering; lowered to 807 (#5988: screen and sanity config peeled to core/import-screen.ts); +1 #6007: the prepared apply reports its written page and seal (PreparedImportApplied) so put_page skips a re-read and a second seal; +1 #5333: embed-skip transition defeats the unchanged fast paths (the stale-marker clear stays inside the sanity block); +3 #6188: Tier 1 fence step in place before the hidden-row merge (logic in fence-repair/import-step.ts); -146 #5575: content-sanity/write-gate disposition moved to import-screen.ts settleContentDisposition
src/core/minions/handlers/subagent-oneshot.ts runSubagentOneshot 378 seed: W5 baseline, refactor wave 1 (decomposition deferred to wave 2, plan D1); +1 fix wave 9 lane B #4921: the oneshot sub-budget is passed as the call timeoutMs so the 300 s gateway backstop cannot cut it
diff --git a/src/core/cycle/synthesize.ts b/src/core/cycle/synthesize.ts
index 94bb7cc88d..e7671911ea 100644
--- a/src/core/cycle/synthesize.ts
+++ b/src/core/cycle/synthesize.ts
@@ -1169,7 +1169,8 @@ async function runPhaseSynthesizeInner(
}
}
- if (!maintenance) await stampDreamProvenance(engine, await withTranscriptTaint(engine, writtenRefs, worthProcessing, config.meetingTranscriptsDir), summaryDate, opts.signal);
+ if (!maintenance) writtenRefs = await withTranscriptTaint(engine, writtenRefs, worthProcessing, config.meetingTranscriptsDir);
+ if (!maintenance) await stampDreamProvenance(engine, writtenRefs, summaryDate, opts.signal);
// Dual-write: reverse-render each DB row → markdown file.
const reverseWriteCount = maintenance ? (maintenance.binding ? writtenRefs.length : 0)
diff --git a/test/extraction-review.test.ts b/test/extraction-review.test.ts
index 6c245d643d..892a3ccf23 100644
--- a/test/extraction-review.test.ts
+++ b/test/extraction-review.test.ts
@@ -404,11 +404,13 @@ describe('enrichEntity created stubs are retrieval-visible (#3994)', () => {
});
test('pipeline failure: stderr-warns the downgrade, then the unchunked fallback still lands the page', async () => {
- // importFromContent runs inside engine.transaction; the fallback putPage
- // does not. Breaking transaction() forces the fallback arm only.
+ // importFromContent runs inside engine.transaction. The fallback putPage
+ // runs in its own attributed transaction (#5575: write attribution and the
+ // derived trust tier), so only the import's transaction is broken.
+ let transactions = 0;
const failingEngine = new Proxy(engine, {
get(target, prop) {
- if (prop === 'transaction') {
+ if (prop === 'transaction' && transactions++ === 0) {
return async () => { throw new Error('simulated pipeline boom'); };
}
const v = Reflect.get(target, prop, target);