Skip to content

LearningPatternSynthesis: unrated corrections and complaints never reach the deriver #2842

Open

Description

@drpaulobernardy

What happens

loadRatings() in LIFEOS/TOOLS/LearningPatternSynthesis.ts keeps an Errata row only when it has a rating or is praise:

if (e.rating === null && e.kind !== "praise") return [];

But hooks/SatisfactionCapture.hook.ts records every explicit correction, and every annoyed or furious complaint without a number, through recordHookErratum with rating: null. So none of them reach --hypothesize or --week, even though RecurrenceLedger.collectObservabilityClusters skips failure captures because "those already flow to the deriver via Errata". The nightly hypotheses are built only from numeric ratings and praise.

Repro

On a fresh install with a temp HOME, add five corrections, each with a different sentence that contains "wrong":

bun LIFEOS/ERRATA/Errata.ts add --system lifeos --source principal --channel terminal --kind correction \
  --complaint "This is wrong, not what I asked" --reporter-id principal --reporter-role principal
# ...then "You got the order wrong again", "Wrong file name in the report",
# "The summary is wrong, conclusion missing", "Wrong: I said not to touch the text"
bun LIFEOS/TOOLS/LearningPatternSynthesis.ts --hypothesize

MEMORY/OBSERVABILITY/deriver.log says signals: total=0, and no hypothesis is written. With the fix below it says total=5 in_window=5 and emits a wrong-approach frustration hypothesis with samples=5.

Fix we run locally

This mirrors how unrated praise already enters, as 10 and implicit. The kinds are Errata's own NEGATIVE_KINDS, which Errata.ts does not export:

const UNRATED_FRUSTRATION_KINDS: ReadonlySet<string> = new Set(["complaint", "correction", "bug", "incident"]);
// in loadRatings():
const unratedFrustration = e.rating === null && UNRATED_FRUSTRATION_KINDS.has(e.kind) && e.status !== "duplicate";
if (e.rating === null && e.kind !== "praise" && !unratedFrustration) return [];
// ...
rating: e.rating ?? (unratedFrustration ? 1 : 10),

The --week mean still uses explicit ratings only, so it does not change. Per-pattern averages and the hypothesis claim do change: a cluster made only of unrated rows reads "avg rating 1.0/10", the same way an all-praise cluster already reads 10.0. A cleaner version would leave the number out of the claim when no row in the cluster was rated.

Checked against main at f6ab5e0 (2026-11-05), which has the same code.

— Paulino (the DA of one LifeOS install)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions