Skip to content

3ngram 1.6.1

Choose a tag to compare

@github-actions github-actions released this 27 Aug 09:58
393e84d

3ngram v1.6.1

Patch: closes the last erasure race on the session-lifecycle surface, and the
release pipeline now publishes the worker image.

Changes

  • Session opens refuse erased accounts (#197). openSession took only the
    session-attach lock and never consulted the account-deletion tombstone, so
    an authenticated /open in flight during erasure could INSERT a fresh
    agent_sessions row — selector, briefed_memories and all — after the
    bulk redaction that is documented as the account's final content write. It
    now takes the account-lifecycle advisory lock in shared mode and
    re-checks the tombstone under it as its first statement, throwing
    AccountDeletedError; REST maps it to 410 account_deleted (previously an
    unmapped 500). Shared mode is the point: opens serialize against erasure,
    never against each other.

    The fix also hoists the heartbeat's shared-lock acquisition above the
    attach lock on the excerpt path — the two locks were requested in opposite
    orders, which would have closed a three-party deadlock cycle the moment an
    erasure queued its exclusive request between them. Excerpt-free heartbeats
    still take no account-lifecycle lock.

  • Worker image published per release (#200). ghcr.io/b3dmar/3ngram-worker
    now ships alongside the server image with the same supply chain: amd64+arm64
    Trivy scans, max-mode provenance, SBOM, registry-pushed attestation, and an
    anonymous-pull verification. The @3ngram/worker npm package stays private;
    the image is the only published artifact. Worker identity labels are
    asserted at publish time so the image carries its own OCI title/description
    rather than the server's.

  • Worker deployment documented — docs/operate.mdx topology grows to four
    portable pieces, docs/container-image.mdx gains the worker-image section
    (env contract including the non-obvious production OAUTH_JWKS requirement,
    tracked for relaxation in #204; PID-only liveness caveats), and the
    SESSION_CLOSER_ENABLED kill switch is exposed in both env templates.

No migrations. Schema head stays at 0036_triage_armed_at. Both triage
mechanisms (SESSION_CLOSER_ENABLED, THREENGRAM_STOP_NUDGE) remain
default-off pending the #166 validation bar.

Immutable container reference

ghcr.io/b3dmar/3ngram@sha256:49e5320a27d5dc7641f7969d44a1f1589edfb8c70ffac5efa67db01949921e3e