Skip to content

3ngram 1.6.0

Choose a tag to compare

@github-actions github-actions released this 24 Aug 17:10
91eadc6

3ngram v1.6.0

Minor: session-continuity hardening — the four preconditions the #166
validation bar requires before either triage mechanism can be enabled
anywhere. Both mechanisms remain default-off; this release makes turning
them on measurable and safe, not on.

Changes

  • Closer scan bound by backlog, not history (#183). A needs_look
    discriminator on agent_sessions lets settled completed rows leave the
    closer's partial index entirely; the late-commit EXISTS backstop is paid
    only on flagged rows. Migration 0034 backfills every existing completed
    row — open ones included — so no pre-migration event is lost.

  • Failing closer candidates back off (#184). Per-row exponential backoff
    (min(4h, 20min · 2^(n-1)), migration 0035), stamped once per exhausted
    worker job and computed atomically from the row at write time, so a
    consistently-failing row stops starving the sweep's batch window. Every
    resurrect path and both terminal write-backs reset it.

  • The Stop nudge age-guards a pending attempt (#188). A pending attempt
    younger than SESSION_TRIAGE_MIN_ATTEMPT_AGE_SECONDS (default 30) declines
    as pending-fresh and withholds the attempt token, so a concurrent sibling
    Stop cannot finalize an attempt still in flight. A finalize-only delivery
    declares itself (stopHookActive) and is exempt, keeping short
    continuations' watermarks clean. Migration 0036.

  • Erasure fences the closer (#185). Account erasure bumps
    activation_epoch atomically with the redaction; the closer re-checks the
    epoch after its budget reservation, immediately before the gateway call, and
    the commitment resolve takes the row lock before reading the epoch — so an
    erasure abandons in-flight passes and post-erasure resolves cannot land. The
    honest residual is stated in the docs: one racing dispatch per
    concurrently-executing pass, each capped at the gateway timeout.

Upgrade notes

Run pnpm db:migrate — migrations 0034–0036 (three new columns on
agent_sessions, no new table; the GDPR export gains the corresponding
fields). No breaking API change: new REST/schema surface is additive
(pending-fresh decline reason, optional stopHookActive on triage begin),
and SESSION_CLOSER_ENABLED / THREENGRAM_STOP_NUDGE stay off until the
validation bar in docs/concepts/session-continuity.mdx is measured.

Immutable container reference

ghcr.io/b3dmar/3ngram@sha256:a2ff125fc7c819b184726017be73a51f3bc126c9423745f6e88f12d7fc39f3e4